[RESENT PATCH] Don't disable irqs in set_next_event and set_mode callbacks

Thomas Gleixner tglx at linutronix.de
Fri Nov 27 16:31:15 EST 2009


On Fri, 27 Nov 2009, Russell King - ARM Linux wrote:
> On Fri, Nov 27, 2009 at 09:38:23PM +0100, Uwe Kleine-König wrote:
> > OK, so this should make it save for mach-nomadik/timer.c,
> > mach-pxa/time.c and mach-sa1100/time.c.
> > 
> > Only mach-at91/at91rm9200_time.c and mach-at91/at91sam926x_time.c
> > request with IRQF_SHARED | IRQF_DISABLED.
> > So for there the right solution is to let the local_irq_save in place
> > and add a comment that it is needed as the timer irq is shared.
> > This hopefully stopps people copying it unnecessarily.
> 
> Given that the gentime code spits out warnings if its called with IRQs
> enabled, I don't think keeping the local_irq_save() in place is worth
> it - especially given Thomas' response.
> 
> We've seen such warnings on AT91 (though I don't think we got positively
> to the bottom of it with the reporter.)  If you _do_ want to ensure that

Any pointer ?

> AT91 is safe, wrapping the call to dev->event_handler(dev) in the AT91
> interrupt handler with a local_irq_save/local_irq_restore would seem
> sensible.

The only way how that would happen is when the serial interrupt would
be set up _BEFORE_ the timer interrupt and when the serial handler
would enable interrupts at some point. Shared interrupt handlers are
called in order of setup.

Thanks,

	tglx


More information about the linux-arm-kernel mailing list