Skip to content

Commit 0075df2

Browse files
rpptgroeck
authored andcommitted
microblaze: don't treat zero reserved memory regions as error
Before commit 721f4a6 ("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. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mike Rapoport <rppt@kernel.org> Reviewed-by: Wei Yang <richard.weiyang@gmail.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20240729053327.4091459-1-rppt@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 5be63fc commit 0075df2

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

arch/microblaze/mm/init.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,6 @@ asmlinkage void __init mmu_init(void)
193193
{
194194
unsigned int kstart, ksize;
195195

196-
if (!memblock.reserved.cnt) {
197-
pr_emerg("Error memory count\n");
198-
machine_restart(NULL);
199-
}
200-
201196
if ((u32) memblock.memory.regions[0].size < 0x400000) {
202197
pr_emerg("Memory must be greater than 4MB\n");
203198
machine_restart(NULL);

0 commit comments

Comments
 (0)