On Thu, Oct 19, 2017 at 4:14 AM, Arnd Bergmann arnd@arndb.de wrote:
This may be a somewhat controversial change, changing 64-bit architectures to use the same 'struct timespec64' definition that 32-bit architectures have, and removing a micro-optimization that tries to minimize the difference between timespec and timespec64.
Starting with gcc-5, the compiler can completely optimize away the timespec_to_timespec64 and timespec64_to_timespec functions on 64-bit architectures. With older compilers, we introduce a couple of extra copies of local variables, but those are easily avoided by using the timespec64 based interfaces consistently, as we do in most of the important code paths already.
The main upside of removing the hack is that printing the tv_sec field of a timespec64 structure can now use the %lld format string on all architectures without a cast to time64_t. Without this patch, the field is a 'long' type and would have to be printed using %ld on 64-bit architectures.
Signed-off-by: Arnd Bergmann arnd@arndb.de
This one doesn't seem to build for me... In the meantime, I'm going to go ahead testing with patches 1-6.
jstultz@buildbox:~/projects/linux/time$ make -j24 bzImage > /dev/null fs/select.c: In function ‘compat_core_sys_select’: fs/select.c:1244:27: error: passing argument 3 of ‘do_select’ from incompatible pointer type [-Werror=incompatible-pointer-types] ret = do_select(n, &fds, end_time); ^ fs/select.c:451:12: note: expected ‘struct timespec64 *’ but argument is of type ‘struct timespec *’ static int do_select(int n, fd_set_bits *fds, struct timespec64 *end_time) ^ fs/select.c: In function ‘C_SYSC_select’: fs/select.c:1279:31: error: passing argument 1 of ‘poll_select_set_timeout’ from incompatible pointer type [-Werror=incompatible-pointer-types] if (poll_select_set_timeout(to, ^ fs/select.c:273:5: note: expected ‘struct timespec64 *’ but argument is of type ‘struct timespec *’ int poll_select_set_timeout(struct timespec64 *to, time64_t sec, long nsec) ^ fs/select.c: In function ‘do_compat_pselect’: fs/select.c:1325:31: error: passing argument 1 of ‘poll_select_set_timeout’ from incompatible pointer type [-Werror=incompatible-pointer-types] if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec)) ^ fs/select.c:273:5: note: expected ‘struct timespec64 *’ but argument is of type ‘struct timespec *’ int poll_select_set_timeout(struct timespec64 *to, time64_t sec, long nsec) ^ fs/select.c: In function ‘C_SYSC_ppoll’: fs/select.c:1394:31: error: passing argument 1 of ‘poll_select_set_timeout’ from incompatible pointer type [-Werror=incompatible-pointer-types] if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec)) ^ fs/select.c:273:5: note: expected ‘struct timespec64 *’ but argument is of type ‘struct timespec *’ int poll_select_set_timeout(struct timespec64 *to, time64_t sec, long nsec) ^ fs/select.c:1409:32: error: passing argument 3 of ‘do_sys_poll’ from incompatible pointer type [-Werror=incompatible-pointer-types] ret = do_sys_poll(ufds, nfds, to); ^ fs/select.c:928:12: note: expected ‘struct timespec64 *’ but argument is of type ‘struct timespec *’ static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, ^ cc1: some warnings being treated as errors
thanks -john