diff options
author | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2008-10-15 08:15:51 -0500 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2008-10-15 20:56:56 +0200 |
commit | 5f87dfb79f829339508a5d989b8252eb30842587 (patch) | |
tree | 7e0234f93f67846ba853b3ba3fa2818e315fe442 /arch/x86/oprofile | |
parent | 69046d430417c30f48867fc52e892c9050b3a29b (diff) | |
download | kernel_samsung_aries-5f87dfb79f829339508a5d989b8252eb30842587.zip kernel_samsung_aries-5f87dfb79f829339508a5d989b8252eb30842587.tar.gz kernel_samsung_aries-5f87dfb79f829339508a5d989b8252eb30842587.tar.bz2 |
x86/oprofile: add the logic for enabling additional IBS bits
This patch adds the logic for enabling additional IBS control bits :
* IBS-Fetch IbsRandEn bit (bit 57)
* IBS-Op IbsOpCntCtl bit (bit 19)
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile')
-rw-r--r-- | arch/x86/oprofile/op_model_amd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c index a2e83af..5095137 100644 --- a/arch/x86/oprofile/op_model_amd.c +++ b/arch/x86/oprofile/op_model_amd.c @@ -310,12 +310,15 @@ static void op_amd_start(struct op_msrs const * const msrs) #ifdef CONFIG_OPROFILE_IBS if (ibs_allowed && ibs_config.fetch_enabled) { low = (ibs_config.max_cnt_fetch >> 4) & 0xFFFF; - high = IBS_FETCH_HIGH_ENABLE; + high = ((ibs_config.rand_en & 0x1) << 25) /* bit 57 */ + + IBS_FETCH_HIGH_ENABLE; wrmsr(MSR_AMD64_IBSFETCHCTL, low, high); } if (ibs_allowed && ibs_config.op_enabled) { - low = ((ibs_config.max_cnt_op >> 4) & 0xFFFF) + IBS_OP_LOW_ENABLE; + low = ((ibs_config.max_cnt_op >> 4) & 0xFFFF) + + ((ibs_config.dispatched_ops & 0x1) << 19) /* bit 19 */ + + IBS_OP_LOW_ENABLE; high = 0; wrmsr(MSR_AMD64_IBSOPCTL, low, high); } |