Skip to content

Commit f65832a

Browse files
committed
Merge tag 'perf-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 perf fixes from Ingo Molnar: - Fix Intel Lunar Lake build-in event definitions - Fall back to (compatible) legacy features on new Intel PEBS format v6 hardware - Enable uncore support on Intel Clearwater Forest CPUs, which is the same as the existing Sierra Forest uncore driver * tag 'perf-urgent-2024-12-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Fix bitmask of OCR and FRONTEND events for LNC perf/x86/intel/ds: Add PEBS format 6 perf/x86/intel/uncore: Add Clearwater Forest support
2 parents bcfac55 + aa5d2ca commit f65832a

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

arch/x86/events/intel/core.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,16 @@ static struct event_constraint intel_lnc_event_constraints[] = {
429429
EVENT_CONSTRAINT_END
430430
};
431431

432+
static struct extra_reg intel_lnc_extra_regs[] __read_mostly = {
433+
INTEL_UEVENT_EXTRA_REG(0x012a, MSR_OFFCORE_RSP_0, 0xfffffffffffull, RSP_0),
434+
INTEL_UEVENT_EXTRA_REG(0x012b, MSR_OFFCORE_RSP_1, 0xfffffffffffull, RSP_1),
435+
INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd),
436+
INTEL_UEVENT_EXTRA_REG(0x02c6, MSR_PEBS_FRONTEND, 0x9, FE),
437+
INTEL_UEVENT_EXTRA_REG(0x03c6, MSR_PEBS_FRONTEND, 0x7fff1f, FE),
438+
INTEL_UEVENT_EXTRA_REG(0x40ad, MSR_PEBS_FRONTEND, 0xf, FE),
439+
INTEL_UEVENT_EXTRA_REG(0x04c2, MSR_PEBS_FRONTEND, 0x8, FE),
440+
EVENT_EXTRA_END
441+
};
432442

433443
EVENT_ATTR_STR(mem-loads, mem_ld_nhm, "event=0x0b,umask=0x10,ldlat=3");
434444
EVENT_ATTR_STR(mem-loads, mem_ld_snb, "event=0xcd,umask=0x1,ldlat=3");
@@ -6422,7 +6432,7 @@ static __always_inline void intel_pmu_init_lnc(struct pmu *pmu)
64226432
intel_pmu_init_glc(pmu);
64236433
hybrid(pmu, event_constraints) = intel_lnc_event_constraints;
64246434
hybrid(pmu, pebs_constraints) = intel_lnc_pebs_event_constraints;
6425-
hybrid(pmu, extra_regs) = intel_rwc_extra_regs;
6435+
hybrid(pmu, extra_regs) = intel_lnc_extra_regs;
64266436
}
64276437

64286438
static __always_inline void intel_pmu_init_skt(struct pmu *pmu)

arch/x86/events/intel/ds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,6 +2517,7 @@ void __init intel_ds_init(void)
25172517
x86_pmu.large_pebs_flags |= PERF_SAMPLE_TIME;
25182518
break;
25192519

2520+
case 6:
25202521
case 5:
25212522
x86_pmu.pebs_ept = 1;
25222523
fallthrough;

arch/x86/events/intel/uncore.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,6 +1910,7 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {
19101910
X86_MATCH_VFM(INTEL_ATOM_GRACEMONT, &adl_uncore_init),
19111911
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT_X, &gnr_uncore_init),
19121912
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT, &gnr_uncore_init),
1913+
X86_MATCH_VFM(INTEL_ATOM_DARKMONT_X, &gnr_uncore_init),
19131914
{},
19141915
};
19151916
MODULE_DEVICE_TABLE(x86cpu, intel_uncore_match);

0 commit comments

Comments
 (0)