aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/irq.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-06-09 12:16:42 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2022-06-29 16:58:31 +1000
commit78f1c24abd16952d383f34eefbb0af7bb53f9b0b (patch)
treedfae0cd3becd147183099455c6dedec38796658e /arch/powerpc/kernel/irq.c
parente90855be9e90e4a046d2be817a31fae6637415a4 (diff)
downloadlinux-78f1c24abd16952d383f34eefbb0af7bb53f9b0b.tar.gz
powerpc/irq: Simplify __do_irq()
Remove duplicated code by implementing a proper if/else. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/5a3b21311191f1240850db6ab29b19ac7885fe03.1654769775.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r--arch/powerpc/kernel/irq.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 56d165c186c7c9..d50a18888bd918 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -281,14 +281,11 @@ void __do_IRQ(struct pt_regs *regs)
irqsp = hardirq_ctx[raw_smp_processor_id()];
sirqsp = softirq_ctx[raw_smp_processor_id()];
- /* Already there ? */
- if (unlikely(cursp == irqsp || cursp == sirqsp)) {
+ /* Already there ? If not switch stack and call */
+ if (unlikely(cursp == irqsp || cursp == sirqsp))
__do_irq(regs, current_stack_pointer);
- set_irq_regs(old_regs);
- return;
- }
- /* Switch stack and call */
- call_do_irq(regs, irqsp);
+ else
+ call_do_irq(regs, irqsp);
set_irq_regs(old_regs);
}