Commit abcabb9e authored by Huang Pei's avatar Huang Pei Committed by Thomas Bogendoerfer
Browse files

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: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarHuang Pei <huangpei@loongson.cn>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent dd3c33cc
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2007,6 +2007,12 @@ unsigned long vi_handlers[64];

void reserve_exception_space(phys_addr_t addr, unsigned long size)
{
	/*
	 * reserve exception space on CPUs other than CPU0
	 * is too late, since memblock is unavailable when APs
	 * up
	 */
	if (smp_processor_id() == 0)
		memblock_reserve(addr, size);
}