linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/16] spufs: change ppc_rtas declaration to weak
@ 2006-11-10 20:00 Geoff Levand
  2006-11-11  2:03 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Geoff Levand @ 2006-11-10 20:00 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, Arnd Bergmann

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>

---

 include/asm-powerpc/unistd.h |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Index: cell--common--6/include/asm-powerpc/unistd.h
===================================================================
--- cell--common--6.orig/include/asm-powerpc/unistd.h
+++ cell--common--6/include/asm-powerpc/unistd.h
@@ -445,7 +445,6 @@
 #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
@@ -480,16 +479,9 @@
 
 /*
  * "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__ */

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

* Re: [PATCH 2/16] spufs: change ppc_rtas declaration to weak
  2006-11-10 20:00 [PATCH 2/16] spufs: change ppc_rtas declaration to weak Geoff Levand
@ 2006-11-11  2:03 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2006-11-11  2:03 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Paul Mackerras

On Friday 10 November 2006 21:00, Geoff Levand wrote:
> 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[].
>=20
> Fixes this powerpc build error with CONFIG_SPU_FS=3Dy, CONFIG_PPC_RTAS=3D=
n:
>=20
> =A0arch/powerpc/platforms/built-in.o: undefined reference to `ppc_rtas'
>=20
>=20
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
>=20

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

end of thread, other threads:[~2006-11-11  2:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10 20:00 [PATCH 2/16] spufs: change ppc_rtas declaration to weak Geoff Levand
2006-11-11  2:03 ` Arnd Bergmann

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).