Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-07-19 17:10:24 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-07-19 22:44:48 +0200
commit9e47260cc445d98315313a23d2cb61f6094cbe2c (patch)
treec01acec3ffc834015c85e23454a6390204beed38
parent25ba0fca496ffa486a59121774b1a408e8061df4 (diff)
s390/cpum_cf: add ctr_stcctm() function (jsc#SLE-6904
-rw-r--r--patches.suse/s390-cpum_cf-add-ctr_stcctm-function47
-rw-r--r--series.conf1
2 files changed, 48 insertions, 0 deletions
diff --git a/patches.suse/s390-cpum_cf-add-ctr_stcctm-function b/patches.suse/s390-cpum_cf-add-ctr_stcctm-function
new file mode 100644
index 0000000000..8b691b2160
--- /dev/null
+++ b/patches.suse/s390-cpum_cf-add-ctr_stcctm-function
@@ -0,0 +1,47 @@
+From: Hendrik Brueckner <brueckner@linux.ibm.com>
+Date: Fri, 26 Oct 2018 09:48:29 +0200
+Subject: s390/cpum_cf: add ctr_stcctm() function
+Git-commit: 86c0b75715e711c035ae0ed9820ae95f14fe2c0d
+Patch-mainline: v5.1-rc1
+References: jsc#SLE-6904 FATE#327581
+
+Introduce the ctr_stcctm() function as wrapper function to extract counters
+from a particular counter set. Note that the counter set is part of the
+stcctm instruction opcode, few indirections are necessary to specify the
+counter set as variable.
+
+Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Acked-by: Petr Tesarik <ptesarik@suse.com>
+---
+ arch/s390/include/asm/cpu_mcf.h | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+--- a/arch/s390/include/asm/cpu_mcf.h
++++ b/arch/s390/include/asm/cpu_mcf.h
+@@ -49,6 +49,25 @@ static inline void ctr_set_stop(u64 *sta
+ *state &= ~(cpumf_ctr_ctl[ctr_set] << CPUMF_LCCTL_ACTCTL_SHIFT);
+ }
+
++static inline int ctr_stcctm(enum cpumf_ctr_set set, u64 range, u64 *dest)
++{
++ switch (set) {
++ case CPUMF_CTR_SET_BASIC:
++ return stcctm(BASIC, range, dest);
++ case CPUMF_CTR_SET_USER:
++ return stcctm(PROBLEM_STATE, range, dest);
++ case CPUMF_CTR_SET_CRYPTO:
++ return stcctm(CRYPTO_ACTIVITY, range, dest);
++ case CPUMF_CTR_SET_EXT:
++ return stcctm(EXTENDED, range, dest);
++ case CPUMF_CTR_SET_MT_DIAG:
++ return stcctm(MT_DIAG_CLEARING, range, dest);
++ case CPUMF_CTR_SET_MAX:
++ return 3;
++ }
++ return 3;
++}
++
+ struct cpu_cf_events {
+ struct cpumf_ctr_info info;
+ atomic_t ctr_set[CPUMF_CTR_SET_MAX];
diff --git a/series.conf b/series.conf
index d2248b907b..a846180c99 100644
--- a/series.conf
+++ b/series.conf
@@ -45474,6 +45474,7 @@
patches.suse/s390-cpu_mf-add-store-cpu-counter-multiple-instruction-support
patches.suse/s390-cpu_mf-replace-stcctm5-with-the-stcctm-function
patches.suse/s390-cpum_cf-introduce-kernel_cpumcf_avail-function
+ patches.suse/s390-cpum_cf-add-ctr_stcctm-function
patches.fixes/0001-s390-vfio_ap-link-the-vfio_ap-devices-to-the-vfio_ap.patch
patches.drivers/clocksource-drivers-sun5i-Fail-gracefully-when-clock.patch
patches.drivers/clocksource-drivers-exynos_mct-Move-one-shot-check-f.patch