Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757466Ab2BXOBS (ORCPT ); Fri, 24 Feb 2012 09:01:18 -0500 Received: from multi.imgtec.com ([194.200.65.239]:60563 "EHLO multi.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756693Ab2BXOBR (ORCPT ); Fri, 24 Feb 2012 09:01:17 -0500 Message-ID: <4F47981F.4020305@imgtec.com> Date: Fri, 24 Feb 2012 14:01:03 +0000 From: James Hogan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.10 MIME-Version: 1.0 To: Arnd Bergmann , , linux-kernel Subject: [RFC] [PATCH] asm-generic/unistd.h: handle symbol prefixes in cond_syscall Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Feb 2012 14:01:03.0389 (UTC) FILETIME=[BED014D0:01CCF2FC] X-SEF-Processed: 7_3_0_01181__2012_02_24_14_01_04 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1389 Lines: 39 Some architectures have symbol prefixes and set CONFIG_SYMBOL_PREFIX, but this wasn't taken into account by the generic cond_syscall. It's easy enough to fix in a generic fashion, so add the symbol prefix to symbol names in cond_syscall when CONFIG_SYMBOL_PREFIX is set. Signed-off-by: James Hogan --- include/asm-generic/unistd.h | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 2292d1a..c9a5ba4 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h @@ -924,7 +924,14 @@ __SYSCALL(__NR_fork, sys_ni_syscall) * but it doesn't work on all toolchains, so we just do it by hand */ #ifndef cond_syscall -#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") +#ifdef CONFIG_SYMBOL_PREFIX +#define __SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX +#else +#define __SYMBOL_PREFIX +#endif +#define cond_syscall(x) asm(".weak\t" __SYMBOL_PREFIX #x "\n\t" \ + ".set\t" __SYMBOL_PREFIX #x "," \ + __SYMBOL_PREFIX "sys_ni_syscall") #endif #endif /* __KERNEL__ */ -- 1.7.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/