Subject: [PATCH] spufs: change ppc_rtas declaration to weak

From: Geoff Levand <[email-masked]>
Date: Thu, 05 Oct 2006 11:35:21 -0700

The symbol ppc_rtas is defined as weak, but the declaration is missing the
weak attribute specifier.  The improper declaration causes problems when
linking the ppc_rtas reference in spu_syscall_table[] (spu_callbacks.c)
when RTAS support is not enabled.

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 <[email-masked]>

---

I did a test build with pseries_defconfig and verified the proper routine is
linked in.  No run time test done.

Index: cell--common--5/include/asm-powerpc/syscalls.h
===================================================================
--- cell--common--5.orig/include/asm-powerpc/syscalls.h
+++ cell--common--5/include/asm-powerpc/syscalls.h
@@ -37,7 +37,7 @@
 asmlinkage int sys_ipc(uint call, int first, unsigned long second,
 		long third, void __user *ptr, long fifth);
 asmlinkage long ppc64_personality(unsigned long personality);
-asmlinkage int ppc_rtas(struct rtas_args __user *uargs);
+asmlinkage int ppc_rtas(struct rtas_args __user *uargs) __attribute__((weak));
 asmlinkage time_t sys64_time(time_t __user * tloc);
 asmlinkage long ppc_newuname(struct new_utsname __user * name);