[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: explicitly mark __initdata variables as used when building with clang.
# HG changeset patch # User Tim Deegan <tim@xxxxxxx> # Date 1334146233 -3600 # Node ID f4bd73fe01adbc0fe6e8559dbdf36b7abc4668cc # Parent 6c604c0c3525d85b279738e72c8b2c61cc12c35b x86: explicitly mark __initdata variables as used when building with clang. This stops LLVM from replacing it with a different, auto-generated variable as part of an optimization. (The auto-generated variable ends up in the normal data section.) Remove stray __read_mostly annotations on declarations that this unmasked. Signed-off-by: Tim Deegan <tim@xxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> Committed-by: Tim Deegan <tim@xxxxxxx> --- diff -r 6c604c0c3525 -r f4bd73fe01ad xen/arch/x86/oprofile/op_x86_model.h --- a/xen/arch/x86/oprofile/op_x86_model.h Wed Apr 11 13:10:33 2012 +0100 +++ b/xen/arch/x86/oprofile/op_x86_model.h Wed Apr 11 13:10:33 2012 +0100 @@ -53,6 +53,6 @@ extern struct op_x86_model_spec const op void arch_perfmon_setup_counters(void); extern int ppro_has_global_ctrl; -extern struct op_x86_model_spec const *__read_mostly model; +extern struct op_x86_model_spec const *model; #endif /* OP_X86_MODEL_H */ diff -r 6c604c0c3525 -r f4bd73fe01ad xen/include/acpi/cpufreq/cpufreq.h --- a/xen/include/acpi/cpufreq/cpufreq.h Wed Apr 11 13:10:33 2012 +0100 +++ b/xen/include/acpi/cpufreq/cpufreq.h Wed Apr 11 13:10:33 2012 +0100 @@ -22,7 +22,7 @@ DECLARE_PER_CPU(spinlock_t, cpufreq_statistic_lock); -extern bool_t __read_mostly cpufreq_verbose; +extern bool_t cpufreq_verbose; struct cpufreq_governor; diff -r 6c604c0c3525 -r f4bd73fe01ad xen/include/xen/compiler.h --- a/xen/include/xen/compiler.h Wed Apr 11 13:10:33 2012 +0100 +++ b/xen/include/xen/compiler.h Wed Apr 11 13:10:33 2012 +0100 @@ -14,7 +14,13 @@ #define always_inline __inline__ __attribute__ ((always_inline)) #define noinline __attribute__((noinline)) +#ifdef __clang__ +/* Clang can replace some vars with new automatic ones that go in .data; + * mark all explicit-segment vars 'used' to prevent that. */ +#define __section(s) __attribute_used__ __attribute__((__section__(s))) +#else #define __section(s) __attribute__((__section__(s))) +#endif #define __used_section(s) __attribute_used__ __attribute__((__section__(s))) #define __text_section(s) __attribute__((__section__(s))) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |