aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/timex.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-02-01 21:53:08 +0100
committerVasily Gorbik <gor@linux.ibm.com>2021-02-09 15:57:05 +0100
commitb22446d00af972ef624958a09dcbe85974b701fd (patch)
treec69c1d78554e2afc05957d9485a7ef714f223e73 /arch/s390/include/asm/timex.h
parents390/cpum_cf_diag: use get_tod_clock_fast() (diff)
downloadlinux-dev-b22446d00af972ef624958a09dcbe85974b701fd.tar.xz
linux-dev-b22446d00af972ef624958a09dcbe85974b701fd.zip
s390/time: use stcke instead of stck
Use STORE CLOCK EXTENDED instead of STORE CLOCK in early tod clock setup. This is just to remove another usage of stck, trying to remove all usages of STORE CLOCK. This doesn't fix anything. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/timex.h')
-rw-r--r--arch/s390/include/asm/timex.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h
index c8e244ecdfde..63bf3bd6e83f 100644
--- a/arch/s390/include/asm/timex.h
+++ b/arch/s390/include/asm/timex.h
@@ -17,6 +17,8 @@
/* The value of the TOD clock for 1.1.1970. */
#define TOD_UNIX_EPOCH 0x7d91048bca000000ULL
+#define STORE_CLOCK_EXT_SIZE 16 /* stcke writes 16 bytes */
+
extern u64 clock_comparator_max;
/* Inline functions for clock register access. */
@@ -32,15 +34,16 @@ static inline int set_tod_clock(__u64 time)
return cc;
}
-static inline int store_tod_clock(__u64 *time)
+static inline int store_tod_clock_ext(char *time)
{
+ typedef struct { char _[STORE_CLOCK_EXT_SIZE]; } addrtype;
int cc;
asm volatile(
- " stck %1\n"
+ " stcke %1\n"
" ipm %0\n"
" srl %0,28\n"
- : "=d" (cc), "=Q" (*time) : : "cc");
+ : "=d" (cc), "=Q" (*(addrtype *)time) : : "cc");
return cc;
}
@@ -144,7 +147,6 @@ static inline void local_tick_enable(unsigned long long comp)
}
#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
-#define STORE_CLOCK_EXT_SIZE 16 /* stcke writes 16 bytes */
typedef unsigned long long cycles_t;