From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20061120180520.902060000@arndb.de> References: <20061120174454.067872000@arndb.de> Date: Mon, 20 Nov 2006 18:44:56 +0100 From: Arnd Bergmann To: cbe-oss-dev@ozlabs.org Subject: [PATCH 02/22] powerpc: change ppc_rtas declaration to weak Cc: linuxppc-dev@ozlabs.org, Paul Mackerras , linux-kernel@vger.kernel.org, Arnd Bergmann List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Geoff Levand 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 Signed-off-by: Arnd Bergmann --- include/asm-powerpc/unistd.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) Index: linux-2.6/include/asm-powerpc/unistd.h =================================================================== --- linux-2.6.orig/include/asm-powerpc/unistd.h +++ linux-2.6/include/asm-powerpc/unistd.h @@ -446,7 +446,6 @@ type name(type1 arg1, type2 arg2, type3 #include #include #include -#include #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR @@ -481,16 +480,9 @@ type name(type1 arg1, type2 arg2, type3 /* * "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__ */ -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966332AbWKTSKJ (ORCPT ); Mon, 20 Nov 2006 13:10:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934286AbWKTSHK (ORCPT ); Mon, 20 Nov 2006 13:07:10 -0500 Received: from moutng.kundenserver.de ([212.227.126.177]:31482 "EHLO moutng.kundenserver.de") by vger.kernel.org with ESMTP id S934277AbWKTSG7 (ORCPT ); Mon, 20 Nov 2006 13:06:59 -0500 Message-Id: <20061120180520.902060000@arndb.de> References: <20061120174454.067872000@arndb.de> User-Agent: quilt/0.45-1 Date: Mon, 20 Nov 2006 18:44:56 +0100 From: Arnd Bergmann To: cbe-oss-dev@ozlabs.org Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, Paul Mackerras , Geoff Levand , Arnd Bergmann Subject: [PATCH 02/22] powerpc: change ppc_rtas declaration to weak Content-Disposition: inline; filename=spufs-fix-weak-symbols-3.diff X-Provags-ID: kundenserver.de abuse@kundenserver.de login:c48f057754fc1b1a557605ab9fa6da41 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org From: Geoff Levand 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 Signed-off-by: Arnd Bergmann --- include/asm-powerpc/unistd.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) Index: linux-2.6/include/asm-powerpc/unistd.h =================================================================== --- linux-2.6.orig/include/asm-powerpc/unistd.h +++ linux-2.6/include/asm-powerpc/unistd.h @@ -446,7 +446,6 @@ type name(type1 arg1, type2 arg2, type3 #include #include #include -#include #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR @@ -481,16 +480,9 @@ type name(type1 arg1, type2 arg2, type3 /* * "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__ */ --