]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest
authorZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 17 Jul 2024 03:16:09 +0000 (11:16 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 29 Jul 2024 10:16:22 +0000 (12:16 +0200)
Package C2 residency counter is also available on Sierra Forest.
So add it support in srf_cstates.

Fixes: 3877d55a0db2 ("perf/x86/intel/cstate: Add Sierra Forest support")
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Tested-by: Wendy Wang <wendy.wang@intel.com>
Link: https://lore.kernel.org/r/20240717031609.74513-1-zhenyuw@linux.intel.com
arch/x86/events/intel/cstate.c

index be58cfb012dd16c09f9ed7340429d6b6793dc47f..9f116dfc47284567d246ab805a129fc84e9b1adb 100644 (file)
@@ -64,7 +64,7 @@
  *                            perf code: 0x00
  *                            Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
  *                                             KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL,
- *                                             RPL,SPR,MTL,ARL,LNL
+ *                                             RPL,SPR,MTL,ARL,LNL,SRF
  *                            Scope: Package (physical package)
  *     MSR_PKG_C3_RESIDENCY:  Package C3 Residency Counter.
  *                            perf code: 0x01
@@ -693,7 +693,8 @@ static const struct cstate_model srf_cstates __initconst = {
        .core_events            = BIT(PERF_CSTATE_CORE_C1_RES) |
                                  BIT(PERF_CSTATE_CORE_C6_RES),
 
-       .pkg_events             = BIT(PERF_CSTATE_PKG_C6_RES),
+       .pkg_events             = BIT(PERF_CSTATE_PKG_C2_RES) |
+                                 BIT(PERF_CSTATE_PKG_C6_RES),
 
        .module_events          = BIT(PERF_CSTATE_MODULE_C6_RES),
 };