From e7d763433b333a63c9f12f419dacdf150ab30fb9 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Mon, 24 May 2004 17:32:47 -0400 Subject: [ACPI] PCI IRQ update (Bjorn Helgaas) http://bugme.osdl.org/show_bug.cgi?id=2574 mp_parse_prt() and iosapic_parse_prt() used to allocate all IRQs, whether devices needed them or not. Some devices failed because the this method enabled unused PCI Interrupt Link Devices, which disrupted active link devices. Now the PRT knowledge is pulled out of the arch code and the IRQ allocation and IO-APIC programming is done by pci_enable_device(). This is also a step toward allowing the addition of new root bridges and PRTs at run-time. The architecture supplies unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) which is called by acpi_pci_irq_enable(). ACPI supplies all the information from the PRT, and the arch sets up the routing and returns the IRQ it allocated. --- include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d56069ba4f5b..d65e84d48ad9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -437,7 +437,7 @@ extern struct acpi_prt_list acpi_prt; struct pci_dev; int acpi_pci_irq_enable (struct pci_dev *dev); -int acpi_pci_irq_init (void); +unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); struct acpi_pci_driver { -- cgit v1.2.3 From c76f45470b599a1da6ee15c1b7d9ff35234375f0 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Wed, 2 Jun 2004 16:45:08 -0400 Subject: [ACPI] fix !CONFIG_PCI build (Bjorn Helgaas) --- arch/i386/kernel/acpi/boot.c | 9 +++++---- include/linux/acpi.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'include/linux') diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 8b3539b3152c..1fd3ee171aad 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -437,23 +437,25 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) return 0; } -#ifdef CONFIG_ACPI_PCI unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) { - static u16 irq_mask; unsigned int irq; - extern void eisa_set_level_irq(unsigned int irq); +#ifdef CONFIG_PCI /* * Make sure all (legacy) PCI IRQs are set as level-triggered. */ if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { + static u16 irq_mask; + extern void eisa_set_level_irq(unsigned int irq); + if ((gsi < 16) && !((1 << gsi) & irq_mask)) { Dprintk(KERN_DEBUG PREFIX "Setting GSI %u as level-triggered\n", gsi); irq_mask |= (1 << gsi); eisa_set_level_irq(gsi); } } +#endif #ifdef CONFIG_X86_IO_APIC if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { @@ -463,7 +465,6 @@ unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) acpi_gsi_to_irq(gsi, &irq); return irq; } -#endif /* CONFIG_ACPI_PCI */ static unsigned long __init acpi_scan_rsdp ( diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d65e84d48ad9..f82aa67ea6b8 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -413,6 +413,8 @@ static inline int acpi_boot_init(void) #endif /*!CONFIG_ACPI_BOOT*/ +unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); +int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); #ifdef CONFIG_ACPI_PCI @@ -437,8 +439,6 @@ extern struct acpi_prt_list acpi_prt; struct pci_dev; int acpi_pci_irq_enable (struct pci_dev *dev); -unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); -int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); struct acpi_pci_driver { struct acpi_pci_driver *next; -- cgit v1.2.3