[PATCH] spufs: change ppc_rtas declaration to weak

Arnd Bergmann arnd at arndb.de
Fri Oct 6 21:53:59 EST 2006

On Thursday 05 October 2006 20:35, Geoff Levand wrote:
> 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);

Hmm, I can't see why this does the right thing. __attribute__((weak)) should
normally be put only into the definition of a function, not into the common
declaration. This looks like it makes _both_ definitions (kernel/sys.c and
arch/powerpc/kernel/rtas.c) weak, so on pseries it becomes unspecific which
one is actually used.

The problem that this is trying to work around is probably caused by the
dot-symbols: cond_syscall defines a ".ppc_rtas", but not a "ppc_rtas" symbol,
which spufs tries to resolve.

	Arnd <>< 

More information about the Linuxppc-dev mailing list