diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2019-09-20 11:57:43 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-10-01 09:41:36 +0200 |
commit | 932bfc5aae08f3cb20c1c9f051542f5933710151 (patch) | |
tree | 185eaf035fa7cc887d86004541b55a2a569e657d /arch/s390/kernel | |
parent | 851345828095f1e40d383ec1a1e91767a2051976 (diff) | |
download | linux-932bfc5aae08f3cb20c1c9f051542f5933710151.tar.bz2 |
s390/cpumsf: Check for CPU Measurement sampling
s390 IBM z15 introduces a check if the CPU Mesurement Facility
sampling is temporarily unavailable. If this is the case return -EBUSY
and abort the setup of CPU Measuement facility sampling.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/perf_cpum_sf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c index 544a02e944c6..2421f0b62630 100644 --- a/arch/s390/kernel/perf_cpum_sf.c +++ b/arch/s390/kernel/perf_cpum_sf.c @@ -803,6 +803,12 @@ static int __hw_perf_event_init(struct perf_event *event) goto out; } + if (si.ribm & CPU_MF_SF_RIBM_NOTAV) { + pr_warn("CPU Measurement Facility sampling is temporarily not available\n"); + err = -EBUSY; + goto out; + } + /* Always enable basic sampling */ SAMPL_FLAGS(hwc) = PERF_CPUM_SF_BASIC_MODE; |