Re: [patch] 2.6.7-rc2-mm1: let SERIAL_8250_ACPI depend on ACPI_PCI
From: Bjorn Helgaas
Date: Wed Jun 02 2004 - 11:55:02 EST
On Tuesday 01 June 2004 6:39 pm, Adrian Bunk wrote:
> The PCI IRQ update in the ACPI tree causes the following compile error with CONFIG_PCI=n:
> ...
> drivers/built-in.o(.text+0xfc1c7): In function `acpi_serial_ext_irq':
> : undefined reference to `acpi_register_gsi'
> drivers/built-in.o(.text+0xfc1f6): In function `acpi_serial_irq':
> : undefined reference to `acpi_register_gsi'
As Matthew noted, there's no reason a machine ACPI needs to have
PCI, so I propose the following patch instead. This just makes
acpi_register_gsi()and acpi_gsi_to_irq() available independent
of CONFIG_PCI.
diff -u -Nur linux-2.6.6/arch/i386/kernel/acpi/boot.c linux-2.6.6-pci-irq/arch/i386/kernel/acpi/boot.c
--- linux-2.6.6/arch/i386/kernel/acpi/boot.c 2004-06-02 10:43:15.000000000 -0600
+++ linux-2.6.6-pci-irq/arch/i386/kernel/acpi/boot.c 2004-06-02 10:41:07.000000000 -0600
@@ -438,23 +438,25 @@
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) {
@@ -464,7 +466,6 @@
acpi_gsi_to_irq(gsi, &irq);
return irq;
}
-#endif /* CONFIG_ACPI_PCI */
static unsigned long __init
acpi_scan_rsdp (
diff -u -Nur linux-2.6.6/include/linux/acpi.h linux-2.6.6-pci-irq/include/linux/acpi.h
--- linux-2.6.6/include/linux/acpi.h 2004-06-02 10:43:15.000000000 -0600
+++ linux-2.6.6-pci-irq/include/linux/acpi.h 2004-06-02 10:33:57.000000000 -0600
@@ -413,6 +413,8 @@
#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 @@
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/