From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758706AbbJINLL (ORCPT ); Fri, 9 Oct 2015 09:11:11 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45999 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932704AbbJINKw (ORCPT ); Fri, 9 Oct 2015 09:10:52 -0400 Date: Fri, 9 Oct 2015 06:10:01 -0700 From: tip-bot for Andy Lutomirski Message-ID: Cc: peterz@infradead.org, mingo@kernel.org, brgerst@gmail.com, linux-kernel@vger.kernel.org, luto@kernel.org, bp@alien8.de, torvalds@linux-foundation.org, hpa@zytor.com, tglx@linutronix.de, dvlasenk@redhat.com, luto@amacapital.net Reply-To: peterz@infradead.org, mingo@kernel.org, brgerst@gmail.com, linux-kernel@vger.kernel.org, luto@kernel.org, bp@alien8.de, torvalds@linux-foundation.org, hpa@zytor.com, tglx@linutronix.de, dvlasenk@redhat.com, luto@amacapital.net In-Reply-To: <3166aaff0fb43897998fcb6ef92991533f8c5c6c.1444091585.git.luto@kernel.org> References: <3166aaff0fb43897998fcb6ef92991533f8c5c6c.1444091585.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/entry/syscalls: Move syscall table declarations into asm/syscalls.h Git-Commit-ID: 034042cc1e2837a584cda0a5e4fc2b0a96b74543 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 034042cc1e2837a584cda0a5e4fc2b0a96b74543 Gitweb: http://git.kernel.org/tip/034042cc1e2837a584cda0a5e4fc2b0a96b74543 Author: Andy Lutomirski AuthorDate: Mon, 5 Oct 2015 17:48:06 -0700 Committer: Ingo Molnar CommitDate: Fri, 9 Oct 2015 09:41:08 +0200 x86/entry/syscalls: Move syscall table declarations into asm/syscalls.h The header was missing some compat declarations. Also make sys_call_ptr_t have a consistent type. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/3166aaff0fb43897998fcb6ef92991533f8c5c6c.1444091585.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/entry/syscall_32.c | 5 +---- arch/x86/include/asm/syscall.h | 12 +++++++++++- arch/x86/um/sys_call_table_32.c | 3 +-- arch/x86/um/sys_call_table_64.c | 3 +-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/arch/x86/entry/syscall_32.c b/arch/x86/entry/syscall_32.c index 8ea34f9..429460d 100644 --- a/arch/x86/entry/syscall_32.c +++ b/arch/x86/entry/syscall_32.c @@ -4,13 +4,12 @@ #include #include #include +#include #ifdef CONFIG_IA32_EMULATION #define SYM(sym, compat) compat #else #define SYM(sym, compat) sym -#define ia32_sys_call_table sys_call_table -#define __NR_syscall_compat_max __NR_syscall_max #endif #define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void SYM(sym, compat)(void) ; @@ -19,8 +18,6 @@ #define __SYSCALL_I386(nr, sym, compat) [nr] = SYM(sym, compat), -typedef asmlinkage void (*sys_call_ptr_t)(void); - extern asmlinkage void sys_ni_syscall(void); __visible const sys_call_ptr_t ia32_sys_call_table[__NR_syscall_compat_max+1] = { diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h index d6a756a..f3ff2ef 100644 --- a/arch/x86/include/asm/syscall.h +++ b/arch/x86/include/asm/syscall.h @@ -20,9 +20,19 @@ #include /* for TS_COMPAT */ #include -typedef void (*sys_call_ptr_t)(void); +typedef asmlinkage void (*sys_call_ptr_t)(void); extern const sys_call_ptr_t sys_call_table[]; +#if defined(CONFIG_X86_32) +#define ia32_sys_call_table sys_call_table +#define __NR_syscall_compat_max __NR_syscall_max +#define IA32_NR_syscalls NR_syscalls +#endif + +#if defined(CONFIG_IA32_EMULATION) +extern const sys_call_ptr_t ia32_sys_call_table[]; +#endif + /* * Only the low 32 bits of orig_ax are meaningful, so we return int. * This importantly ignores the high bits on 64-bit, so comparisons diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c index bd16d6c..d738e9c 100644 --- a/arch/x86/um/sys_call_table_32.c +++ b/arch/x86/um/sys_call_table_32.c @@ -7,6 +7,7 @@ #include #include #include +#include #define __NO_STUBS @@ -30,8 +31,6 @@ #undef __SYSCALL_I386 #define __SYSCALL_I386(nr, sym, compat) [ nr ] = sym, -typedef asmlinkage void (*sys_call_ptr_t)(void); - extern asmlinkage void sys_ni_syscall(void); const sys_call_ptr_t sys_call_table[] ____cacheline_aligned = { diff --git a/arch/x86/um/sys_call_table_64.c b/arch/x86/um/sys_call_table_64.c index a75d8700..1ff9a21 100644 --- a/arch/x86/um/sys_call_table_64.c +++ b/arch/x86/um/sys_call_table_64.c @@ -7,6 +7,7 @@ #include #include #include +#include #define __NO_STUBS @@ -43,8 +44,6 @@ #undef __SYSCALL_64 #define __SYSCALL_64(nr, sym, compat) [ nr ] = sym, -typedef void (*sys_call_ptr_t)(void); - extern void sys_ni_syscall(void); const sys_call_ptr_t sys_call_table[] ____cacheline_aligned = {