diff options
-rw-r--r-- | xen/arch/x86/oprofile/op_x86_model.h | 2 | ||||
-rw-r--r-- | xen/include/acpi/cpufreq/cpufreq.h | 2 | ||||
-rw-r--r-- | xen/include/xen/compiler.h | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/xen/arch/x86/oprofile/op_x86_model.h b/xen/arch/x86/oprofile/op_x86_model.h index 87beedbf87..31d473b7f6 100644 --- a/xen/arch/x86/oprofile/op_x86_model.h +++ b/xen/arch/x86/oprofile/op_x86_model.h @@ -53,6 +53,6 @@ extern struct op_x86_model_spec const op_amd_fam15h_spec; 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 --git a/xen/include/acpi/cpufreq/cpufreq.h b/xen/include/acpi/cpufreq/cpufreq.h index 3377232ccd..1798b9bb19 100644 --- a/xen/include/acpi/cpufreq/cpufreq.h +++ b/xen/include/acpi/cpufreq/cpufreq.h @@ -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 --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h index 04f84ec393..8c26756afa 100644 --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -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))) |