Lines Matching refs:tv
83 struct timespec64 tv; in SYSCALL_DEFINE1() local
86 if (get_user(tv.tv_sec, tptr)) in SYSCALL_DEFINE1()
89 tv.tv_nsec = 0; in SYSCALL_DEFINE1()
91 err = security_settime64(&tv, NULL); in SYSCALL_DEFINE1()
95 do_settimeofday64(&tv); in SYSCALL_DEFINE1()
121 struct timespec64 tv; in SYSCALL_DEFINE1() local
124 if (get_user(tv.tv_sec, tptr)) in SYSCALL_DEFINE1()
127 tv.tv_nsec = 0; in SYSCALL_DEFINE1()
129 err = security_settime64(&tv, NULL); in SYSCALL_DEFINE1()
133 do_settimeofday64(&tv); in SYSCALL_DEFINE1()
140 SYSCALL_DEFINE2(gettimeofday, struct __kernel_old_timeval __user *, tv, in SYSCALL_DEFINE2() argument
143 if (likely(tv != NULL)) { in SYSCALL_DEFINE2()
147 if (put_user(ts.tv_sec, &tv->tv_sec) || in SYSCALL_DEFINE2()
148 put_user(ts.tv_nsec / 1000, &tv->tv_usec)) in SYSCALL_DEFINE2()
169 int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz) in do_sys_settimeofday64() argument
174 if (tv && !timespec64_valid_settod(tv)) in do_sys_settimeofday64()
177 error = security_settime64(tv, tz); in do_sys_settimeofday64()
190 if (!tv) in do_sys_settimeofday64()
194 if (tv) in do_sys_settimeofday64()
195 return do_settimeofday64(tv); in do_sys_settimeofday64()
199 SYSCALL_DEFINE2(settimeofday, struct __kernel_old_timeval __user *, tv, in SYSCALL_DEFINE2() argument
205 if (tv) { in SYSCALL_DEFINE2()
206 if (get_user(new_ts.tv_sec, &tv->tv_sec) || in SYSCALL_DEFINE2()
207 get_user(new_ts.tv_nsec, &tv->tv_usec)) in SYSCALL_DEFINE2()
220 return do_sys_settimeofday64(tv ? &new_ts : NULL, tz ? &new_tz : NULL); in SYSCALL_DEFINE2()
224 COMPAT_SYSCALL_DEFINE2(gettimeofday, struct old_timeval32 __user *, tv, in COMPAT_SYSCALL_DEFINE2() argument
227 if (tv) { in COMPAT_SYSCALL_DEFINE2()
231 if (put_user(ts.tv_sec, &tv->tv_sec) || in COMPAT_SYSCALL_DEFINE2()
232 put_user(ts.tv_nsec / 1000, &tv->tv_usec)) in COMPAT_SYSCALL_DEFINE2()
243 COMPAT_SYSCALL_DEFINE2(settimeofday, struct old_timeval32 __user *, tv, in COMPAT_SYSCALL_DEFINE2() argument
249 if (tv) { in COMPAT_SYSCALL_DEFINE2()
250 if (get_user(new_ts.tv_sec, &tv->tv_sec) || in COMPAT_SYSCALL_DEFINE2()
251 get_user(new_ts.tv_nsec, &tv->tv_usec)) in COMPAT_SYSCALL_DEFINE2()
264 return do_sys_settimeofday64(tv ? &new_ts : NULL, tz ? &new_tz : NULL); in COMPAT_SYSCALL_DEFINE2()
455 struct __kernel_old_timeval tv; in ns_to_kernel_old_timeval() local
457 tv.tv_sec = ts.tv_sec; in ns_to_kernel_old_timeval()
458 tv.tv_usec = (suseconds_t)ts.tv_nsec / 1000; in ns_to_kernel_old_timeval()
460 return tv; in ns_to_kernel_old_timeval()