Commit 28c6a0ba authored by Yinghai Lu's avatar Yinghai Lu Committed by H. Peter Anvin

x86, legacy_irq: Remove left over nr_legacy_irqs

nr_legacy_irqs and its ilk have moved to legacy_pic.

-v2: there is one in ioapic_.c
Singed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
LKML-Reference: <4B84AAC4.2020204@kernel.org>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 3746c6b6
...@@ -48,6 +48,5 @@ extern DECLARE_BITMAP(used_vectors, NR_VECTORS); ...@@ -48,6 +48,5 @@ extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
extern int vector_used_by_percpu_irq(unsigned int vector); extern int vector_used_by_percpu_irq(unsigned int vector);
extern void init_ISA_irqs(void); extern void init_ISA_irqs(void);
extern int nr_legacy_irqs;
#endif /* _ASM_X86_IRQ_H */ #endif /* _ASM_X86_IRQ_H */
...@@ -1440,7 +1440,7 @@ static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq ...@@ -1440,7 +1440,7 @@ static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq
* controllers like 8259. Now that IO-APIC can handle this irq, update * controllers like 8259. Now that IO-APIC can handle this irq, update
* the cfg->domain. * the cfg->domain.
*/ */
if (irq < nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain)) if (irq < legacy_pic->nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
apic->vector_allocation_domain(0, cfg->domain); apic->vector_allocation_domain(0, cfg->domain);
if (assign_irq_vector(irq, cfg, apic->target_cpus())) if (assign_irq_vector(irq, cfg, apic->target_cpus()))
......
...@@ -99,9 +99,6 @@ int vector_used_by_percpu_irq(unsigned int vector) ...@@ -99,9 +99,6 @@ int vector_used_by_percpu_irq(unsigned int vector)
return 0; return 0;
} }
/* Number of legacy interrupts */
int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY;
void __init init_ISA_irqs(void) void __init init_ISA_irqs(void)
{ {
int i; int i;
...@@ -114,7 +111,7 @@ void __init init_ISA_irqs(void) ...@@ -114,7 +111,7 @@ void __init init_ISA_irqs(void)
/* /*
* 16 old-style INTA-cycle interrupts: * 16 old-style INTA-cycle interrupts:
*/ */
for (i = 0; i < NR_IRQS_LEGACY; i++) { for (i = 0; i < legacy_pic->nr_legacy_irqs; i++) {
struct irq_desc *desc = irq_to_desc(i); struct irq_desc *desc = irq_to_desc(i);
desc->status = IRQ_DISABLED; desc->status = IRQ_DISABLED;
...@@ -138,7 +135,7 @@ void __init init_IRQ(void) ...@@ -138,7 +135,7 @@ void __init init_IRQ(void)
* then this vector space can be freed and re-used dynamically as the * then this vector space can be freed and re-used dynamically as the
* irq's migrate etc. * irq's migrate etc.
*/ */
for (i = 0; i < nr_legacy_irqs; i++) for (i = 0; i < legacy_pic->nr_legacy_irqs; i++)
per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i; per_cpu(vector_irq, 0)[IRQ0_VECTOR + i] = i;
x86_init.irqs.intr_init(); x86_init.irqs.intr_init();
......
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