Commit 2cd23553 authored by Ingo Molnar's avatar Ingo Molnar

x86/asm/entry: Rename compat syscall entry points

Rename the following system call entry points:

	ia32_cstar_target       -> entry_SYSCALL_compat
	ia32_syscall            -> entry_INT80_compat

The generic naming scheme for x86 system call entry points is:

	entry_MNEMONIC_qualifier

where 'qualifier' is one of _32, _64 or _compat.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 138bd56a
...@@ -18,10 +18,10 @@ Some of these entries are: ...@@ -18,10 +18,10 @@ Some of these entries are:
- system_call: syscall instruction from 64-bit code. - system_call: syscall instruction from 64-bit code.
- ia32_syscall: int 0x80 from 32-bit or 64-bit code; compat syscall - entry_INT80_compat: int 0x80 from 32-bit or 64-bit code; compat syscall
either way. either way.
- ia32_syscall, ia32_sysenter: syscall and sysenter from 32-bit - entry_INT80_compat, ia32_sysenter: syscall and sysenter from 32-bit
code code
- interrupt: An array of entries. Every IDT vector that doesn't - interrupt: An array of entries. Every IDT vector that doesn't
......
...@@ -288,7 +288,7 @@ ENDPROC(ia32_sysenter_target) ...@@ -288,7 +288,7 @@ ENDPROC(ia32_sysenter_target)
* path below. We set up a complete hardware stack frame to share code * path below. We set up a complete hardware stack frame to share code
* with the int 0x80 path. * with the int 0x80 path.
*/ */
ENTRY(ia32_cstar_target) ENTRY(entry_SYSCALL_compat)
/* /*
* Interrupts are off on entry. * Interrupts are off on entry.
* We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON, * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON,
...@@ -409,7 +409,7 @@ cstar_tracesys: ...@@ -409,7 +409,7 @@ cstar_tracesys:
RESTORE_EXTRA_REGS RESTORE_EXTRA_REGS
jmp cstar_do_call jmp cstar_do_call
END(ia32_cstar_target) END(entry_SYSCALL_compat)
ia32_badarg: ia32_badarg:
ASM_CLAC ASM_CLAC
...@@ -445,7 +445,7 @@ ia32_ret_from_sys_call: ...@@ -445,7 +445,7 @@ ia32_ret_from_sys_call:
* Assumes it is only called from user space and entered with interrupts off. * Assumes it is only called from user space and entered with interrupts off.
*/ */
ENTRY(ia32_syscall) ENTRY(entry_INT80_compat)
/* /*
* Interrupts are off on entry. * Interrupts are off on entry.
* We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON, * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON,
...@@ -511,7 +511,7 @@ ia32_tracesys: ...@@ -511,7 +511,7 @@ ia32_tracesys:
movl %eax, %eax /* zero extension */ movl %eax, %eax /* zero extension */
RESTORE_EXTRA_REGS RESTORE_EXTRA_REGS
jmp ia32_do_call jmp ia32_do_call
END(ia32_syscall) END(entry_INT80_compat)
.macro PTREGSCALL label, func .macro PTREGSCALL label, func
ALIGN ALIGN
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#else #else
#define SYM(sym, compat) sym #define SYM(sym, compat) sym
#define ia32_sys_call_table sys_call_table #define ia32_sys_call_table sys_call_table
#define __NR_ia32_syscall_max __NR_syscall_max #define __NR_entry_INT80_compat_max __NR_syscall_max
#endif #endif
#define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void SYM(sym, compat)(void) ; #define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void SYM(sym, compat)(void) ;
...@@ -23,11 +23,11 @@ typedef asmlinkage void (*sys_call_ptr_t)(void); ...@@ -23,11 +23,11 @@ typedef asmlinkage void (*sys_call_ptr_t)(void);
extern asmlinkage void sys_ni_syscall(void); extern asmlinkage void sys_ni_syscall(void);
__visible const sys_call_ptr_t ia32_sys_call_table[__NR_ia32_syscall_max+1] = { __visible const sys_call_ptr_t ia32_sys_call_table[__NR_entry_INT80_compat_max+1] = {
/* /*
* Smells like a compiler bug -- it doesn't work * Smells like a compiler bug -- it doesn't work
* when the & below is removed. * when the & below is removed.
*/ */
[0 ... __NR_ia32_syscall_max] = &sys_ni_syscall, [0 ... __NR_entry_INT80_compat_max] = &sys_ni_syscall,
#include <asm/syscalls_32.h> #include <asm/syscalls_32.h>
}; };
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
void system_call(void); void system_call(void);
void syscall_init(void); void syscall_init(void);
void ia32_syscall(void); void entry_INT80_compat(void);
void ia32_cstar_target(void); void entry_SYSCALL_compat(void);
void ia32_sysenter_target(void); void ia32_sysenter_target(void);
void x86_configure_nx(void); void x86_configure_nx(void);
......
...@@ -66,7 +66,7 @@ int main(void) ...@@ -66,7 +66,7 @@ int main(void)
DEFINE(__NR_syscall_max, sizeof(syscalls_64) - 1); DEFINE(__NR_syscall_max, sizeof(syscalls_64) - 1);
DEFINE(NR_syscalls, sizeof(syscalls_64)); DEFINE(NR_syscalls, sizeof(syscalls_64));
DEFINE(__NR_ia32_syscall_max, sizeof(syscalls_ia32) - 1); DEFINE(__NR_entry_INT80_compat_max, sizeof(syscalls_ia32) - 1);
DEFINE(IA32_NR_syscalls, sizeof(syscalls_ia32)); DEFINE(IA32_NR_syscalls, sizeof(syscalls_ia32));
return 0; return 0;
......
...@@ -1207,7 +1207,7 @@ void syscall_init(void) ...@@ -1207,7 +1207,7 @@ void syscall_init(void)
wrmsrl(MSR_LSTAR, system_call); wrmsrl(MSR_LSTAR, system_call);
#ifdef CONFIG_IA32_EMULATION #ifdef CONFIG_IA32_EMULATION
wrmsrl(MSR_CSTAR, ia32_cstar_target); wrmsrl(MSR_CSTAR, entry_SYSCALL_compat);
/* /*
* This only works on Intel CPUs. * This only works on Intel CPUs.
* On AMD CPUs these MSRs are 32-bit, CPU truncates MSR_IA32_SYSENTER_EIP. * On AMD CPUs these MSRs are 32-bit, CPU truncates MSR_IA32_SYSENTER_EIP.
......
...@@ -992,7 +992,7 @@ void __init trap_init(void) ...@@ -992,7 +992,7 @@ void __init trap_init(void)
set_bit(i, used_vectors); set_bit(i, used_vectors);
#ifdef CONFIG_IA32_EMULATION #ifdef CONFIG_IA32_EMULATION
set_system_intr_gate(IA32_SYSCALL_VECTOR, ia32_syscall); set_system_intr_gate(IA32_SYSCALL_VECTOR, entry_INT80_compat);
set_bit(IA32_SYSCALL_VECTOR, used_vectors); set_bit(IA32_SYSCALL_VECTOR, used_vectors);
#endif #endif
......
...@@ -122,7 +122,7 @@ ENDPROC(xen_syscall_target) ...@@ -122,7 +122,7 @@ ENDPROC(xen_syscall_target)
/* 32-bit compat syscall target */ /* 32-bit compat syscall target */
ENTRY(xen_syscall32_target) ENTRY(xen_syscall32_target)
undo_xen_syscall undo_xen_syscall
jmp ia32_cstar_target jmp entry_SYSCALL_compat
ENDPROC(xen_syscall32_target) ENDPROC(xen_syscall32_target)
/* 32-bit compat sysenter target */ /* 32-bit compat sysenter target */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment