]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Update MMCR2 to support event exclude_idle
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Thu, 29 Apr 2021 05:02:08 +0000 (10:32 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jun 2022 09:42:41 +0000 (19:42 +1000)
commit4b44d15ddb01875d39846661b9d69e4178ab130c
tree216808b242c1c1429aa32d6ec5d0246d140025b5
parentdc4d38cae099cd142a2c4063ccc94a678061fab2
powerpc/perf: Update MMCR2 to support event exclude_idle

struct perf_event_attr supports exclude counting of idle task.
This is sent to kernel via perf_event_attr.exclude_idle and
in perf tool, user can use ":I" event modifier to enable this
for specific event.

Monitor Mode Control Register 2 (MMCR2) SPR has control bits
for each PMCs to freeze counting based on the Control Register
CTRL[RUN] state. CTRL[RUN] is not set when idle task is
running. Patch adds a check for event attr.exclude_idle to
set MMCR2[FCnWAIT] bit.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210429050208.266619-1-maddy@linux.ibm.com
arch/powerpc/perf/isa207-common.c
arch/powerpc/perf/isa207-common.h