perf/x86/intel/uncore: Factor out snr_uncore_mmio_map()
authorKan Liang <kan.liang@linux.intel.com>
Wed, 30 Jun 2021 21:08:37 +0000 (14:08 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 2 Jul 2021 13:58:41 +0000 (15:58 +0200)
commit1583971b5cb8c786df88be580cdd96a974ad591b
treef24deb0ea770f722b09c330c3437d2c86685bb36
parent8053f2d752e2936f494ede62766a6c9e9fb674f2
perf/x86/intel/uncore: Factor out snr_uncore_mmio_map()

The IMC free-running counters on Sapphire Rapids server are also
accessed by MMIO, which is similar to the previous platforms, SNR and
ICX. The only difference is the device ID of the device which contains
BAR address.

Factor out snr_uncore_mmio_map() which ioremap the MMIO space. It can be
reused in the following patch for SPR.

Use the snr_uncore_mmio_map() in the icx_uncore_imc_freerunning_init_box().
There is no box_ctl for the free-running counters.

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://lore.kernel.org/r/1625087320-194204-14-git-send-email-kan.liang@linux.intel.com
arch/x86/events/intel/uncore_snbep.c