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

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Nov 27 15:38:23 EST 2009


Hello Russell,

On Fri, Nov 27, 2009 at 07:58:57PM +0000, Russell King - ARM Linux wrote:
> On Fri, Nov 27, 2009 at 11:44:55AM +0100, Uwe Kleine-König wrote:
> > Hello,
> > 
> > On Thu, Nov 26, 2009 at 11:31:58AM +0000, Russell King - ARM Linux wrote:
> > > tick_do_broadcast
> > > +-tick_do_periodic_broadcast
> > > | `-tick_handle_periodic_broadcast
> > > |   `- dev->event_handler
> > > `-tick_handle_oneshot_broadcast
> > >    `- dev->event_handler
> > I currently fail to trace where the irqs are disabled, but I have an
> > at91rm2000 machine and the warning doesn't trigger.
> > Where are irqs reenabled after exception entry?  Is it before or after
> > the handler is called?
> 
> If interrupt handlers are requested with IRQF_DISABLED (as timer
> interrupts should be), they will be called with IRQs disabled.
> 
> There is one exception: if an interrupt is requested with
> IRQF_SHARED|IRQF_DISABLED and either another handler enables interrupts
> itself and leaves them enabled, or was requested without IRQF_DISABLED.
> In this case, such a handler can still be called with IRQs enabled.
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.

@Eric: do you still prefer the warning or is it OK for you now to remove
the irq saving for nomadik, pxa and sa1100?

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list