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>
Bu işleme şunda yer alıyor:

işlemeyi yapan:
Geert Uytterhoeven

ebeveyn
9e98c678c2
işleme
1efdd4bd25
@@ -24,6 +24,18 @@
|
||||
DEFINE_SPINLOCK(rtc_lock);
|
||||
EXPORT_SYMBOL_GPL(rtc_lock);
|
||||
|
||||
static irqreturn_t mfp_timer_c_handler(int irq, void *dev_id)
|
||||
{
|
||||
irq_handler_t timer_routine = dev_id;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
timer_routine(0, NULL);
|
||||
local_irq_restore(flags);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
void __init
|
||||
atari_sched_init(irq_handler_t timer_routine)
|
||||
{
|
||||
@@ -32,7 +44,8 @@ atari_sched_init(irq_handler_t timer_routine)
|
||||
/* start timer C, div = 1:100 */
|
||||
st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60;
|
||||
/* install interrupt service routine for MFP Timer C */
|
||||
if (request_irq(IRQ_MFP_TIMC, timer_routine, 0, "timer", timer_routine))
|
||||
if (request_irq(IRQ_MFP_TIMC, mfp_timer_c_handler, 0, "timer",
|
||||
timer_routine))
|
||||
pr_err("Couldn't register timer interrupt\n");
|
||||
}
|
||||
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle