diff options
| author | Tiejun Chen <tiejun.chen@windriver.com> | 2013-01-05 19:49:34 -0500 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-01-28 18:18:15 -0500 |
| commit | 572177d7c77db1981ba2563e01478126482c43bc (patch) | |
| tree | 89a68e8ee9014606031f98f0222f037eb7510aa1 | |
| parent | 46ed7a76ae7770cb8ba733ee2b06273397ad8b5b (diff) | |
powerpc/book3e: Disable interrupt after preempt_schedule_irq
In preempt case current arch_local_irq_restore() from
preempt_schedule_irq() may enable hard interrupt but we really
should disable interrupts when we return from the interrupt,
and so that we don't get interrupted after loading SRR0/1.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| -rw-r--r-- | arch/powerpc/kernel/entry_64.S | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index b310a0573625..3d990d3bd8ba 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
| @@ -664,6 +664,19 @@ resume_kernel: | |||
| 664 | ld r4,TI_FLAGS(r9) | 664 | ld r4,TI_FLAGS(r9) |
| 665 | andi. r0,r4,_TIF_NEED_RESCHED | 665 | andi. r0,r4,_TIF_NEED_RESCHED |
| 666 | bne 1b | 666 | bne 1b |
| 667 | |||
| 668 | /* | ||
| 669 | * arch_local_irq_restore() from preempt_schedule_irq above may | ||
| 670 | * enable hard interrupt but we really should disable interrupts | ||
| 671 | * when we return from the interrupt, and so that we don't get | ||
| 672 | * interrupted after loading SRR0/1. | ||
| 673 | */ | ||
| 674 | #ifdef CONFIG_PPC_BOOK3E | ||
| 675 | wrteei 0 | ||
| 676 | #else | ||
| 677 | ld r10,PACAKMSR(r13) /* Get kernel MSR without EE */ | ||
| 678 | mtmsrd r10,1 /* Update machine state */ | ||
| 679 | #endif /* CONFIG_PPC_BOOK3E */ | ||
| 667 | #endif /* CONFIG_PREEMPT */ | 680 | #endif /* CONFIG_PREEMPT */ |
| 668 | 681 | ||
| 669 | .globl fast_exc_return_irq | 682 | .globl fast_exc_return_irq |
