aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/kernel/perf_cpum_sf.c
diff options
context:
space:
mode:
authorThomas Richter <[email protected]>2024-10-07 07:45:16 +0200
committerHeiko Carstens <[email protected]>2024-10-10 15:32:43 +0200
commit31d1d8a35eeb9cd2a2ecd840304a6935e461c500 (patch)
tree8c040530c51f54180922f381ffd7eed7e3b38914 /arch/s390/kernel/perf_cpum_sf.c
parent25f39d3dcb48bbc824a77d16b3d977f0f3713cfe (diff)
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 <[email protected]> Reviewed-by: Hendrik Brueckner <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'arch/s390/kernel/perf_cpum_sf.c')
-rw-r--r--arch/s390/kernel/perf_cpum_sf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c
index 5b765e3ccf0c..e806693c8473 100644
--- a/arch/s390/kernel/perf_cpum_sf.c
+++ b/arch/s390/kernel/perf_cpum_sf.c
@@ -942,18 +942,15 @@ static void cpumsf_pmu_enable(struct pmu *pmu)
}
/* (Re)enable the PMU and sampling facility */
- cpuhw->flags |= PMU_F_ENABLED;
- barrier();
-
err = lsctl(&cpuhw->lsctl);
if (err) {
- cpuhw->flags &= ~PMU_F_ENABLED;
pr_err("Loading sampling controls failed: op 1 err %i\n", err);
return;
}
/* Load current program parameter */
lpp(&get_lowcore()->lpp);
+ cpuhw->flags |= PMU_F_ENABLED;
}
static void cpumsf_pmu_disable(struct pmu *pmu)