aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2008-12-19 18:23:44 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-23 16:37:28 -0500
commitb77b881f21b29aa7efa668fde69ee3dc0372ae3f (patch)
treea4039161e9bcab3e9c2fd2e2aa70fee16103857b /arch/x86/kernel/traps.c
parenta7883dece6ef82097e6bdf19c1d0a20351e06056 (diff)
x86: fix lguest used_vectors breakage, -v2
Impact: fix lguest, clean up 32-bit lguest used used_vectors to record vectors, but that model of allocating vectors changed and got broken, after we changed vector allocation to a per_cpu array. Try enable that for 64bit, and the array is used for all vectors that are not managed by vector_irq per_cpu array. Also kill system_vectors[], that is now a duplication of the used_vectors bitmap. [ merged in cpus4096 due to io_apic.c cpumask changes. ] [ -v2, fix build failure ] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r--arch/x86/kernel/traps.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 04d242ab0161..4a6dff39a470 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -72,9 +72,6 @@
72 72
73#include "cpu/mcheck/mce.h" 73#include "cpu/mcheck/mce.h"
74 74
75DECLARE_BITMAP(used_vectors, NR_VECTORS);
76EXPORT_SYMBOL_GPL(used_vectors);
77
78asmlinkage int system_call(void); 75asmlinkage int system_call(void);
79 76
80/* Do we ignore FPU interrupts ? */ 77/* Do we ignore FPU interrupts ? */
@@ -89,6 +86,9 @@ gate_desc idt_table[256]
89 __attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, }; 86 __attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, };
90#endif 87#endif
91 88
89DECLARE_BITMAP(used_vectors, NR_VECTORS);
90EXPORT_SYMBOL_GPL(used_vectors);
91
92static int ignore_nmis; 92static int ignore_nmis;
93 93
94static inline void conditional_sti(struct pt_regs *regs) 94static inline void conditional_sti(struct pt_regs *regs)
@@ -949,9 +949,7 @@ dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code)
949 949
950void __init trap_init(void) 950void __init trap_init(void)
951{ 951{
952#ifdef CONFIG_X86_32
953 int i; 952 int i;
954#endif
955 953
956#ifdef CONFIG_EISA 954#ifdef CONFIG_EISA
957 void __iomem *p = early_ioremap(0x0FFFD9, 4); 955 void __iomem *p = early_ioremap(0x0FFFD9, 4);
@@ -1008,11 +1006,15 @@ void __init trap_init(void)
1008 } 1006 }
1009 1007
1010 set_system_trap_gate(SYSCALL_VECTOR, &system_call); 1008 set_system_trap_gate(SYSCALL_VECTOR, &system_call);
1009#endif
1011 1010
1012 /* Reserve all the builtin and the syscall vector: */ 1011 /* Reserve all the builtin and the syscall vector: */
1013 for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) 1012 for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++)
1014 set_bit(i, used_vectors); 1013 set_bit(i, used_vectors);
1015 1014
1015#ifdef CONFIG_X86_64
1016 set_bit(IA32_SYSCALL_VECTOR, used_vectors);
1017#else
1016 set_bit(SYSCALL_VECTOR, used_vectors); 1018 set_bit(SYSCALL_VECTOR, used_vectors);
1017#endif 1019#endif
1018 /* 1020 /*