public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix compile error in arch/x86/kernel/syscall_64.c
@ 2008-12-02 21:51 Jody McIntyre
  2008-12-03 18:00 ` H. Peter Anvin
  2008-12-04 14:32 ` Arnd Bergmann
  0 siblings, 2 replies; 8+ messages in thread
From: Jody McIntyre @ 2008-12-02 21:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: H. Peter Anvin, tglx, mingo

1965aae3c98397aad957412413c07e97b1bd4e64 broke compilation on one of my
systems:

  CC      arch/x86/kernel/syscall_64.o
arch/x86/kernel/syscall_64.c:27: error: array index in initializer exceeds array bounds
arch/x86/kernel/syscall_64.c:27: error: (near initialization for ‘sys_call_table’)
arch/x86/kernel/syscall_64.c:27: warning: excess elements in array initializer
arch/x86/kernel/syscall_64.c:27: warning: (near initialization for ‘sys_call_table’)
make[1]: *** [arch/x86/kernel/syscall_64.o] Error 1
make: *** [arch/x86/kernel/syscall_64.o] Error 2

Reverting only the parts of the commit that change ASM_X86__UNISTD_64_H
to _ASM_X86_UNISTD_64_H fixes the problem.  Patch below.

I have no idea what's going on here.  Compiler bug?

root@vm1:~/linux-2.6# gcc --version
gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2

Signed-off-by: Jody McIntyre <scjody@sun.com>
---
 arch/um/sys-x86_64/syscall_table.c |    4 ++--
 arch/x86/include/asm/unistd_64.h   |    6 +++---
 arch/x86/kernel/asm-offsets_64.c   |    2 +-
 arch/x86/kernel/syscall_64.c       |    4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/um/sys-x86_64/syscall_table.c b/arch/um/sys-x86_64/syscall_table.c
index dd21d69..ef42ec0 100644
--- a/arch/um/sys-x86_64/syscall_table.c
+++ b/arch/um/sys-x86_64/syscall_table.c
@@ -41,12 +41,12 @@
 #define stub_rt_sigreturn sys_rt_sigreturn
 
 #define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
-#undef _ASM_X86_UNISTD_64_H
+#undef ASM_X86__UNISTD_64_H
 #include "../../x86/include/asm/unistd_64.h"
 
 #undef __SYSCALL
 #define __SYSCALL(nr, sym) [ nr ] = sym,
-#undef _ASM_X86_UNISTD_64_H
+#undef ASM_X86__UNISTD_64_H
 
 typedef void (*sys_call_ptr_t)(void);
 
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h
index d2e415e..26a7432 100644
--- a/arch/x86/include/asm/unistd_64.h
+++ b/arch/x86/include/asm/unistd_64.h
@@ -1,5 +1,5 @@
-#ifndef _ASM_X86_UNISTD_64_H
-#define _ASM_X86_UNISTD_64_H
+#ifndef ASM_X86__UNISTD_64_H
+#define ASM_X86__UNISTD_64_H
 
 #ifndef __SYSCALL
 #define __SYSCALL(a, b)
@@ -690,4 +690,4 @@ __SYSCALL(__NR_inotify_init1, sys_inotify_init1)
 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 #endif	/* __KERNEL__ */
 
-#endif /* _ASM_X86_UNISTD_64_H */
+#endif /* ASM_X86__UNISTD_64_H */
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
index 7fcf63d..505543a 100644
--- a/arch/x86/kernel/asm-offsets_64.c
+++ b/arch/x86/kernel/asm-offsets_64.c
@@ -22,7 +22,7 @@
 
 #define __NO_STUBS 1
 #undef __SYSCALL
-#undef _ASM_X86_UNISTD_64_H
+#undef ASM_X86__UNISTD_64_H
 #define __SYSCALL(nr, sym) [nr] = 1,
 static char syscalls[] = {
 #include <asm/unistd.h>
diff --git a/arch/x86/kernel/syscall_64.c b/arch/x86/kernel/syscall_64.c
index de87d60..3d1be4f 100644
--- a/arch/x86/kernel/syscall_64.c
+++ b/arch/x86/kernel/syscall_64.c
@@ -8,12 +8,12 @@
 #define __NO_STUBS
 
 #define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
-#undef _ASM_X86_UNISTD_64_H
+#undef ASM_X86__UNISTD_64_H
 #include <asm/unistd_64.h>
 
 #undef __SYSCALL
 #define __SYSCALL(nr, sym) [nr] = sym,
-#undef _ASM_X86_UNISTD_64_H
+#undef ASM_X86__UNISTD_64_H
 
 typedef void (*sys_call_ptr_t)(void);
 

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

end of thread, other threads:[~2008-12-04 19:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 21:51 [PATCH] Fix compile error in arch/x86/kernel/syscall_64.c Jody McIntyre
2008-12-03 18:00 ` H. Peter Anvin
2008-12-03 19:50   ` Jody McIntyre
2008-12-03 20:17     ` H. Peter Anvin
2008-12-03 21:23       ` Jody McIntyre
2008-12-04 14:32 ` Arnd Bergmann
2008-12-04 19:07   ` Jody McIntyre
2008-12-04 19:12   ` H. Peter Anvin

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