|
@@ -94,8 +94,6 @@ struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES];
|
|
|
/* # of MP IRQ source entries */
|
|
|
int mp_irq_entries;
|
|
|
|
|
|
-/* Number of legacy interrupts */
|
|
|
-static int nr_legacy_irqs __read_mostly = NR_IRQS_LEGACY;
|
|
|
/* GSI interrupts */
|
|
|
static int nr_irqs_gsi = NR_IRQS_LEGACY;
|
|
|
|
|
@@ -140,27 +138,10 @@ static struct irq_pin_list *get_one_free_irq_2_pin(int node)
|
|
|
|
|
|
/* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */
|
|
|
#ifdef CONFIG_SPARSE_IRQ
|
|
|
-static struct irq_cfg irq_cfgx[] = {
|
|
|
+static struct irq_cfg irq_cfgx[NR_IRQS_LEGACY];
|
|
|
#else
|
|
|
-static struct irq_cfg irq_cfgx[NR_IRQS] = {
|
|
|
+static struct irq_cfg irq_cfgx[NR_IRQS];
|
|
|
#endif
|
|
|
- [0] = { .vector = IRQ0_VECTOR, },
|
|
|
- [1] = { .vector = IRQ1_VECTOR, },
|
|
|
- [2] = { .vector = IRQ2_VECTOR, },
|
|
|
- [3] = { .vector = IRQ3_VECTOR, },
|
|
|
- [4] = { .vector = IRQ4_VECTOR, },
|
|
|
- [5] = { .vector = IRQ5_VECTOR, },
|
|
|
- [6] = { .vector = IRQ6_VECTOR, },
|
|
|
- [7] = { .vector = IRQ7_VECTOR, },
|
|
|
- [8] = { .vector = IRQ8_VECTOR, },
|
|
|
- [9] = { .vector = IRQ9_VECTOR, },
|
|
|
- [10] = { .vector = IRQ10_VECTOR, },
|
|
|
- [11] = { .vector = IRQ11_VECTOR, },
|
|
|
- [12] = { .vector = IRQ12_VECTOR, },
|
|
|
- [13] = { .vector = IRQ13_VECTOR, },
|
|
|
- [14] = { .vector = IRQ14_VECTOR, },
|
|
|
- [15] = { .vector = IRQ15_VECTOR, },
|
|
|
-};
|
|
|
|
|
|
void __init io_apic_disable_legacy(void)
|
|
|
{
|
|
@@ -185,8 +166,14 @@ int __init arch_early_irq_init(void)
|
|
|
desc->chip_data = &cfg[i];
|
|
|
zalloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node);
|
|
|
zalloc_cpumask_var_node(&cfg[i].old_domain, GFP_NOWAIT, node);
|
|
|
- if (i < nr_legacy_irqs)
|
|
|
- cpumask_setall(cfg[i].domain);
|
|
|
+ /*
|
|
|
+ * For legacy IRQ's, start with assigning irq0 to irq15 to
|
|
|
+ * IRQ0_VECTOR to IRQ15_VECTOR on cpu 0.
|
|
|
+ */
|
|
|
+ if (i < nr_legacy_irqs) {
|
|
|
+ cfg[i].vector = IRQ0_VECTOR + i;
|
|
|
+ cpumask_set_cpu(0, cfg[i].domain);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return 0;
|