Skip to content

Commit

Permalink
[POWERPC] Change ppc_rtas declaration to weak
Browse files Browse the repository at this point in the history
Change the definition of powerpc's cond_syscall() to use the standard gcc
weak attribute specifier which provides proper support for C linkage as
needed by spu_syscall_table[].

Fixes this powerpc build error with CONFIG_SPU_FS=y, CONFIG_PPC_RTAS=n:

 arch/powerpc/platforms/built-in.o: undefined reference to `ppc_rtas'

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Geoff Levand authored and Paul Mackerras committed Dec 4, 2006
1 parent 78dc4c2 commit 8dc86ab
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions include/asm-powerpc/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
#include <linux/types.h>
#include <linux/compiler.h>
#include <linux/linkage.h>
#include <asm/syscalls.h>

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
Expand Down Expand Up @@ -481,16 +480,9 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6

/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#ifdef CONFIG_PPC32
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#else
#define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall")
#endif

#define cond_syscall(x) \
asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall")))

#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
Expand Down

0 comments on commit 8dc86ab

Please sign in to comment.