x86/ioapic: Cleanup the timer_works() irqflags mess
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 Dec 2020 20:15:04 +0000 (21:15 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 10 Dec 2020 22:02:31 +0000 (23:02 +0100)
commit058df195c23403f91acc028e39ca2ad599d0af52
treeb23ca0a9a4da0a8aeb50ca4736eaea242b1a3b52
parent26ab12bb9d96133b7880141d68b5e01a8783de9d
x86/ioapic: Cleanup the timer_works() irqflags mess

Mark tripped over the creative irqflags handling in the IO-APIC timer
delivery check which ends up doing:

        local_irq_save(flags);
local_irq_enable();
        local_irq_restore(flags);

which triggered a new consistency check he's working on required for
replacing the POPF based restore with a conditional STI.

That code is a historical mess and none of this is needed. Make it
straightforward use local_irq_disable()/enable() as that's all what is
required. It is invoked from interrupt enabled code nowadays.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/87k0tpju47.fsf@nanos.tec.linutronix.de
arch/x86/kernel/apic/io_apic.c