]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Exclude kernel samples while counting events in user space.
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Wed, 25 Nov 2020 07:26:55 +0000 (02:26 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 10 Dec 2020 12:04:35 +0000 (23:04 +1100)
commite60122d577147dc1b654b0dcf9b1cd50af9cab9e
tree66cf35613b250a809c25b241325bb07c2823f8da
parentb9a92d0fc07f9205db35922de5d0f50214a9b809
powerpc/perf: Exclude kernel samples while counting events in user space.

Perf event attritube supports exclude_kernel flag to avoid
sampling/profiling in supervisor state (kernel). Based on this event
attr flag, Monitor Mode Control Register bit is set to freeze on
supervisor state. But sometimes (due to hardware limitation), Sampled
Instruction Address Register (SIAR) locks on to kernel address even
when freeze on supervisor is set. Patch here adds a check to drop
those samples.

Cc: stable@vger.kernel.org
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1606289215-1433-1-git-send-email-atrajeev@linux.vnet.ibm.com
arch/powerpc/perf/core-book3s.c