diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2026-02-18 17:20:09 +0300 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2026-02-25 18:46:07 +0300 |
| commit | d8b5cf9c63143fae54a734c41e3bb55cf3f365c7 (patch) | |
| tree | ed4089dd73d9274e797540cf1be65dca2068fd02 | |
| parent | 257c14e5a1d8de40fded80fd8b525af55a6ded26 (diff) | |
| download | linux-d8b5cf9c63143fae54a734c41e3bb55cf3f365c7.tar.xz | |
s390/irq/idle: Remove psw bits early
Remove wait, io, external interrupt bits early in do_io_irq()/do_ext_irq()
when previous context was idle. This saves one conditional branch and is
closer to the original old assembly code.
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
| -rw-r--r-- | arch/s390/kernel/irq.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index d10a17e6531d..7fdf960191d3 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c @@ -147,8 +147,10 @@ void noinstr do_io_irq(struct pt_regs *regs) bool from_idle; from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT); - if (from_idle) + if (from_idle) { update_timer_idle(); + regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT); + } irq_enter_rcu(); @@ -174,9 +176,6 @@ void noinstr do_io_irq(struct pt_regs *regs) set_irq_regs(old_regs); irqentry_exit(regs, state); - - if (from_idle) - regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT); } void noinstr do_ext_irq(struct pt_regs *regs) @@ -186,8 +185,10 @@ void noinstr do_ext_irq(struct pt_regs *regs) bool from_idle; from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT); - if (from_idle) + if (from_idle) { update_timer_idle(); + regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT); + } irq_enter_rcu(); @@ -209,9 +210,6 @@ void noinstr do_ext_irq(struct pt_regs *regs) irq_exit_rcu(); set_irq_regs(old_regs); irqentry_exit(regs, state); - - if (from_idle) - regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT); } static void show_msi_interrupt(struct seq_file *p, int irq) |
