powerpc/perf: Fix disabling BHRB and instruction sampling
authorNicholas Piggin <npiggin@gmail.com>
Wed, 18 Oct 2023 15:34:23 +0000 (01:34 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:19:55 +0000 (17:19 +0000)
commit63fe567a0668a893e8bb16faa8624e8c99c2dbd2
treef8f7b9400f83dbbb288334e5072f63c1aa29f472
parentee534525baf87a8e82229fc4ad4a0743a5b431f5
powerpc/perf: Fix disabling BHRB and instruction sampling

commit ea142e590aec55ba40c5affb4d49e68c713c63dc upstream.

When the PMU is disabled, MMCRA is not updated to disable BHRB and
instruction sampling. This can lead to those features remaining enabled,
which can slow down a real or emulated CPU.

Fixes: 1cade527f6e9 ("powerpc/perf: BHRB control to disable BHRB logic when not used")
Cc: stable@vger.kernel.org # v5.9+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231018153423.298373-1-npiggin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/perf/core-book3s.c