From bb4ef1507d2d6fca8b52cd645c94112ac7924f4c Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 5 Jan 2021 13:12:37 +0100 Subject: [PATCH] x86/build: limit #include-ing by asm-offsets.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This file has a long dependencies list and asm-offsets.h, generated from it, has a long list of dependents. IOW if any of the former changes, all of the latter will be rebuilt, even if there's no actual change to the generated file. Therefore avoid including headers we don't actually need (generally or configuration dependent). Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné --- xen/arch/x86/x86_64/asm-offsets.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/x86_64/asm-offsets.c b/xen/arch/x86/x86_64/asm-offsets.c index 9f66a69be7..67ed86a648 100644 --- a/xen/arch/x86/x86_64/asm-offsets.c +++ b/xen/arch/x86/x86_64/asm-offsets.c @@ -5,11 +5,13 @@ */ #define COMPILE_OFFSETS +#ifdef CONFIG_PERF_COUNTERS #include +#endif #include -#include +#ifdef CONFIG_PV #include -#include +#endif #include #include #include @@ -101,7 +103,6 @@ void __dummy__(void) #ifdef CONFIG_PV OFFSET(DOMAIN_is_32bit_pv, struct domain, arch.pv.is_32bit); BLANK(); -#endif OFFSET(VCPUINFO_upcall_pending, struct vcpu_info, evtchn_upcall_pending); OFFSET(VCPUINFO_upcall_mask, struct vcpu_info, evtchn_upcall_mask); @@ -110,6 +111,7 @@ void __dummy__(void) OFFSET(COMPAT_VCPUINFO_upcall_pending, struct compat_vcpu_info, evtchn_upcall_pending); OFFSET(COMPAT_VCPUINFO_upcall_mask, struct compat_vcpu_info, evtchn_upcall_mask); BLANK(); +#endif OFFSET(CPUINFO_guest_cpu_user_regs, struct cpu_info, guest_cpu_user_regs); OFFSET(CPUINFO_verw_sel, struct cpu_info, verw_sel); -- 2.30.2