Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/cpum_sf: Set bit PMU_F_ENABLED enabled after lpp() invocation

Set PMU enabled bit after lpp() call. This ensures the proper
task PID is loaded by the llp instruction into Program Parameter
register from where it is copied to each sampling data buffer
(SDB) sample entry after the sampling was enabled.

The barrier() instruction is not needed as cpumsf_pmu_enable()
changes a CPU specific variable. Only the CPU that task is
running on changes structure members.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

authored by

Thomas Richter and committed by
Heiko Carstens
31d1d8a3 25f39d3d

+1 -4
+1 -4
arch/s390/kernel/perf_cpum_sf.c
··· 942 942 } 943 943 944 944 /* (Re)enable the PMU and sampling facility */ 945 - cpuhw->flags |= PMU_F_ENABLED; 946 - barrier(); 947 - 948 945 err = lsctl(&cpuhw->lsctl); 949 946 if (err) { 950 - cpuhw->flags &= ~PMU_F_ENABLED; 951 947 pr_err("Loading sampling controls failed: op 1 err %i\n", err); 952 948 return; 953 949 } 954 950 955 951 /* Load current program parameter */ 956 952 lpp(&get_lowcore()->lpp); 953 + cpuhw->flags |= PMU_F_ENABLED; 957 954 } 958 955 959 956 static void cpumsf_pmu_disable(struct pmu *pmu)