Skip to contentSkip to conversation

2.6.16-rc1-mm2

DISCUSSION Chuck Ebbert 1 participant 1 message Jan 22, 2006 PCI

lore
Share & tools
lore
#0 lore raw

gregkh-pci-msi-vector-targeting-abstractions.patch breaks msi on x86_64:

In file included from include/asm/msi.h:11,

                 from drivers/pci/msi.h:9,
                 from drivers/pci/msi-apic.c:15:

include/asm/smp.h:103: error: syntax error before ‘->’ token

include/asm-x86_64/msi.h:#include <asm/mach_apic.h>

include/asm-x86_64/mach_apic.h:#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)

include/asm-x86_64/smp.h:103:static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)

drivers/pci/msi.c does not have this problem because it includes <asm/smp.h> _before_ "msi.h" so the #define overrides the inline function.

Ugly patch to fix this follows... at least it compiles now...

Fix msi on x86_64, broken due to include-ordering problems.

 drivers/pci/msi-apic.c |    2 ++
 1 files changed, 2 insertions(+)
drivers/pci/msi-apic.c +2 -0
@@ -11,6 +11,8 @@
 #include <linux/pci.h>
 #include <linux/irq.h>
 
+#include <asm/smp.h>
+
 #include "pci.h"
 #include "msi.h"
 
Signature · 1 line
Chuck