[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] move __read_mostly to xen/cache.h
There's no need for every arch to define its own identical copy. If down the road an arch needs to customize it, we can add #ifndef around the common #define. To be on the safe side build-breakage-wise, change a couple of #include <asm/cache.h> to the xen/ equivalent. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/arch/arm/include/asm/cache.h +++ b/xen/arch/arm/include/asm/cache.h @@ -6,8 +6,6 @@ #define L1_CACHE_SHIFT (CONFIG_ARM_L1_CACHE_SHIFT) #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) -#define __read_mostly __section(".data.read_mostly") - #endif /* * Local variables: --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -34,13 +34,13 @@ #include <xen/lib.h> #include <xen/types.h> #include <xen/acpi.h> +#include <xen/cache.h> #include <xen/smp.h> #include <xen/guest_access.h> #include <xen/keyhandler.h> #include <xen/param.h> #include <xen/trace.h> #include <xen/irq.h> -#include <asm/cache.h> #include <asm/io.h> #include <asm/iocap.h> #include <asm/hpet.h> --- a/xen/arch/x86/flushtlb.c +++ b/xen/arch/x86/flushtlb.c @@ -7,11 +7,11 @@ * Copyright (c) 2003-2006, K A Fraser */ +#include <xen/cache.h> #include <xen/paging.h> #include <xen/sched.h> #include <xen/smp.h> #include <xen/softirq.h> -#include <asm/cache.h> #include <asm/flushtlb.h> #include <asm/invpcid.h> #include <asm/nops.h> --- a/xen/arch/x86/genapic/probe.c +++ b/xen/arch/x86/genapic/probe.c @@ -6,10 +6,10 @@ #include <xen/cpumask.h> #include <xen/string.h> #include <xen/kernel.h> +#include <xen/cache.h> #include <xen/ctype.h> #include <xen/init.h> #include <xen/param.h> -#include <asm/cache.h> #include <asm/fixmap.h> #include <asm/mpspec.h> #include <asm/apicdef.h> --- a/xen/arch/x86/guest/hypervisor.c +++ b/xen/arch/x86/guest/hypervisor.c @@ -6,11 +6,11 @@ * * Copyright (c) 2019 Microsoft. */ +#include <xen/cache.h> #include <xen/cpumask.h> #include <xen/init.h> #include <xen/types.h> -#include <asm/cache.h> #include <asm/guest.h> static struct hypervisor_ops __read_mostly ops; --- a/xen/arch/x86/include/asm/cache.h +++ b/xen/arch/x86/include/asm/cache.h @@ -9,8 +9,6 @@ #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) -#define __read_mostly __section(".data.read_mostly") - #ifndef __ASSEMBLY__ void cache_flush(const void *addr, unsigned int size); --- a/xen/common/version.c +++ b/xen/common/version.c @@ -1,3 +1,4 @@ +#include <xen/cache.h> #include <xen/compile.h> #include <xen/init.h> #include <xen/errno.h> @@ -8,8 +9,6 @@ #include <xen/elf.h> #include <xen/version.h> -#include <asm/cache.h> - const char *xen_compile_date(void) { return XEN_COMPILE_DATE; --- a/xen/include/xen/cache.h +++ b/xen/include/xen/cache.h @@ -15,6 +15,7 @@ #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) #endif +#define __read_mostly __section(".data.read_mostly") #define __ro_after_init __section(".data.ro_after_init") #endif /* __LINUX_CACHE_H */
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |