Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+21 -8
+17 -6
arch/x86/events/intel/cstate.c
··· 40 40 * Model specific counters: 41 41 * MSR_CORE_C1_RES: CORE C1 Residency Counter 42 42 * perf code: 0x00 43 - * Available model: SLM,AMT,GLM,CNL,TNT,ADL 43 + * Available model: SLM,AMT,GLM,CNL,ICX,TNT,ADL 44 44 * Scope: Core (each processor core has a MSR) 45 45 * MSR_CORE_C3_RESIDENCY: CORE C3 Residency Counter 46 46 * perf code: 0x01 ··· 50 50 * MSR_CORE_C6_RESIDENCY: CORE C6 Residency Counter 51 51 * perf code: 0x02 52 52 * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW, 53 - * SKL,KNL,GLM,CNL,KBL,CML,ICL,TGL, 54 - * TNT,RKL,ADL 53 + * SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX, 54 + * TGL,TNT,RKL,ADL 55 55 * Scope: Core 56 56 * MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter 57 57 * perf code: 0x03 ··· 61 61 * MSR_PKG_C2_RESIDENCY: Package C2 Residency Counter. 62 62 * perf code: 0x00 63 63 * Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL, 64 - * KBL,CML,ICL,TGL,TNT,RKL,ADL 64 + * KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL 65 65 * Scope: Package (physical package) 66 66 * MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter. 67 67 * perf code: 0x01 ··· 72 72 * MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter. 73 73 * perf code: 0x02 74 74 * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW, 75 - * SKL,KNL,GLM,CNL,KBL,CML,ICL,TGL, 76 - * TNT,RKL,ADL 75 + * SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX, 76 + * TGL,TNT,RKL,ADL 77 77 * Scope: Package (physical package) 78 78 * MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter. 79 79 * perf code: 0x03 ··· 566 566 BIT(PERF_CSTATE_PKG_C10_RES), 567 567 }; 568 568 569 + static const struct cstate_model icx_cstates __initconst = { 570 + .core_events = BIT(PERF_CSTATE_CORE_C1_RES) | 571 + BIT(PERF_CSTATE_CORE_C6_RES), 572 + 573 + .pkg_events = BIT(PERF_CSTATE_PKG_C2_RES) | 574 + BIT(PERF_CSTATE_PKG_C6_RES), 575 + }; 576 + 569 577 static const struct cstate_model adl_cstates __initconst = { 570 578 .core_events = BIT(PERF_CSTATE_CORE_C1_RES) | 571 579 BIT(PERF_CSTATE_CORE_C6_RES) | ··· 672 664 673 665 X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_L, &icl_cstates), 674 666 X86_MATCH_INTEL_FAM6_MODEL(ICELAKE, &icl_cstates), 667 + X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X, &icx_cstates), 668 + X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &icx_cstates), 669 + 675 670 X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates), 676 671 X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates), 677 672 X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE, &icl_cstates),
+4 -2
arch/x86/events/intel/uncore_snbep.c
··· 3804 3804 /* One more for NULL. */ 3805 3805 attrs = kcalloc((uncore_max_dies() + 1), sizeof(*attrs), GFP_KERNEL); 3806 3806 if (!attrs) 3807 - goto err; 3807 + goto clear_topology; 3808 3808 3809 3809 eas = kcalloc(uncore_max_dies(), sizeof(*eas), GFP_KERNEL); 3810 3810 if (!eas) 3811 - goto err; 3811 + goto clear_attrs; 3812 3812 3813 3813 for (die = 0; die < uncore_max_dies(); die++) { 3814 3814 sprintf(buf, "die%ld", die); ··· 3829 3829 for (; die >= 0; die--) 3830 3830 kfree(eas[die].attr.attr.name); 3831 3831 kfree(eas); 3832 + clear_attrs: 3832 3833 kfree(attrs); 3834 + clear_topology: 3833 3835 kfree(type->topology); 3834 3836 clear_attr_update: 3835 3837 type->attr_update = NULL;