From c4edfced662fa64deeed89c7d8c9f96d86130c19 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 20 Nov 2008 11:58:36 +0100 Subject: at91: warn if irqs are enabled in set_next_event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thomas claims that irqs are disabled when set_next_event is called. But David and Remy claim they saw irqs being enabled here. As both sides don't seem to have time to investigate here, start with a warning that might trigger if the problem still exists. Signed-off-by: Uwe Kleine-König Acked-By: David Brownell Cc: Bill Gatliff Acked-By: Remy Bohmer Cc: Thomas Gleixner --- arch/arm/mach-at91/at91rm9200_time.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/mach-at91/at91rm9200_time.c') diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index a72e798a2a40..d140eae53ded 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c @@ -141,6 +141,15 @@ clkevt32k_next_event(unsigned long delta, struct clock_event_device *dev) /* Use "raw" primitives so we behave correctly on RT kernels. */ raw_local_irq_save(flags); + /* + * According to Thomas Gleixner irqs are already disabled here. Simply + * removing raw_local_irq_save above (and the matching + * raw_local_irq_restore) was not accepted. See + * http://thread.gmane.org/gmane.linux.ports.arm.kernel/41174 + * So for now (2008-11-20) just warn once if irqs were not disabled ... + */ + WARN_ON_ONCE(!raw_irqs_disabled_flags(flags)); + /* The alarm IRQ uses absolute time (now+delta), not the relative * time (delta) in our calling convention. Like all clockevents * using such "match" hardware, we have a race to defend against. -- cgit v1.2.3