diff options
author | Andi Kleen <ak@linux.intel.com> | 2017-12-21 19:18:21 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-01-14 14:09:45 -0500 |
commit | 327867faa4d66628fcd92a843adb3345736a5313 (patch) | |
tree | 5e990413bcb7274d2a3ef07a2779d91d8dde5397 | |
parent | fc90ccfd286eabb05ec54521367df8663cf0bbbf (diff) |
x86/idt: Mark IDT tables __initconst
const variables must use __initconst, not __initdata.
Fix this up for the IDT tables, which got it consistently wrong.
Fixes: 16bc18d895ce ("x86/idt: Move 32-bit idt_descr to C code")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20171222001821.2157-7-andi@firstfloor.org
-rw-r--r-- | arch/x86/kernel/idt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c index d985cef3984f..56d99be3706a 100644 --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c | |||
@@ -56,7 +56,7 @@ struct idt_data { | |||
56 | * Early traps running on the DEFAULT_STACK because the other interrupt | 56 | * Early traps running on the DEFAULT_STACK because the other interrupt |
57 | * stacks work only after cpu_init(). | 57 | * stacks work only after cpu_init(). |
58 | */ | 58 | */ |
59 | static const __initdata struct idt_data early_idts[] = { | 59 | static const __initconst struct idt_data early_idts[] = { |
60 | INTG(X86_TRAP_DB, debug), | 60 | INTG(X86_TRAP_DB, debug), |
61 | SYSG(X86_TRAP_BP, int3), | 61 | SYSG(X86_TRAP_BP, int3), |
62 | #ifdef CONFIG_X86_32 | 62 | #ifdef CONFIG_X86_32 |
@@ -70,7 +70,7 @@ static const __initdata struct idt_data early_idts[] = { | |||
70 | * the traps which use them are reinitialized with IST after cpu_init() has | 70 | * the traps which use them are reinitialized with IST after cpu_init() has |
71 | * set up TSS. | 71 | * set up TSS. |
72 | */ | 72 | */ |
73 | static const __initdata struct idt_data def_idts[] = { | 73 | static const __initconst struct idt_data def_idts[] = { |
74 | INTG(X86_TRAP_DE, divide_error), | 74 | INTG(X86_TRAP_DE, divide_error), |
75 | INTG(X86_TRAP_NMI, nmi), | 75 | INTG(X86_TRAP_NMI, nmi), |
76 | INTG(X86_TRAP_BR, bounds), | 76 | INTG(X86_TRAP_BR, bounds), |
@@ -108,7 +108,7 @@ static const __initdata struct idt_data def_idts[] = { | |||
108 | /* | 108 | /* |
109 | * The APIC and SMP idt entries | 109 | * The APIC and SMP idt entries |
110 | */ | 110 | */ |
111 | static const __initdata struct idt_data apic_idts[] = { | 111 | static const __initconst struct idt_data apic_idts[] = { |
112 | #ifdef CONFIG_SMP | 112 | #ifdef CONFIG_SMP |
113 | INTG(RESCHEDULE_VECTOR, reschedule_interrupt), | 113 | INTG(RESCHEDULE_VECTOR, reschedule_interrupt), |
114 | INTG(CALL_FUNCTION_VECTOR, call_function_interrupt), | 114 | INTG(CALL_FUNCTION_VECTOR, call_function_interrupt), |
@@ -150,7 +150,7 @@ static const __initdata struct idt_data apic_idts[] = { | |||
150 | * Early traps running on the DEFAULT_STACK because the other interrupt | 150 | * Early traps running on the DEFAULT_STACK because the other interrupt |
151 | * stacks work only after cpu_init(). | 151 | * stacks work only after cpu_init(). |
152 | */ | 152 | */ |
153 | static const __initdata struct idt_data early_pf_idts[] = { | 153 | static const __initconst struct idt_data early_pf_idts[] = { |
154 | INTG(X86_TRAP_PF, page_fault), | 154 | INTG(X86_TRAP_PF, page_fault), |
155 | }; | 155 | }; |
156 | 156 | ||
@@ -158,7 +158,7 @@ static const __initdata struct idt_data early_pf_idts[] = { | |||
158 | * Override for the debug_idt. Same as the default, but with interrupt | 158 | * Override for the debug_idt. Same as the default, but with interrupt |
159 | * stack set to DEFAULT_STACK (0). Required for NMI trap handling. | 159 | * stack set to DEFAULT_STACK (0). Required for NMI trap handling. |
160 | */ | 160 | */ |
161 | static const __initdata struct idt_data dbg_idts[] = { | 161 | static const __initconst struct idt_data dbg_idts[] = { |
162 | INTG(X86_TRAP_DB, debug), | 162 | INTG(X86_TRAP_DB, debug), |
163 | INTG(X86_TRAP_BP, int3), | 163 | INTG(X86_TRAP_BP, int3), |
164 | }; | 164 | }; |
@@ -180,7 +180,7 @@ gate_desc debug_idt_table[IDT_ENTRIES] __page_aligned_bss; | |||
180 | * The exceptions which use Interrupt stacks. They are setup after | 180 | * The exceptions which use Interrupt stacks. They are setup after |
181 | * cpu_init() when the TSS has been initialized. | 181 | * cpu_init() when the TSS has been initialized. |
182 | */ | 182 | */ |
183 | static const __initdata struct idt_data ist_idts[] = { | 183 | static const __initconst struct idt_data ist_idts[] = { |
184 | ISTG(X86_TRAP_DB, debug, DEBUG_STACK), | 184 | ISTG(X86_TRAP_DB, debug, DEBUG_STACK), |
185 | ISTG(X86_TRAP_NMI, nmi, NMI_STACK), | 185 | ISTG(X86_TRAP_NMI, nmi, NMI_STACK), |
186 | SISTG(X86_TRAP_BP, int3, DEBUG_STACK), | 186 | SISTG(X86_TRAP_BP, int3, DEBUG_STACK), |