diff options
author | Robert Richter <robert.richter@amd.com> | 2009-05-25 15:38:19 (GMT) |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-06-11 17:42:17 (GMT) |
commit | bbc5986d2db427fdd61b6116ff8b9ed988e663a8 (patch) | |
tree | db39521e332170b30b3c6d83cf13ad5911256344 /arch/x86/oprofile/op_model_amd.c | |
parent | 217d3cfb959756cb493fc03106c0253baa420ce8 (diff) | |
download | linux-fsl-qoriq-bbc5986d2db427fdd61b6116ff8b9ed988e663a8.tar.xz |
x86/oprofile: use 64 bit wrmsr functions
This patch replaces some wrmsr() functions with wrmsrl().
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/op_model_amd.c')
-rw-r--r-- | arch/x86/oprofile/op_model_amd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c index c5c5eec..9bf9017 100644 --- a/arch/x86/oprofile/op_model_amd.c +++ b/arch/x86/oprofile/op_model_amd.c @@ -101,14 +101,15 @@ static void op_amd_setup_ctrs(struct op_x86_model_spec const *model, for (i = 0; i < NUM_COUNTERS; ++i) { if (unlikely(!msrs->counters[i].addr)) continue; - wrmsr(msrs->counters[i].addr, -1, -1); + wrmsrl(msrs->counters[i].addr, -1LL); } /* enable active counters */ for (i = 0; i < NUM_COUNTERS; ++i) { if (counter_config[i].enabled && msrs->counters[i].addr) { reset_value[i] = counter_config[i].count; - wrmsr(msrs->counters[i].addr, -(unsigned int)counter_config[i].count, -1); + wrmsrl(msrs->counters[i].addr, + -(s64)counter_config[i].count); rdmsrl(msrs->controls[i].addr, val); val &= model->reserved; val |= op_x86_get_ctrl(model, &counter_config[i]); @@ -251,7 +252,7 @@ static int op_amd_check_ctrs(struct pt_regs * const regs, if (val & OP_CTR_OVERFLOW) continue; oprofile_add_sample(regs, i); - wrmsr(msrs->counters[i].addr, -(unsigned int)reset_value[i], -1); + wrmsrl(msrs->counters[i].addr, -(s64)reset_value[i]); } op_amd_handle_ibs(regs, msrs); |