diff options
Diffstat (limited to 'arch/s390/include/asm/timex.h')
-rw-r--r-- | arch/s390/include/asm/timex.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index 8beee1cceba4..98eb2a579223 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h | |||
@@ -67,20 +67,22 @@ static inline void local_tick_enable(unsigned long long comp) | |||
67 | set_clock_comparator(S390_lowcore.clock_comparator); | 67 | set_clock_comparator(S390_lowcore.clock_comparator); |
68 | } | 68 | } |
69 | 69 | ||
70 | #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | 70 | #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ |
71 | #define STORE_CLOCK_EXT_SIZE 16 /* stcke writes 16 bytes */ | ||
71 | 72 | ||
72 | typedef unsigned long long cycles_t; | 73 | typedef unsigned long long cycles_t; |
73 | 74 | ||
74 | static inline void get_tod_clock_ext(char clk[16]) | 75 | static inline void get_tod_clock_ext(char *clk) |
75 | { | 76 | { |
76 | typedef struct { char _[sizeof(clk)]; } addrtype; | 77 | typedef struct { char _[STORE_CLOCK_EXT_SIZE]; } addrtype; |
77 | 78 | ||
78 | asm volatile("stcke %0" : "=Q" (*(addrtype *) clk) : : "cc"); | 79 | asm volatile("stcke %0" : "=Q" (*(addrtype *) clk) : : "cc"); |
79 | } | 80 | } |
80 | 81 | ||
81 | static inline unsigned long long get_tod_clock(void) | 82 | static inline unsigned long long get_tod_clock(void) |
82 | { | 83 | { |
83 | unsigned char clk[16]; | 84 | unsigned char clk[STORE_CLOCK_EXT_SIZE]; |
85 | |||
84 | get_tod_clock_ext(clk); | 86 | get_tod_clock_ext(clk); |
85 | return *((unsigned long long *)&clk[1]); | 87 | return *((unsigned long long *)&clk[1]); |
86 | } | 88 | } |