[PATCH] genirq: ARM dyntick cleanup
authorThomas Gleixner <tglx@linutronix.de>
Mon, 3 Jul 2006 00:18:48 +0000 (02:18 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 3 Jul 2006 00:29:21 +0000 (17:29 -0700)
Linus: "The hacks in kernel/irq/handle.c are really horrid. REALLY
horrid."

They are indeed. Move the dyntick quirks to ARM where they belong.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-arm/hw_irq.h
include/asm-arm/mach/time.h
include/linux/irq.h
kernel/irq/handle.c

index f1a08a5006049eafa5d70b7f2ffc51eb989f8650..275b574fd1a5be077e00b771c57f56ad260c8203 100644 (file)
@@ -6,4 +6,15 @@
 
 #include <asm/mach/irq.h>
 
+#if defined(CONFIG_NO_IDLE_HZ)
+# include <asm/dyntick.h>
+# define handle_dynamic_tick(action)                                   \
+       if (!(action->flags & SA_TIMER) && system_timer->dyn_tick) {    \
+               write_seqlock(&xtime_lock);                             \
+               if (system_timer->dyn_tick->state & DYN_TICK_ENABLED)   \
+                       system_timer->dyn_tick->handler(irq, 0, regs);  \
+               write_sequnlock(&xtime_lock);                           \
+       }
+#endif
+
 #endif
index 9f28073559e8f6140788546012acecdd16479330..dee0bc336fe8393ae8e13b4079a1a3f3eab6f328 100644 (file)
@@ -69,6 +69,7 @@ extern void timer_tick(struct pt_regs *);
 /*
  * Kernel time keeping support.
  */
+struct timespec;
 extern int (*set_rtc)(void);
 extern void save_time_delta(struct timespec *delta, struct timespec *rtc);
 extern void restore_time_delta(struct timespec *delta, struct timespec *rtc);
index 95d7aa7954d20b8aa706567e7eee52e391da8b00..b48eae32dc61c05eb5afd83c1c6c23ab4d10b85f 100644 (file)
@@ -182,6 +182,10 @@ extern int setup_irq(unsigned int irq, struct irqaction *new);
 
 #ifdef CONFIG_GENERIC_HARDIRQS
 
+#ifndef handle_dynamic_tick
+# define handle_dynamic_tick(a)                do { } while (0)
+#endif
+
 #ifdef CONFIG_SMP
 static inline void set_native_irq_info(int irq, cpumask_t mask)
 {
index 6d8b30114961a46669455b7e5721319751e94744..aeb6e391276cc78f48f4c7cda119f46a13e4614a 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 
-#if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM)
-#include <asm/dyntick.h>
-#endif
-
 #include "internals.h"
 
 /**
@@ -133,14 +129,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
        irqreturn_t ret, retval = IRQ_NONE;
        unsigned int status = 0;
 
-#if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM)
-       if (!(action->flags & SA_TIMER) && system_timer->dyn_tick != NULL) {
-               write_seqlock(&xtime_lock);
-               if (system_timer->dyn_tick->state & DYN_TICK_ENABLED)
-                       system_timer->dyn_tick->handler(irq, 0, regs);
-               write_sequnlock(&xtime_lock);
-       }
-#endif
+       handle_dynamic_tick(action);
 
        if (!(action->flags & IRQF_DISABLED))
                local_irq_enable();