-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/idt: Create file for IDT related code
IDT related code lives scattered around in various places. Create a new source file in arch/x86/kernel/idt.c to hold it. Move the idt_tables and descriptors to it for a start. Follow up patches will gradually move more code over. Signed-off-by: Thomas 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.367081121@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
- Loading branch information
Thomas Gleixner
authored and
Ingo Molnar
committed
Aug 29, 2017
1 parent
87cc037
commit d8ed9d4
Showing
4 changed files
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Interrupt descriptor table related code | ||
* | ||
* This file is licensed under the GPL V2 | ||
*/ | ||
#include <linux/interrupt.h> | ||
|
||
#include <asm/desc.h> | ||
|
||
/* Must be page-aligned because the real IDT is used in a fixmap. */ | ||
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 = { | ||
.size = IDT_ENTRIES * 16 - 1, | ||
.address = (unsigned long) idt_table, | ||
}; | ||
|
||
const struct desc_ptr debug_idt_descr = { | ||
.size = IDT_ENTRIES * 16 - 1, | ||
.address = (unsigned long) debug_idt_table, | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters