diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-06-03 14:24:32 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-07-24 14:03:14 +0200 |
commit | 9b81c0211c249c1bc8caec2ddbc86e36c550ce0f (patch) | |
tree | d958dd35a17709ee2a6de59061d82410bea307e3 /arch/powerpc/kernel/exceptions-64e.S | |
parent | selftests/powerpc: Fix ptrace-pkey for default execute permission change (diff) | |
download | linux-9b81c0211c249c1bc8caec2ddbc86e36c550ce0f.tar.xz linux-9b81c0211c249c1bc8caec2ddbc86e36c550ce0f.zip |
powerpc/64s: make PACA_IRQ_HARD_DIS track MSR[EE] closely
When the masked interrupt handler clears MSR[EE] for an interrupt in
the PACA_IRQ_MUST_HARD_MASK set, it does not set PACA_IRQ_HARD_DIS.
This makes them get out of synch.
With that taken into account, it's only low level irq manipulation
(and interrupt entry before reconcile) where they can be out of synch.
This makes the code less surprising.
It also allows the IRQ replay code to rely on the IRQ_HARD_DIS value
and not have to mtmsrd again in this case (e.g., for an external
interrupt that has been masked). The bigger benefit might just be
that there is not such an element of surprise in these two bits of
state.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64e.S')
-rw-r--r-- | arch/powerpc/kernel/exceptions-64e.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 9b6e653e501a..3325f721e7b2 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S @@ -949,7 +949,11 @@ kernel_dbg_exc: .macro masked_interrupt_book3e paca_irq full_mask lbz r10,PACAIRQHAPPENED(r13) + .if \full_mask == 1 + ori r10,r10,\paca_irq | PACA_IRQ_HARD_DIS + .else ori r10,r10,\paca_irq + .endif stb r10,PACAIRQHAPPENED(r13) .if \full_mask == 1 |