linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] [PATCH] asm-generic/unistd.h: handle symbol prefixes in cond_syscall
@ 2012-02-24 14:01 James Hogan
  2012-02-24 14:01 ` James Hogan
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: James Hogan @ 2012-02-24 14:01 UTC (permalink / raw)
  To: Arnd Bergmann, linux-arch, linux-kernel

Some architectures have symbol prefixes and set CONFIG_SYMBOL_PREFIX,
but this wasn't taken into account by the generic cond_syscall. It's
easy enough to fix in a generic fashion, so add the symbol prefix to
symbol names in cond_syscall when CONFIG_SYMBOL_PREFIX is set.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
---
 include/asm-generic/unistd.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
index 2292d1a..c9a5ba4 100644
--- a/include/asm-generic/unistd.h
+++ b/include/asm-generic/unistd.h
@@ -924,7 +924,14 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
+#ifdef CONFIG_SYMBOL_PREFIX
+#define __SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
+#else
+#define __SYMBOL_PREFIX
+#endif
+#define cond_syscall(x) asm(".weak\t" __SYMBOL_PREFIX #x "\n\t" \
+			    ".set\t" __SYMBOL_PREFIX #x "," \
+			    __SYMBOL_PREFIX "sys_ni_syscall")
 #endif
 
 #endif /* __KERNEL__ */
-- 
1.7.2.3

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

end of thread, other threads:[~2012-02-24 16:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-24 14:01 [RFC] [PATCH] asm-generic/unistd.h: handle symbol prefixes in cond_syscall James Hogan
2012-02-24 14:01 ` James Hogan
2012-02-24 14:23 ` Arnd Bergmann
2012-02-24 14:24 ` Arnd Bergmann
2012-02-24 14:24   ` Arnd Bergmann
2012-02-24 14:51   ` James Hogan
2012-02-24 15:09     ` Arnd Bergmann
2012-02-24 15:09       ` Arnd Bergmann
2012-02-24 15:40       ` James Hogan
2012-02-24 16:19   ` Mike Frysinger
2012-02-24 16:37     ` Arnd Bergmann
2012-02-24 16:38       ` Arnd Bergmann
2012-02-24 16:56         ` James Hogan
2012-02-24 16:41 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).