Skip to content

Commit af16bde

Browse files
committed
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
2 parents 75603b1 + f3fd84a commit af16bde

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

arch/x86/events/intel/core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,6 @@ intel_pmu_snapshot_branch_stack(struct perf_branch_entry *entries, unsigned int
22112211
/* must not have branches... */
22122212
local_irq_save(flags);
22132213
__intel_pmu_disable_all(false); /* we don't care about BTS */
2214-
__intel_pmu_pebs_disable_all();
22152214
__intel_pmu_lbr_disable();
22162215
/* ... until here */
22172216
return __intel_pmu_snapshot_branch_stack(entries, cnt, flags);
@@ -2225,7 +2224,6 @@ intel_pmu_snapshot_arch_branch_stack(struct perf_branch_entry *entries, unsigned
22252224
/* must not have branches... */
22262225
local_irq_save(flags);
22272226
__intel_pmu_disable_all(false); /* we don't care about BTS */
2228-
__intel_pmu_pebs_disable_all();
22292227
__intel_pmu_arch_lbr_disable();
22302228
/* ... until here */
22312229
return __intel_pmu_snapshot_branch_stack(entries, cnt, flags);

arch/x86/events/intel/uncore_snbep.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3608,6 +3608,9 @@ static int skx_cha_hw_config(struct intel_uncore_box *box, struct perf_event *ev
36083608
struct hw_perf_event_extra *reg1 = &event->hw.extra_reg;
36093609
struct extra_reg *er;
36103610
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;
36113614

36123615
for (er = skx_uncore_cha_extra_regs; er->msr; er++) {
36133616
if (er->event != (event->hw.config & er->config_mask))
@@ -3675,6 +3678,7 @@ static struct event_constraint skx_uncore_iio_constraints[] = {
36753678
UNCORE_EVENT_CONSTRAINT(0xc0, 0xc),
36763679
UNCORE_EVENT_CONSTRAINT(0xc5, 0xc),
36773680
UNCORE_EVENT_CONSTRAINT(0xd4, 0xc),
3681+
UNCORE_EVENT_CONSTRAINT(0xd5, 0xc),
36783682
EVENT_CONSTRAINT_END
36793683
};
36803684

@@ -4525,6 +4529,13 @@ static void snr_iio_cleanup_mapping(struct intel_uncore_type *type)
45254529
pmu_iio_cleanup_mapping(type, &snr_iio_mapping_group);
45264530
}
45274531

4532+
static struct event_constraint snr_uncore_iio_constraints[] = {
4533+
UNCORE_EVENT_CONSTRAINT(0x83, 0x3),
4534+
UNCORE_EVENT_CONSTRAINT(0xc0, 0xc),
4535+
UNCORE_EVENT_CONSTRAINT(0xd5, 0xc),
4536+
EVENT_CONSTRAINT_END
4537+
};
4538+
45284539
static struct intel_uncore_type snr_uncore_iio = {
45294540
.name = "iio",
45304541
.num_counters = 4,
@@ -4536,6 +4547,7 @@ static struct intel_uncore_type snr_uncore_iio = {
45364547
.event_mask_ext = SNR_IIO_PMON_RAW_EVENT_MASK_EXT,
45374548
.box_ctl = SNR_IIO_MSR_PMON_BOX_CTL,
45384549
.msr_offset = SNR_IIO_MSR_OFFSET,
4550+
.constraints = snr_uncore_iio_constraints,
45394551
.ops = &ivbep_uncore_msr_ops,
45404552
.format_group = &snr_uncore_iio_format_group,
45414553
.attr_update = snr_iio_attr_update,

0 commit comments

Comments
 (0)