All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: lkml <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCH 38/38] asm-generic: introduc Kbuild.generic
Date: Thu, 17 Jul 2014 12:38:15 +0200	[thread overview]
Message-ID: <20140717103815.GA16291@ravnborg.org> (raw)
In-Reply-To: <4667634.oiTEQ4v5vj@wuerfel>

On Tue, Jul 15, 2014 at 09:03:00AM +0200, Arnd Bergmann wrote:
> On Monday 14 July 2014 17:09:06 Sam Ravnborg wrote:
> > Kbuild.generic is for asm-generic files that are used
> > by all architectures.
> > So rather than adding the file to the individual Kbuild files
> > it is enough to add it to this file
> > 
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> 
> This has been suggested in the past, and I remember there being some
> controversy around it, but I don't really mind it, so you have my
> ok in principle. Two points though that we have to work out first:
> 
> > diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild
> > index 96e54be..e09f8e7 100644
> > --- a/arch/alpha/include/asm/Kbuild
> > +++ b/arch/alpha/include/asm/Kbuild
> > @@ -1,9 +1,9 @@
> > -
> > +# Generic wrappers from include/asm-generic
> > +include include/asm-generic/Kbuild.generic
> 
> We have the same kind of header for the uapi files, it's called 
> include/uapi/asm-generic/Kbuild.asm. I don't know why I picked that
> name back then, Kbuild.generic seems more appropriate, but I think
> either way it would be good to be consistent.
> 
> Can you either rename the existing file to Kbuild.generic, or call
> the new one Kbuild.asm as well?
There was already a file name Kbuild.asm in that directory - therefore I picked another name.
But the original Kbuild.asm was in reality not used so I have deleted it in
my patch-set and will re-introduce it with a different purpose.
People are used to the name "Kbuild.asm" so let's stick to that.

> * We could improve the situation if the definition of this list is
>   changed so we only generate the generic header files that are not
>   already provided by an architecture. If we do this, we can consolidate
>   a lot more here, which is nice, but the cost would be equivalent to
>   another level of indirection and a potential for subtle bugs if it's
>   not done very careful.
I think this is the way to go - and will try to give it a spin.

Something along these lines:
include/asm-generic/Kbuild.asm will include a list of all header files
that shall be present for any architecture and may come from asm-generic.
If the architecture provide there own file - good.
If the architecture do not provide their own file => create wrapper.

The arch provided header file comes first in the search path,
so if a wrapper was generated and later a dedicated file is added
then we will use the dedicated file and not the wrapper that points
back to asm-generic.

The same logic applies for uapi/asm-generic as well.

I will try to come up with an implementation of this,
then we can see if this flys.

	Sam

  reply	other threads:[~2014-07-17 10:38 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 15:06 [RFC PATCH 0/38] clean-up uapi + asm-generic Kbuild files Sam Ravnborg
2014-07-14 15:08 ` [PATCH 01/38] cris: fix headers_install Sam Ravnborg
2014-07-14 15:08   ` [PATCH 02/38] openrisc: drop ucontext from list exported headers Sam Ravnborg
2014-07-14 15:08     ` Sam Ravnborg
2014-07-14 15:08   ` [PATCH 03/38] hexagon: " Sam Ravnborg
2014-07-28 16:19     ` rkuo
2014-07-14 15:08   ` [PATCH 04/38] score: drop irrelevant assignment from Kbuild file Sam Ravnborg
2014-07-15 13:57     ` Lennox Wu
2014-07-14 15:08   ` [PATCH 05/38] tile: clean up Kbuild files Sam Ravnborg
2014-07-17 19:41     ` Chris Metcalf
2014-07-14 15:08   ` [PATCH 06/38] x86: clean-up Kbuild file - drop unused assignments Sam Ravnborg
2014-07-14 22:50     ` H. Peter Anvin
2014-07-14 15:08   ` [PATCH 07/38] Delete unused Kbuild files in include/* Sam Ravnborg
2014-07-15  9:06     ` James Hogan
2014-07-15  9:19       ` Sam Ravnborg
2014-07-14 15:08   ` [PATCH 08/38] kbuild: drop support for non uapi Kbuild files in headers_install Sam Ravnborg
2014-07-14 15:08   ` [PATCH 09/38] uapi: check for optional files which are generated Sam Ravnborg
2014-07-14 15:08   ` [PATCH 10/38] uapi: drop obsolete logic for generated headers Sam Ravnborg
2014-07-14 15:08   ` [PATCH 11/38] alpha: clean-up uapi Kbuild file Sam Ravnborg
2014-07-14 15:08   ` [PATCH 12/38] arm: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 13/38] arm64: " Sam Ravnborg
2014-07-14 17:02     ` Catalin Marinas
2014-07-15 10:14     ` James Hogan
2014-07-14 15:08   ` [PATCH 14/38] avr32: " Sam Ravnborg
2014-07-14 17:53     ` Hans-Christian Egtvedt
2014-07-14 15:08   ` [PATCH 15/38] blackfin: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 16/38] c6x: " Sam Ravnborg
2014-07-14 20:40     ` Mark Salter
2014-07-14 15:08   ` [PATCH 17/38] cris: " Sam Ravnborg
2014-08-11  5:35     ` Mikael Starvik
2014-09-03 11:23     ` Jesper Nilsson
2014-07-14 15:08   ` [PATCH 18/38] frv: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 19/38] hexagon: " Sam Ravnborg
2014-07-28 16:19     ` rkuo
2014-07-14 15:08   ` [PATCH 20/38] ia64: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 21/38] m32r: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 22/38] m68k: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 23/38] metag: " Sam Ravnborg
     [not found]     ` <1405350546-28467-23-git-send-email-sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>
2014-07-15  9:22       ` James Hogan
2014-07-15  9:22         ` James Hogan
2014-07-14 15:08   ` [PATCH 24/38] microblaze: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 25/38] mips: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 26/38] mn10300: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 27/38] openrisc: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 28/38] parisc: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 29/38] powerpc: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 30/38] s390: " Sam Ravnborg
2014-07-14 15:08   ` [PATCH 31/38] score: " Sam Ravnborg
2014-07-18 15:19     ` Lennox Wu
2014-07-14 15:09   ` [PATCH 32/38] sh: " Sam Ravnborg
2014-07-14 15:09   ` [PATCH 33/38] sparc: " Sam Ravnborg
2014-07-14 20:02     ` David Miller
2014-07-14 15:09   ` [PATCH 34/38] tile: " Sam Ravnborg
2014-07-17 19:44     ` Chris Metcalf
2014-07-14 15:09   ` [PATCH 35/38] unicore32: " Sam Ravnborg
2014-07-15 10:53     ` James Hogan
2014-07-15 11:07       ` Sam Ravnborg
2014-07-14 15:09   ` [PATCH 36/38] x86: " Sam Ravnborg
2014-07-14 22:52     ` H. Peter Anvin
2014-07-14 15:09   ` [PATCH 37/38] xtensa: " Sam Ravnborg
2014-07-14 15:09   ` [PATCH 38/38] asm-generic: introduc Kbuild.generic Sam Ravnborg
2014-07-15  7:03     ` Arnd Bergmann
2014-07-17 10:38       ` Sam Ravnborg [this message]
2014-07-17 10:50         ` Arnd Bergmann
2014-08-11  5:35   ` [PATCH 01/38] cris: fix headers_install Mikael Starvik
2014-09-03 11:22   ` Jesper Nilsson
2014-07-14 15:34 ` [RFC PATCH 0/38] clean-up uapi + asm-generic Kbuild files Arnd Bergmann
2014-07-14 22:14   ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140717103815.GA16291@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.