From 0274c8726015e83c989aac905b6626e40397495c Mon Sep 17 00:00:00 2001 From: Remy Noel Date: Sun, 8 Apr 2018 12:29:41 +0200 Subject: kern/perfmon: Handle overflow on sync. Add new perfmon driver method "get_pmc_width". --- arch/x86/machine/pmu_amd.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/x86/machine/pmu_amd.c') 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); } -- cgit v1.2.3