aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/include/asm/perf_event_server.h
diff options
context:
space:
mode:
authorMadhavan Srinivasan <maddy@linux.ibm.com>2020-07-17 10:38:16 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2020-07-22 21:56:41 +1000
commitc718547e4a92d74089f862457adf1f617c498e16 (patch)
tree736bc5079b79f612d722cf831c9ca0f160d64c67 /arch/powerpc/include/asm/perf_event_server.h
parentpowerpc/perf: Update Power PMU cache_events to u64 type (diff)
downloadwireguard-linux-c718547e4a92d74089f862457adf1f617c498e16.tar.xz
wireguard-linux-c718547e4a92d74089f862457adf1f617c498e16.zip
powerpc/perf: Add support for ISA3.1 PMU SPRs
PowerISA v3.1 includes new performance monitoring unit(PMU) special purpose registers (SPRs). They are Monitor Mode Control Register 3 (MMCR3) Sampled Instruction Event Register 2 (SIER2) Sampled Instruction Event Register 3 (SIER3) MMCR3 is added for further sampling related configuration control. SIER2/SIER3 are added to provide additional information about the sampled instruction. Patch adds new PPMU flag called "PPMU_ARCH_31" to support handling of these new SPRs, updates the struct thread_struct to include these new SPRs, include MMCR3 in struct mmcr_regs. This is needed to support programming of MMCR3 SPR during event_enable/disable. Patch also adds the sysfs support for the MMCR3 SPR along with SPRN_ macros for these new pmu SPRs. Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> [mpe: Rename to PPMU_ARCH_31 as noted by jpn] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1594996707-3727-5-git-send-email-atrajeev@linux.vnet.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/perf_event_server.h')
-rw-r--r--arch/powerpc/include/asm/perf_event_server.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h
index 14b8dc130598..86c9eb064b22 100644
--- a/arch/powerpc/include/asm/perf_event_server.h
+++ b/arch/powerpc/include/asm/perf_event_server.h
@@ -22,6 +22,7 @@ struct mmcr_regs {
unsigned long mmcr1;
unsigned long mmcr2;
unsigned long mmcra;
+ unsigned long mmcr3;
};
/*
* This struct provides the constants and functions needed to
@@ -75,6 +76,7 @@ struct power_pmu {
#define PPMU_HAS_SIER 0x00000040 /* Has SIER */
#define PPMU_ARCH_207S 0x00000080 /* PMC is architecture v2.07S */
#define PPMU_NO_SIAR 0x00000100 /* Do not use SIAR */
+#define PPMU_ARCH_31 0x00000200 /* Has MMCR3, SIER2 and SIER3 */
/*
* Values for flags to get_alternatives()