timekeeping/vsyscall: Use __iter_div_u64_rem()
authorArnd Bergmann <arnd@arndb.de>
Wed, 10 Jul 2019 13:01:53 +0000 (15:01 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 10 Jul 2019 18:37:49 +0000 (20:37 +0200)
commit0df1c9868c3a1916198ee09c323ca5932a0b8a11
tree18a8b26434edf1c7766d971bbcdbc3c516c2205d
parent9bdd7bb3a8447fe841cd37ddd9e0a6974b06a0bb
timekeeping/vsyscall: Use __iter_div_u64_rem()

On 32-bit x86 when building with clang-9, the 'division' loop gets turned
back into an inefficient division that causes a link error:

kernel/time/vsyscall.o: In function `update_vsyscall':
vsyscall.c:(.text+0xe3): undefined reference to `__udivdi3'

Use the existing __iter_div_u64_rem() function which is used to address the
same issue in other places.

Fixes: 44f57d788e7d ("timekeeping: Provide a generic update_vsyscall() implementation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://lkml.kernel.org/r/20190710130206.1670830-1-arnd@arndb.de
kernel/time/vsyscall.c