On 20.02.2023 20:47, Andrew Cooper wrote:
> Despite its name, the irq{save,restore}() APIs are only intended to
> conditionally disable and re-enable interrupts.Are they? Maybe nowadays they indeed are, but I couldn't spot any wording to this effect in Linux'es Documentation/ (and I don't think we have anywhere such could be put). Yet I'd expect such a statement to be backed by something. > IO-APIC's timer_irq_works() violates this intention. As it is init code, > switch to simple irq enable/disable(). If all callers of the function obviously did have interrupts off, I might agree. But the last of them sits _after_ local_irq_restore(), and all of this is called from underneath smp_prepare_cpus(), i.e. after IRQs were already enabled. I'm willing to believe that the local_irq_restore() there really comes too early, but then, ... > No functional change. ... in order for this to be true, that'll need fixing at the same time (or in a prereq patch). Jan
