* [PATCH] kernel/time/clocksource.c needs struct task_struct on m68k
@ 2007-02-04 6:22 Mathieu Desnoyers
2007-02-04 10:18 ` Tim Schmielau
0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Desnoyers @ 2007-02-04 6:22 UTC (permalink / raw)
To: linux-kernel, Andrew Morton, Ingo Molnar
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>
--- a/kernel/time/clocksource.c
+++ b/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;
--
OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg
Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] kernel/time/clocksource.c needs struct task_struct on m68k
2007-02-04 6:22 [PATCH] kernel/time/clocksource.c needs struct task_struct on m68k Mathieu Desnoyers
@ 2007-02-04 10:18 ` Tim Schmielau
0 siblings, 0 replies; 2+ messages in thread
From: Tim Schmielau @ 2007-02-04 10:18 UTC (permalink / raw)
To: Mathieu Desnoyers; +Cc: linux-kernel, Andrew Morton, Ingo Molnar
On Sun, 4 Feb 2007, Mathieu Desnoyers wrote:
> 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.
This indeed sounds quite ugly. If there really is no other simple way to
resolve this, this case seems to provide the missing incentive to create a
task_struct.h header file.
Unfortunately, I currently cannot foresee when I will have time to do so.
Tim
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-04 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-04 6:22 [PATCH] kernel/time/clocksource.c needs struct task_struct on m68k Mathieu Desnoyers
2007-02-04 10:18 ` Tim Schmielau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®