Re: [tip:x86/apic] x86: Fix out of order gsi -- add remap_ioapic_gsi_to_irq()

From: Yinghai Lu
Date: Sat Feb 27 2010 - 13:54:23 EST


On 02/27/2010 05:01 AM, Ingo Molnar wrote:
> arch/x86/kernel/apic/io_apic.c:1042: error: implicit declaration of function ?remap_ioapic_gsi_to_irq?
>
please check

[PATCH] x86: fix warning with remap_ioapic_gsi_to_irq when !CONFIG_ACPI

Ingo found:
| x86: Fix out of order gsi -- add remap_ioapic_gsi_to_irq()
cause:
arch/x86/kernel/apic/io_apic.c:1042: error: implicit declaration of function ?remap_ioapic_gsi_to_irq?

actually when !CONFIG_ACPI, we have
#define acpi_ioapic 0

somehow we still get warning for
#if (!0) {
...
} else {
...
remap_ioapic_gsi_to_irq...
}

gcc bug?

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

---
arch/x86/include/asm/mpspec.h | 8 ++++++++
1 file changed, 8 insertions(+)

Index: linux-2.6/arch/x86/include/asm/mpspec.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/mpspec.h
+++ linux-2.6/arch/x86/include/asm/mpspec.h
@@ -116,6 +116,14 @@ static inline int acpi_probe_gsi(void)
{
return 0;
}
+static inline int remap_ioapic_gsi_to_irq(int ioapic, u32 gsi)
+{
+ return gsi;
+}
+static inline int remap_ioapic_irq_to_gsi(int irq)
+{
+ return irq;
+}
#endif /* CONFIG_ACPI */

#define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS)
--
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/