perf/x86/intel: Factor out intel_update_topdown_event()
authorKan Liang <kan.liang@linux.intel.com>
Thu, 28 Jan 2021 22:40:08 +0000 (14:40 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 1 Feb 2021 14:31:36 +0000 (15:31 +0100)
commit628d923a3c464db98c1c98bb1e0cd50804caf681
tree10389ee00dd04922b2dcb2ec089f733a15a32950
parent2a6c6b7d7ad346f0679d0963cb19b3f0ea7ef32c
perf/x86/intel: Factor out intel_update_topdown_event()

Similar to Ice Lake, Intel Sapphire Rapids server also supports the
topdown performance metrics feature. The difference is that Intel
Sapphire Rapids server extends the PERF_METRICS MSR to feature TMA
method level two metrics, which will introduce 8 metrics events. Current
icl_update_topdown_event() only check 4 level one metrics events.

Factor out intel_update_topdown_event() to facilitate the code sharing
between Ice Lake and Sapphire Rapids.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/1611873611-156687-3-git-send-email-kan.liang@linux.intel.com
arch/x86/events/intel/core.c