mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [SPARC64][PPC] strange error ..
@ 2004-03-15 13:41 Wojciech 'Sas' Cieciwa
  2004-03-15 18:41 ` Wojciech 'Sas' Cieciwa
  0 siblings, 1 reply; 11+ messages in thread
From: Wojciech 'Sas' Cieciwa @ 2004-03-15 13:41 UTC (permalink / raw)
  To: linux-kernel

I try to build 2.6.4 + cset-20040314_2208
on SPARC64 and got error:

[...]
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  SYMLINK include/asm -> include/asm-sparc64
  HOSTCC  scripts/fixdep
  HOSTCC  scripts/split-include
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/docproc
  HOSTCC  scripts/kallsyms
  CC      scripts/empty.o
  HOSTCC  scripts/mk_elfconfig
  MKELF   scripts/elfconfig.h
  HOSTCC  scripts/file2alias.o
  HOSTCC  scripts/modpost.o
  HOSTCC  scripts/sumversion.o
  HOSTLD  scripts/modpost
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/bin2c
make[2]: `scripts/fixdep' is up to date.
  SHIPPED scripts/kconfig/zconf.tab.h
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/mconf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/lex.zconf.c
  HOSTCC  -fPIC scripts/kconfig/zconf.tab.o
  HOSTLLD -shared scripts/kconfig/libkconfig.so
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/sparc64/Kconfig
#
# using defaults found in .config
#
  SPLIT   include/linux/autoconf.h -> include/config/*
  CC      init/main.o
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  CC      init/do_mounts.o
  CC      init/do_mounts_devfs.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
In file included from include/linux/unistd.h:9,
                 from init/do_mounts_initrd.c:2:
include/asm/unistd.h:446: syntax error before "unsigned"
include/asm/unistd.h:451: syntax error before "long"
make[1]: *** [init/do_mounts_initrd.o] Error 1
make: *** [init] Error 2

line 446 is:
asmlinkage unsigned long sys_mmap(
				unsigned long addr, unsigned long len,
				unsigned long prot, unsigned long flags,
				unsigned long fd, unsigned long off);

line 451:
asmlinkage long sys_rt_sigaction(int sig,
				const struct sigaction __user *act,
				struct sigaction __user *oact,
				void __user *restorer,
				size_t sigsetsize);


When I add to init/do_mounts_initrd.c 
#include <linux/linkage.h> before unistd.h 
All looks like OK.
This is bug, or I miss something?

Thanx.
					Sas.
-- 
{Wojciech 'Sas' Cieciwa}  {Member of PLD Team                               }
{e-mail: cieciwa@alpha.zarz.agh.edu.pl, http://www2.zarz.agh.edu.pl/~cieciwa}

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 13:41 [SPARC64][PPC] strange error Wojciech 'Sas' Cieciwa
@ 2004-03-15 18:41 ` Wojciech 'Sas' Cieciwa
  2004-03-15 19:00   ` Tom Rini
  0 siblings, 1 reply; 11+ messages in thread
From: Wojciech 'Sas' Cieciwa @ 2004-03-15 18:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds, davem

OK. here is trivial fix:

--- linux-2.6.4/init/do_mounts_initrd.c.org	2004-03-15 09:24:58.000000000 +0100
+++ linux-2.6.4/init/do_mounts_initrd.c	2004-03-15 19:35:50.186528400 +0100
@@ -1,6 +1,6 @@
 #define __KERNEL_SYSCALLS__
-#include <linux/unistd.h>
 #include <linux/kernel.h>
+#include <linux/unistd.h>
 #include <linux/fs.h>
 #include <linux/minix_fs.h>
 #include <linux/ext2_fs.h>

-- 
{Wojciech 'Sas' Cieciwa}  {Member of PLD Team                               }
{e-mail: cieciwa@alpha.zarz.agh.edu.pl, http://www2.zarz.agh.edu.pl/~cieciwa}

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 18:41 ` Wojciech 'Sas' Cieciwa
@ 2004-03-15 19:00   ` Tom Rini
  2004-03-15 20:39     ` David S. Miller
  0 siblings, 1 reply; 11+ messages in thread
From: Tom Rini @ 2004-03-15 19:00 UTC (permalink / raw)
  To: Wojciech 'Sas' Cieciwa; +Cc: linux-kernel, torvalds, davem

On Mon, Mar 15, 2004 at 07:41:57PM +0100, Wojciech 'Sas' Cieciwa wrote:

> OK. here is trivial fix:
> 
> --- linux-2.6.4/init/do_mounts_initrd.c.org	2004-03-15 09:24:58.000000000 +0100
> +++ linux-2.6.4/init/do_mounts_initrd.c	2004-03-15 19:35:50.186528400 +0100
> @@ -1,6 +1,6 @@
>  #define __KERNEL_SYSCALLS__
> -#include <linux/unistd.h>
>  #include <linux/kernel.h>
> +#include <linux/unistd.h>
>  #include <linux/fs.h>
>  #include <linux/minix_fs.h>
>  #include <linux/ext2_fs.h>

That leaves the more general problem of <asm/unistd.h> uses 'asmlinkage'
on platforms where either (or both) of the following can be true:
- 'asmlinkage' is a meaningless term, and shouldn't be used.
- <asm/unistd.h> doesn't include <linux/linkage.h> so it's possible
  another file down the line breaks.

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 19:00   ` Tom Rini
@ 2004-03-15 20:39     ` David S. Miller
  2004-03-15 20:43       ` Tom Rini
  2004-03-15 22:02       ` Colin Leroy
  0 siblings, 2 replies; 11+ messages in thread
From: David S. Miller @ 2004-03-15 20:39 UTC (permalink / raw)
  To: Tom Rini; +Cc: cieciwa, linux-kernel, torvalds

On Mon, 15 Mar 2004 12:00:26 -0700
Tom Rini <trini@kernel.crashing.org> wrote:

> That leaves the more general problem of <asm/unistd.h> uses 'asmlinkage'
> on platforms where either (or both) of the following can be true:
> - 'asmlinkage' is a meaningless term, and shouldn't be used.
> - <asm/unistd.h> doesn't include <linux/linkage.h> so it's possible
>   another file down the line breaks.

I think the best fix is to include linux/linkage.h in asm/unistd.h as
you seem to be suggesting, and therefore that is the change I will
push off to Linus to fix this on sparc32 and sparc64.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 20:39     ` David S. Miller
@ 2004-03-15 20:43       ` Tom Rini
  2004-03-15 20:54         ` Randy.Dunlap
  2004-03-15 21:33         ` David S. Miller
  2004-03-15 22:02       ` Colin Leroy
  1 sibling, 2 replies; 11+ messages in thread
From: Tom Rini @ 2004-03-15 20:43 UTC (permalink / raw)
  To: David S. Miller; +Cc: cieciwa, linux-kernel, torvalds

On Mon, Mar 15, 2004 at 12:39:53PM -0800, David S. Miller wrote:

> On Mon, 15 Mar 2004 12:00:26 -0700
> Tom Rini <trini@kernel.crashing.org> wrote:
> 
> > That leaves the more general problem of <asm/unistd.h> uses 'asmlinkage'
> > on platforms where either (or both) of the following can be true:
> > - 'asmlinkage' is a meaningless term, and shouldn't be used.
> > - <asm/unistd.h> doesn't include <linux/linkage.h> so it's possible
> >   another file down the line breaks.
> 
> I think the best fix is to include linux/linkage.h in asm/unistd.h as
> you seem to be suggesting, and therefore that is the change I will
> push off to Linus to fix this on sparc32 and sparc64.

Erm, if I read include/asm-sparc{,64}/linkage.h right, 'asmlinkage' ends
up being defined to ''.  So why not just remove 'asmlinkage' from the
offending line in unistd.h ?

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 20:43       ` Tom Rini
@ 2004-03-15 20:54         ` Randy.Dunlap
  2004-03-15 21:08           ` Tom Rini
  2004-03-15 21:33         ` David S. Miller
  1 sibling, 1 reply; 11+ messages in thread
From: Randy.Dunlap @ 2004-03-15 20:54 UTC (permalink / raw)
  To: Tom Rini; +Cc: davem, cieciwa, linux-kernel, torvalds

On Mon, 15 Mar 2004 13:43:46 -0700 Tom Rini wrote:

| On Mon, Mar 15, 2004 at 12:39:53PM -0800, David S. Miller wrote:
| 
| > On Mon, 15 Mar 2004 12:00:26 -0700
| > Tom Rini <trini@kernel.crashing.org> wrote:
| > 
| > > That leaves the more general problem of <asm/unistd.h> uses 'asmlinkage'
| > > on platforms where either (or both) of the following can be true:
| > > - 'asmlinkage' is a meaningless term, and shouldn't be used.
| > > - <asm/unistd.h> doesn't include <linux/linkage.h> so it's possible
| > >   another file down the line breaks.
| > 
| > I think the best fix is to include linux/linkage.h in asm/unistd.h as
| > you seem to be suggesting, and therefore that is the change I will
| > push off to Linus to fix this on sparc32 and sparc64.
| 
| Erm, if I read include/asm-sparc{,64}/linkage.h right, 'asmlinkage' ends
| up being defined to ''.  So why not just remove 'asmlinkage' from the
| offending line in unistd.h ?

For future-proofing:  so that it will be like all other $arch/unistd.h,
so that when someone changes the meaning of it, it will just work...?

--
~Randy

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 20:54         ` Randy.Dunlap
@ 2004-03-15 21:08           ` Tom Rini
  2004-03-15 21:14             ` Randy.Dunlap
  0 siblings, 1 reply; 11+ messages in thread
From: Tom Rini @ 2004-03-15 21:08 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: davem, cieciwa, linux-kernel, torvalds

On Mon, Mar 15, 2004 at 12:54:17PM -0800, Randy.Dunlap wrote:
> On Mon, 15 Mar 2004 13:43:46 -0700 Tom Rini wrote:
> | On Mon, Mar 15, 2004 at 12:39:53PM -0800, David S. Miller wrote:
> | 
> | > On Mon, 15 Mar 2004 12:00:26 -0700
> | > Tom Rini <trini@kernel.crashing.org> wrote:
> | > 
> | > > That leaves the more general problem of <asm/unistd.h> uses 'asmlinkage'
> | > > on platforms where either (or both) of the following can be true:
> | > > - 'asmlinkage' is a meaningless term, and shouldn't be used.
> | > > - <asm/unistd.h> doesn't include <linux/linkage.h> so it's possible
> | > >   another file down the line breaks.
> | > 
> | > I think the best fix is to include linux/linkage.h in asm/unistd.h as
> | > you seem to be suggesting, and therefore that is the change I will
> | > push off to Linus to fix this on sparc32 and sparc64.
> | 
> | Erm, if I read include/asm-sparc{,64}/linkage.h right, 'asmlinkage' ends
> | up being defined to ''.  So why not just remove 'asmlinkage' from the
> | offending line in unistd.h ?
> 
> For future-proofing:  so that it will be like all other $arch/unistd.h,

It's not nearly all other $arch/unistd.h, it's arm, arm26, i386, ia64,
ppc64, v850 and x86_64.  Of which, only i386, ia64 and x86_64 arm* do
anything in <asm/linkage.h>.

So if we really do want to go down the future-proof <asm-*/unistd.h>
from the ia-centric folks (<grin>) road, we'd be better off with a patch
to fix everyone else's $arch/unistd.h.

> so that when someone changes the meaning of it, it will just work...?

The meaning of asmlinkage ?

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 21:08           ` Tom Rini
@ 2004-03-15 21:14             ` Randy.Dunlap
  0 siblings, 0 replies; 11+ messages in thread
From: Randy.Dunlap @ 2004-03-15 21:14 UTC (permalink / raw)
  To: Tom Rini; +Cc: davem, cieciwa, linux-kernel, torvalds

On Mon, 15 Mar 2004 14:08:07 -0700 Tom Rini wrote:

| On Mon, Mar 15, 2004 at 12:54:17PM -0800, Randy.Dunlap wrote:
| > On Mon, 15 Mar 2004 13:43:46 -0700 Tom Rini wrote:
| > | On Mon, Mar 15, 2004 at 12:39:53PM -0800, David S. Miller wrote:
| > | 
| > | > On Mon, 15 Mar 2004 12:00:26 -0700
| > | > Tom Rini <trini@kernel.crashing.org> wrote:
| > | > 
| > | > > That leaves the more general problem of <asm/unistd.h> uses 'asmlinkage'
| > | > > on platforms where either (or both) of the following can be true:
| > | > > - 'asmlinkage' is a meaningless term, and shouldn't be used.
| > | > > - <asm/unistd.h> doesn't include <linux/linkage.h> so it's possible
| > | > >   another file down the line breaks.
| > | > 
| > | > I think the best fix is to include linux/linkage.h in asm/unistd.h as
| > | > you seem to be suggesting, and therefore that is the change I will
| > | > push off to Linus to fix this on sparc32 and sparc64.
| > | 
| > | Erm, if I read include/asm-sparc{,64}/linkage.h right, 'asmlinkage' ends
| > | up being defined to ''.  So why not just remove 'asmlinkage' from the
| > | offending line in unistd.h ?
| > 
| > For future-proofing:  so that it will be like all other $arch/unistd.h,
| 
| It's not nearly all other $arch/unistd.h, it's arm, arm26, i386, ia64,
| ppc64, v850 and x86_64.  Of which, only i386, ia64 and x86_64 arm* do
| anything in <asm/linkage.h>.
| 
| So if we really do want to go down the future-proof <asm-*/unistd.h>
| from the ia-centric folks (<grin>) road, we'd be better off with a patch
| to fix everyone else's $arch/unistd.h.

OK.  :)

| > so that when someone changes the meaning of it, it will just work...?
| 
| The meaning of asmlinkage ?

Sure, it could mean something in the future, for any arch.

Your simple fix sounds good for 2.6.x.

--
~Randy

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 20:43       ` Tom Rini
  2004-03-15 20:54         ` Randy.Dunlap
@ 2004-03-15 21:33         ` David S. Miller
  1 sibling, 0 replies; 11+ messages in thread
From: David S. Miller @ 2004-03-15 21:33 UTC (permalink / raw)
  To: Tom Rini; +Cc: cieciwa, linux-kernel, torvalds

On Mon, 15 Mar 2004 13:43:46 -0700
Tom Rini <trini@kernel.crashing.org> wrote:

> Erm, if I read include/asm-sparc{,64}/linkage.h right, 'asmlinkage' ends
> up being defined to ''.  So why not just remove 'asmlinkage' from the
> offending line in unistd.h ?

So that the declarations look consistent across platforms?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
  2004-03-15 20:39     ` David S. Miller
  2004-03-15 20:43       ` Tom Rini
@ 2004-03-15 22:02       ` Colin Leroy
       [not found]         ` <Pine.LNX.4.58L.0403160928530.23289@alpha.zarz.agh.edu.pl>
  1 sibling, 1 reply; 11+ messages in thread
From: Colin Leroy @ 2004-03-15 22:02 UTC (permalink / raw)
  To: David S. Miller; +Cc: Tom Rini, cieciwa, linux-kernel, torvalds

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

On 15 Mar 2004 at 12h03, David S. Miller wrote:

Hi, 

> I think the best fix is to include linux/linkage.h in asm/unistd.h as
> you seem to be suggesting, and therefore that is the change I will
> push off to Linus to fix this on sparc32 and sparc64.

My first patch did that :)
See '[PATCH] 2.6.4-bk3 ppc32 compile fix' thread. 
Re-attaching just in case.
-- 
Colin

[-- Attachment #2: 2.6.4-bk3.compile.fix --]
[-- Type: application/octet-stream, Size: 273 bytes --]

--- include/asm-ppc/unistd.h.old	2004-03-14 22:56:42.901105784 +0100
+++ include/asm-ppc/unistd.h	2004-03-14 22:56:45.276744632 +0100
@@ -380,6 +380,7 @@
 
 #include <linux/compiler.h>
 #include <linux/types.h>
+#include <linux/linkage.h>
 
 /*
  * System call prototypes.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [SPARC64][PPC] strange error ..
       [not found]         ` <Pine.LNX.4.58L.0403160928530.23289@alpha.zarz.agh.edu.pl>
@ 2004-03-16 15:25           ` Tom Rini
  0 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2004-03-16 15:25 UTC (permalink / raw)
  To: Wojciech 'Sas' Cieciwa
  Cc: Colin Leroy, David S. Miller, linux-kernel, torvalds

On Tue, Mar 16, 2004 at 09:35:36AM +0100, Wojciech 'Sas' Cieciwa wrote:

> 
> 2.6.5-rc1 released and problem still exist on PPC.

Andrew has submitted my preferred fix for PPC32 to Linus, so it should be
in -rc2.

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-03-16 15:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-15 13:41 [SPARC64][PPC] strange error Wojciech 'Sas' Cieciwa
2004-03-15 18:41 ` Wojciech 'Sas' Cieciwa
2004-03-15 19:00   ` Tom Rini
2004-03-15 20:39     ` David S. Miller
2004-03-15 20:43       ` Tom Rini
2004-03-15 20:54         ` Randy.Dunlap
2004-03-15 21:08           ` Tom Rini
2004-03-15 21:14             ` Randy.Dunlap
2004-03-15 21:33         ` David S. Miller
2004-03-15 22:02       ` Colin Leroy
     [not found]         ` <Pine.LNX.4.58L.0403160928530.23289@alpha.zarz.agh.edu.pl>
2004-03-16 15:25           ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®