x86: Clean up idt_descr and idt_tableby using NR_VECTORS instead of hardcoded number
authorCyrill Gorcunov <gorcunov@openvz.org>
Wed, 8 Jul 2009 18:03:53 +0000 (22:03 +0400)
committerIngo Molnar <mingo@elte.hu>
Fri, 10 Jul 2009 11:57:13 +0000 (13:57 +0200)
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <20090708180353.GH5301@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/common.c
arch/x86/kernel/traps.c

index f1961c07af9a684b0fd15ad1636ef21dbf1d31ac..d6f27c92854b90ba7df7e297ada04b4c25a8bfe1 100644 (file)
@@ -982,7 +982,7 @@ static __init int setup_disablecpuid(char *arg)
 __setup("clearcpuid=", setup_disablecpuid);
 
 #ifdef CONFIG_X86_64
-struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
+struct desc_ptr idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) idt_table };
 
 DEFINE_PER_CPU_FIRST(union irq_stack_union,
                     irq_stack_union) __aligned(PAGE_SIZE);
index 5204332f475d86e1caa1ede6bb39fcc28b78d13f..7e4b1f5dec8e129cf1d72f3b8a6f4ee32a78bd39 100644 (file)
@@ -76,7 +76,7 @@ char ignore_fpu_irq;
  * F0 0F bug workaround.. We have a special link segment
  * for this.
  */
-gate_desc idt_table[256]
+gate_desc idt_table[NR_VECTORS]
        __attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, };
 #endif