diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2013-04-25 15:28:27 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-04-26 02:11:10 -0400 |
commit | 8f61aa325fab3a40b7c847bd35601ad99d7959c9 (patch) | |
tree | a778e0cdef0a9bf3138246fe56817125282e9eeb /arch/powerpc/include | |
parent | 860aad71fc7022e5a3907afe50fd96a11e546802 (diff) |
powerpc/perf: Add support for SIER
On power8 we have a new SIER (Sampled Instruction Event Register), which
captures information about instructions when we have random sampling
enabled.
Add support for loading the SIER into pt_regs, overloading regs->dar.
Also set the new NO_SIPR flag in regs->result if we don't have SIPR.
Update regs_sihv/sipr() to look for SIPR/SIHV in SIER.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/perf_event_server.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h index 7074aeccb9f9..57b42da03b62 100644 --- a/arch/powerpc/include/asm/perf_event_server.h +++ b/arch/powerpc/include/asm/perf_event_server.h | |||
@@ -53,6 +53,7 @@ struct power_pmu { | |||
53 | #define PPMU_NO_CONT_SAMPLING 0x00000008 /* no continuous sampling */ | 53 | #define PPMU_NO_CONT_SAMPLING 0x00000008 /* no continuous sampling */ |
54 | #define PPMU_SIAR_VALID 0x00000010 /* Processor has SIAR Valid bit */ | 54 | #define PPMU_SIAR_VALID 0x00000010 /* Processor has SIAR Valid bit */ |
55 | #define PPMU_HAS_SSLOT 0x00000020 /* Has sampled slot in MMCRA */ | 55 | #define PPMU_HAS_SSLOT 0x00000020 /* Has sampled slot in MMCRA */ |
56 | #define PPMU_HAS_SIER 0x00000040 /* Has SIER */ | ||
56 | 57 | ||
57 | /* | 58 | /* |
58 | * Values for flags to get_alternatives() | 59 | * Values for flags to get_alternatives() |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 5735ebbd5888..5c6fbe2c5ce6 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -671,6 +671,11 @@ | |||
671 | #define SPRN_PMC8 794 | 671 | #define SPRN_PMC8 794 |
672 | #define SPRN_SIAR 780 | 672 | #define SPRN_SIAR 780 |
673 | #define SPRN_SDAR 781 | 673 | #define SPRN_SDAR 781 |
674 | #define SPRN_SIER 784 | ||
675 | #define SIER_SIPR 0x2000000 /* Sampled MSR_PR */ | ||
676 | #define SIER_SIHV 0x1000000 /* Sampled MSR_HV */ | ||
677 | #define SIER_SIAR_VALID 0x0400000 /* SIAR contents valid */ | ||
678 | #define SIER_SDAR_VALID 0x0200000 /* SDAR contents valid */ | ||
674 | 679 | ||
675 | #define SPRN_PA6T_MMCR0 795 | 680 | #define SPRN_PA6T_MMCR0 795 |
676 | #define PA6T_MMCR0_EN0 0x0000000000000001UL | 681 | #define PA6T_MMCR0_EN0 0x0000000000000001UL |