diff options
author | James Hogan <james.hogan@imgtec.com> | 2012-02-24 08:47:48 -0500 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2013-03-02 15:09:14 -0500 |
commit | 4dd3c95940b836bc4073e8827973362e78f5e204 (patch) | |
tree | 987592410ca14694fc169d905bda9fdf5e9124b5 /include | |
parent | c93d03123169357afde2d9b20dfbf9675295668f (diff) |
asm-generic/unistd.h: handle symbol prefixes in cond_syscall
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>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r-- | 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 a36991ab334e..abc925de8ecf 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -20,5 +20,12 @@ | |||
20 | * but it doesn't work on all toolchains, so we just do it by hand | 20 | * but it doesn't work on all toolchains, so we just do it by hand |
21 | */ | 21 | */ |
22 | #ifndef cond_syscall | 22 | #ifndef cond_syscall |
23 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 23 | #ifdef CONFIG_SYMBOL_PREFIX |
24 | #define __SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX | ||
25 | #else | ||
26 | #define __SYMBOL_PREFIX | ||
27 | #endif | ||
28 | #define cond_syscall(x) asm(".weak\t" __SYMBOL_PREFIX #x "\n\t" \ | ||
29 | ".set\t" __SYMBOL_PREFIX #x "," \ | ||
30 | __SYMBOL_PREFIX "sys_ni_syscall") | ||
24 | #endif | 31 | #endif |