diff options
author | Remy Noel <mocramis@gmail.com> | 2018-04-08 12:29:41 +0200 |
---|---|---|
committer | Remy Noel <mocramis@gmail.com> | 2018-04-21 00:04:20 +0200 |
commit | 0274c8726015e83c989aac905b6626e40397495c (patch) | |
tree | d7857b4d4a8983ad2fe08339c83d0f285b45e1f6 /arch/x86/machine/pmu_amd.c | |
parent | 7f545f440e58b081b1ff630e78903ee4ee901a5a (diff) |
kern/perfmon: Handle overflow on sync.
Add new perfmon driver method "get_pmc_width".
Diffstat (limited to 'arch/x86/machine/pmu_amd.c')
-rw-r--r-- | arch/x86/machine/pmu_amd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/machine/pmu_amd.c b/arch/x86/machine/pmu_amd.c index 0f8b14a..1c6545e 100644 --- a/arch/x86/machine/pmu_amd.c +++ b/arch/x86/machine/pmu_amd.c @@ -197,6 +197,12 @@ pmu_amd_read(unsigned int pmc_id) return cpu_get_msr64(PMU_AMD_MSR_PERCTR0 + pmc_id); } +static uint8_t +pmu_amd_get_pmc_width(void) +{ + return PMU_AMD_PMC_WIDTH; +} + static int __init pmu_amd_setup(void) { @@ -225,6 +231,7 @@ pmu_amd_setup(void) pmu_driver.start = pmu_amd_start; pmu_driver.stop = pmu_amd_stop; pmu_driver.read = pmu_amd_read; + pmu_driver.get_pmc_width = pmu_amd_get_pmc_width; return perfmon_pmu_register(&pmu_driver); } |