diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clocksource.h | 1 | ||||
| -rw-r--r-- | include/linux/hrtimer.h | 5 | ||||
| -rw-r--r-- | include/linux/jiffies.h | 1 | ||||
| -rw-r--r-- | include/linux/time.h | 3 | ||||
| -rw-r--r-- | include/linux/timekeeper_internal.h | 7 | 
5 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 27cfda427dd..aa7032c7238 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -206,6 +206,7 @@ struct clocksource {  #define CLOCK_SOURCE_WATCHDOG			0x10  #define CLOCK_SOURCE_VALID_FOR_HRES		0x20  #define CLOCK_SOURCE_UNSTABLE			0x40 +#define CLOCK_SOURCE_SUSPEND_NONSTOP		0x80  /* simplify initialization of mask field */  #define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index cc07d2777bb..d19a5c2d227 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -157,6 +157,7 @@ enum  hrtimer_base_type {  	HRTIMER_BASE_MONOTONIC,  	HRTIMER_BASE_REALTIME,  	HRTIMER_BASE_BOOTTIME, +	HRTIMER_BASE_TAI,  	HRTIMER_MAX_CLOCK_BASES,  }; @@ -327,7 +328,9 @@ extern ktime_t ktime_get(void);  extern ktime_t ktime_get_real(void);  extern ktime_t ktime_get_boottime(void);  extern ktime_t ktime_get_monotonic_offset(void); -extern ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot); +extern ktime_t ktime_get_clocktai(void); +extern ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot, +					 ktime_t *offs_tai);  DECLARE_PER_CPU(struct tick_device, tick_cpu_device); diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 82ed068b1eb..8fb8edf1241 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -75,7 +75,6 @@ extern int register_refined_jiffies(long clock_tick_rate);   */  extern u64 __jiffy_data jiffies_64;  extern unsigned long volatile __jiffy_data jiffies; -extern seqlock_t jiffies_lock;  #if (BITS_PER_LONG < 64)  u64 get_jiffies_64(void); diff --git a/include/linux/time.h b/include/linux/time.h index d4835dfdf25..22d81b3c955 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -181,6 +181,9 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran);  extern int timekeeping_valid_for_hres(void);  extern u64 timekeeping_max_deferment(void);  extern int timekeeping_inject_offset(struct timespec *ts); +extern s32 timekeeping_get_tai_offset(void); +extern void timekeeping_set_tai_offset(s32 tai_offset); +extern void timekeeping_clocktai(struct timespec *ts);  struct tms;  extern void do_sys_times(struct tms *); diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h index e1d558e237e..a151bd70e52 100644 --- a/include/linux/timekeeper_internal.h +++ b/include/linux/timekeeper_internal.h @@ -62,8 +62,11 @@ struct timekeeper {  	ktime_t			offs_boot;  	/* The raw monotonic time for the CLOCK_MONOTONIC_RAW posix clock. */  	struct timespec		raw_time; -	/* Seqlock for all timekeeper values */ -	seqlock_t		lock; +	/* The current UTC to TAI offset in seconds */ +	s32			tai_offset; +	/* Offset clock monotonic -> clock tai */ +	ktime_t			offs_tai; +  };  static inline struct timespec tk_xtime(struct timekeeper *tk)  |