| From stable-bounces@linux.kernel.org Sat Feb 10 01:45:32 2007 |
| From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> |
| Date: Sat, 10 Feb 2007 01:43:43 -0800 |
| Subject: kernel/time/clocksource.c needs struct task_struct on m68k |
| To: torvalds@linux-foundation.org |
| Cc: mathieu.desnoyers@polymtl.ca, zippel@linux-m68k.org, stable@kernel.org, tglx@linutronix.de, akpm@linux-foundation.org, mingo@elte.hu |
| Message-ID: <200702100943.l1A9hhaO008570@shell0.pdx.osdl.net> |
| |
| |
| From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> |
| |
| kernel/time/clocksource.c needs struct task_struct on m68k. |
| |
| Because it uses spin_unlock_irq(), which, on m68k, uses hardirq_count(), which |
| uses preempt_count(), which needs to dereference struct task_struct, we |
| have to include sched.h. Because it would cause a loop inclusion, we |
| cannot include sched.h in any other of asm-m68k/system.h, |
| linux/thread_info.h, linux/hardirq.h, which leaves this ugly include in |
| a C file as the only simple solution. |
| |
| Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> |
| Cc: Ingo Molnar <mingo@elte.hu> |
| Cc: Roman Zippel <zippel@linux-m68k.org> |
| Cc: Thomas Gleixner <tglx@linutronix.de> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| |
| --- |
| kernel/time/clocksource.c | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| --- linux-2.6.20.1.orig/kernel/time/clocksource.c |
| +++ linux-2.6.20.1/kernel/time/clocksource.c |
| @@ -28,6 +28,7 @@ |
| #include <linux/sysdev.h> |
| #include <linux/init.h> |
| #include <linux/module.h> |
| +#include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */ |
| |
| /* XXX - Would like a better way for initializing curr_clocksource */ |
| extern struct clocksource clocksource_jiffies; |