|
@@ -71,30 +71,30 @@ static inline void local_tick_enable(unsigned long long comp)
|
|
|
|
|
|
typedef unsigned long long cycles_t;
|
|
typedef unsigned long long cycles_t;
|
|
|
|
|
|
-static inline unsigned long long get_tod_clock(void)
|
|
|
|
-{
|
|
|
|
- unsigned long long clk;
|
|
|
|
-
|
|
|
|
-#ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES
|
|
|
|
- asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc");
|
|
|
|
-#else
|
|
|
|
- asm volatile("stck %0" : "=Q" (clk) : : "cc");
|
|
|
|
-#endif
|
|
|
|
- return clk;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static inline void get_tod_clock_ext(char *clk)
|
|
static inline void get_tod_clock_ext(char *clk)
|
|
{
|
|
{
|
|
asm volatile("stcke %0" : "=Q" (*clk) : : "cc");
|
|
asm volatile("stcke %0" : "=Q" (*clk) : : "cc");
|
|
}
|
|
}
|
|
|
|
|
|
-static inline unsigned long long get_tod_clock_xt(void)
|
|
|
|
|
|
+static inline unsigned long long get_tod_clock(void)
|
|
{
|
|
{
|
|
unsigned char clk[16];
|
|
unsigned char clk[16];
|
|
get_tod_clock_ext(clk);
|
|
get_tod_clock_ext(clk);
|
|
return *((unsigned long long *)&clk[1]);
|
|
return *((unsigned long long *)&clk[1]);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline unsigned long long get_tod_clock_fast(void)
|
|
|
|
+{
|
|
|
|
+#ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES
|
|
|
|
+ unsigned long long clk;
|
|
|
|
+
|
|
|
|
+ asm volatile("stckf %0" : "=Q" (clk) : : "cc");
|
|
|
|
+ return clk;
|
|
|
|
+#else
|
|
|
|
+ return get_tod_clock();
|
|
|
|
+#endif
|
|
|
|
+}
|
|
|
|
+
|
|
static inline cycles_t get_cycles(void)
|
|
static inline cycles_t get_cycles(void)
|
|
{
|
|
{
|
|
return (cycles_t) get_tod_clock() >> 2;
|
|
return (cycles_t) get_tod_clock() >> 2;
|
|
@@ -125,7 +125,7 @@ extern u64 sched_clock_base_cc;
|
|
*/
|
|
*/
|
|
static inline unsigned long long get_tod_clock_monotonic(void)
|
|
static inline unsigned long long get_tod_clock_monotonic(void)
|
|
{
|
|
{
|
|
- return get_tod_clock_xt() - sched_clock_base_cc;
|
|
|
|
|
|
+ return get_tod_clock() - sched_clock_base_cc;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|