Re: [RFC] possible killing of boilerplate headers by asm-generic reorg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 11, 2011 at 03:16:43PM +0200, Arnd Bergmann wrote:
> On Wednesday 10 August 2011, Linus Torvalds wrote:
> > Or you can do it by creating the default file, and then editing EVERY
> > SINGLE ARCHITECTURE. Which just sucks.
> > 
> > This has come up before, for similar situations - wanting to implement
> > optional architecture capabilities without having to worry about
> > architectures that don't support it.
> 
> If you mostly care about new extensions, we can ignore all the
> user ABI headers for now and find a solution that just deals with
> the kernel internal ones.
> 
> I think the easiest way to do that would be to move all non-exported
> headers from include/asm-generic to include/asm. Since it's only about
> internel users then, we can simply use "#include_next <asm/foo.h>"
> to refer to them from arch-specific files that want to reuse them
> only partially and also add some of their own definitions.

We could also create:

    arch/$ARCH/include/arch/
    include/default/arch

"-I include/default" should then be added last in the search path.

An arch generic file could be dropepd in include/default/arch
and be available for everyone.
And an arch specific file could then include the arch generic
file using: 

    #include <default/arch/foo.h>

This is only a slight variant of what has already been suggested,
but it avoids include_next - in favour of an additional
directory that is searched.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux