public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq: ARM dyntick cleanup
@ 2006-07-03  0:18 Thomas Gleixner
  2006-07-03  0:35 ` Andrew Morton
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Gleixner @ 2006-07-03  0:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Ingo Molnar, Russell King, LKML

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>

Index: linux-2.6.git/include/asm-arm/hw_irq.h
===================================================================
--- linux-2.6.git.orig/include/asm-arm/hw_irq.h	2006-07-03 00:13:24.000000000 +0200
+++ linux-2.6.git/include/asm-arm/hw_irq.h	2006-07-03 00:52:04.000000000 +0200
@@ -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: linux-2.6.git/include/linux/irq.h
===================================================================
--- linux-2.6.git.orig/include/linux/irq.h	2006-07-03 00:13:24.000000000 +0200
+++ linux-2.6.git/include/linux/irq.h	2006-07-03 00:49:01.000000000 +0200
@@ -182,6 +182,10 @@ extern int setup_irq(unsigned int irq, s
 
 #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: linux-2.6.git/kernel/irq/handle.c
===================================================================
--- linux-2.6.git.orig/kernel/irq/handle.c	2006-07-03 00:13:24.000000000 +0200
+++ linux-2.6.git/kernel/irq/handle.c	2006-07-03 00:47:47.000000000 +0200
@@ -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 in
 	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();
Index: linux-2.6.git/include/asm-arm/mach/time.h
===================================================================
--- linux-2.6.git.orig/include/asm-arm/mach/time.h	2006-06-21 08:32:46.000000000 +0200
+++ linux-2.6.git/include/asm-arm/mach/time.h	2006-07-03 00:54:07.000000000 +0200
@@ -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);



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2006-07-08 18:54 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-03  0:18 [PATCH] genirq: ARM dyntick cleanup Thomas Gleixner
2006-07-03  0:35 ` Andrew Morton
2006-07-03  6:29   ` Thomas Gleixner
2006-07-03  6:57     ` Ingo Molnar
2006-07-04 11:54       ` Christoph Hellwig
2006-07-04 12:22         ` Ingo Molnar
2006-07-05  8:35           ` Russell King
2006-07-08 18:53         ` Christoph Hellwig
2006-07-03  7:41   ` Russell King
2006-07-03  7:55     ` Andrew Morton
2006-07-03  9:03       ` Russell King
2006-07-03  9:12         ` Andrew Morton
2006-07-03 16:56       ` Linus Torvalds
2006-07-03 17:13   ` Linus Torvalds
2006-07-03 17:27     ` Arjan van de Ven
2006-07-05 23:24       ` Randy.Dunlap
2006-07-05 23:35         ` Andrew Morton
2006-07-05 23:50           ` Randy.Dunlap
2006-07-05 23:53         ` Linus Torvalds
2006-07-06  0:02           ` Randy.Dunlap
2006-07-06  6:47           ` Giacomo A. Catenazzi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox