ia64 support for PCI link devices
PATCH 1/1 ia64 support for PCI link devices
This patch enables correct enablement of interrupts described by PCI link device entries in the DSDT.
The current ia64 implementation ignores link entries and therefore prevents such interrupts from being configured correctly.
Comments?
thanks,
Signature · 66 lines
Chris McDermott
--- orig/arch/ia64/kernel/iosapic.c 2004-03-31 16:19:20.000000000 -0800
+++ new/arch/ia64/kernel/iosapic.c 2004-04-05 10:29:11.668281924 -0700
@@ -688,15 +688,23 @@ iosapic_parse_prt (void)
char pci_id[16];
struct hw_interrupt_type *irq_type = &irq_type_iosapic_level;
irq_desc_t *idesc;
+ int trigger = IOSAPIC_LEVEL;
+ int polarity = IOSAPIC_POL_LOW;
list_for_each(node, &acpi_prt.entries) {
entry = list_entry(node, struct acpi_prt_entry, node);
- /* We're only interested in static (non-link) entries. */
- if (entry->link.handle)
- continue;
+ /* Check for dynamic (PCI link) entry. */
+ if (entry->link.handle) {
+ gsi = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &trigger, &polarity);
+ if (!gsi)
+ continue;
- gsi = entry->link.index;
+ if (trigger == IOSAPIC_EDGE)
+ irq_type = &irq_type_iosapic_edge;
+ } else {
+ gsi = entry->link.index;
+ }
vector = gsi_to_vector(gsi);
if (vector < 0) {
@@ -710,8 +718,12 @@ iosapic_parse_prt (void)
/* new GSI; allocate a vector for it */
vector = ia64_alloc_vector();
- register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
- IOSAPIC_LEVEL);
+ if (entry->link.handle)
+ register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, polarity,
+ trigger);
+ else
+ register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
+ IOSAPIC_LEVEL);
}
entry->irq = vector;
snprintf(pci_id, sizeof(pci_id), "%02x:%02x:%02x[%c]",
@@ -723,8 +735,8 @@ iosapic_parse_prt (void)
*/
idesc = irq_descp(vector);
if (idesc->handler != irq_type)
- register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
- IOSAPIC_LEVEL);
+ register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, polarity,
+ trigger);
}
}
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=clickA message that is not in the archive (sent off-list or not yet received): 20040406014553.GV7695-r/[email protected]
Quoted 5 lines · Chris McDermott
This patch enables correct enablement of interrupts described by PCI link device entries in the DSDT.
The current ia64 implementation ignores link entries and therefore prevents such interrupts from being configured correctly.
I'm working on cleaning this up in a generic way, which will eventually remove iosapic_parse_prt() completely. Unfortunately, I don't think I have any boxes that use link entries, so I can't test that bit of it.
Here's the patch I'm currently testing (ia64 and generic changes only). Can you give it a whirl and see what it does with your link entries?
===== arch/ia64/kernel/acpi.c 1.65 vs edited =====
arch/ia64/kernel/acpi.c +8 -1
@@ -527,7 +527,7 @@if (fadt->iapc_boot_arch &BAF_LEGACY_DEVICES ) acpi_legacy_devices =1 ; -acpi_register_irq (fadt->sci_int,ACPI_ACTIVE_LOW ,ACPI_LEVEL_SENSITIVE ); +acpi_register_gsi (fadt->sci_int,ACPI_ACTIVE_LOW ,ACPI_LEVEL_SENSITIVE );return 0 ; }
@@ -662,5 +662,12 @@ (trigger == ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : IOSAPIC_LEVEL); }EXPORT_SYMBOL (acpi_register_irq); + +unsigned int +acpi_register_gsi (u32 gsi,int polarity,int trigger) +{ +return acpi_register_irq (gsi, polarity, trigger); +} +EXPORT_SYMBOL (acpi_register_gsi);#endif /* CONFIG_ACPI_BOOT */
===== arch/ia64/pci/pci.c 1.45 vs edited =====
arch/ia64/pci/pci.c +0 -1
@@ -441,7 +441,6 @@if (ret <0 )return ret; -printk (KERN_INFO "PCI: Found IRQ %d for device %s\n" , dev->irq,pci_name (dev));return acpi_pci_irq_enable (dev); }
===== drivers/acpi/pci_irq.c 1.26 vs edited =====
drivers/acpi/pci_irq.c +28 -46
150 lines not on this page · raw message
===== drivers/serial/8250_acpi.c 1.8 vs edited =====
drivers/serial/8250_acpi.c +4 -14
@@ -58,28 +58,18 @@static acpi_status acpi_serial_ext_irq (struct serial_struct *req,struct acpi_resource_ext_irq *ext_irq) { -if (ext_irq->number_of_interrupts >0 ) { -#ifdef CONFIG_IA64 - req->irq =acpi_register_irq (ext_irq->interrupts[0 ], +if (ext_irq->number_of_interrupts >0 ) + req->irq =acpi_register_gsi (ext_irq->interrupts[0 ], ext_irq->active_high_low, ext_irq->edge_level); -#else - req->irq = ext_irq->interrupts[0 ]; -#endif - }return AE_OK ; }static acpi_status acpi_serial_irq (struct serial_struct *req,struct acpi_resource_irq *irq) { -if (irq->number_of_interrupts >0 ) { -#ifdef CONFIG_IA64 - req->irq =acpi_register_irq (irq->interrupts[0 ], +if (irq->number_of_interrupts >0 ) + req->irq =acpi_register_gsi (irq->interrupts[0 ], irq->active_high_low, irq->edge_level); -#else - req->irq = irq->interrupts[0 ]; -#endif - }return AE_OK ; }
===== drivers/serial/8250_hcdp.c 1.3 vs edited =====
drivers/serial/8250_hcdp.c +1 -5
@@ -179,12 +179,8 @@printk (KERN_WARNING "warning: No support for PCI serial console\n" );return ; } -#ifdef CONFIG_IA64 - port.irq =acpi_register_irq (gsi,ACPI_ACTIVE_HIGH , + port.irq =acpi_register_gsi (gsi,ACPI_ACTIVE_HIGH ,ACPI_EDGE_SENSITIVE ); -#else - port.irq = gsi; -#endif port.flags =UPF_SKIP_TEST |UPF_BOOT_AUTOCONF |UPF_RESOURCES ;/*
===== include/linux/acpi.h 1.32 vs edited =====
include/linux/acpi.h +1 -0
@@ -438,6 +438,7 @@int acpi_pci_irq_enable (struct pci_dev *dev);int acpi_pci_irq_init (void ); +unsigned int acpi_register_gsi (u32 gsi,int polarity,int trigger);struct acpi_pci_driver {struct acpi_pci_driver *next;
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click