Searched hist:f761622e59433130bc33ad086ce219feee9eb961 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/arch/powerpc/kernel/ |
H A D | head_64.S | diff 54a834043314c257210db2a9d59f8cc605571639 Wed Aug 25 16:04:25 CDT 2010 Michael Neuling <mikey@neuling.org> powerpc: Don't use kernel stack with translation off
In f761622e59433130bc33ad086ce219feee9eb961 we changed early_setup_secondary so it's called using the proper kernel stack rather than the emergency one.
Unfortunately, this stack pointer can't be used when translation is off on PHYP as this stack pointer might be outside the RMO. This results in the following on all non zero cpus: cpu 0x1: Vector: 300 (Data Access) at [c00000001639fd10] pc: 000000000001c50c lr: 000000000000821c sp: c00000001639ff90 msr: 8000000000001000 dar: c00000001639ffa0 dsisr: 42000000 current = 0xc000000016393540 paca = 0xc000000006e00200 pid = 0, comm = swapper
The original patch was only tested on bare metal system, so it never caught this problem.
This changes __secondary_start so that we calculate the new stack pointer but only start using it after we've called early_setup_secondary.
With this patch, the above problem goes away.
Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> diff f761622e59433130bc33ad086ce219feee9eb961 Thu Aug 12 15:58:28 CDT 2010 Matt Evans <matt@ozlabs.org> powerpc: Initialise paca->kstack before early_setup_secondary
As early setup calls down to slb_initialize(), we must have kstack initialised before checking "should we add a bolted SLB entry for our kstack?"
Failing to do so means stack access requires an SLB miss exception to refill an entry dynamically, if the stack isn't accessible via SLB(0) (kernel text & static data). It's not always allowable to take such a miss, and intermittent crashes will result.
Primary CPUs don't have this issue; an SLB entry is not bolted for their stack anyway (as that lives within SLB(0)). This patch therefore only affects the init of secondaries.
Signed-off-by: Matt Evans <matt@ozlabs.org> Cc: stable <stable@kernel.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|