x86/devicetree: Fix build for amd64
PATCH v2 1/1 x86/devicetree: Fix build for amd64
apic_force_enable is not defined for amd64.
Without this patch:
LD init/built-in.oarch/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
---
v2: Suggested by: Jiang Liu <[email protected]>
How about defining a version of apic_force_enable() for X86_64 in apic.h which just return failure?
arch/x86/kernel/apic/apic.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/x86/kernel/apic/apic.c +6 -0
@@ -1679,6 +1679,12 @@ static int __init detect_init_APIC(void) mp_lapic_addr =APIC_DEFAULT_PHYS_BASE ; return 0; } + +int __init apic_force_enable (unsigned long addr) +{ +return -1 ; +} +#else static int __init apic_verify (void )
Signature · 1 line
2.1.4
Quoted 14 lines · Ricardo Ribalda Delgado
apic_force_enableis not defined for amd64.Without this patch:
LD
init/built-in.oarch/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 1Signed-off-by Ricardo Ribalda Delgado <[email protected]>---
Quoted 7 lines
v2: Suggested by: Jiang Liu <[email protected]>
How about defining a version of
apic_force_enable()forX86_64inapic.hwhich just return failure?arch/x86/kernel/apic/apic.c | 6 ++++++ 1 file changed, 6 insertions(+)
I think the original suggestion made sense, move your stuff to apic.h so
that the call is optimised away rather than keeping it here.
Maciej