From: Thomas Richter Date: Tue, 29 Oct 2024 07:09:15 +0000 (+0100) Subject: s390/cpum_sf: Rework call to sf_disable() X-Git-Tag: v6.13-rc1~206^2~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4d5e64c5c620fd532cc24dc39c6be767e3f8648;p=thirdparty%2Fkernel%2Flinux.git s390/cpum_sf: Rework call to sf_disable() Setup_pmc_cpu() function body consists of one single switch statement with two cases PMC_INIT and PMC_RELEASE. In both of these cases sf_disable() is invoked to turn off the CPU Measurement sampling facility. Move sf_disable() out of the switch statement. No functional change. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Reviewed-by: Sumanth Korikkar Signed-off-by: Heiko Carstens --- diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c index 713999681b608..2c1d4188e9874 100644 --- a/arch/s390/kernel/perf_cpum_sf.c +++ b/arch/s390/kernel/perf_cpum_sf.c @@ -559,16 +559,15 @@ static void setup_pmc_cpu(void *flags) { struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf); + sf_disable(); switch (*((int *)flags)) { case PMC_INIT: memset(cpuhw, 0, sizeof(*cpuhw)); qsi(&cpuhw->qsi); cpuhw->flags |= PMU_F_RESERVED; - sf_disable(); break; case PMC_RELEASE: cpuhw->flags &= ~PMU_F_RESERVED; - sf_disable(); deallocate_buffers(cpuhw); break; }