lkml.org 
[lkml]   [2016]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 05/13] powerpc/perf: Define enums for perf_arch_regs registers
Date
Patch creates a perf_event_powerpc_arch_regs enum and macros
to include some of the powerpc pmu registers.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Stephane Eranian <eranian@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
arch/powerpc/include/uapi/asm/perf_regs.h | 38 ++++++++++++++++++++++++
tools/arch/powerpc/include/uapi/asm/perf_regs.h | 39 +++++++++++++++++++++++++
2 files changed, 77 insertions(+)

diff --git a/arch/powerpc/include/uapi/asm/perf_regs.h b/arch/powerpc/include/uapi/asm/perf_regs.h
index 6a93209748a1..e8f5553a61d1 100644
--- a/arch/powerpc/include/uapi/asm/perf_regs.h
+++ b/arch/powerpc/include/uapi/asm/perf_regs.h
@@ -47,4 +47,42 @@ enum perf_event_powerpc_regs {
PERF_REG_POWERPC_DSISR,
PERF_REG_POWERPC_MAX,
};
+
+enum perf_event_powerpc_arch_regs {
+ PERF_ARCH_REG_POWERPC_PVR,
+ PERF_ARCH_REG_POWERPC_PMC1,
+ PERF_ARCH_REG_POWERPC_PMC2,
+ PERF_ARCH_REG_POWERPC_PMC3,
+ PERF_ARCH_REG_POWERPC_PMC4,
+ PERF_ARCH_REG_POWERPC_PMC5,
+ PERF_ARCH_REG_POWERPC_PMC6,
+ PERF_ARCH_REG_POWERPC_PMC7,
+ PERF_ARCH_REG_POWERPC_PMC8,
+ PERF_ARCH_REG_POWERPC_MMCR0,
+ PERF_ARCH_REG_POWERPC_MMCR1,
+ PERF_ARCH_REG_POWERPC_SIER,
+ PERF_ARCH_REG_POWERPC_SIAR,
+ PERF_ARCH_REG_POWERPC_SDAR,
+ PERF_ARCH_REG_POWERPC_MMCRA,
+ PERF_ARCH_REG_POWERPC_MMCR2,
+ PERF_ARCH_REG_POWERPC_MAX,
+};
+
+#define PERF_ARCH_REG_PVR (1ULL<<PERF_ARCH_REG_POWERPC_PVR)
+#define PERF_ARCH_REG_PMC1 (1ULL<<PERF_ARCH_REG_POWERPC_PMC1)
+#define PERF_ARCH_REG_PMC2 (1ULL<<PERF_ARCH_REG_POWERPC_PMC2)
+#define PERF_ARCH_REG_PMC3 (1ULL<<PERF_ARCH_REG_POWERPC_PMC3)
+#define PERF_ARCH_REG_PMC4 (1ULL<<PERF_ARCH_REG_POWERPC_PMC4)
+#define PERF_ARCH_REG_PMC5 (1ULL<<PERF_ARCH_REG_POWERPC_PMC5)
+#define PERF_ARCH_REG_PMC6 (1ULL<<PERF_ARCH_REG_POWERPC_PMC6)
+#define PERF_ARCH_REG_PMC7 (1ULL<<PERF_ARCH_REG_POWERPC_PMC7)
+#define PERF_ARCH_REG_PMC8 (1ULL<<PERF_ARCH_REG_POWERPC_PMC8)
+#define PERF_ARCH_REG_MMCR0 (1ULL<<PERF_ARCH_REG_POWERPC_MMCR0)
+#define PERF_ARCH_REG_MMCR1 (1ULL<<PERF_ARCH_REG_POWERPC_MMCR1)
+#define PERF_ARCH_REG_SIER (1ULL<<PERF_ARCH_REG_POWERPC_SIER)
+#define PERF_ARCH_REG_SIAR (1ULL<<PERF_ARCH_REG_POWERPC_SIAR)
+#define PERF_ARCH_REG_SDAR (1ULL<<PERF_ARCH_REG_POWERPC_SDAR)
+#define PERF_ARCH_REG_MMCRA (1ULL<<PERF_ARCH_REG_POWERPC_MMCRA)
+#define PERF_ARCH_REG_MMCR2 (1ULL<<PERF_ARCH_REG_POWERPC_MMCR2)
+
#endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
diff --git a/tools/arch/powerpc/include/uapi/asm/perf_regs.h b/tools/arch/powerpc/include/uapi/asm/perf_regs.h
index 6a93209748a1..bf249a27aa36 100644
--- a/tools/arch/powerpc/include/uapi/asm/perf_regs.h
+++ b/tools/arch/powerpc/include/uapi/asm/perf_regs.h
@@ -47,4 +47,43 @@ enum perf_event_powerpc_regs {
PERF_REG_POWERPC_DSISR,
PERF_REG_POWERPC_MAX,
};
+
+enum perf_event_powerpc_arch_regs {
+ PERF_ARCH_REG_POWERPC_PVR,
+ PERF_ARCH_REG_POWERPC_PMC1,
+ PERF_ARCH_REG_POWERPC_PMC2,
+ PERF_ARCH_REG_POWERPC_PMC3,
+ PERF_ARCH_REG_POWERPC_PMC4,
+ PERF_ARCH_REG_POWERPC_PMC5,
+ PERF_ARCH_REG_POWERPC_PMC6,
+ PERF_ARCH_REG_POWERPC_PMC7,
+ PERF_ARCH_REG_POWERPC_PMC8,
+ PERF_ARCH_REG_POWERPC_MMCR0,
+ PERF_ARCH_REG_POWERPC_MMCR1,
+ PERF_ARCH_REG_POWERPC_SIER,
+ PERF_ARCH_REG_POWERPC_SIAR,
+ PERF_ARCH_REG_POWERPC_SDAR,
+ PERF_ARCH_REG_POWERPC_MMCRA,
+ PERF_ARCH_REG_POWERPC_MMCR2,
+ PERF_ARCH_REG_POWERPC_MAX,
+};
+
+#define PERF_ARCH_REG_PVR 1ULL<<PERF_ARCH_REG_POWERPC_PVR
+#define PERF_ARCH_REG_PMC1 1ULL<<PERF_ARCH_REG_POWERPC_PMC1
+#define PERF_ARCH_REG_PMC2 1ULL<<PERF_ARCH_REG_POWERPC_PMC2
+#define PERF_ARCH_REG_PMC3 1ULL<<PERF_ARCH_REG_POWERPC_PMC3
+#define PERF_ARCH_REG_PMC4 1ULL<<PERF_ARCH_REG_POWERPC_PMC4
+#define PERF_ARCH_REG_PMC5 1ULL<<PERF_ARCH_REG_POWERPC_PMC5
+#define PERF_ARCH_REG_PMC6 1ULL<<PERF_ARCH_REG_POWERPC_PMC6
+#define PERF_ARCH_REG_PMC7 1ULL<<PERF_ARCH_REG_POWERPC_PMC7
+#define PERF_ARCH_REG_PMC8 1ULL<<PERF_ARCH_REG_POWERPC_PMC8
+#define PERF_ARCH_REG_MMCR0 1ULL<<PERF_ARCH_REG_POWERPC_MMCR0
+#define PERF_ARCH_REG_MMCR1 1ULL<<PERF_ARCH_REG_POWERPC_MMCR1
+#define PERF_ARCH_REG_SIER 1ULL<<PERF_ARCH_REG_POWERPC_SIER
+#define PERF_ARCH_REG_SIAR 1ULL<<PERF_ARCH_REG_POWERPC_SIAR
+#define PERF_ARCH_REG_SDAR 1ULL<<PERF_ARCH_REG_POWERPC_SDAR
+#define PERF_ARCH_REG_MMCRA 1ULL<<PERF_ARCH_REG_POWERPC_MMCRA
+#define PERF_ARCH_REG_MMCR2 1ULL<<PERF_ARCH_REG_POWERPC_MMCR2
+
+
#endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
--
2.7.4
\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.121 / U:1.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site