Blame view

kernel/time/timekeeping_internal.h 663 Bytes
5c83545f2   Colin Cross   power: Add option...
1
2
3
4
5
  #ifndef _TIMEKEEPING_INTERNAL_H
  #define _TIMEKEEPING_INTERNAL_H
  /*
   * timekeeping debug functions
   */
3a9783778   Thomas Gleixner   clocksource: Make...
6
  #include <linux/clocksource.h>
5c83545f2   Colin Cross   power: Add option...
7
8
9
  #include <linux/time.h>
  
  #ifdef CONFIG_DEBUG_FS
7d489d15c   John Stultz   timekeeping: Conv...
10
  extern void tk_debug_account_sleep_time(struct timespec64 *t);
5c83545f2   Colin Cross   power: Add option...
11
12
13
  #else
  #define tk_debug_account_sleep_time(x)
  #endif
09ec54429   Thomas Gleixner   clocksource: Move...
14
15
16
17
18
19
20
21
  #ifdef CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE
  static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
  {
  	cycle_t ret = (now - last) & mask;
  
  	return (s64) ret > 0 ? ret : 0;
  }
  #else
3a9783778   Thomas Gleixner   clocksource: Make...
22
23
24
25
  static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
  {
  	return (now - last) & mask;
  }
09ec54429   Thomas Gleixner   clocksource: Move...
26
  #endif
3a9783778   Thomas Gleixner   clocksource: Make...
27

5c83545f2   Colin Cross   power: Add option...
28
  #endif /* _TIMEKEEPING_INTERNAL_H */