microblaze: don't treat zero reserved memory regions as error
PATCH 1/1 microblaze: don't treat zero reserved memory regions as error
Before commit 721f4a6526da ("mm/memblock: remove empty dummy entry") the check for non-zero of memblock.reserved.cnt in mmu_init() would always be true either because memblock.reserved.cnt is initialized to 1 or because there were memory reservations earlier.
The removal of dummy empty entry in memblock caused this check to fail because now memblock.reserved.cnt is initialized to 0.
Remove the check for non-zero of memblock.reserved.cnt because it's perfectly fine to have an empty memblock.reserved array that early in boot.
---
Looks like it fell between the cracks.
arch/microblaze/mm/init.c | 5 ----- 1 file changed, 5 deletions(-)
arch/microblaze/mm/init.c +0 -5
@@ -193,11 +193,6 @@ asmlinkage void __init mmu_init(void) {unsigned int kstart, ksize; -if (!memblock.reserved.cnt) { -pr_emerg ("Error memory count\n" ); -machine_restart (NULL ); - } -if ((u32 ) memblock.memory.regions[0 ].size <0x400000 ) {pr_emerg ("Memory must be greater than 4MB\n" );machine_restart (NULL );
base-commit: dc1c8034e31b14a2e5e212104ec508aec44ce1b9
Signature · 1 line
2.43.0
po 29. 7. 2024 v 7:33 odesílatel Mike Rapoport <[email protected]> napsal:
Quoted 41 lines
Before commit
721f4a6526da("mm/memblock: remove empty dummy entry") the check for non-zero of memblock.reserved.cnt inmmu_init()would always be true either because memblock.reserved.cnt is initialized to 1 or because there were memory reservations earlier.The removal of dummy empty entry in memblock caused this check to fail because now memblock.reserved.cnt is initialized to 0.
Remove the check for non-zero of memblock.reserved.cnt because it's perfectly fine to have an empty memblock.reserved array that early in boot.
Reported-by Guenter Roeck <[email protected]>Signed-off-by Mike Rapoport <[email protected]>Reviewed-by Wei Yang <[email protected]>Tested-by Guenter Roeck <[email protected]>---
Looks like it fell between the cracks.
arch/microblaze/mm/init.c | 5 ----- 1 file changed, 5 deletions(-)arch/microblaze/mm/init.c +0
-5@@ -193,11 +193,6 @@ asmlinkage void __init mmu_init(void) {unsigned int kstart, ksize; -if (!memblock.reserved.cnt) { -pr_emerg ("Error memory count\n" ); -machine_restart (NULL ); - } -if ((u32 ) memblock.memory.regions[0 ].size <0x400000 ) {pr_emerg ("Memory must be greater than 4MB\n" );machine_restart (NULL );
Quoted 4 lines
base-commit:
dc1c8034e31b14a2e5e212104ec508aec44ce1b9--
2.43.0
Applied.
M
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs