[PATCH] genirq: ARM dyntick cleanup

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>

authored by Thomas Gleixner and committed by Linus Torvalds d061daa0 f82bc176

+17 -12
+11
include/asm-arm/hw_irq.h
··· 6 7 #include <asm/mach/irq.h> 8 9 #endif
··· 6 7 #include <asm/mach/irq.h> 8 9 + #if defined(CONFIG_NO_IDLE_HZ) 10 + # include <asm/dyntick.h> 11 + # define handle_dynamic_tick(action) \ 12 + if (!(action->flags & SA_TIMER) && system_timer->dyn_tick) { \ 13 + write_seqlock(&xtime_lock); \ 14 + if (system_timer->dyn_tick->state & DYN_TICK_ENABLED) \ 15 + system_timer->dyn_tick->handler(irq, 0, regs); \ 16 + write_sequnlock(&xtime_lock); \ 17 + } 18 + #endif 19 + 20 #endif
+1
include/asm-arm/mach/time.h
··· 69 /* 70 * Kernel time keeping support. 71 */ 72 extern int (*set_rtc)(void); 73 extern void save_time_delta(struct timespec *delta, struct timespec *rtc); 74 extern void restore_time_delta(struct timespec *delta, struct timespec *rtc);
··· 69 /* 70 * Kernel time keeping support. 71 */ 72 + struct timespec; 73 extern int (*set_rtc)(void); 74 extern void save_time_delta(struct timespec *delta, struct timespec *rtc); 75 extern void restore_time_delta(struct timespec *delta, struct timespec *rtc);
+4
include/linux/irq.h
··· 182 183 #ifdef CONFIG_GENERIC_HARDIRQS 184 185 #ifdef CONFIG_SMP 186 static inline void set_native_irq_info(int irq, cpumask_t mask) 187 {
··· 182 183 #ifdef CONFIG_GENERIC_HARDIRQS 184 185 + #ifndef handle_dynamic_tick 186 + # define handle_dynamic_tick(a) do { } while (0) 187 + #endif 188 + 189 #ifdef CONFIG_SMP 190 static inline void set_native_irq_info(int irq, cpumask_t mask) 191 {
+1 -12
kernel/irq/handle.c
··· 16 #include <linux/interrupt.h> 17 #include <linux/kernel_stat.h> 18 19 - #if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM) 20 - #include <asm/dyntick.h> 21 - #endif 22 - 23 #include "internals.h" 24 25 /** ··· 129 irqreturn_t ret, retval = IRQ_NONE; 130 unsigned int status = 0; 131 132 - #if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM) 133 - if (!(action->flags & SA_TIMER) && system_timer->dyn_tick != NULL) { 134 - write_seqlock(&xtime_lock); 135 - if (system_timer->dyn_tick->state & DYN_TICK_ENABLED) 136 - system_timer->dyn_tick->handler(irq, 0, regs); 137 - write_sequnlock(&xtime_lock); 138 - } 139 - #endif 140 141 if (!(action->flags & IRQF_DISABLED)) 142 local_irq_enable();
··· 16 #include <linux/interrupt.h> 17 #include <linux/kernel_stat.h> 18 19 #include "internals.h" 20 21 /** ··· 133 irqreturn_t ret, retval = IRQ_NONE; 134 unsigned int status = 0; 135 136 + handle_dynamic_tick(action); 137 138 if (!(action->flags & IRQF_DISABLED)) 139 local_irq_enable();