From: Sam Ravnborg <sam@ravnborg.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Greg Ungerer <gerg@snapgear.com>,
linux arch <linux-arch@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux/m68k <linux-m68k@vger.kernel.org>
Subject: Re: kbuild now support arch/$ARCH/include - time for ARCHs to convert
Date: Mon, 4 Aug 2008 18:45:58 +0200 [thread overview]
Message-ID: <20080804164558.GA26622@uranus.ravnborg.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0808041750110.16461@anakin>
On Mon, Aug 04, 2008 at 06:00:53PM +0200, Geert Uytterhoeven wrote:
> On Mon, 4 Aug 2008, Arnd Bergmann wrote:
> > On Sunday 03 August 2008, Geert Uytterhoeven wrote:
> > > There seem to be 3 classes of m68knommu header files:
> > > ? 1. Plain files (some of them may be (nearly) identical copies of the
> > > ? ? ?m68k variants,
> >
> > For reference, I found the files auxvec.h, device.h, emergency-restart.h,
> > futex.h, ioctl.h, irq_regs.h, kdebug.h, mutex.h and topology.h to be
> > entirely identical, so you may remove the m68knommu variants with your
> > approach.
>
> Thanks for the list!
>
> > > ? 2. Files that just include the m68k variant,
> > > ? 3. Files that include the m68k variant and do something more (pci.h and
> > > ? ? ?setup.h).
> > >
> > > Since I don't think we want to do the m68k/m68knommu merge right now
> > > (Sorry Arnd, I'll keep your script in mind anyway!), the simplest way is to:
> > > - Remove all files from class 2, and add to the Makefile:
> >
> > Does this work with the exported headers? I guess it should if you
> > always use the m68k exports for m68knommu as well, but if that's
> > possible is is a question you haven't answered yet.
>
> Oops, forgot about the exported headers... Don't know. Sam?
For sparc I has a similar issue and in the end I decided
to put the extra effort in and merged the header files
for sparc and sparc64. In this way we then had only a single
source to export from and despite the number of files named
foo_32.h / foo_64.h it was a net win because David long term anyway
plan to merge the two.
So to me the obvious solution for m68k / m68knommu is to
put in the additional effort required to merge the header files
for the two architectures.
In the top-level Makefile you will need this trivial patch to make it work:
diff --git a/Makefile b/Makefile
index f156f40..491ce6b 100644
--- a/Makefile
+++ b/Makefile
@@ -206,10 +206,12 @@ ifeq ($(ARCH),x86_64)
endif
# Where to locate arch specific headers
+hdr-arch := $(SRCARCH)
ifeq ($(ARCH),sparc64)
hdr-arch := sparc
-else
- hdr-arch := $(SRCARCH)
+endif
+ifeq ($(ARCH),m68knommu)
+ hdr-arch := m68k
endif
So we have a script to help us. We know what files are identical and
kbuild support is ready.
And if we avoid it we have issues with exported headers.
So let's merge the two now - there is no reason to wait.
And do so in the git tree to make it obvious what happens.
Sam
next prev parent reply other threads:[~2008-08-04 16:46 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 20:05 Sam Ravnborg
2008-07-29 3:06 ` Kyle McMartin
2008-07-29 3:27 ` Sam Ravnborg
2008-07-29 14:21 ` Kyle McMartin
2008-08-09 2:50 ` Sam Ravnborg
2008-07-30 6:49 ` Greg Ungerer
2008-07-30 7:07 ` Arnd Bergmann
2008-07-30 8:52 ` Sam Ravnborg
2008-07-30 8:38 ` Sam Ravnborg
2008-08-01 6:03 ` Greg Ungerer
2008-08-03 20:16 ` Geert Uytterhoeven
2008-08-04 0:34 ` Greg Ungerer
2008-08-04 5:10 ` Sam Ravnborg
2008-08-04 14:35 ` Arnd Bergmann
2008-08-04 16:00 ` Geert Uytterhoeven
2008-08-04 16:45 ` Sam Ravnborg [this message]
2008-07-30 9:34 ` David Howells
2008-07-30 12:26 ` Geert Uytterhoeven
2008-07-31 3:23 ` Paul Mundt
2008-07-31 7:17 ` Geert Uytterhoeven
2008-07-31 11:26 ` Greg Ungerer
2008-07-31 19:47 ` Arnd Bergmann
2008-07-31 20:13 ` Sam Ravnborg
2008-08-01 7:35 ` Arnd Bergmann
2008-08-01 16:46 ` Sam Ravnborg
2008-07-31 18:23 ` Ralf Baechle
2008-07-31 20:14 ` Sam Ravnborg
2008-08-09 2:52 ` Sam Ravnborg
2008-08-09 3:09 ` Paul Mundt
2008-08-09 7:03 ` Sam Ravnborg
2008-08-09 7:20 ` Russell King
2008-08-09 11:13 ` Sam Ravnborg
2008-08-01 8:35 ` Martin Schwidefsky
2008-08-01 16:49 ` Sam Ravnborg
2008-08-05 4:18 ` Rusty Russell
2008-08-05 17:16 ` Geert Uytterhoeven
2008-08-05 20:45 ` Sam Ravnborg
2008-08-05 22:06 ` Russell King
2008-08-06 19:21 ` Russell King
2008-08-06 19:28 ` Sam Ravnborg
2008-08-06 19:51 ` Russell King
2008-08-06 19:27 ` Sam Ravnborg
2008-08-09 7:28 ` 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=20080804164558.GA26622@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=arnd@arndb.de \
--cc=geert@linux-m68k.org \
--cc=gerg@snapgear.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome