Skip to content

Commit abcabb9

Browse files
mips-hptsbogend
authored andcommitted
MIPS: reserve exception vector space ONLY ONCE
"cpu_probe" is called both by BP and APs, but reserving exception vector (like 0x0-0x1000) called by "cpu_probe" need once and calling on APs is too late since memblock is unavailable at that time. So, reserve exception vector ONLY by BP. Suggested-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Huang Pei <huangpei@loongson.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent dd3c33c commit abcabb9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

arch/mips/kernel/traps.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,13 @@ unsigned long vi_handlers[64];
20072007

20082008
void reserve_exception_space(phys_addr_t addr, unsigned long size)
20092009
{
2010-
memblock_reserve(addr, size);
2010+
/*
2011+
* reserve exception space on CPUs other than CPU0
2012+
* is too late, since memblock is unavailable when APs
2013+
* up
2014+
*/
2015+
if (smp_processor_id() == 0)
2016+
memblock_reserve(addr, size);
20112017
}
20122018

20132019
void __init *set_except_vector(int n, void *addr)

0 commit comments

Comments
 (0)