[PATCH v3] x86/devicetree: Fix build for amd64
From: Ricardo Ribalda Delgado
Date: Mon Feb 02 2015 - 14:27:23 EST
apic_force_enable is not defined for amd64.
Without this patch:
LD init/built-in.o
arch/x86/built-in.o: In function `dtb_lapic_setup':
kernel/devicetree.c:155:
undefined reference to `apic_force_enable'
Makefile:923: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx>
---
v3: Suggested by: Maciej W. Rozycki <macro@xxxxxxxxxxxxxx>
Implementing the function in apic.h and not in apic.c
(actually, doing v2 properly :) )
v2: Suggested by: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
How about defining a version of apic_force_enable()
for X86_64 in apic.h which just return failure?
arch/x86/include/asm/apic.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 92003f3..efc3b22 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -213,7 +213,15 @@ void register_lapic_address(unsigned long address);
extern void setup_boot_APIC_clock(void);
extern void setup_secondary_APIC_clock(void);
extern int APIC_init_uniprocessor(void);
+
+#ifdef CONFIG_X86_64
+static inline int apic_force_enable(unsigned long addr)
+{
+ return -1;
+}
+#else
extern int apic_force_enable(unsigned long addr);
+#endif
extern int apic_bsp_setup(bool upmode);
extern void apic_ap_setup(void);
--
2.1.4
--
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/