* [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> @ 2005-12-21 1:27 Adrian Bunk 2005-12-21 10:41 ` Andrew Morton 0 siblings, 1 reply; 8+ messages in thread From: Adrian Bunk @ 2005-12-21 1:27 UTC (permalink / raw) To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, uclinux-v850 Jan's crosscompile page [1] shows, that one regression in 2.6.15-rc is that the v850 defconfig does no longer compile. The compile error is: <-- snip --> ... CC arch/v850/kernel/setup.o In file included from /usr/src/ctest/rc/kernel/arch/v850/kernel/setup.c:17: /usr/src/ctest/rc/kernel/include/linux/irq.h:13:43: asm/smp.h: No such file or directory make[2]: *** [arch/v850/kernel/setup.o] Error 1 <-- snip --> The #include <asm/smp.h> in irq.h was intruduced in 2.6.15-rc. Since include/linux/irq.h needs code from asm/smp.h only in the CONFIG_SMP=y case and linux/smp.h #include's asm/smp.h only in the CONFIG_SMP=y case, I'm suggesting this patch to #include <linux/smp.h> in irq.h. I've tested the compilation with both CONFIG_SMP=y and CONFIG_SMP=n on i386. Signed-off-by: Adrian Bunk <bunk@stusta.de> --- linux-2.6.15-rc6/include/linux/irq.h.old 2005-12-20 21:45:57.000000000 +0100 +++ linux-2.6.15-rc6/include/linux/irq.h 2005-12-20 21:46:08.000000000 +0100 @@ -10,7 +10,7 @@ */ #include <linux/config.h> -#include <asm/smp.h> /* cpu_online_map */ +#include <linux/smp.h> #if !defined(CONFIG_ARCH_S390) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> 2005-12-21 1:27 [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> Adrian Bunk @ 2005-12-21 10:41 ` Andrew Morton 2005-12-21 11:04 ` Russell King 0 siblings, 1 reply; 8+ messages in thread From: Andrew Morton @ 2005-12-21 10:41 UTC (permalink / raw) To: Adrian Bunk; +Cc: torvalds, linux-kernel, uclinux-v850 Adrian Bunk <bunk@stusta.de> wrote: > > The #include <asm/smp.h> in irq.h was intruduced in 2.6.15-rc. > > Since include/linux/irq.h needs code from asm/smp.h only in the > CONFIG_SMP=y case and linux/smp.h #include's asm/smp.h only in the > CONFIG_SMP=y case, I'm suggesting this patch to #include <linux/smp.h> > in irq.h. > > I've tested the compilation with both CONFIG_SMP=y and CONFIG_SMP=n > on i386. > > > Signed-off-by: Adrian Bunk <bunk@stusta.de> > > --- linux-2.6.15-rc6/include/linux/irq.h.old 2005-12-20 21:45:57.000000000 +0100 > +++ linux-2.6.15-rc6/include/linux/irq.h 2005-12-20 21:46:08.000000000 +0100 > @@ -10,7 +10,7 @@ > */ > > #include <linux/config.h> > -#include <asm/smp.h> /* cpu_online_map */ > +#include <linux/smp.h> > > #if !defined(CONFIG_ARCH_S390) Yes, it's basically always wrong to include asm/foo.h when linux/foo.h exists. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> 2005-12-21 10:41 ` Andrew Morton @ 2005-12-21 11:04 ` Russell King 2005-12-21 21:33 ` Adrian Bunk 0 siblings, 1 reply; 8+ messages in thread From: Russell King @ 2005-12-21 11:04 UTC (permalink / raw) To: Andrew Morton; +Cc: Adrian Bunk, torvalds, linux-kernel, uclinux-v850 On Wed, Dec 21, 2005 at 02:41:33AM -0800, Andrew Morton wrote: > Yes, it's basically always wrong to include asm/foo.h when linux/foo.h > exists. There's always an exception to every rule. linux/irq.h is that exception for the above rule. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> 2005-12-21 11:04 ` Russell King @ 2005-12-21 21:33 ` Adrian Bunk 2005-12-21 21:48 ` Russell King 0 siblings, 1 reply; 8+ messages in thread From: Adrian Bunk @ 2005-12-21 21:33 UTC (permalink / raw) To: Andrew Morton, torvalds, linux-kernel, uclinux-v850 On Wed, Dec 21, 2005 at 11:04:22AM +0000, Russell King wrote: > On Wed, Dec 21, 2005 at 02:41:33AM -0800, Andrew Morton wrote: > > Yes, it's basically always wrong to include asm/foo.h when linux/foo.h > > exists. > > There's always an exception to every rule. linux/irq.h is that > exception for the above rule. Why? > Russell King cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> 2005-12-21 21:33 ` Adrian Bunk @ 2005-12-21 21:48 ` Russell King 2005-12-21 22:11 ` Adrian Bunk 0 siblings, 1 reply; 8+ messages in thread From: Russell King @ 2005-12-21 21:48 UTC (permalink / raw) To: Adrian Bunk; +Cc: Andrew Morton, torvalds, linux-kernel, uclinux-v850 On Wed, Dec 21, 2005 at 10:33:21PM +0100, Adrian Bunk wrote: > On Wed, Dec 21, 2005 at 11:04:22AM +0000, Russell King wrote: > > On Wed, Dec 21, 2005 at 02:41:33AM -0800, Andrew Morton wrote: > > > Yes, it's basically always wrong to include asm/foo.h when linux/foo.h > > > exists. > > > > There's always an exception to every rule. linux/irq.h is that > > exception for the above rule. > > Why? /* * Please do not include this file in generic code. There is currently * no requirement for any architecture to implement anything held * within this file. * * Thanks. --rmk */ Using linux/irq.h instead of asm/irq.h _breaks_ architectures which do not use the generic irq code. Basically, linux/irq.h should have been called asm-generic/irq.h. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> 2005-12-21 21:48 ` Russell King @ 2005-12-21 22:11 ` Adrian Bunk 2005-12-21 22:21 ` Russell King 0 siblings, 1 reply; 8+ messages in thread From: Adrian Bunk @ 2005-12-21 22:11 UTC (permalink / raw) To: Andrew Morton, torvalds, linux-kernel, uclinux-v850 On Wed, Dec 21, 2005 at 09:48:06PM +0000, Russell King wrote: > On Wed, Dec 21, 2005 at 10:33:21PM +0100, Adrian Bunk wrote: > > On Wed, Dec 21, 2005 at 11:04:22AM +0000, Russell King wrote: > > > On Wed, Dec 21, 2005 at 02:41:33AM -0800, Andrew Morton wrote: > > > > Yes, it's basically always wrong to include asm/foo.h when linux/foo.h > > > > exists. > > > > > > There's always an exception to every rule. linux/irq.h is that > > > exception for the above rule. > > > > Why? > > /* > * Please do not include this file in generic code. There is currently > * no requirement for any architecture to implement anything held > * within this file. > * > * Thanks. --rmk > */ > > Using linux/irq.h instead of asm/irq.h _breaks_ architectures > which do not use the generic irq code. > > Basically, linux/irq.h should have been called asm-generic/irq.h. I'm not getting your point. The patch we are discussing is: --- linux-2.6.15-rc6/include/linux/irq.h.old 2005-12-20 21:45:57.000000000 +0100 +++ linux-2.6.15-rc6/include/linux/irq.h 2005-12-20 21:46:08.000000000 +0100 @@ -10,7 +10,7 @@ */ #include <linux/config.h> -#include <asm/smp.h> /* cpu_online_map */ +#include <linux/smp.h> > Russell King cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> 2005-12-21 22:11 ` Adrian Bunk @ 2005-12-21 22:21 ` Russell King 2005-12-21 22:33 ` Adrian Bunk 0 siblings, 1 reply; 8+ messages in thread From: Russell King @ 2005-12-21 22:21 UTC (permalink / raw) To: Adrian Bunk; +Cc: Andrew Morton, torvalds, linux-kernel, uclinux-v850 On Wed, Dec 21, 2005 at 11:11:14PM +0100, Adrian Bunk wrote: > On Wed, Dec 21, 2005 at 09:48:06PM +0000, Russell King wrote: > > On Wed, Dec 21, 2005 at 10:33:21PM +0100, Adrian Bunk wrote: > > > On Wed, Dec 21, 2005 at 11:04:22AM +0000, Russell King wrote: > > > > On Wed, Dec 21, 2005 at 02:41:33AM -0800, Andrew Morton wrote: > > > > > Yes, it's basically always wrong to include asm/foo.h when linux/foo.h > > > > > exists. > > > > > > > > There's always an exception to every rule. linux/irq.h is that > > > > exception for the above rule. > > > > > > Why? > > > > /* > > * Please do not include this file in generic code. There is currently > > * no requirement for any architecture to implement anything held > > * within this file. > > * > > * Thanks. --rmk > > */ > > > > Using linux/irq.h instead of asm/irq.h _breaks_ architectures > > which do not use the generic irq code. > > > > Basically, linux/irq.h should have been called asm-generic/irq.h. > > I'm not getting your point. The point is _exactly_ as the above quotation between Andrew Morton and myself. I'm sure it's not me being thick because it's absolutely damned obvious from the above. Andrew said: "Yes, it's basically always wrong to include asm/foo.h when linux/foo.h exists." That statement is a rule. I assert that this is an incorrect statement and I assert that there is a proven case where this statement is incorrect. Hence, to avoid people reading Andrew's misleading statement, I followed up on precisely _that_ point and _that_ point alone. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> 2005-12-21 22:21 ` Russell King @ 2005-12-21 22:33 ` Adrian Bunk 0 siblings, 0 replies; 8+ messages in thread From: Adrian Bunk @ 2005-12-21 22:33 UTC (permalink / raw) To: Andrew Morton, torvalds, linux-kernel, uclinux-v850 On Wed, Dec 21, 2005 at 10:21:31PM +0000, Russell King wrote: > > The point is _exactly_ as the above quotation between Andrew Morton > and myself. I'm sure it's not me being thick because it's absolutely > damned obvious from the above. > > Andrew said: "Yes, it's basically always wrong to include asm/foo.h > when linux/foo.h exists." > > That statement is a rule. I assert that this is an incorrect statement > and I assert that there is a proven case where this statement is incorrect. > > Hence, to avoid people reading Andrew's misleading statement, I followed > up on precisely _that_ point and _that_ point alone. OK, now I got it: You are arguing only against Andrew's statement of a general rule, not against my patch. Sorry for my misunderstading. > Russell King cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-12-21 22:33 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-12-21 1:27 [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h> Adrian Bunk 2005-12-21 10:41 ` Andrew Morton 2005-12-21 11:04 ` Russell King 2005-12-21 21:33 ` Adrian Bunk 2005-12-21 21:48 ` Russell King 2005-12-21 22:11 ` Adrian Bunk 2005-12-21 22:21 ` Russell King 2005-12-21 22:33 ` Adrian Bunk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).