]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powerpc: Initialise paca->kstack before early_setup_secondary
authorMatt Evans <matt@ozlabs.org>
Thu, 12 Aug 2010 20:58:28 +0000 (20:58 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:40 +0000 (21:51 -0700)
commit02f6f1e637a74a11bd5e834b39bc5e4dd28796c5
treeb75830228b087196d704a92e5b838b0ade32a9b2
parent50c5f9ded08bf13cbef33ebbb19b78fc21b2861d
powerpc: Initialise paca->kstack before early_setup_secondary

commit f761622e59433130bc33ad086ce219feee9eb961 upstream.

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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/powerpc/kernel/head_64.S