[PATCH 2/3] MIPS: loongson64: fix booting failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Inappropriate memblock_reserve cause loongson64 booting failed with
CONFIG_DEFERRED_STRUCT_PAGE_INIT like this:
----------------------------------------------------------------------
 Call Trace:
 [<ffffffff8235d088>] reserve_bootmem_region+0xa8/0x184
 [<ffffffff82333940>] memblock_free_all+0x104/0x2a8
 [<ffffffff8231d8e4>] mem_init+0x84/0x94
 [<ffffffff82330958>] mm_core_init+0xf8/0x308
 [<ffffffff82318c38>] start_kernel+0x43c/0x86c

 Code: 10400028  2402fff0  de420000 <dc432880> 0203182b 14600022
 64420070  00003025  24040003

 ---[ end trace 0000000000000000 ]---
 Kernel panic - not syncing: Attempted to kill the idle task!
 ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
----------------------------------------------------------------------

The root cause is no memory region "0x0-0x1fffff" paired with
memory-reserved region "0x0-0x1fffff" and "0x0-0xfff", with "memblock
=debug":

----------------------------------------------------------------------
  memory[0x0]     [0x0000000000200000-0x000000000effffff],
  0x000000000ee00000 bytes on node 0 flags: 0x0 !!!!here
  memory[0x1]     [0x0000000090000000-0x00000000fdffffff],
  0x000000006e000000 bytes on node 0 flags: 0x0
  memory[0x2]     [0x0000000100000000-0x000000027fffffff],
  0x0000000180000000 bytes on node 0 flags: 0x0
  memory[0x3]     [0x0000100000000000-0x000010000fffffff],
  0x0000000010000000 bytes on node 1 flags: 0x0
  memory[0x4]     [0x0000100090000000-0x000010027fffffff],
  0x00000001f0000000 bytes on node 1 flags: 0x0
  reserved.cnt  = 0x1f
  reserved[0x0]   [0x0000000000000000-0x000000000190c80a],
  0x000000000190c80b bytes flags: 0x0 !!!!oops 0x0-0x1fffff not in memory[0]
  reserved[0x1]   [0x000000000190c810-0x000000000190eea3],
  0x0000000000002694 bytes flags: 0x0
----------------------------------------------------------------------

To fix this bug, we should remove unnecessary memory block reservation.

Fixes: commit 61167ad5fecd("mm: pass nid to reserve_bootmem_region())
Signed-off-by: Huang Pei <huangpei@xxxxxxxxxxx>
---
 arch/mips/loongson64/numa.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/mips/loongson64/numa.c b/arch/mips/loongson64/numa.c
index 8f61e93c0c5b..9b4ce40c1d40 100644
--- a/arch/mips/loongson64/numa.c
+++ b/arch/mips/loongson64/numa.c
@@ -129,9 +129,6 @@ static void __init node_mem_init(unsigned int node)
 		if (node_end_pfn(0) >= (0xffffffff >> PAGE_SHIFT))
 			memblock_reserve((node_addrspace_offset | 0xfe000000),
 					 32 << 20);
-
-		/* Reserve pfn range 0~node[0]->node_start_pfn */
-		memblock_reserve(0, PAGE_SIZE * start_pfn);
 	}
 }
 
-- 
2.30.2





[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux