diff options
| -rw-r--r-- | include/linux/pps_kernel.h | 7 | ||||
| -rw-r--r-- | include/linux/timekeeping.h | 4 | ||||
| -rw-r--r-- | kernel/time/timekeeping.c | 12 | 
3 files changed, 14 insertions, 9 deletions
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h index 1d2cd21242e8..b2fbd62ab18d 100644 --- a/include/linux/pps_kernel.h +++ b/include/linux/pps_kernel.h @@ -115,7 +115,12 @@ static inline void timespec_to_pps_ktime(struct pps_ktime *kt,  static inline void pps_get_ts(struct pps_event_time *ts)  { -	getnstime_raw_and_real(&ts->ts_raw, &ts->ts_real); +	struct timespec64 raw, real; + +	ktime_get_raw_and_real_ts64(&raw, &real); + +	ts->ts_raw = timespec64_to_timespec(raw); +	ts->ts_real = timespec64_to_timespec(real);  }  #else /* CONFIG_NTP_PPS */ diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index ba0ae09cbb21..ec89d846324c 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -263,8 +263,8 @@ extern void timekeeping_inject_sleeptime64(struct timespec64 *delta);  /*   * PPS accessor   */ -extern void getnstime_raw_and_real(struct timespec *ts_raw, -				   struct timespec *ts_real); +extern void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw, +				        struct timespec64 *ts_real);  /*   * Persistent clock related interfaces diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 177188b11a2e..274ed5e88456 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -849,7 +849,7 @@ EXPORT_SYMBOL_GPL(ktime_get_real_seconds);  #ifdef CONFIG_NTP_PPS  /** - * getnstime_raw_and_real - get day and raw monotonic time in timespec format + * ktime_get_raw_and_real_ts64 - get day and raw monotonic time in timespec format   * @ts_raw:	pointer to the timespec to be set to raw monotonic time   * @ts_real:	pointer to the timespec to be set to the time of day   * @@ -857,7 +857,7 @@ EXPORT_SYMBOL_GPL(ktime_get_real_seconds);   * same time atomically and stores the resulting timestamps in timespec   * format.   */ -void getnstime_raw_and_real(struct timespec *ts_raw, struct timespec *ts_real) +void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw, struct timespec64 *ts_real)  {  	struct timekeeper *tk = &tk_core.timekeeper;  	unsigned long seq; @@ -868,7 +868,7 @@ void getnstime_raw_and_real(struct timespec *ts_raw, struct timespec *ts_real)  	do {  		seq = read_seqcount_begin(&tk_core.seq); -		*ts_raw = timespec64_to_timespec(tk->raw_time); +		*ts_raw = tk->raw_time;  		ts_real->tv_sec = tk->xtime_sec;  		ts_real->tv_nsec = 0; @@ -877,10 +877,10 @@ void getnstime_raw_and_real(struct timespec *ts_raw, struct timespec *ts_real)  	} while (read_seqcount_retry(&tk_core.seq, seq)); -	timespec_add_ns(ts_raw, nsecs_raw); -	timespec_add_ns(ts_real, nsecs_real); +	timespec64_add_ns(ts_raw, nsecs_raw); +	timespec64_add_ns(ts_real, nsecs_real);  } -EXPORT_SYMBOL(getnstime_raw_and_real); +EXPORT_SYMBOL(ktime_get_raw_and_real_ts64);  #endif /* CONFIG_NTP_PPS */  | 
