Merge tag 'perf-urgent-2021-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 perf fixes from Thomas Gleixner:

- Remove unneded PEBS disabling when taking LBR snapshots to prevent an
unchecked MSR access error.

- Fix IIO event constraints for Snowridge and Skylake server chips.

* tag 'perf-urgent-2021-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/perf: Fix snapshot_branch_stack warning in VM
perf/x86/intel/uncore: Fix IIO event constraints for Snowridge
perf/x86/intel/uncore: Fix IIO event constraints for Skylake Server
perf/x86/intel/uncore: Fix filter_tid mask for CHA events on Skylake Server

Changed files
+12 -2
arch
x86
events
-2
arch/x86/events/intel/core.c
··· 2211 2211 /* must not have branches... */ 2212 2212 local_irq_save(flags); 2213 2213 __intel_pmu_disable_all(false); /* we don't care about BTS */ 2214 - __intel_pmu_pebs_disable_all(); 2215 2214 __intel_pmu_lbr_disable(); 2216 2215 /* ... until here */ 2217 2216 return __intel_pmu_snapshot_branch_stack(entries, cnt, flags); ··· 2224 2225 /* must not have branches... */ 2225 2226 local_irq_save(flags); 2226 2227 __intel_pmu_disable_all(false); /* we don't care about BTS */ 2227 - __intel_pmu_pebs_disable_all(); 2228 2228 __intel_pmu_arch_lbr_disable(); 2229 2229 /* ... until here */ 2230 2230 return __intel_pmu_snapshot_branch_stack(entries, cnt, flags);
+12
arch/x86/events/intel/uncore_snbep.c
··· 3608 3608 struct hw_perf_event_extra *reg1 = &event->hw.extra_reg; 3609 3609 struct extra_reg *er; 3610 3610 int idx = 0; 3611 + /* Any of the CHA events may be filtered by Thread/Core-ID.*/ 3612 + if (event->hw.config & SNBEP_CBO_PMON_CTL_TID_EN) 3613 + idx = SKX_CHA_MSR_PMON_BOX_FILTER_TID; 3611 3614 3612 3615 for (er = skx_uncore_cha_extra_regs; er->msr; er++) { 3613 3616 if (er->event != (event->hw.config & er->config_mask)) ··· 3678 3675 UNCORE_EVENT_CONSTRAINT(0xc0, 0xc), 3679 3676 UNCORE_EVENT_CONSTRAINT(0xc5, 0xc), 3680 3677 UNCORE_EVENT_CONSTRAINT(0xd4, 0xc), 3678 + UNCORE_EVENT_CONSTRAINT(0xd5, 0xc), 3681 3679 EVENT_CONSTRAINT_END 3682 3680 }; 3683 3681 ··· 4529 4525 pmu_iio_cleanup_mapping(type, &snr_iio_mapping_group); 4530 4526 } 4531 4527 4528 + static struct event_constraint snr_uncore_iio_constraints[] = { 4529 + UNCORE_EVENT_CONSTRAINT(0x83, 0x3), 4530 + UNCORE_EVENT_CONSTRAINT(0xc0, 0xc), 4531 + UNCORE_EVENT_CONSTRAINT(0xd5, 0xc), 4532 + EVENT_CONSTRAINT_END 4533 + }; 4534 + 4532 4535 static struct intel_uncore_type snr_uncore_iio = { 4533 4536 .name = "iio", 4534 4537 .num_counters = 4, ··· 4547 4536 .event_mask_ext = SNR_IIO_PMON_RAW_EVENT_MASK_EXT, 4548 4537 .box_ctl = SNR_IIO_MSR_PMON_BOX_CTL, 4549 4538 .msr_offset = SNR_IIO_MSR_OFFSET, 4539 + .constraints = snr_uncore_iio_constraints, 4550 4540 .ops = &ivbep_uncore_msr_ops, 4551 4541 .format_group = &snr_uncore_iio_format_group, 4552 4542 .attr_update = snr_iio_attr_update,