]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Use the address from SIAR register to set cpumode flags
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Wed, 21 Oct 2020 08:53:27 +0000 (14:23 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Nov 2020 05:56:56 +0000 (16:56 +1100)
commitbef974baa7ed9179d8be2ba7e876516df5fcb187
tree76ad4028a093b758d88b79748d5487188df1fac5
parent125f291ab25534181cee6a209b31e3287c7fc4d8
powerpc/perf: Use the address from SIAR register to set cpumode flags

While setting the processor mode for any sample, perf_get_misc_flags()
expects the privilege level to differentiate the userspace and kernel
address. On power10 DD1, there is an issue that causes MSR_HV MSR_PR
bits of Sampled Instruction Event Register (SIER) not to be set for
marked events. Hence add a check to use the address in SIAR (Sampled
Instruction Address Register) to identify the privilege level.

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
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-3-maddy@linux.ibm.com
arch/powerpc/perf/core-book3s.c