9 #ifndef _ASM_S390_TIMEX_H
10 #define _ASM_S390_TIMEX_H
15 #define TOD_UNIX_EPOCH 0x7d91048bca000000ULL
26 :
"=d" (
cc) :
"Q" (time) :
"cc");
30 static inline int store_clock(
__u64 *
time)
38 :
"=d" (
cc),
"=Q" (*time) : :
"cc");
42 static inline void set_clock_comparator(
__u64 time)
44 asm volatile(
"sckc %0" : :
"Q" (
time));
47 static inline void store_clock_comparator(
__u64 *time)
49 asm volatile(
"stckc %0" :
"=Q" (*time));
54 static inline unsigned long long local_tick_disable(
void)
56 unsigned long long old;
64 static inline void local_tick_enable(
unsigned long long comp)
70 #define CLOCK_TICK_RATE 1193180
74 static inline unsigned long long get_clock(
void)
76 unsigned long long clk;
78 #ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES
79 asm volatile(
".insn s,0xb27c0000,%0" :
"=Q" (clk) : :
"cc");
81 asm volatile(
"stck %0" :
"=Q" (clk) : :
"cc");
86 static inline void get_clock_ext(
char *
clk)
88 asm volatile(
"stcke %0" :
"=Q" (*clk) : :
"cc");
91 static inline unsigned long long get_clock_xt(
void)
93 unsigned char clk[16];
95 return *((
unsigned long long *)&clk[1]);
110 void stck_to_timespec(
unsigned long long stck,
struct timespec *
ts)
126 static inline unsigned long long get_clock_monotonic(
void)