Skip to content

Commit f4d5e64

Browse files
Thomas Richterhcahca
authored andcommitted
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 <tmricht@linux.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com> Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent 666300d commit f4d5e64

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/s390/kernel/perf_cpum_sf.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,16 +559,15 @@ static void setup_pmc_cpu(void *flags)
559559
{
560560
struct cpu_hw_sf *cpuhw = this_cpu_ptr(&cpu_hw_sf);
561561

562+
sf_disable();
562563
switch (*((int *)flags)) {
563564
case PMC_INIT:
564565
memset(cpuhw, 0, sizeof(*cpuhw));
565566
qsi(&cpuhw->qsi);
566567
cpuhw->flags |= PMU_F_RESERVED;
567-
sf_disable();
568568
break;
569569
case PMC_RELEASE:
570570
cpuhw->flags &= ~PMU_F_RESERVED;
571-
sf_disable();
572571
deallocate_buffers(cpuhw);
573572
break;
574573
}

0 commit comments

Comments
 (0)