From: Mike Frysinger <vapier@gentoo.org>
Date: Wed, 17 Oct 2007 16:04:36 +0000 (+0200)
Subject: x86: hide cond_syscall behind __KERNEL__
X-Git-Tag: v2.6.24-rc1~476^2~81
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6704ab1cd42269e536a6735db740e57e2c04c3b4;p=linux-2.6-omap-h63xx.git

x86: hide cond_syscall behind __KERNEL__

This brings x86_64 into line with all other architectures by only defining
cond_syscall() when __KERNEL__ is defined.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---

diff --git a/include/asm-x86/unistd_64.h b/include/asm-x86/unistd_64.h
index fc4e73f5f1f..4f769598aba 100644
--- a/include/asm-x86/unistd_64.h
+++ b/include/asm-x86/unistd_64.h
@@ -676,6 +676,7 @@ asmlinkage long sys_rt_sigaction(int sig,
 #endif	/* __KERNEL__ */
 #endif	/* __NO_STUBS */
 
+#ifdef __KERNEL__
 /*
  * "Conditional" syscalls
  *
@@ -683,5 +684,6 @@ asmlinkage long sys_rt_sigaction(int sig,
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
+#endif	/* __KERNEL__ */
 
 #endif /* _ASM_X86_64_UNISTD_H_ */