]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Hybrid PMU support for intel_ctrl
authorKan Liang <kan.liang@linux.intel.com>
Mon, 12 Apr 2021 14:30:45 +0000 (07:30 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 19 Apr 2021 18:03:24 +0000 (20:03 +0200)
commitbdefb3fc71afe7cbde3422cc19c65d07826911f4
tree92a9b781dda1e078839e8ed47bd34ab9f4041390
parente3150f313ab92c14e2406673ff24028508a93e3a
perf/x86: Hybrid PMU support for intel_ctrl

The intel_ctrl is the counter mask of a PMU. The PMU counter information
may be different among hybrid PMUs, each hybrid PMU should use its own
intel_ctrl to check and access the counters.

When handling a certain hybrid PMU, apply the intel_ctrl from the
corresponding hybrid PMU.

When checking the HW existence, apply the PMU and number of counters
from the corresponding hybrid PMU as well. Perf will check the HW
existence for each Hybrid PMU before registration. Expose the
check_hw_exists() for a later patch.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Link: https://lkml.kernel.org/r/1618237865-33448-6-git-send-email-kan.liang@linux.intel.com
arch/x86/events/core.c
arch/x86/events/intel/core.c
arch/x86/events/perf_event.h