I know irqsave version of spinlock notes down the interrupt state while taking lock and restore interrupt state while releasing the lock.
My doubt is, say if there are 10 interrupt vectors in total and 2 of them are in disabled state (assume a device driver has disabled these two interrupt vectors) while taking lock using irqsave variant. Does the flag
argument of spin_lock_irqsave()
note down interrupt states and enables only the 8 interrupt during restore? What if those 2 disabled interrupts are enabled from other CPUs after the state is saved in flag
argument?