Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-22 Thread Arnd Bergmann
On Mon, Jul 22, 2019 at 12:39 PM Jan Beulich wrote: > On 22.07.2019 12:10, Thomas Gleixner wrote: > > On Thu, 11 Jul 2019, Arnd Bergmann wrote: > "q" was used in that commit exclusively for byte sized operands, simply > because that _is_ the constraint to use in such cases. Using "r" is > wrong on

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-22 Thread Jan Beulich
On 22.07.2019 12:10, Thomas Gleixner wrote: > On Thu, 11 Jul 2019, Arnd Bergmann wrote: > > Trimmed CC list and added Jan > >> See below for the patch I am using locally to work around this. >> That patch is probably wrong, so I have not submitted it yet, but it >> gives you a clean build ;-) >>

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-22 Thread Thomas Gleixner
On Thu, 11 Jul 2019, Arnd Bergmann wrote: Trimmed CC list and added Jan > See below for the patch I am using locally to work around this. > That patch is probably wrong, so I have not submitted it yet, but it > gives you a clean build ;-) > > Arnd > 8<--- > Subject: [PATCH] x86: percpu: fix

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-11 Thread Arnd Bergmann
On Thu, Jul 11, 2019 at 7:14 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Thu, Jul 11, 2019 at 5:28 AM Arnd Bergmann wrote: > > clang does not like an inline assembly with a "=q" contraint for > > a 64-bit output: > > Seems like starting in GCC 7, GCC may not like it either: > https:

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-11 Thread Nick Desaulniers
On Thu, Jul 11, 2019 at 5:28 AM Arnd Bergmann wrote: > clang does not like an inline assembly with a "=q" contraint for > a 64-bit output: Seems like starting in GCC 7, GCC may not like it either: https://godbolt.org/z/UyBUfh it simply warns then proceeds with code gen. Another difference may co

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-11 Thread Vincenzo Frascino
Hi Arnd, On 11/07/2019 13:28, Arnd Bergmann wrote: > On Thu, Jul 11, 2019 at 2:14 PM Vincenzo Frascino > wrote: >> >> >> Could you please tell me which version of the compiler did you use? >> >> My building command is: >> >> # make mrproper && make CC=clang HOSTCC=clang i386_defconfig && make >>

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-11 Thread Arnd Bergmann
On Thu, Jul 11, 2019 at 2:14 PM Vincenzo Frascino wrote: > > > Could you please tell me which version of the compiler did you use? > > My building command is: > > # make mrproper && make CC=clang HOSTCC=clang i386_defconfig && make ARCH=i386 > CC=clang HOSTCC=clang -j56 > See below for the patch

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-11 Thread Vincenzo Frascino
Hi Arnd, On 10/07/2019 14:01, Arnd Bergmann wrote: > On 32-bit x86 when building with clang-9, the 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

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-10 Thread Nathan Chancellor
On Wed, Jul 10, 2019 at 03:01:53PM +0200, Arnd Bergmann wrote: > On 32-bit x86 when building with clang-9, the 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

[PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-10 Thread Arnd Bergmann
On 32-bit x86 when building with clang-9, the 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 provided __iter_div_u64_rem() function that is mean