severing module.h->sched.h
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Linux Kernel Mailing List
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f6a570333e554b48ad589e7137c77c57809eee81 Commit: f6a570333e554b48ad589e7137c77c57809eee81 Parent: 2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2 Author: Al Viro <[email protected]> AuthorDate: Wed Oct 18 01:47:25 2006 -0400 Committer: Al Viro <[email protected]> CommitDate: Mon Dec 4 02:00:22 2006 -0500[PATCH] severing
module.h->sched.hSigned-off-by Al Viro <[email protected]>include/linux/module.h +0
-0
include/linux/module.h line 11
Quoted 7 lines
include/linux/module.h +0
-1@@ -6,7 +6,6 @@* Rewritten by Richard Henderson <[email protected]> Dec 1996 * Rewritten again by Rusty Russell, 2002 */ -#include <linux/sched.h> #include <linux/spinlock.h> #include <linux/list.h> #include <linux/stat.h>
This change causes the following compile errors on m68k:
| linux-2.6.20-rc4/kernel/time/clocksource.c: In function `sysfs_show_current_clocksources': | linux-2.6.20-rc4/kernel/time/clocksource.c:204: error: dereferencing pointer to incomplete type | linux-2.6.20-rc4/kernel/time/clocksource.c: In function `sysfs_override_clocksource': | linux-2.6.20-rc4/kernel/time/clocksource.c:243: error: dereferencing pointer to incomplete type | linux-2.6.20-rc4/kernel/time/clocksource.c: In function `sysfs_show_available_clocksources': | linux-2.6.20-rc4/kernel/time/clocksource.c:268: error: dereferencing pointer to incomplete type
spin_lock_irq
-> _spin_lock_irq
-> preempt_disable
-> inc_preempt_count
-> add_preempt_count
-> preempt_count
-> current_thread_info
-> task_thread_infowhich needs the definition of struct task_struct.
The patch below fixes it by including <linux/sched.h> in kernel/time/clocksource.c. But perhaps this is the right time to move struct task_struct to its own include instead?
kernel/time/clocksource.c +1 -0
@@ -28,6 +28,7 @@#include <linux/sysdev.h> #include <linux/init.h> #include <linux/module.h> +#include <linux/sched.h> /* XXX - Would like a better way for initializing curr_clocksource */ extern struct clocksource clocksource_jiffies;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 5 lines · Geert Uytterhoeven
which needs the definition of struct
task_struct.The patch below fixes it by including <
linux/sched.h> inkernel/time/clocksource.c. But perhaps this is the right time to move structtask_structto its own include instead?
I used to post such a patch once every few years, as it allows to remove the (indirect) include of that sched.h monster from a few thousand files. If there is interest in such a move, I'll cook up a patch within the next weeks.
Tim