From 2d2ccf24939cf369f7473c7e4ea309891be91848 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 19 May 2018 21:22:48 +0200 Subject: x86/Hyper-V/hv_apic: Build the Hyper-V APIC conditionally The Hyper-V APIC code is built when CONFIG_HYPERV is enabled but the actual code in that file is guarded with CONFIG_X86_64. There is no point in doing this. Neither is there a point in having the CONFIG_HYPERV guard in there because the containing directory is not built when CONFIG_HYPERV=n. Further for the hv_init_apic() function a stub is provided only for CONFIG_HYPERV=n, which is pointless as the callsite is not compiled at all. But for X86_32 the stub is missing and the build fails. Clean that up: - Compile hv_apic.c only when CONFIG_X86_64=y - Make the stub for hv_init_apic() available when CONFG_X86_64=n Fixes: 6b48cb5f8347 ("X86/Hyper-V: Enlighten APIC access") Reported-by: kbuild test robot Signed-off-by: Thomas Gleixner Cc: K. Y. Srinivasan Cc: Michael Kelley --- arch/x86/hyperv/hv_apic.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch/x86/hyperv/hv_apic.c') diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c index d3ff6e255924..f68855499391 100644 --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c @@ -31,9 +31,6 @@ #include #include -#ifdef CONFIG_X86_64 -#if IS_ENABLED(CONFIG_HYPERV) - static struct apic orig_apic; static u64 hv_apic_icr_read(void) @@ -257,6 +254,3 @@ void __init hv_apic_init(void) apic->icr_read = hv_apic_icr_read; } } - -#endif /* CONFIG_HYPERV */ -#endif /* CONFIG_X86_64 */ -- cgit