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

Configure Feed

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

perf/x86/intel: Fix bitmask of OCR and FRONTEND events for LNC

The released OCR and FRONTEND events utilized more bits on Lunar Lake
p-core. The corresponding mask in the extra_regs has to be extended to
unblock the extra bits.

Add a dedicated intel_lnc_extra_regs.

Fixes: a932aa0e868f ("perf/x86: Add Lunar Lake and Arrow Lake support")
Reported-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20241216160252.430858-1-kan.liang@linux.intel.com

authored by

Kan Liang and committed by
Peter Zijlstra
aa5d2ca7 b8c3a250

+11 -1
+11 -1
arch/x86/events/intel/core.c
··· 429 429 EVENT_CONSTRAINT_END 430 430 }; 431 431 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 + }; 432 442 433 443 EVENT_ATTR_STR(mem-loads, mem_ld_nhm, "event=0x0b,umask=0x10,ldlat=3"); 434 444 EVENT_ATTR_STR(mem-loads, mem_ld_snb, "event=0xcd,umask=0x1,ldlat=3"); ··· 6432 6422 intel_pmu_init_glc(pmu); 6433 6423 hybrid(pmu, event_constraints) = intel_lnc_event_constraints; 6434 6424 hybrid(pmu, pebs_constraints) = intel_lnc_pebs_event_constraints; 6435 - hybrid(pmu, extra_regs) = intel_rwc_extra_regs; 6425 + hybrid(pmu, extra_regs) = intel_lnc_extra_regs; 6436 6426 } 6437 6427 6438 6428 static __always_inline void intel_pmu_init_skt(struct pmu *pmu)