summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/perf_event.h
diff options
context:
space:
mode:
authorShaokun Zhang <zhangshaokun@hisilicon.com>2021-06-03 10:15:02 +0300
committerWill Deacon <will@kernel.org>2021-06-03 11:53:17 +0300
commit281e44f5fd4f82d86a2b86f0592c698f7311a674 (patch)
tree88d2fc59d771c6f906d73b8814845bb3d34f8054 /arch/arm64/include/asm/perf_event.h
parent0d0f144a8f5f9815a180d16ef7d08b6269016897 (diff)
downloadlinux-281e44f5fd4f82d86a2b86f0592c698f7311a674.tar.xz
arm64: perf: Add more support on caps under sysfs
Armv8.7 has introduced BUS_SLOTS and BUS_WIDTH in PMMIR_EL1 register, add two entries in caps for bus_slots and bus_width under sysfs. It will return the true slots and width if the information is available, otherwise it will return 0. Cc: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com> Link: https://lore.kernel.org/r/1622704502-63951-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/perf_event.h')
-rw-r--r--arch/arm64/include/asm/perf_event.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/perf_event.h b/arch/arm64/include/asm/perf_event.h
index 60731f602d3e..4ef6f19331f9 100644
--- a/arch/arm64/include/asm/perf_event.h
+++ b/arch/arm64/include/asm/perf_event.h
@@ -239,6 +239,11 @@
/* PMMIR_EL1.SLOTS mask */
#define ARMV8_PMU_SLOTS_MASK 0xff
+#define ARMV8_PMU_BUS_SLOTS_SHIFT 8
+#define ARMV8_PMU_BUS_SLOTS_MASK 0xff
+#define ARMV8_PMU_BUS_WIDTH_SHIFT 16
+#define ARMV8_PMU_BUS_WIDTH_MASK 0xf
+
#ifdef CONFIG_PERF_EVENTS
struct pt_regs;
extern unsigned long perf_instruction_pointer(struct pt_regs *regs);