mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
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>
This commit is contained in:
parent
257c14e5a1
commit
d8b5cf9c63
|
|
@ -147,8 +147,10 @@ void noinstr do_io_irq(struct pt_regs *regs)
|
||||||
bool from_idle;
|
bool from_idle;
|
||||||
|
|
||||||
from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT);
|
from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT);
|
||||||
if (from_idle)
|
if (from_idle) {
|
||||||
update_timer_idle();
|
update_timer_idle();
|
||||||
|
regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
|
||||||
|
}
|
||||||
|
|
||||||
irq_enter_rcu();
|
irq_enter_rcu();
|
||||||
|
|
||||||
|
|
@ -174,9 +176,6 @@ void noinstr do_io_irq(struct pt_regs *regs)
|
||||||
|
|
||||||
set_irq_regs(old_regs);
|
set_irq_regs(old_regs);
|
||||||
irqentry_exit(regs, state);
|
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)
|
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;
|
bool from_idle;
|
||||||
|
|
||||||
from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT);
|
from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT);
|
||||||
if (from_idle)
|
if (from_idle) {
|
||||||
update_timer_idle();
|
update_timer_idle();
|
||||||
|
regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
|
||||||
|
}
|
||||||
|
|
||||||
irq_enter_rcu();
|
irq_enter_rcu();
|
||||||
|
|
||||||
|
|
@ -209,9 +210,6 @@ void noinstr do_ext_irq(struct pt_regs *regs)
|
||||||
irq_exit_rcu();
|
irq_exit_rcu();
|
||||||
set_irq_regs(old_regs);
|
set_irq_regs(old_regs);
|
||||||
irqentry_exit(regs, state);
|
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)
|
static void show_msi_interrupt(struct seq_file *p, int irq)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user