* [PATCH] powerpc/perf: Fix perf_get_data_addr() for power9 DD1
@ 2017-02-20 13:56 Madhavan Srinivasan
2017-03-14 11:45 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Madhavan Srinivasan @ 2017-02-20 13:56 UTC (permalink / raw)
To: mpe; +Cc: linuxppc-dev, Madhavan Srinivasan
Power9 DD1 do not support PMU_HAS_SIER flag and sdsync
in perf_get_data_addr() defaults to MMCRA_SDSYNC which
is wrong. Since power9 MMCRA does not support SDSYNC bit,
patch includes PPMU_NO_SIAR flag to the check and set the
sdsync with MMCRA_SAMPLE_ENABLE;
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
arch/powerpc/perf/core-book3s.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 270eb9b74e2e..e9e6dfff032f 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -183,6 +183,8 @@ static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp)
sdsync = POWER7P_MMCRA_SDAR_VALID;
else if (ppmu->flags & PPMU_ALT_SIPR)
sdsync = POWER6_MMCRA_SDSYNC;
+ else if (ppmu->flags & PPMU_NO_SIAR)
+ sdsync = MMCRA_SAMPLE_ENABLE;
else
sdsync = MMCRA_SDSYNC;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/perf: Fix perf_get_data_addr() for power9 DD1
2017-02-20 13:56 [PATCH] powerpc/perf: Fix perf_get_data_addr() for power9 DD1 Madhavan Srinivasan
@ 2017-03-14 11:45 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-03-14 11:45 UTC (permalink / raw)
To: Madhavan Srinivasan; +Cc: Madhavan Srinivasan, linuxppc-dev
On Mon, 2017-02-20 at 13:56:30 UTC, Madhavan Srinivasan wrote:
> Power9 DD1 do not support PMU_HAS_SIER flag and sdsync
> in perf_get_data_addr() defaults to MMCRA_SDSYNC which
> is wrong. Since power9 MMCRA does not support SDSYNC bit,
> patch includes PPMU_NO_SIAR flag to the check and set the
> sdsync with MMCRA_SAMPLE_ENABLE;
>
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/f04d108029063a8a67528a88449c41
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-14 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-20 13:56 [PATCH] powerpc/perf: Fix perf_get_data_addr() for power9 DD1 Madhavan Srinivasan
2017-03-14 11:45 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).