|
@@ -1538,6 +1538,56 @@ static void __init setup_IO_APIC_irqs(void)
|
|
" (apicid-pin) not connected\n");
|
|
" (apicid-pin) not connected\n");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * for the gsit that is not in first ioapic
|
|
|
|
+ * but could not use acpi_register_gsi()
|
|
|
|
+ * like some special sci in IBM x3330
|
|
|
|
+ */
|
|
|
|
+void setup_IO_APIC_irq_extra(u32 gsi)
|
|
|
|
+{
|
|
|
|
+ int apic_id = 0, pin, idx, irq;
|
|
|
|
+ int node = cpu_to_node(boot_cpu_id);
|
|
|
|
+ struct irq_desc *desc;
|
|
|
|
+ struct irq_cfg *cfg;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Convert 'gsi' to 'ioapic.pin'.
|
|
|
|
+ */
|
|
|
|
+ apic_id = mp_find_ioapic(gsi);
|
|
|
|
+ if (apic_id < 0)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ pin = mp_find_ioapic_pin(apic_id, gsi);
|
|
|
|
+ idx = find_irq_entry(apic_id, pin, mp_INT);
|
|
|
|
+ if (idx == -1)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ irq = pin_2_irq(idx, apic_id, pin);
|
|
|
|
+#ifdef CONFIG_SPARSE_IRQ
|
|
|
|
+ desc = irq_to_desc(irq);
|
|
|
|
+ if (desc)
|
|
|
|
+ return;
|
|
|
|
+#endif
|
|
|
|
+ desc = irq_to_desc_alloc_node(irq, node);
|
|
|
|
+ if (!desc) {
|
|
|
|
+ printk(KERN_INFO "can not get irq_desc for %d\n", irq);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ cfg = desc->chip_data;
|
|
|
|
+ add_pin_to_irq_node(cfg, node, apic_id, pin);
|
|
|
|
+
|
|
|
|
+ if (test_bit(pin, mp_ioapic_routing[apic_id].pin_programmed)) {
|
|
|
|
+ pr_debug("Pin %d-%d already programmed\n",
|
|
|
|
+ mp_ioapics[apic_id].apicid, pin);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ set_bit(pin, mp_ioapic_routing[apic_id].pin_programmed);
|
|
|
|
+
|
|
|
|
+ setup_IO_APIC_irq(apic_id, pin, irq, desc,
|
|
|
|
+ irq_trigger(idx), irq_polarity(idx));
|
|
|
|
+}
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Set up the timer pin, possibly with the 8259A-master behind.
|
|
* Set up the timer pin, possibly with the 8259A-master behind.
|
|
*/
|
|
*/
|
|
@@ -3252,14 +3302,12 @@ int create_irq(void)
|
|
void destroy_irq(unsigned int irq)
|
|
void destroy_irq(unsigned int irq)
|
|
{
|
|
{
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
- struct irq_cfg *cfg;
|
|
|
|
|
|
|
|
dynamic_irq_cleanup_keep_chip_data(irq);
|
|
dynamic_irq_cleanup_keep_chip_data(irq);
|
|
|
|
|
|
free_irte(irq);
|
|
free_irte(irq);
|
|
spin_lock_irqsave(&vector_lock, flags);
|
|
spin_lock_irqsave(&vector_lock, flags);
|
|
- cfg = irq_to_desc(irq)->chip_data;
|
|
|
|
- __clear_irq_vector(irq, cfg);
|
|
|
|
|
|
+ __clear_irq_vector(irq, get_irq_chip_data(irq));
|
|
spin_unlock_irqrestore(&vector_lock, flags);
|
|
spin_unlock_irqrestore(&vector_lock, flags);
|
|
}
|
|
}
|
|
|
|
|