diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-11-07 17:27:39 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-11-15 16:38:30 +0300 |
commit | bd40a175769d411b2a37e1c087082ac7ee2c15bb (patch) | |
tree | 10ef420857e4df8bf36863bb3b399f8005b5531a /include/trace | |
parent | ddbc7d0657e9fd38b69f16bd0310703367b52d29 (diff) | |
download | linux-bd40a175769d411b2a37e1c087082ac7ee2c15bb.tar.xz |
y2038: itimer: change implementation to timespec64
There is no 64-bit version of getitimer/setitimer since that is not
actually needed. However, the implementation is built around the
deprecated 'struct timeval' type.
Change the code to use timespec64 internally to reduce the dependencies
on timeval and associated helper functions.
Minor adjustments in the code are needed to make the native and compat
version work the same way, and to keep the range check working after
the conversion.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/timer.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index b7a904825e7d..5998789ed91f 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h @@ -303,7 +303,7 @@ DEFINE_EVENT(hrtimer_class, hrtimer_cancel, */ TRACE_EVENT(itimer_state, - TP_PROTO(int which, const struct itimerval *const value, + TP_PROTO(int which, const struct itimerspec64 *const value, unsigned long long expires), TP_ARGS(which, value, expires), @@ -312,24 +312,24 @@ TRACE_EVENT(itimer_state, __field( int, which ) __field( unsigned long long, expires ) __field( long, value_sec ) - __field( long, value_usec ) + __field( long, value_nsec ) __field( long, interval_sec ) - __field( long, interval_usec ) + __field( long, interval_nsec ) ), TP_fast_assign( __entry->which = which; __entry->expires = expires; __entry->value_sec = value->it_value.tv_sec; - __entry->value_usec = value->it_value.tv_usec; + __entry->value_nsec = value->it_value.tv_nsec; __entry->interval_sec = value->it_interval.tv_sec; - __entry->interval_usec = value->it_interval.tv_usec; + __entry->interval_nsec = value->it_interval.tv_nsec; ), - TP_printk("which=%d expires=%llu it_value=%ld.%ld it_interval=%ld.%ld", + TP_printk("which=%d expires=%llu it_value=%ld.%06ld it_interval=%ld.%06ld", __entry->which, __entry->expires, - __entry->value_sec, __entry->value_usec, - __entry->interval_sec, __entry->interval_usec) + __entry->value_sec, __entry->value_nsec / NSEC_PER_USEC, + __entry->interval_sec, __entry->interval_nsec / NSEC_PER_USEC) ); /** |