Re: [RFC: 2.6 patch] include/linux/irq.h: #include <linux/smp.h>

From: Adrian Bunk
Date: Wed Dec 21 2005 - 17:10:17 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/