diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-09-13 17:29:26 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-09-25 14:51:52 -0400 |
commit | 7854f82293e99f6bb3df793a2f579db4670ba71b (patch) | |
tree | 39634f7579c86e3962725c32ced309f6bf60921a | |
parent | c1d1ee9ac1793d939ba1a1322767cc5f77a5b8fe (diff) |
x86/vector: Rename used_vectors to system_vectors
used_vectors is a nisnomer as it only has the system vectors which are
excluded from the regular vector allocation marked. It's not what the name
suggests storage for the actually used vectors.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Juergen Gross <jgross@suse.com>
Tested-by: Yu Chen <yu.c.chen@intel.com>
Acked-by: Juergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Rui Zhang <rui.zhang@intel.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Len Brown <lenb@kernel.org>
Link: https://lkml.kernel.org/r/20170913213154.150209009@linutronix.de
-rw-r--r-- | arch/x86/include/asm/desc.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/vector.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/idt.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/traps.c | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index 9d0e13738ed3..c474bf4971d9 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h | |||
@@ -392,7 +392,7 @@ static inline void set_desc_limit(struct desc_struct *desc, unsigned long limit) | |||
392 | void update_intr_gate(unsigned int n, const void *addr); | 392 | void update_intr_gate(unsigned int n, const void *addr); |
393 | void alloc_intr_gate(unsigned int n, const void *addr); | 393 | void alloc_intr_gate(unsigned int n, const void *addr); |
394 | 394 | ||
395 | extern unsigned long used_vectors[]; | 395 | extern unsigned long system_vectors[]; |
396 | 396 | ||
397 | #ifdef CONFIG_X86_64 | 397 | #ifdef CONFIG_X86_64 |
398 | DECLARE_PER_CPU(u32, debug_idt_ctr); | 398 | DECLARE_PER_CPU(u32, debug_idt_ctr); |
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index b6b963e42028..67d20ee60e33 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c | |||
@@ -175,7 +175,7 @@ next: | |||
175 | if (unlikely(current_vector == vector)) | 175 | if (unlikely(current_vector == vector)) |
176 | goto next_cpu; | 176 | goto next_cpu; |
177 | 177 | ||
178 | if (test_bit(vector, used_vectors)) | 178 | if (test_bit(vector, system_vectors)) |
179 | goto next; | 179 | goto next; |
180 | 180 | ||
181 | for_each_cpu(new_cpu, vector_searchmask) { | 181 | for_each_cpu(new_cpu, vector_searchmask) { |
diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c index 6107ee1cb8d5..723fa9782186 100644 --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c | |||
@@ -225,7 +225,7 @@ idt_setup_from_table(gate_desc *idt, const struct idt_data *t, int size, bool sy | |||
225 | idt_init_desc(&desc, t); | 225 | idt_init_desc(&desc, t); |
226 | write_idt_entry(idt, t->vector, &desc); | 226 | write_idt_entry(idt, t->vector, &desc); |
227 | if (sys) | 227 | if (sys) |
228 | set_bit(t->vector, used_vectors); | 228 | set_bit(t->vector, system_vectors); |
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||
@@ -313,14 +313,14 @@ void __init idt_setup_apic_and_irq_gates(void) | |||
313 | 313 | ||
314 | idt_setup_from_table(idt_table, apic_idts, ARRAY_SIZE(apic_idts), true); | 314 | idt_setup_from_table(idt_table, apic_idts, ARRAY_SIZE(apic_idts), true); |
315 | 315 | ||
316 | for_each_clear_bit_from(i, used_vectors, FIRST_SYSTEM_VECTOR) { | 316 | for_each_clear_bit_from(i, system_vectors, FIRST_SYSTEM_VECTOR) { |
317 | entry = irq_entries_start + 8 * (i - FIRST_EXTERNAL_VECTOR); | 317 | entry = irq_entries_start + 8 * (i - FIRST_EXTERNAL_VECTOR); |
318 | set_intr_gate(i, entry); | 318 | set_intr_gate(i, entry); |
319 | } | 319 | } |
320 | 320 | ||
321 | for_each_clear_bit_from(i, used_vectors, NR_VECTORS) { | 321 | for_each_clear_bit_from(i, system_vectors, NR_VECTORS) { |
322 | #ifdef CONFIG_X86_LOCAL_APIC | 322 | #ifdef CONFIG_X86_LOCAL_APIC |
323 | set_bit(i, used_vectors); | 323 | set_bit(i, system_vectors); |
324 | set_intr_gate(i, spurious_interrupt); | 324 | set_intr_gate(i, spurious_interrupt); |
325 | #else | 325 | #else |
326 | entry = irq_entries_start + 8 * (i - FIRST_EXTERNAL_VECTOR); | 326 | entry = irq_entries_start + 8 * (i - FIRST_EXTERNAL_VECTOR); |
@@ -358,7 +358,7 @@ void idt_invalidate(void *addr) | |||
358 | 358 | ||
359 | void __init update_intr_gate(unsigned int n, const void *addr) | 359 | void __init update_intr_gate(unsigned int n, const void *addr) |
360 | { | 360 | { |
361 | if (WARN_ON_ONCE(!test_bit(n, used_vectors))) | 361 | if (WARN_ON_ONCE(!test_bit(n, system_vectors))) |
362 | return; | 362 | return; |
363 | set_intr_gate(n, addr); | 363 | set_intr_gate(n, addr); |
364 | } | 364 | } |
@@ -366,6 +366,6 @@ void __init update_intr_gate(unsigned int n, const void *addr) | |||
366 | void alloc_intr_gate(unsigned int n, const void *addr) | 366 | void alloc_intr_gate(unsigned int n, const void *addr) |
367 | { | 367 | { |
368 | BUG_ON(n < FIRST_SYSTEM_VECTOR); | 368 | BUG_ON(n < FIRST_SYSTEM_VECTOR); |
369 | if (!test_and_set_bit(n, used_vectors)) | 369 | if (!test_and_set_bit(n, system_vectors)) |
370 | set_intr_gate(n, addr); | 370 | set_intr_gate(n, addr); |
371 | } | 371 | } |
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 52089c043160..188990c3a514 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -134,7 +134,7 @@ int arch_show_interrupts(struct seq_file *p, int prec) | |||
134 | seq_puts(p, " Machine check polls\n"); | 134 | seq_puts(p, " Machine check polls\n"); |
135 | #endif | 135 | #endif |
136 | #if IS_ENABLED(CONFIG_HYPERV) || defined(CONFIG_XEN) | 136 | #if IS_ENABLED(CONFIG_HYPERV) || defined(CONFIG_XEN) |
137 | if (test_bit(HYPERVISOR_CALLBACK_VECTOR, used_vectors)) { | 137 | if (test_bit(HYPERVISOR_CALLBACK_VECTOR, system_vectors)) { |
138 | seq_printf(p, "%*s: ", prec, "HYP"); | 138 | seq_printf(p, "%*s: ", prec, "HYP"); |
139 | for_each_online_cpu(j) | 139 | for_each_online_cpu(j) |
140 | seq_printf(p, "%10u ", | 140 | seq_printf(p, "%10u ", |
@@ -416,7 +416,7 @@ int check_irq_vectors_for_cpu_disable(void) | |||
416 | */ | 416 | */ |
417 | for (vector = FIRST_EXTERNAL_VECTOR; | 417 | for (vector = FIRST_EXTERNAL_VECTOR; |
418 | vector < FIRST_SYSTEM_VECTOR; vector++) { | 418 | vector < FIRST_SYSTEM_VECTOR; vector++) { |
419 | if (!test_bit(vector, used_vectors) && | 419 | if (!test_bit(vector, system_vectors) && |
420 | IS_ERR_OR_NULL(per_cpu(vector_irq, cpu)[vector])) { | 420 | IS_ERR_OR_NULL(per_cpu(vector_irq, cpu)[vector])) { |
421 | if (++count == this_count) | 421 | if (++count == this_count) |
422 | return 0; | 422 | return 0; |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 34ea3651362e..321240f712e1 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -71,7 +71,7 @@ | |||
71 | #include <asm/proto.h> | 71 | #include <asm/proto.h> |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | DECLARE_BITMAP(used_vectors, NR_VECTORS); | 74 | DECLARE_BITMAP(system_vectors, NR_VECTORS); |
75 | 75 | ||
76 | static inline void cond_local_irq_enable(struct pt_regs *regs) | 76 | static inline void cond_local_irq_enable(struct pt_regs *regs) |
77 | { | 77 | { |