Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-07-19 22:19:02 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-07-19 22:44:48 +0200
commit66b95ee15da83ab672f811f6f01b5bd7b1159a5c (patch)
tree77472ecaba8c21b146e7a484fea86a765e3610d7
parent91e59e7ef7e72ad99c1e174f3844984936340c5a (diff)
s390/cpu_mf: replace stcctm5() with the stcctm() function
(jsc#SLE-6904 FATE#327581).
-rw-r--r--patches.suse/s390-cpu_mf-replace-stcctm5-with-the-stcctm-function80
-rw-r--r--series.conf1
2 files changed, 81 insertions, 0 deletions
diff --git a/patches.suse/s390-cpu_mf-replace-stcctm5-with-the-stcctm-function b/patches.suse/s390-cpu_mf-replace-stcctm5-with-the-stcctm-function
new file mode 100644
index 0000000000..5b7b7a15ab
--- /dev/null
+++ b/patches.suse/s390-cpu_mf-replace-stcctm5-with-the-stcctm-function
@@ -0,0 +1,80 @@
+From: Hendrik Brueckner <brueckner@linux.ibm.com>
+Date: Wed, 29 Aug 2018 18:12:17 +0200
+Subject: s390/cpu_mf: replace stcctm5() with the stcctm() function
+Git-commit: 346d034d7f13da9eb135458a2f6cf14c9b77a637
+Patch-mainline: v5.1-rc1
+References: jsc#SLE-6904 FATE#327581
+
+Remove the stcctm5() function to extract counters from the MT-diagnostic
+counter set with the stcctm() function. For readability, introduce an
+enum to map the counter sets names to respective numbers for the stcctm
+instruction.
+
+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_mf.h | 25 +++++++++----------------
+ arch/s390/kernel/vtime.c | 4 ++--
+ 2 files changed, 11 insertions(+), 18 deletions(-)
+
+--- a/arch/s390/include/asm/cpu_mf.h
++++ b/arch/s390/include/asm/cpu_mf.h
+@@ -203,7 +203,15 @@ static inline int ecctr(u64 ctr, u64 *va
+ }
+
+ /* Store CPU counter multiple for a particular counter set */
+-static inline int stcctm(u8 set, u64 range, u64 *dest)
++enum stcctm_ctr_set {
++ EXTENDED = 0,
++ BASIC = 1,
++ PROBLEM_STATE = 2,
++ CRYPTO_ACTIVITY = 3,
++ MT_DIAG = 5,
++ MT_DIAG_CLEARING = 9, /* clears loss-of-MT-ctr-data alert */
++};
++static inline int stcctm(enum stcctm_ctr_set set, u64 range, u64 *dest)
+ {
+ int cc;
+
+@@ -216,21 +224,6 @@ static inline int stcctm(u8 set, u64 ran
+ : "cc", "memory");
+ return cc;
+ }
+-
+-/* Store CPU counter multiple for the MT utilization counter set */
+-static inline int stcctm5(u64 num, u64 *val)
+-{
+- int cc;
+-
+- asm volatile (
+- " .insn rsy,0xeb0000000017,%2,5,%1\n"
+- " ipm %0\n"
+- " srl %0,28\n"
+- : "=d" (cc)
+- : "Q" (*val), "d" (num)
+- : "cc", "memory");
+- return cc;
+-}
+
+ /* Query sampling information */
+ static inline int qsi(struct hws_qsi_info_block *info)
+--- a/arch/s390/kernel/vtime.c
++++ b/arch/s390/kernel/vtime.c
+@@ -68,7 +68,7 @@ static void update_mt_scaling(void)
+ u64 delta, fac, mult, div;
+ int i;
+
+- stcctm5(smp_cpu_mtid + 1, cycles_new);
++ stcctm(MT_DIAG, smp_cpu_mtid + 1, cycles_new);
+ cycles_old = this_cpu_ptr(mt_cycles);
+ fac = 1;
+ mult = div = 0;
+@@ -435,6 +435,6 @@ void vtime_init(void)
+ __this_cpu_write(mt_scaling_jiffies, jiffies);
+ __this_cpu_write(mt_scaling_mult, 1);
+ __this_cpu_write(mt_scaling_div, 1);
+- stcctm5(smp_cpu_mtid + 1, this_cpu_ptr(mt_cycles));
++ stcctm(MT_DIAG, smp_cpu_mtid + 1, this_cpu_ptr(mt_cycles));
+ }
+ }
diff --git a/series.conf b/series.conf
index 51bf9a41dd..0d1c237338 100644
--- a/series.conf
+++ b/series.conf
@@ -45472,6 +45472,7 @@
patches.suse/s390-cpum_cf-introduce-kernel_cpumcf_alert-to-obtain-measurement-alerts
patches.suse/s390-cpum_cf-add-minimal-in-kernel-interface-for-counter-measurements
patches.suse/s390-cpu_mf-add-store-cpu-counter-multiple-instruction-support
+ patches.suse/s390-cpu_mf-replace-stcctm5-with-the-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