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
commitf423c06cd624ff2075892eb04303571ac16ddd3b (patch)
treec4280ee322284f64295b47165f556d9d5b8881ed
parent0e7455b4e8f1d933b3f15e86798f7e607017b52c (diff)
s390/cpu_mf: replace stcctm5() with the stcctm() function
-rw-r--r--arch/s390/include/asm/cpu_mf.h25
-rw-r--r--arch/s390/kernel/vtime.c4
2 files changed, 11 insertions, 18 deletions
diff --git a/arch/s390/include/asm/cpu_mf.h b/arch/s390/include/asm/cpu_mf.h
index 81669852a5ce..9dd2e74c0207 100644
--- 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 *val)
}
/* 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;
@@ -217,21 +225,6 @@ static inline int stcctm(u8 set, u64 range, u64 *dest)
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)
{
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index a6f23238c3b0..8bcc7f3b2196 100644
--- 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;
@@ -440,6 +440,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));
}
}