Commit ac3048df authored by Pekka Enberg's avatar Pekka Enberg Committed by Ingo Molnar

x86: define IA32_SYSCALL_VECTOR on 32-bit to reduce ifdefs

Impact: cleanup

We can remove some #ifdefs if we define IA32_SYSCALL_VECTOR on 32-bit.

Reviewed-by Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 31cb45ef
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
# define SYSCALL_VECTOR 0x80 # define SYSCALL_VECTOR 0x80
# define IA32_SYSCALL_VECTOR 0x80
#else #else
# define IA32_SYSCALL_VECTOR 0x80 # define IA32_SYSCALL_VECTOR 0x80
#endif #endif
......
...@@ -242,15 +242,9 @@ void __init native_init_IRQ(void) ...@@ -242,15 +242,9 @@ void __init native_init_IRQ(void)
* 'special' SMP interrupts) * 'special' SMP interrupts)
*/ */
for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) { for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
#ifdef CONFIG_X86_32
/* SYSCALL_VECTOR was reserved in trap_init. */
if (i != SYSCALL_VECTOR)
set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
#else
/* IA32_SYSCALL_VECTOR was reserved in trap_init. */ /* IA32_SYSCALL_VECTOR was reserved in trap_init. */
if (i != IA32_SYSCALL_VECTOR) if (i != IA32_SYSCALL_VECTOR)
set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]); set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
#endif
} }
apic_intr_init(); apic_intr_init();
......
...@@ -969,11 +969,8 @@ void __init trap_init(void) ...@@ -969,11 +969,8 @@ void __init trap_init(void)
for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++)
set_bit(i, used_vectors); set_bit(i, used_vectors);
#ifdef CONFIG_X86_64
set_bit(IA32_SYSCALL_VECTOR, used_vectors); set_bit(IA32_SYSCALL_VECTOR, used_vectors);
#else
set_bit(SYSCALL_VECTOR, used_vectors);
#endif
/* /*
* Should be a barrier for any external CPU state: * Should be a barrier for any external CPU state:
*/ */
......
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