Re: [PATCH 3/4] MIPS: Reinstate platform `__div64_32' handler

From: Maciej W. Rozycki
Date: Thu Apr 22 2021 - 16:43:48 EST


On Thu, 22 Apr 2021, Guenter Roeck wrote:

> This patch results in:
>
> arch/mips/mti-malta/malta-time.c: In function 'plat_time_init':
> ./arch/mips/include/asm/div64.h:76:3: error: inconsistent operand constraints in an 'asm'
>
> and similar errors when trying to compile malta_qemu_32r6_defconfig.

Thanks for the heads-up, however the 0-DAY bot has caught this issue
already last night and I would have addressed it earlier on if not for a
failure of my Malta board :( which disrupted my verification.

> I tried with gcc 8.3.0, 8.4.0, 9.3.0, and 10.3.0.
>
> Does this need some additional new compile flags ?

MIPSr6 doesn't have the original division instruction along with the MD
accumulator registers anymore, and consequently GCC cannot fit the
constraint requested.

We don't need that asm however. Maybe we didn't with GCC 2.95 either,
but I suspect there was something to it. Anyway I have just posted a fix.

Maciej