On Wed, 12 May 2021, Greg Kroah-Hartman wrote: > > > > > > mips clang build breaks on stable rc 5.4 .. 5.12 due to below warnings / errors > > > > > > - mips (defconfig) with clang-12 > > > > > > - mips (tinyconfig) with clang-12 > > > > > > - mips (allnoconfig) with clang-12 > > > > > > > > > > > > make --silent --keep-going --jobs=8 > > > > > > O=/home/tuxbuild/.cache/tuxmake/builds/current ARCH=mips > > > > > > CROSS_COMPILE=mips-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache > > > > > > clang' > > > > > > kernel/time/hrtimer.c:318:2: error: couldn't allocate output register > > > > > > for constraint 'x' > > > > > > do_div(tmp, (u32) div); > > > > > > ^ > > > > > > include/asm-generic/div64.h:243:11: note: expanded from macro 'do_div' > > > > > > __rem = __div64_32(&(n), __base); \ > > > > > > ^ > > > > > > arch/mips/include/asm/div64.h:74:11: note: expanded from macro '__div64_32' > > > > > > __asm__("divu $0, %z1, %z2" \ > > > > > > ^ > > > > > > 1 error generated. > > > > > > > > > > Does this also show up in Linus's tree? The same MIPS patch is there as > > > > > well from what I can tell. > > > > > > > > No. > > > > Linus's tree builds MIPS clang successfully. > > > > > > Ick, ok, I'll go drop this and let a MIPS developer send us the correct > > > thing. > > > > > > thanks! > > > > > > greg k-h > > > > > > > I think you just need to grab commits c1d337d45ec0 ("MIPS: Avoid DIVU in > > `__div64_32' is result would be zero") and 25ab14cbe9d1 ("MIPS: Avoid > > handcoded DIVU in `__div64_32' altogether") to fix this up. > > It was easier for me to drop it, let's see if any MIPS developers (are > there any anymore?) care enough to send the proper series. Thomas, I told you it would work better if the original fix was replaced ahead of a pull request to Linus rather than updated with the follow-ups. Will you be able to fix up the mess in this case? I can offer no more than just the commits quoted above, there's no better fix. Maciej