diff options
Diffstat (limited to 'arch/x86/machine/pmu_intel.c')
-rw-r--r-- | arch/x86/machine/pmu_intel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/machine/pmu_intel.c b/arch/x86/machine/pmu_intel.c index 6fbdbae..8b2f309 100644 --- a/arch/x86/machine/pmu_intel.c +++ b/arch/x86/machine/pmu_intel.c @@ -354,6 +354,7 @@ pmu_intel_setup(void) pmu->events = ~ebx & ((1U << ev_len) - 1); + memset(&pmu_driver, 0, sizeof(pmu_driver)); pmu_driver.pmc_width = pmu->pmc_width; pmu_driver.ops.info = pmu_intel_info; pmu_driver.ops.translate = pmu_intel_translate; @@ -366,10 +367,8 @@ pmu_intel_setup(void) if (pmu->version >= 2) { pmu_driver.ops.handle_of_intr = pmu_intel_handle_of_intr_v2; - pmu_driver.of_max_ticks = 0; } else { /* Set max_tick to half the number of instruction per seconds. */ - pmu_driver.ops.handle_of_intr = NULL; pmu_driver.of_max_ticks = (1ULL << (pmu_driver.pmc_width - 1)) / (cpu_get_freq() / CLOCK_FREQ); } |