Skip to content

Commit 9063058

Browse files
committed
perf/x86/intel/cstate: Add Lunarlake support
JIRA: https://issues.redhat.com/browse/RHEL-20059 upstream ======== commit 2657986 Author: Zhang Rui <rui.zhang@intel.com> Date: Fri Jun 28 11:17:58 2024 +0800 description =========== Compared with previous client platforms, PC8 is removed from Lunarlake. It supports CC1/CC6/CC7 and PC2/PC3/PC6/PC10 residency counters. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Link: https://lore.kernel.org/r/20240628031758.43103-4-rui.zhang@intel.com Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 23b5b54 commit 9063058

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

arch/x86/events/intel/cstate.c

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* MSR_CORE_C1_RES: CORE C1 Residency Counter
4242
* perf code: 0x00
4343
* Available model: SLM,AMT,GLM,CNL,ICX,TNT,ADL,RPL
44-
* MTL,SRF,GRR,ARL
44+
* MTL,SRF,GRR,ARL,LNL
4545
* Scope: Core (each processor core has a MSR)
4646
* MSR_CORE_C3_RESIDENCY: CORE C3 Residency Counter
4747
* perf code: 0x01
@@ -53,31 +53,31 @@
5353
* Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
5454
* SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX,
5555
* TGL,TNT,RKL,ADL,RPL,SPR,MTL,SRF,
56-
* GRR,ARL
56+
* GRR,ARL,LNL
5757
* Scope: Core
5858
* MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter
5959
* perf code: 0x03
6060
* Available model: SNB,IVB,HSW,BDW,SKL,CNL,KBL,CML,
61-
* ICL,TGL,RKL,ADL,RPL,MTL,ARL
61+
* ICL,TGL,RKL,ADL,RPL,MTL,ARL,LNL
6262
* Scope: Core
6363
* MSR_PKG_C2_RESIDENCY: Package C2 Residency Counter.
6464
* perf code: 0x00
6565
* Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
6666
* KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL,
67-
* RPL,SPR,MTL,ARL
67+
* RPL,SPR,MTL,ARL,LNL
6868
* Scope: Package (physical package)
6969
* MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter.
7070
* perf code: 0x01
7171
* Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,KNL,
7272
* GLM,CNL,KBL,CML,ICL,TGL,TNT,RKL,
73-
* ADL,RPL,MTL,ARL
73+
* ADL,RPL,MTL,ARL,LNL
7474
* Scope: Package (physical package)
7575
* MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter.
7676
* perf code: 0x02
7777
* Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
7878
* SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX,
7979
* TGL,TNT,RKL,ADL,RPL,SPR,MTL,SRF,
80-
* ARL
80+
* ARL,LNL
8181
* Scope: Package (physical package)
8282
* MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter.
8383
* perf code: 0x03
@@ -97,7 +97,7 @@
9797
* MSR_PKG_C10_RESIDENCY: Package C10 Residency Counter.
9898
* perf code: 0x06
9999
* Available model: HSW ULT,KBL,GLM,CNL,CML,ICL,TGL,
100-
* TNT,RKL,ADL,RPL,MTL,ARL
100+
* TNT,RKL,ADL,RPL,MTL,ARL,LNL
101101
* Scope: Package (physical package)
102102
* MSR_MODULE_C6_RES_MS: Module C6 Residency Counter.
103103
* perf code: 0x00
@@ -649,6 +649,17 @@ static const struct cstate_model adl_cstates __initconst = {
649649
BIT(PERF_CSTATE_PKG_C10_RES),
650650
};
651651

652+
static const struct cstate_model lnl_cstates __initconst = {
653+
.core_events = BIT(PERF_CSTATE_CORE_C1_RES) |
654+
BIT(PERF_CSTATE_CORE_C6_RES) |
655+
BIT(PERF_CSTATE_CORE_C7_RES),
656+
657+
.pkg_events = BIT(PERF_CSTATE_PKG_C2_RES) |
658+
BIT(PERF_CSTATE_PKG_C3_RES) |
659+
BIT(PERF_CSTATE_PKG_C6_RES) |
660+
BIT(PERF_CSTATE_PKG_C10_RES),
661+
};
662+
652663
static const struct cstate_model slm_cstates __initconst = {
653664
.core_events = BIT(PERF_CSTATE_CORE_C1_RES) |
654665
BIT(PERF_CSTATE_CORE_C6_RES),
@@ -772,6 +783,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
772783
X86_MATCH_VFM(INTEL_ARROWLAKE, &adl_cstates),
773784
X86_MATCH_VFM(INTEL_ARROWLAKE_H, &adl_cstates),
774785
X86_MATCH_VFM(INTEL_ARROWLAKE_U, &adl_cstates),
786+
X86_MATCH_VFM(INTEL_LUNARLAKE_M, &lnl_cstates),
775787
{ },
776788
};
777789
MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match);

0 commit comments

Comments
 (0)