Re: New location for generic headers?

From: Arnd Bergmann
Date: Wed Dec 03 2008 - 07:26:20 EST


On Wednesday 03 December 2008, Sam Ravnborg wrote:
> On Wed, Dec 03, 2008 at 11:40:01AM +0100, Arnd Bergmann wrote:
>
> > I'm working on patches to consolidate a lot of generic headers, why not
> > add this in a generic way and make x86 use that version?
>
> Should we try to get rid of all those silly:
> #include <asm-generic/foo.h>
> files we have in arch/$ARCH/include/asm?
>
> We could for example add include/generic/ last in the search path.
> Or we could add the files in include/asm and add that last in the
> search path.

My current idea is to have an explicit list of asm-generic headers
that can act as drop-in replacements, either in include/asm-generic/Makefile
or in arch/*/include/asm/Makefile, and then generate these trivial
wrappers in $(objdir)arch/*/include/asm/ and $(INSTALL_HDR_PATH)/asm
if it doesn't already exist there.

This way we don't have to change all the headers that do #include
<asm-generic/foo.h> plus something else.

Arnd <><
--
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/