Move them out of a header file and make the macros proper functions again.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
#endif
DEFINE_PER_CPU(struct vcpu *, curr_vcpu);
-DEFINE_PER_CPU(u64, efer);
DEFINE_PER_CPU(unsigned long, cr4);
static void default_idle(void);
#endif
string_param("nmi", opt_nmi);
+DEFINE_PER_CPU(u64, efer);
+
DEFINE_PER_CPU_READ_MOSTLY(u32, ler_msr);
DEFINE_PER_CPU_READ_MOSTLY(struct desc_struct *, gdt_table);
return;
}
+u64 read_efer(void)
+{
+ return this_cpu(efer);
+}
+
+void write_efer(u64 val)
+{
+ this_cpu(efer) = val;
+ wrmsrl(MSR_EFER, val);
+}
+
+static void ler_enable(void)
+{
+ u64 debugctl;
+
+ if ( !this_cpu(ler_msr) )
+ return;
+
+ rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
+ wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl | 1);
+}
+
asmlinkage void do_debug(struct cpu_user_regs *regs)
{
struct vcpu *v = current;
DECLARE_PER_CPU(u64, efer);
-
-#define read_efer() this_cpu(efer)
-
-#define write_efer(val) do { \
- this_cpu(efer) = val; \
- wrmsrl(MSR_EFER, val); \
-} while(0)
+u64 read_efer(void);
+void write_efer(u64 val);
DECLARE_PER_CPU(u32, ler_msr);
-#define ler_enable() do { \
- u64 debugctl; \
- if ( !this_cpu(ler_msr) ) \
- return; \
- rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl); \
- wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl | 1); \
-} while(0)
-
#endif /* !__ASSEMBLY__ */
#endif /* __ASM_MSR_H */
#ifndef _XEN_CPUIDLE_H
#define _XEN_CPUIDLE_H
-#include <xen/smp.h>
+#include <xen/cpumask.h>
#define ACPI_PROCESSOR_MAX_POWER 8
#define CPUIDLE_NAME_LEN 16