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/idle_book3e.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/idle_book3e.S')
-rw-r--r-- | arch/powerpc/kernel/idle_book3e.S | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/idle_book3e.S b/arch/powerpc/kernel/idle_book3e.S index 2b269315d377..4e0d94d02030 100644 --- a/arch/powerpc/kernel/idle_book3e.S +++ b/arch/powerpc/kernel/idle_book3e.S @@ -36,7 +36,7 @@ _GLOBAL(\name) */ lbz r3,PACAIRQHAPPENED(r13) cmpwi cr0,r3,0 - bnelr + bne 2f /* Now we are going to mark ourselves as soft and hard enabled in * order to be able to take interrupts while asleep. We inform lockdep @@ -72,6 +72,11 @@ _GLOBAL(\name) wrteei 1 \loop +2: + lbz r10,PACAIRQHAPPENED(r13) + ori r10,r10,PACA_IRQ_HARD_DIS + stb r10,PACAIRQHAPPENED(r13) + blr .endm .macro BOOK3E_IDLE_LOOP |