A fix and a hardware-enablement addition:
- Robustify uncore_snbep's skx_iio_set_mapping()'s error cleanup - Add cstate event support for Intel ICELAKE_X and ICELAKE_D Signed-off-by: Ingo Molnar <mingo@kernel.org> -----BEGIN PGP SIGNATURE----- iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmDq8TwRHG1pbmdvQGtl cm5lbC5vcmcACgkQEnMQ0APhK1ixEg//e3lbiMEJSqTv+MCZYZWn1PH/oOaHzcVD dJ/Mb9Glwbanj9vEfF7BszVIyovnPcnhO9Hg0sLEg4TJkYUcWi7uaJWJJYTVjlys yXNV8wOK7IkJHbBjJMyv4gn5rrnSVfjsCMiSctTs9sNCsXyNmmgDpTp43wmQIphb ROnUUbDhGqDahT3Q+Oj1VG5u66N1j24PD2Yf6/gdoyoPvjYbgEB5baJ011bletbM +tfMOlSK63DoeBQyhMadG+1kdVG27YesLn7g7Metb7g9Y6InBkr9XRpMwmi3V+43 tjX3bDJ+5DSGsSH2GzawsUlGrWZuek7l8s5u25+w1QxAPvUQvgUFf3R1h0lt/Mke uJi5eSG1Z6A0AQs1h8L8lPmyF0YeVjhZCmxZVSGZpAAz+vqoiNWVdUS3MevqxB2S SJJ4A1Yj/mEBDxbE9WCU2RS7QVgVlra/sT0aadRpJQyjIrMooXa0LxvkLBm6/YPW 43gJysUNFt5l1fi2opn6PlOYuqTH6FJNnOveQ/cp3fCO4NDtFd+pohfKwBq0PPMh xhiFe6o0bJ0/sfEftwecf1v7qdvnWGsjkyvt3jVk8NBtI03k6qXkHTHdkEEJ53YK Ge88tosDTdEZnJHTCUzguTyX+Dns/iEGwdtH2OrghCLxPUmAcVmShbB0MlvaYjjB DDockwrBh88= =+Ond -----END PGP SIGNATURE----- Merge tag 'perf-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "A fix and a hardware-enablement addition: - Robustify uncore_snbep's skx_iio_set_mapping()'s error cleanup - Add cstate event support for Intel ICELAKE_X and ICELAKE_D" * tag 'perf-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Clean up error handling path of iio mapping perf/x86/cstate: Add ICELAKE_X and ICELAKE_D support
This commit is contained in:
commit
936b664fb2
|
@ -40,7 +40,7 @@
|
||||||
* Model specific counters:
|
* Model specific counters:
|
||||||
* MSR_CORE_C1_RES: CORE C1 Residency Counter
|
* MSR_CORE_C1_RES: CORE C1 Residency Counter
|
||||||
* perf code: 0x00
|
* perf code: 0x00
|
||||||
* Available model: SLM,AMT,GLM,CNL,TNT,ADL
|
* Available model: SLM,AMT,GLM,CNL,ICX,TNT,ADL
|
||||||
* Scope: Core (each processor core has a MSR)
|
* Scope: Core (each processor core has a MSR)
|
||||||
* MSR_CORE_C3_RESIDENCY: CORE C3 Residency Counter
|
* MSR_CORE_C3_RESIDENCY: CORE C3 Residency Counter
|
||||||
* perf code: 0x01
|
* perf code: 0x01
|
||||||
|
@ -50,8 +50,8 @@
|
||||||
* MSR_CORE_C6_RESIDENCY: CORE C6 Residency Counter
|
* MSR_CORE_C6_RESIDENCY: CORE C6 Residency Counter
|
||||||
* perf code: 0x02
|
* perf code: 0x02
|
||||||
* Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
|
* Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
|
||||||
* SKL,KNL,GLM,CNL,KBL,CML,ICL,TGL,
|
* SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX,
|
||||||
* TNT,RKL,ADL
|
* TGL,TNT,RKL,ADL
|
||||||
* Scope: Core
|
* Scope: Core
|
||||||
* MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter
|
* MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter
|
||||||
* perf code: 0x03
|
* perf code: 0x03
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
* MSR_PKG_C2_RESIDENCY: Package C2 Residency Counter.
|
* MSR_PKG_C2_RESIDENCY: Package C2 Residency Counter.
|
||||||
* perf code: 0x00
|
* perf code: 0x00
|
||||||
* Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
|
* Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
|
||||||
* KBL,CML,ICL,TGL,TNT,RKL,ADL
|
* KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL
|
||||||
* Scope: Package (physical package)
|
* Scope: Package (physical package)
|
||||||
* MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter.
|
* MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter.
|
||||||
* perf code: 0x01
|
* perf code: 0x01
|
||||||
|
@ -72,8 +72,8 @@
|
||||||
* MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter.
|
* MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter.
|
||||||
* perf code: 0x02
|
* perf code: 0x02
|
||||||
* Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
|
* Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
|
||||||
* SKL,KNL,GLM,CNL,KBL,CML,ICL,TGL,
|
* SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX,
|
||||||
* TNT,RKL,ADL
|
* TGL,TNT,RKL,ADL
|
||||||
* Scope: Package (physical package)
|
* Scope: Package (physical package)
|
||||||
* MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter.
|
* MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter.
|
||||||
* perf code: 0x03
|
* perf code: 0x03
|
||||||
|
@ -566,6 +566,14 @@ static const struct cstate_model icl_cstates __initconst = {
|
||||||
BIT(PERF_CSTATE_PKG_C10_RES),
|
BIT(PERF_CSTATE_PKG_C10_RES),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct cstate_model icx_cstates __initconst = {
|
||||||
|
.core_events = BIT(PERF_CSTATE_CORE_C1_RES) |
|
||||||
|
BIT(PERF_CSTATE_CORE_C6_RES),
|
||||||
|
|
||||||
|
.pkg_events = BIT(PERF_CSTATE_PKG_C2_RES) |
|
||||||
|
BIT(PERF_CSTATE_PKG_C6_RES),
|
||||||
|
};
|
||||||
|
|
||||||
static const struct cstate_model adl_cstates __initconst = {
|
static const struct cstate_model adl_cstates __initconst = {
|
||||||
.core_events = BIT(PERF_CSTATE_CORE_C1_RES) |
|
.core_events = BIT(PERF_CSTATE_CORE_C1_RES) |
|
||||||
BIT(PERF_CSTATE_CORE_C6_RES) |
|
BIT(PERF_CSTATE_CORE_C6_RES) |
|
||||||
|
@ -664,6 +672,9 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
|
||||||
|
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_L, &icl_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_L, &icl_cstates),
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE, &icl_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE, &icl_cstates),
|
||||||
|
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X, &icx_cstates),
|
||||||
|
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &icx_cstates),
|
||||||
|
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates),
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates),
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE, &icl_cstates),
|
X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE, &icl_cstates),
|
||||||
|
|
|
@ -3804,11 +3804,11 @@ pmu_iio_set_mapping(struct intel_uncore_type *type, struct attribute_group *ag)
|
||||||
/* One more for NULL. */
|
/* One more for NULL. */
|
||||||
attrs = kcalloc((uncore_max_dies() + 1), sizeof(*attrs), GFP_KERNEL);
|
attrs = kcalloc((uncore_max_dies() + 1), sizeof(*attrs), GFP_KERNEL);
|
||||||
if (!attrs)
|
if (!attrs)
|
||||||
goto err;
|
goto clear_topology;
|
||||||
|
|
||||||
eas = kcalloc(uncore_max_dies(), sizeof(*eas), GFP_KERNEL);
|
eas = kcalloc(uncore_max_dies(), sizeof(*eas), GFP_KERNEL);
|
||||||
if (!eas)
|
if (!eas)
|
||||||
goto err;
|
goto clear_attrs;
|
||||||
|
|
||||||
for (die = 0; die < uncore_max_dies(); die++) {
|
for (die = 0; die < uncore_max_dies(); die++) {
|
||||||
sprintf(buf, "die%ld", die);
|
sprintf(buf, "die%ld", die);
|
||||||
|
@ -3829,7 +3829,9 @@ err:
|
||||||
for (; die >= 0; die--)
|
for (; die >= 0; die--)
|
||||||
kfree(eas[die].attr.attr.name);
|
kfree(eas[die].attr.attr.name);
|
||||||
kfree(eas);
|
kfree(eas);
|
||||||
|
clear_attrs:
|
||||||
kfree(attrs);
|
kfree(attrs);
|
||||||
|
clear_topology:
|
||||||
kfree(type->topology);
|
kfree(type->topology);
|
||||||
clear_attr_update:
|
clear_attr_update:
|
||||||
type->attr_update = NULL;
|
type->attr_update = NULL;
|
||||||
|
|
Loading…
Reference in New Issue