diff options
author | Anton Blanchard <anton@samba.org> | 2008-03-17 07:27:09 +0300 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-03-20 02:14:55 +0300 |
commit | 44387e9ff25267c78a99229aca55ed750e9174c7 (patch) | |
tree | 84485e031d4a97898e3a80b5dc1c5a09b2e6e222 /arch/powerpc/kernel | |
parent | c2372eb9bcafdd149b26987a8c25bbed92fd2775 (diff) | |
download | linux-44387e9ff25267c78a99229aca55ed750e9174c7.tar.xz |
[POWERPC] Fix PMU + soft interrupt disable bug
Since the PMU is an NMI now, it can come at any time we are only soft
disabled. We must hard disable around the two places we allow the kernel
stack SLB and r1 to go out of sync. Otherwise the PMU exception can
force a kernel stack SLB into another slot, which can lead to it
getting evicted, which can lead to a nasty unrecoverable SLB miss
in the exception entry code.
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/process.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 4846bf543a8c..59311ec0d422 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -353,6 +353,12 @@ struct task_struct *__switch_to(struct task_struct *prev, account_process_vtime(current); calculate_steal_time(); + /* + * We can't take a PMU exception inside _switch() since there is a + * window where the kernel stack SLB and the kernel stack are out + * of sync. Hard disable here. + */ + hard_irq_disable(); last = _switch(old_thread, new_thread); local_irq_restore(flags); |