Commit 16bc18d8 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

x86/idt: Move 32-bit idt_descr to C code

32-bit kernels have the idt_descr defined in the low level assembly entry code,
but there is no good reason for that.

Move it into the C file and use the 64-bit version of it.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
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: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20170828064958.445862201@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent d8ed9d48
...@@ -622,7 +622,6 @@ int_msg: ...@@ -622,7 +622,6 @@ int_msg:
.data .data
.globl boot_gdt_descr .globl boot_gdt_descr
.globl idt_descr
ALIGN ALIGN
# early boot GDT descriptor (must use 1:1 address mapping) # early boot GDT descriptor (must use 1:1 address mapping)
...@@ -631,11 +630,6 @@ boot_gdt_descr: ...@@ -631,11 +630,6 @@ boot_gdt_descr:
.word __BOOT_DS+7 .word __BOOT_DS+7
.long boot_gdt - __PAGE_OFFSET .long boot_gdt - __PAGE_OFFSET
.word 0 # 32-bit align idt_desc.address
idt_descr:
.word IDT_ENTRIES*8-1 # idt contains 256 entries
.long idt_table
# boot GDT descriptor (later on used by CPU#0): # boot GDT descriptor (later on used by CPU#0):
.word 0 # 32 bit align gdt_desc.address .word 0 # 32 bit align gdt_desc.address
ENTRY(early_gdt_descr) ENTRY(early_gdt_descr)
......
...@@ -10,15 +10,15 @@ ...@@ -10,15 +10,15 @@
/* Must be page-aligned because the real IDT is used in a fixmap. */ /* Must be page-aligned because the real IDT is used in a fixmap. */
gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss; gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss;
#ifdef CONFIG_X86_64
/* No need to be aligned, but done to keep all IDTs defined the same way. */
gate_desc debug_idt_table[IDT_ENTRIES] __page_aligned_bss;
struct desc_ptr idt_descr __ro_after_init = { struct desc_ptr idt_descr __ro_after_init = {
.size = IDT_ENTRIES * 16 - 1, .size = (IDT_ENTRIES * 2 * sizeof(unsigned long)) - 1,
.address = (unsigned long) idt_table, .address = (unsigned long) idt_table,
}; };
#ifdef CONFIG_X86_64
/* No need to be aligned, but done to keep all IDTs defined the same way. */
gate_desc debug_idt_table[IDT_ENTRIES] __page_aligned_bss;
const struct desc_ptr debug_idt_descr = { const struct desc_ptr debug_idt_descr = {
.size = IDT_ENTRIES * 16 - 1, .size = IDT_ENTRIES * 16 - 1,
.address = (unsigned long) debug_idt_table, .address = (unsigned long) debug_idt_table,
......
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