aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/timex.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/timex.h')
-rw-r--r--arch/s390/include/asm/timex.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h
index c447a27a7fdb..72eaa8511a4f 100644
--- a/arch/s390/include/asm/timex.h
+++ b/arch/s390/include/asm/timex.h
@@ -73,11 +73,15 @@ static inline void local_tick_enable(unsigned long long comp)
73 73
74typedef unsigned long long cycles_t; 74typedef unsigned long long cycles_t;
75 75
76static inline unsigned long long get_clock (void) 76static inline unsigned long long get_clock(void)
77{ 77{
78 unsigned long long clk; 78 unsigned long long clk;
79 79
80#if defined(CONFIG_64BIT) && !defined(CONFIG_MARCH_Z900) && !defined(CONFIG_MARCH_Z990)
81 asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc");
82#else
80 asm volatile("stck %0" : "=Q" (clk) : : "cc"); 83 asm volatile("stck %0" : "=Q" (clk) : : "cc");
84#endif
81 return clk; 85 return clk;
82} 86}
83 87
@@ -86,17 +90,6 @@ static inline void get_clock_ext(char *clk)
86 asm volatile("stcke %0" : "=Q" (*clk) : : "cc"); 90 asm volatile("stcke %0" : "=Q" (*clk) : : "cc");
87} 91}
88 92
89static inline unsigned long long get_clock_fast(void)
90{
91 unsigned long long clk;
92
93 if (MACHINE_HAS_STCKF)
94 asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc");
95 else
96 clk = get_clock();
97 return clk;
98}
99
100static inline unsigned long long get_clock_xt(void) 93static inline unsigned long long get_clock_xt(void)
101{ 94{
102 unsigned char clk[16]; 95 unsigned char clk[16];