powerpc/perf: Use regs->nip when SIAR is zero
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 21 Oct 2020 08:53:29 +0000 (14:23 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Nov 2020 05:56:56 +0000 (16:56 +1100)
commit2ca13a4cc56c920a6c9fc8ee45d02bccacd7f46c
treef681c01bc4c81f76b0bcdd0b32f1fff0f31ef545
parentd9f7088dd6d8859f385565ca8acd2681e1f700f9
powerpc/perf: Use regs->nip when SIAR is zero

In power10 DD1, there is an issue where the SIAR (Sampled Instruction
Address Register) is not latching to the sampled address during random
sampling. This results in value of 0s in the SIAR. Add a check to use
regs->nip when SIAR is zero.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201021085329.384535-5-maddy@linux.ibm.com
arch/powerpc/perf/core-book3s.c