summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-07-03 00:18:48 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 00:29:21 (GMT)
commitd061daa0e3abdddc28e21a37c8ac4536dedbf239 (patch)
tree6c08e7b8ed988053f421e38578fa11db538b0747
parentf82bc1762e0e74b7e0040a4d83be06d32c37fc2e (diff)
downloadlinux-fsl-qoriq-d061daa0e3abdddc28e21a37c8ac4536dedbf239.tar.xz
[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>
-rw-r--r--include/asm-arm/hw_irq.h11
-rw-r--r--include/asm-arm/mach/time.h1
-rw-r--r--include/linux/irq.h4
-rw-r--r--kernel/irq/handle.c13
4 files changed, 17 insertions, 12 deletions
diff --git a/include/asm-arm/hw_irq.h b/include/asm-arm/hw_irq.h
index f1a08a5..275b574 100644
--- a/include/asm-arm/hw_irq.h
+++ b/include/asm-arm/hw_irq.h
@@ -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
diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h
index 9f28073..dee0bc3 100644
--- a/include/asm-arm/mach/time.h
+++ b/include/asm-arm/mach/time.h
@@ -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);
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 95d7aa7..b48eae3 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -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)
{
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 6d8b301..aeb6e39 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -16,10 +16,6 @@
#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();