perf/x86: Add Intel Tiger Lake uncore support
Subsystems (2)
PATCH v2 1/1 perf/x86: Add Intel Tiger Lake uncore support
From: Kan Liang <[email protected]>
For MSR type of uncore units, there is no difference between Ice Lake and Tiger Lake. Share the same code with Ice Lake.
Tiger Lake has two MCs. Both of them are located at 0:0:0. The BAR offset is still 0x48. The offset of the two MCs is 0x10000. Each MC has three counters to count every read/write/total issued by the Memory Controller to DRAM. The counters can be accessed by MMIO. They are free-running counters.
The offset of counters are different for TIGERLAKE_L and TIGERLAKE. Add separated mmio_init() functions.
---
Changes since V1:
- Remove comma at the end of terminator line
- Refine the code style of tgl_uncore_imc_freerunning_init_box()
arch/x86/events/intel/uncore.c | 12 +++ arch/x86/events/intel/uncore.h | 2 + arch/x86/events/intel/uncore_snb.c | 157 +++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+)
arch/x86/events/intel/uncore.c +12 -0
@@ -1470,6 +1470,16 @@ static const struct intel_uncore_init_fun icl_uncore_init __initconst = { .pci_init = skl_uncore_pci_init, }; +static const struct intel_uncore_init_fun tgl_uncore_init__initconst = { + .cpu_init = icl_uncore_cpu_init, + .mmio_init = tgl_uncore_mmio_init, +}; + +static const struct intel_uncore_init_fun tgl_l_uncore_init__initconst = { + .cpu_init = icl_uncore_cpu_init, + .mmio_init = tgl_l_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,
@@ -1505,6 +1515,8 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE_L , icl_uncore_init),X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE_NNPI , icl_uncore_init),X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE , icl_uncore_init), +X86_UNCORE_MODEL_MATCH (INTEL_FAM6_TIGERLAKE_L , tgl_l_uncore_init), +X86_UNCORE_MODEL_MATCH (INTEL_FAM6_TIGERLAKE , tgl_uncore_init), X86_UNCORE_MODEL_MATCH(INTEL_FAM6_ATOM_TREMONT_D, snr_uncore_init), {}, };
arch/x86/events/intel/uncore.h +2 -0
@@ -527,6 +527,8 @@ void snb_uncore_cpu_init(void);void nhm_uncore_cpu_init (void );void skl_uncore_cpu_init (void );void icl_uncore_cpu_init (void ); +void tgl_uncore_mmio_init (void ); +void tgl_l_uncore_mmio_init (void );int snb_pci2phy_map_init (int devid);/* uncore_snbep.c */
arch/x86/events/intel/uncore_snb.c +157 -0
166 lines not on this page · raw message
Signature · 1 line
2.21.0
Peter Zijlstra
maintainerQuoted 11 lines · On Thu, Feb 06, 2020 at 08:15:27AM -0800, [email protected] wrote:
From: Kan Liang <[email protected]>
For MSR type of uncore units, there is no difference between Ice Lake and Tiger Lake. Share the same code with Ice Lake.
Tiger Lake has two MCs. Both of them are located at 0:0:0. The BAR offset is still
0x48. The offset of the two MCs is0x10000. Each MC has three counters to count every read/write/total issued by the Memory Controller to DRAM. The counters can be accessed by MMIO. They are free-running counters.
Quoted 5 lines
The offset of counters are different for
TIGERLAKE_Land TIGERLAKE. Add separatedmmio_init()functions.Reviewed-by Andi Kleen <[email protected]>Signed-off-by Kan Liang <[email protected]>
Thanks!
The following commit has been merged into the perf/core branch of tip:
The following commit has been merged into the perf/core branch of tip:
Commit-ID: fdb64822443ec9fb8c3a74b598a74790ae8d2e22 Gitweb: https://git.kernel.org/tip/fdb64822443ec9fb8c3a74b598a74790ae8d2e22 Author: Kan Liang <[email protected]> AuthorDate: Thu, 06 Feb 2020 08:15:27 -08:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 11 Feb 2020 13:23:49 +01:00
perf/x86: Add Intel Tiger Lake uncore support
For MSR type of uncore units, there is no difference between Ice Lake and Tiger Lake. Share the same code with Ice Lake.
Tiger Lake has two MCs. Both of them are located at 0:0:0. The BAR offset is still 0x48. The offset of the two MCs is 0x10000. Each MC has three counters to count every read/write/total issued by the Memory Controller to DRAM. The counters can be accessed by MMIO. They are free-running counters.
The offset of counters are different for TIGERLAKE_L and TIGERLAKE. Add separated mmio_init() functions.
--- arch/x86/events/intel/uncore.c | 12 ++- arch/x86/events/intel/uncore.h | 2 +- arch/x86/events/intel/uncore_snb.c | 159 ++++++++++++++++++++++++++++- 3 files changed, 173 insertions(+)
arch/x86/events/intel/uncore.c +12 -0
@@ -1470,6 +1470,16 @@ static const struct intel_uncore_init_fun icl_uncore_init __initconst = { .pci_init = skl_uncore_pci_init, }; +static const struct intel_uncore_init_fun tgl_uncore_init__initconst = { + .cpu_init = icl_uncore_cpu_init, + .mmio_init = tgl_uncore_mmio_init, +}; + +static const struct intel_uncore_init_fun tgl_l_uncore_init__initconst = { + .cpu_init = icl_uncore_cpu_init, + .mmio_init = tgl_l_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,
@@ -1505,6 +1515,8 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE_L , icl_uncore_init),X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE_NNPI , icl_uncore_init),X86_UNCORE_MODEL_MATCH (INTEL_FAM6_ICELAKE , icl_uncore_init), +X86_UNCORE_MODEL_MATCH (INTEL_FAM6_TIGERLAKE_L , tgl_l_uncore_init), +X86_UNCORE_MODEL_MATCH (INTEL_FAM6_TIGERLAKE , tgl_uncore_init), X86_UNCORE_MODEL_MATCH(INTEL_FAM6_ATOM_TREMONT_D, snr_uncore_init), {}, };
arch/x86/events/intel/uncore.h +2 -0
@@ -527,6 +527,8 @@ void snb_uncore_cpu_init(void);void nhm_uncore_cpu_init (void );void skl_uncore_cpu_init (void );void icl_uncore_cpu_init (void ); +void tgl_uncore_mmio_init (void ); +void tgl_l_uncore_mmio_init (void );int snb_pci2phy_map_init (int devid);/* uncore_snbep.c */
arch/x86/events/intel/uncore_snb.c +159 -0
168 lines not on this page · raw message