Messages in this thread | | | Date | Thu, 22 May 2008 02:30:35 +0100 | From | Al Viro <> | Subject | Re: Moving include/asm-* [was: Re: Moving sound/* to drivers/ ?] |
| |
On Wed, May 21, 2008 at 06:20:27PM -0700, Linus Torvalds wrote: > > > On Thu, 22 May 2008, Al Viro wrote: > > > > Eh? git mv include/asm-$i arch/$i/include/asm, then? > > Yeah, sorry, I dropped an "include/" there. > > > Nice, but... how do you pull what's currently asm-generic/foo.h from what's > > currently asm-bar/foo.h? #include_next is _ugly_... > > I was actually going to suggest #include_next, yes. But if people hate it, > we can certainly just keep the current <asm-generic/xyz.h> approach.
Another alternative is to replace asm-generic/ with generic/asm and have -I include -I arch/$ARCH/include -I include/generic. Then we'd have
linux/foo.h => include/linux/foo.h (one lookup) asm/foo.h => arch/include/asm/foo.h if it exists (negative on include/asm, then one lookup) => include/generic/asm/foo.h otherwise (negative on include/asm, negative lookup, lookup) generic/asm/foo.h => include/generic/asm/foo.h (one lookup)
No #include_next at all. Kludgy, though... Note that arch/um will need more interesting treatment in any case and so may things like arch/arm with its include/asm/arch symlink ;-/
| |