diff options
author | Dietmar Hahn <dietmar.hahn@ts.fujitsu.com> | 2012-02-09 06:09:17 -0800 |
---|---|---|
committer | Dietmar Hahn <dietmar.hahn@ts.fujitsu.com> | 2012-02-09 06:09:17 -0800 |
commit | a81e66257424ef78f2ea987d3f239b0746f8ad04 (patch) | |
tree | 04ecc87288b2dc0f406bd01cedd03ee2dedd7850 | |
parent | 48a8a4ed8854fd40c3535e09a365031b2391cfbc (diff) | |
download | xen-a81e66257424ef78f2ea987d3f239b0746f8ad04.tar.gz xen-a81e66257424ef78f2ea987d3f239b0746f8ad04.tar.bz2 xen-a81e66257424ef78f2ea987d3f239b0746f8ad04.zip |
vpmu: Rename PASSIVE_DOMAIN_ALLOCATED
This patch renames the define PASSIVE_DOMAIN_ALLOCATED to follow the
same scheme of the other defines.
Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Committed-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | xen/arch/x86/oprofile/nmi_int.c | 4 | ||||
-rw-r--r-- | xen/arch/x86/oprofile/op_model_ppro.c | 9 | ||||
-rw-r--r-- | xen/include/asm-x86/hvm/vpmu.h | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c index acc3869e04..379046127d 100644 --- a/xen/arch/x86/oprofile/nmi_int.c +++ b/xen/arch/x86/oprofile/nmi_int.c @@ -47,7 +47,7 @@ static int passive_domain_msr_op_checks(unsigned int msr, int *typep, int *index if ( !model->is_arch_pmu_msr(msr, typep, indexp) ) return 0; - if ( !vpmu_is_set(vpmu, PASSIVE_DOMAIN_ALLOCATED) ) + if ( !vpmu_is_set(vpmu, VPMU_PASSIVE_DOMAIN_ALLOCATED) ) if ( ! model->allocated_msr(current) ) return 0; return 1; @@ -78,7 +78,7 @@ int passive_domain_do_wrmsr(unsigned int msr, uint64_t msr_content) void passive_domain_destroy(struct vcpu *v) { struct vpmu_struct *vpmu = vcpu_vpmu(v); - if ( vpmu_is_set(vpmu, PASSIVE_DOMAIN_ALLOCATED) ) + if ( vpmu_is_set(vpmu, VPMU_PASSIVE_DOMAIN_ALLOCATED) ) model->free_msr(v); } diff --git a/xen/arch/x86/oprofile/op_model_ppro.c b/xen/arch/x86/oprofile/op_model_ppro.c index cb3dcc7609..62646d5b45 100644 --- a/xen/arch/x86/oprofile/op_model_ppro.c +++ b/xen/arch/x86/oprofile/op_model_ppro.c @@ -143,7 +143,8 @@ static int ppro_check_ctrs(unsigned int const cpu, xenoprof_log_event(current, regs, eip, mode, i); wrmsrl(msrs->counters[i].addr, -reset_value[i]); if ( is_passive(current->domain) && (mode != 2) && - vpmu_is_set(vcpu_vpmu(current), PASSIVE_DOMAIN_ALLOCATED) ) + vpmu_is_set(vcpu_vpmu(current), + VPMU_PASSIVE_DOMAIN_ALLOCATED) ) { if ( IS_ACTIVE(msrs_content[i].control) ) { @@ -231,7 +232,7 @@ static int ppro_allocate_msr(struct vcpu *v) goto out; vpmu->context = (void *)msr_content; vpmu_clear(vpmu); - vpmu_set(vpmu, PASSIVE_DOMAIN_ALLOCATED); + vpmu_set(vpmu, VPMU_PASSIVE_DOMAIN_ALLOCATED); return 1; out: gdprintk(XENLOG_WARNING, "Insufficient memory for oprofile, oprofile is " @@ -244,10 +245,10 @@ static void ppro_free_msr(struct vcpu *v) { struct vpmu_struct *vpmu = vcpu_vpmu(v); - if ( !vpmu_is_set(vpmu, PASSIVE_DOMAIN_ALLOCATED) ) + if ( !vpmu_is_set(vpmu, VPMU_PASSIVE_DOMAIN_ALLOCATED) ) return; xfree(vpmu->context); - vpmu_reset(vpmu, PASSIVE_DOMAIN_ALLOCATED); + vpmu_reset(vpmu, VPMU_PASSIVE_DOMAIN_ALLOCATED); } static void ppro_load_msr(struct vcpu *v, int type, int index, u64 *msr_content) diff --git a/xen/include/asm-x86/hvm/vpmu.h b/xen/include/asm-x86/hvm/vpmu.h index 6ba420ed63..c08bc3b4e6 100644 --- a/xen/include/asm-x86/hvm/vpmu.h +++ b/xen/include/asm-x86/hvm/vpmu.h @@ -68,7 +68,7 @@ struct vpmu_struct { #define VPMU_CONTEXT_ALLOCATED 0x1 #define VPMU_CONTEXT_LOADED 0x2 #define VPMU_RUNNING 0x4 -#define PASSIVE_DOMAIN_ALLOCATED 0x8 +#define VPMU_PASSIVE_DOMAIN_ALLOCATED 0x8 #define vpmu_set(_vpmu, _x) ((_vpmu)->flags |= (_x)) #define vpmu_reset(_vpmu, _x) ((_vpmu)->flags &= ~(_x)) |