diff options
author | Remy Noel <mocramis@gmail.com> | 2018-03-28 14:55:53 +0200 |
---|---|---|
committer | Remy Noel <mocramis@gmail.com> | 2018-04-21 00:04:20 +0200 |
commit | f6f54a518bb2f35b5f222de7288ebf2cae67fca2 (patch) | |
tree | cf07eb44b8cfffa939b6fc55dc9a071045c092ec /arch/x86/machine/pmu_amd.c | |
parent | 6b98275f3864ee6a413e99b9bddc7a3c029af2d2 (diff) |
cpu: Add cpu_get_msr64 helper
Diffstat (limited to 'arch/x86/machine/pmu_amd.c')
-rw-r--r-- | arch/x86/machine/pmu_amd.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/machine/pmu_amd.c b/arch/x86/machine/pmu_amd.c index 49b8d7e..0f8b14a 100644 --- a/arch/x86/machine/pmu_amd.c +++ b/arch/x86/machine/pmu_amd.c @@ -192,13 +192,9 @@ pmu_amd_stop(unsigned int pmc_id) static uint64_t pmu_amd_read(unsigned int pmc_id) { - uint32_t high, low; - assert(pmc_id < PMU_AMD_NR_PMCS); - cpu_get_msr(PMU_AMD_MSR_PERCTR0 + pmc_id, &high, &low); - - return (((uint64_t)high << 32) | low); + return cpu_get_msr64(PMU_AMD_MSR_PERCTR0 + pmc_id); } static int __init |