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

arm64: perf: Extend ARMV8_EVTYPE_MASK to include PMCR.LC

Commit 7175f0591eb9 ("arm64: perf: Enable PMCR long cycle counter bit")
added initial support for a 64-bit cycle counter enabled using PMCR.LC.

Unfortunately, that patch doesn't extend ARMV8_EVTYPE_MASK, so any
attempts to set the enable bit are ignored by armv8pmu_pmcr_write.

This patch extends the mask to include the new bit.

Signed-off-by: Will Deacon <will.deacon@arm.com>

+1 -1
+1 -1
arch/arm64/kernel/perf_event.c
··· 408 408 #define ARMV8_PMCR_LC (1 << 6) /* Overflow on 64 bit cycle counter */ 409 409 #define ARMV8_PMCR_N_SHIFT 11 /* Number of counters supported */ 410 410 #define ARMV8_PMCR_N_MASK 0x1f 411 - #define ARMV8_PMCR_MASK 0x3f /* Mask for writable bits */ 411 + #define ARMV8_PMCR_MASK 0x7f /* Mask for writable bits */ 412 412 413 413 /* 414 414 * PMOVSR: counters overflow flag status reg