From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Roman Zippel <zippel@linux-m68k.org>,
linux-m68k <linux-m68k@vger.kernel.org>,
Greg Ungerer <gerg@uclinux.org>,
uclinux-dev <uclinux-dev@uclinux.org>,
linux-kbuild <linux-kbuild@vger.kernel.org>
Subject: Re: Merge headerfiles for m68k and m68knommu to arch/m68k/include/asm
Date: Tue, 9 Dec 2008 09:24:47 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0812090921310.29640@anakin> (raw)
In-Reply-To: <20081209054528.GA1407@uranus.ravnborg.org>
On Tue, 9 Dec 2008, Sam Ravnborg wrote:
> On Tue, Dec 09, 2008 at 12:26:05AM +0100, Arnd Bergmann wrote:
> > On Tuesday 09 December 2008, Geert Uytterhoeven wrote:
> > > > I have used the following include guard:
> > > >
> > > > #ifdef __uClinux__
> > > > #include "atomic_no.h"
> > > > #else
> > > > #include "atomic_mm.h"
> > > > #endif
> > > >
> > > > gcc -E -dM for the two compilers revealed that this was the
> > > > only symbol that differed.
> > >
> > > I think you can share a toolchain for m68k and m68knommu, at least for the
> > > kernel (I used my plain m68k toolchain when experimenting with m68knommu for
> > > Amiga).
> > >
> > > > With the above construct we do the "right thing" also for
> > > > headers exported to userspace.
> > > > But actually none of the headers using the above are
> > > > subject for export at the moment so we could use a
> > > > CONFIG_ symbol for the same.
> > >
> > > So I prefer to just check CONFIG_MMU.
> >
> > Some of them are, by means of include/asm-generic/Kbuild.asm, e.g.
> > unistd.h!
Interesting, I'd expect unistd.h to be the same!
Ah, it's the restart_syscall:
--- include/asm-m68k/unistd.h 2008-10-18 10:34:15.000000000 +0200
+++ arch/m68knommu/include/asm/unistd.h 2008-10-12 14:08:01.000000000 +0200
@@ -5,6 +5,7 @@
* This file contains the system call numbers.
*/
+#define __NR_restart_syscall 0
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
@@ -359,9 +360,6 @@
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
-/* whitelist for checksyscalls */
-#define __IGNORE_restart_syscall
-
/*
* "Conditional" syscalls
*
Sorry, I don't know about syscall restart handling, and why it differs. Anyone
who can enlighten me?
> I was fooled by make headers_check showing no errros.
> But it turns out that headers_check does not recognize
> includes made with "".
>
> So I will update the patch to include revevant *_{no,mm}.h files
> in Kbuild.
>
> >
> > I'm not sure if it's entirely correct, but I think you can use
> >
> > #ifdef __KERNEL__
> > # ifdef CONFIG_MMU
> > # include "atomic_mm.h
> > # else
> > # include "atomic_no.h
> > # endif
> > #else
> > # ifndef __uClinux__
> > # include "atomic_mm.h
> > # else
> > # include "atomic_no.h
> > # endif
> > #endif
>
> Can someone with a shared (m68k/m68knommu) please check if
> __uClinux__ is only set in the m68knommu case.
^^^^
always and only
>
> Use:
>
> touch foo.h; gcc -E -dM
>
> to see what is defined by the compiler.
> You will also need to specify if this is for m68k or m68knommu.
Still, I don't see why the compiler needs to be aware of being configured for
m68k or m68knommu, so IMHO this is a very fragile test...
What are the other exported headers that differ?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2008-12-09 8:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081208205814.GA22697@uranus.ravnborg.org>
2008-12-08 22:53 ` Merge headerfiles for m68k and m68knommu to arch/m68k/include/asm Sam Ravnborg
2008-12-08 23:01 ` Geert Uytterhoeven
2008-12-08 23:26 ` Arnd Bergmann
2008-12-09 5:45 ` Sam Ravnborg
2008-12-09 8:24 ` Geert Uytterhoeven [this message]
2008-12-09 9:45 ` Andreas Schwab
2008-12-09 11:02 ` Arnd Bergmann
2008-12-09 18:04 ` Sam Ravnborg
2008-12-11 8:33 ` Geert Uytterhoeven
2008-12-11 9:38 ` Andreas Schwab
2008-12-11 16:48 ` Arnd Bergmann
2008-12-11 20:16 ` Geert Uytterhoeven
2008-12-13 16:16 ` Arnd Bergmann
2008-12-12 5:40 ` Greg Ungerer
2008-12-13 20:46 ` Sam Ravnborg
2008-12-13 20:43 ` Sam Ravnborg
2008-12-09 16:54 ` Allon Stern
2008-12-09 17:39 ` [uClinux-dev] " Geert Uytterhoeven
2008-12-11 15:44 ` Allon Stern
2008-12-12 5:22 ` Greg Ungerer
2008-12-13 20:52 ` Sam Ravnborg
[not found] ` <20081213205251.GC27748@uranus.ravnborg.org>
[not found] ` <20081213205828.GD27748@uranus.ravnborg.org>
2008-12-14 16:13 ` [PATCH] m68k,m68knommu: merge header files Geert Uytterhoeven
[not found] ` <49707AE0.1040803@opengear.com>
2009-01-16 12:57 ` Geert Uytterhoeven
2009-01-16 14:21 ` Greg Ungerer
2009-01-16 14:34 ` Sam Ravnborg
2009-01-16 21:53 ` Geert Uytterhoeven
2009-01-16 22:19 ` Greg Ungerer
2008-12-08 20:58 Merge headerfiles for m68k and m68knommu to arch/m68k/include/asm 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=Pine.LNX.4.64.0812090921310.29640@anakin \
--to=geert@linux-m68k.org \
--cc=arnd@arndb.de \
--cc=gerg@uclinux.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=uclinux-dev@uclinux.org \
--cc=zippel@linux-m68k.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