m68k: Call timer_interrupt() with interrupts disabled
Some platforms execute their timer handler with the interrupt priority level set below 6. That means the handler could be interrupted by another driver and this could lead to re-entry of the timer core. Avoid this by use of local_irq_save/restore for timer interrupt dispatch. This provides mutual exclusion around the timer interrupt flag access which is needed later in this series for the clocksource conversion. Reported-by: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1811131407120.2697@nanos.tec.linutronix.de Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:

committed by
Geert Uytterhoeven

vanhempi
9e98c678c2
commit
1efdd4bd25
@@ -88,10 +88,19 @@ static irqreturn_t cia_handler(int irq, void *dev_id)
|
||||
struct ciabase *base = dev_id;
|
||||
int mach_irq;
|
||||
unsigned char ints;
|
||||
unsigned long flags;
|
||||
|
||||
/* Interrupts get disabled while the timer irq flag is cleared and
|
||||
* the timer interrupt serviced.
|
||||
*/
|
||||
mach_irq = base->cia_irq;
|
||||
local_irq_save(flags);
|
||||
ints = cia_set_irq(base, CIA_ICR_ALL);
|
||||
amiga_custom.intreq = base->int_mask;
|
||||
if (ints & 1)
|
||||
generic_handle_irq(mach_irq);
|
||||
local_irq_restore(flags);
|
||||
mach_irq++, ints >>= 1;
|
||||
for (; ints; mach_irq++, ints >>= 1) {
|
||||
if (ints & 1)
|
||||
generic_handle_irq(mach_irq);
|
||||
|
Viittaa uudesa ongelmassa
Block a user