public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] killing linux/irq.h
@ 2005-09-09 18:42 viro
  2005-09-11  7:50 ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: viro @ 2005-09-09 18:42 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-arch, linux-kernel

	We get regular portability bugs when somebody decides to include
linux/irq.h into a driver instead of asm/irq.h.  It's almost always a
wrong thing to do and, in fact, causes immediate breakage on e.g. arm.

	Here's what I'm going to do:
* check current includes of linux/irq.h; e.g. in arch/x86_64 all but two
had been 100% useless, one should've been asm/irq.h and one - asm/irq.h +
asm/hw_irq.h.  The only legitimate user of linux/irq.h on amd64 was
asm/hardirq.h.
Situation elsewhere in arch/* is similar - most of includes are not needed
at all.
* remove bogus includes, arch by arch for architectures that live in main
tree.  Switch ones that should've been asm/irq.h to that form.
* put the current contents of linux/irq.h to asm-generic/hardirq.h (which
is what it really is - declarations for hardirq code, relevant on many but
not all platforms).
* switch remaining users of linux/irq.h to asm-generic/hardirq.h (again, for
architectures that live in main tree)
* replace contents of linux/irq.h with #warning and
#include <asm-generic/hardirq.h>.
* after 2.6.14 kill linux/irq.h completely.

	Objections?  That variant leaves out-of-tree folks with window until
2.6.15 to convert and that's really more than enough...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] killing linux/irq.h
  2005-09-09 18:42 [RFC] killing linux/irq.h viro
@ 2005-09-11  7:50 ` Geert Uytterhoeven
  2005-09-15 16:34   ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2005-09-11  7:50 UTC (permalink / raw)
  To: viro; +Cc: Linus Torvalds, linux-arch, Linux Kernel Development

On Fri, 9 Sep 2005 viro@ZenIV.linux.org.uk wrote:
> 	We get regular portability bugs when somebody decides to include
> linux/irq.h into a driver instead of asm/irq.h.  It's almost always a
> wrong thing to do and, in fact, causes immediate breakage on e.g. arm.

Wouldn't it be more logical to make linux/irq.h the preferred include?
Usually the linux/* versions are preferred over the asm/* versions.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] killing linux/irq.h
  2005-09-11  7:50 ` Geert Uytterhoeven
@ 2005-09-15 16:34   ` Matthew Wilcox
  2005-09-15 16:40     ` Russell King
  2005-09-15 16:42     ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Matthew Wilcox @ 2005-09-15 16:34 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: viro, Linus Torvalds, linux-arch, Linux Kernel Development

On Sun, Sep 11, 2005 at 09:50:38AM +0200, Geert Uytterhoeven wrote:
> On Fri, 9 Sep 2005 viro@ZenIV.linux.org.uk wrote:
> > 	We get regular portability bugs when somebody decides to include
> > linux/irq.h into a driver instead of asm/irq.h.  It's almost always a
> > wrong thing to do and, in fact, causes immediate breakage on e.g. arm.
> 
> Wouldn't it be more logical to make linux/irq.h the preferred include?
> Usually the linux/* versions are preferred over the asm/* versions.

There's almost no reason to want <*/irq.h> in the first place.  Almost
all drivers really want <linux/interrupt.h>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] killing linux/irq.h
  2005-09-15 16:34   ` Matthew Wilcox
@ 2005-09-15 16:40     ` Russell King
  2005-09-15 16:42     ` Christoph Hellwig
  1 sibling, 0 replies; 5+ messages in thread
From: Russell King @ 2005-09-15 16:40 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Geert Uytterhoeven, viro, Linus Torvalds, linux-arch,
	Linux Kernel Development

On Thu, Sep 15, 2005 at 10:34:55AM -0600, Matthew Wilcox wrote:
> On Sun, Sep 11, 2005 at 09:50:38AM +0200, Geert Uytterhoeven wrote:
> > On Fri, 9 Sep 2005 viro@ZenIV.linux.org.uk wrote:
> > > 	We get regular portability bugs when somebody decides to include
> > > linux/irq.h into a driver instead of asm/irq.h.  It's almost always a
> > > wrong thing to do and, in fact, causes immediate breakage on e.g. arm.
> > 
> > Wouldn't it be more logical to make linux/irq.h the preferred include?
> > Usually the linux/* versions are preferred over the asm/* versions.
> 
> There's almost no reason to want <*/irq.h> in the first place.  Almost
> all drivers really want <linux/interrupt.h>

The only exception I can think of is for ARM where we supplement the
Linux interrupt API to deal with our configurable interrupt sources
(high level/low level/rising edge/falling edge triggers) on
certain platform groups.

-- 
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] 5+ messages in thread

* Re: [RFC] killing linux/irq.h
  2005-09-15 16:34   ` Matthew Wilcox
  2005-09-15 16:40     ` Russell King
@ 2005-09-15 16:42     ` Christoph Hellwig
  1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2005-09-15 16:42 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Geert Uytterhoeven, viro, Linus Torvalds, linux-arch,
	Linux Kernel Development

On Thu, Sep 15, 2005 at 10:34:55AM -0600, Matthew Wilcox wrote:
> On Sun, Sep 11, 2005 at 09:50:38AM +0200, Geert Uytterhoeven wrote:
> > On Fri, 9 Sep 2005 viro@ZenIV.linux.org.uk wrote:
> > > 	We get regular portability bugs when somebody decides to include
> > > linux/irq.h into a driver instead of asm/irq.h.  It's almost always a
> > > wrong thing to do and, in fact, causes immediate breakage on e.g. arm.
> > 
> > Wouldn't it be more logical to make linux/irq.h the preferred include?
> > Usually the linux/* versions are preferred over the asm/* versions.
> 
> There's almost no reason to want <*/irq.h> in the first place.  Almost
> all drivers really want <linux/interrupt.h>

Umm, no.  <linux/interrupt.h> doesn't include <asm/irq.h> and variours
achitectures have important prototypes in there.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-15 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 18:42 [RFC] killing linux/irq.h viro
2005-09-11  7:50 ` Geert Uytterhoeven
2005-09-15 16:34   ` Matthew Wilcox
2005-09-15 16:40     ` Russell King
2005-09-15 16:42     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox