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 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 timeval __user *, tv, in SYSCALL_DEFINE2() argument
206 if (tv) { in SYSCALL_DEFINE2()
207 if (copy_from_user(&user_tv, tv, sizeof(*tv))) in SYSCALL_DEFINE2()
221 return do_sys_settimeofday64(tv ? &new_ts : NULL, tz ? &new_tz : NULL); in SYSCALL_DEFINE2()
225 COMPAT_SYSCALL_DEFINE2(gettimeofday, struct old_timeval32 __user *, tv, in COMPAT_SYSCALL_DEFINE2() argument
228 if (tv) { in COMPAT_SYSCALL_DEFINE2()
232 if (put_user(ts.tv_sec, &tv->tv_sec) || in COMPAT_SYSCALL_DEFINE2()
233 put_user(ts.tv_nsec / 1000, &tv->tv_usec)) in COMPAT_SYSCALL_DEFINE2()
244 COMPAT_SYSCALL_DEFINE2(settimeofday, struct old_timeval32 __user *, tv, in COMPAT_SYSCALL_DEFINE2() argument
251 if (tv) { in COMPAT_SYSCALL_DEFINE2()
252 if (compat_get_timeval(&user_tv, tv)) in COMPAT_SYSCALL_DEFINE2()
266 return do_sys_settimeofday64(tv ? &new_ts : NULL, tz ? &new_tz : NULL); in COMPAT_SYSCALL_DEFINE2()
488 struct timeval tv; in ns_to_timeval() local
490 tv.tv_sec = ts.tv_sec; in ns_to_timeval()
491 tv.tv_usec = (suseconds_t) ts.tv_nsec / 1000; in ns_to_timeval()
493 return tv; in ns_to_timeval()
500 struct __kernel_old_timeval tv; in ns_to_kernel_old_timeval() local
502 tv.tv_sec = ts.tv_sec; in ns_to_kernel_old_timeval()
503 tv.tv_usec = (suseconds_t)ts.tv_nsec / 1000; in ns_to_kernel_old_timeval()
505 return tv; in ns_to_kernel_old_timeval()