perf/x86/intel/uncore: Add Ice Lake server uncore support
Subsystems (2)
PATCH 1/1 perf/x86/intel/uncore: Add Ice Lake server uncore support
From: Kan Liang <[email protected]>
The uncore subsystem in Ice Lake server is similar to previous server. There are some differences in config register encoding and pci device IDs. The uncore PMON units in Ice Lake server include Ubox, Chabox, IIO, IRP, M2PCIE, PCU, M2M, PCIE3 and IMC.
- For CHA, filter 1 register has been removed. The filter 0 register can be used by and of CHA events to be filterd by Thread/Core-ID. To do so, the control register's tid_en bit must be set to 1.
- For IIO, there are some changes on event constraints. The MSR address and MSR offsets among counters are also changed.
- For IRP, the MSR address and MSR offsets among counters are changed.
- For M2PCIE, the counters are accessed by MSR now. Add new MSR address and MSR offsets. Change event constraints.
- To determine the number of CHAs, have to read CAPID6(Low) and CAPID7 (High) now.
- For M2M, update the PCICFG address and Device ID.
- For UPI, update the PCICFG address, Device ID and counter address.
- For M3UPI, update the PCICFG address, Device ID, counter address and event constraints.
- For IMC, update the formular to calculate MMIO BAR address, which is MMIO_BASE + specific MEM_BAR offset.
--- arch/x86/events/intel/uncore.c | 8 + arch/x86/events/intel/uncore.h | 3 + arch/x86/events/intel/uncore_snbep.c | 511 +++++++++++++++++++++++++++++++++++ 3 files changed, 522 insertions(+)
arch/x86/events/intel/uncore.c +8 -0
@@ -1476,6 +1476,12 @@ static const struct intel_uncore_init_fun tgl_l_uncore_init __initconst = { .mmio_init = tgl_l_uncore_mmio_init, }; +static const struct intel_uncore_init_fun icx_uncore_init__initconst = { + .cpu_init = icx_uncore_cpu_init, + .pci_init = icx_uncore_pci_init, + .mmio_init = icx_uncore_mmio_init, +}; +static const struct intel_uncore_init_fun snr_uncore_init__initconst = { .cpu_init = snr_uncore_cpu_init, .pci_init = snr_uncore_pci_init,
@@ -1511,6 +1517,8 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {X86_MATCH_INTEL_FAM6_MODEL (ICELAKE_L , &icl_uncore_init),X86_MATCH_INTEL_FAM6_MODEL (ICELAKE_NNPI , &icl_uncore_init),X86_MATCH_INTEL_FAM6_MODEL (ICELAKE , &icl_uncore_init), +X86_MATCH_INTEL_FAM6_MODEL (ICELAKE_D , &icx_uncore_init), +X86_MATCH_INTEL_FAM6_MODEL (ICELAKE_X , &icx_uncore_init),X86_MATCH_INTEL_FAM6_MODEL (TIGERLAKE_L , &tgl_l_uncore_init),X86_MATCH_INTEL_FAM6_MODEL (TIGERLAKE , &tgl_uncore_init), X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &snr_uncore_init),
arch/x86/events/intel/uncore.h +3 -0
@@ -550,6 +550,9 @@ void skx_uncore_cpu_init(void);int snr_uncore_pci_init (void );void snr_uncore_cpu_init (void );void snr_uncore_mmio_init (void ); +int icx_uncore_pci_init (void ); +void icx_uncore_cpu_init (void ); +void icx_uncore_mmio_init (void );/* uncore_nhmex.c */ void nhmex_uncore_cpu_init (void );
arch/x86/events/intel/uncore_snbep.c +511 -0
526 lines not on this page · raw message
Signature · 1 line
2.7.4
The following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 2b3b76b5ec67568da4bb475d3ce8a92ef494b5de Gitweb: https://git.kernel.org/tip/2b3b76b5ec67568da4bb475d3ce8a92ef494b5de Author: Kan Liang <[email protected]> AuthorDate: Thu, 02 Apr 2020 08:46:51 -07:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Wed, 08 Apr 2020 11:33:46 +02:00
perf/x86/intel/uncore: Add Ice Lake server uncore support
The uncore subsystem in Ice Lake server is similar to previous server. There are some differences in config register encoding and pci device IDs. The uncore PMON units in Ice Lake server include Ubox, Chabox, IIO, IRP, M2PCIE, PCU, M2M, PCIE3 and IMC.
- For CHA, filter 1 register has been removed. The filter 0 register can be used by and of CHA events to be filterd by Thread/Core-ID. To do so, the control register's tid_en bit must be set to 1.
- For IIO, there are some changes on event constraints. The MSR address and MSR offsets among counters are also changed.
- For IRP, the MSR address and MSR offsets among counters are changed.
- For M2PCIE, the counters are accessed by MSR now. Add new MSR address and MSR offsets. Change event constraints.
- To determine the number of CHAs, have to read CAPID6(Low) and CAPID7 (High) now.
- For M2M, update the PCICFG address and Device ID.
- For UPI, update the PCICFG address, Device ID and counter address.
- For M3UPI, update the PCICFG address, Device ID, counter address and event constraints.
- For IMC, update the formular to calculate MMIO BAR address, which is MMIO_BASE + specific MEM_BAR offset.
--- arch/x86/events/intel/uncore.c | 8 +- arch/x86/events/intel/uncore.h | 3 +- arch/x86/events/intel/uncore_snbep.c | 511 ++++++++++++++++++++++++++- 3 files changed, 522 insertions(+)
arch/x86/events/intel/uncore.c +8 -0
@@ -1476,6 +1476,12 @@ static const struct intel_uncore_init_fun tgl_l_uncore_init __initconst = { .mmio_init = tgl_l_uncore_mmio_init, }; +static const struct intel_uncore_init_fun icx_uncore_init__initconst = { + .cpu_init = icx_uncore_cpu_init, + .pci_init = icx_uncore_pci_init, + .mmio_init = icx_uncore_mmio_init, +}; +static const struct intel_uncore_init_fun snr_uncore_init__initconst = { .cpu_init = snr_uncore_cpu_init, .pci_init = snr_uncore_pci_init,
@@ -1511,6 +1517,8 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {X86_MATCH_INTEL_FAM6_MODEL (ICELAKE_L , &icl_uncore_init),X86_MATCH_INTEL_FAM6_MODEL (ICELAKE_NNPI , &icl_uncore_init),X86_MATCH_INTEL_FAM6_MODEL (ICELAKE , &icl_uncore_init), +X86_MATCH_INTEL_FAM6_MODEL (ICELAKE_D , &icx_uncore_init), +X86_MATCH_INTEL_FAM6_MODEL (ICELAKE_X , &icx_uncore_init),X86_MATCH_INTEL_FAM6_MODEL (TIGERLAKE_L , &tgl_l_uncore_init),X86_MATCH_INTEL_FAM6_MODEL (TIGERLAKE , &tgl_uncore_init), X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &snr_uncore_init),
arch/x86/events/intel/uncore.h +3 -0
@@ -550,6 +550,9 @@ void skx_uncore_cpu_init(void);int snr_uncore_pci_init (void );void snr_uncore_cpu_init (void );void snr_uncore_mmio_init (void ); +int icx_uncore_pci_init (void ); +void icx_uncore_cpu_init (void ); +void icx_uncore_mmio_init (void );/* uncore_nhmex.c */ void nhmex_uncore_cpu_init (void );
arch/x86/events/intel/uncore_snbep.c +511 -0
526 lines not on this page · raw message