summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/irq_64.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-05-18 09:40:16 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2022-06-29 16:47:43 +1000
commit98552307e3a72d480e72744bf5da2a865822f496 (patch)
tree10fa4b57829ca31d4cc3ae553638ec26317b4cbf /arch/powerpc/kernel/irq_64.c
parent7d7b28b302085e1ec2815bc9f5205af28394c5db (diff)
downloadlinux-98552307e3a72d480e72744bf5da2a865822f496.tar.bz2
powerpc/irq64: Remove get_irq_happened()
No need to open code the read of local_paca->irq_happened in assembly, we have READ_ONCE() for doing the same. Replace get_irq_happened() by READ_ONCE(local_paca->irq_happened). Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/af511b53e4eb51f8fbc51eda7f5597175e68dce6.1652859593.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/irq_64.c')
-rw-r--r--arch/powerpc/kernel/irq_64.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/irq_64.c b/arch/powerpc/kernel/irq_64.c
index 56dd7d94e661..01645e03e9f0 100644
--- a/arch/powerpc/kernel/irq_64.c
+++ b/arch/powerpc/kernel/irq_64.c
@@ -68,16 +68,6 @@
int distribute_irqs = 1;
-static inline notrace unsigned long get_irq_happened(void)
-{
- unsigned long happened;
-
- __asm__ __volatile__("lbz %0,%1(13)"
- : "=r" (happened) : "i" (offsetof(struct paca_struct, irq_happened)));
-
- return happened;
-}
-
void replay_soft_interrupts(void)
{
struct pt_regs regs;
@@ -234,7 +224,7 @@ notrace void arch_local_irq_restore(unsigned long mask)
return;
happened:
- irq_happened = get_irq_happened();
+ irq_happened = READ_ONCE(local_paca->irq_happened);
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
WARN_ON_ONCE(!irq_happened);
@@ -257,7 +247,7 @@ happened:
* IRQ_HARD_DIS again and warn if it is still
* clear.
*/
- irq_happened = get_irq_happened();
+ irq_happened = READ_ONCE(local_paca->irq_happened);
WARN_ON_ONCE(!(irq_happened & PACA_IRQ_HARD_DIS));
}
}