[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2qD3LFic8L_3-KCnuVL6J8M_SLFsdj0c-n258MsUPKuQ@mail.gmail.com>
Date: Sun, 25 Jul 2021 17:26:46 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Greg Ungerer <gerg@...inux.org>, Will Deacon <will@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Boqun Feng <boqun.feng@...il.com>,
Brendan Jackman <jackmanb@...gle.com>,
kernel test robot <lkp@...el.com>,
Arnd Bergmann <arnd@...db.de>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-m68k <linux-m68k@...ts.linux-m68k.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] m68k: Fix asm register constraints for atomic ops
On Sun, Jul 25, 2021 at 12:46 PM Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
>
> Depending on register assignment by the compiler:
>
> {standard input}:3084: Error: operands mismatch -- statement `andl %a1,%d1' ignored
> {standard input}:3145: Error: operands mismatch -- statement `orl %a1,%d1' ignored
> {standard input}:3195: Error: operands mismatch -- statement `eorl %a1,%d1' ignored
>
> Indeed, the first operand must not be an address register. Fix this by
> adjusting the register constraint from "g" (general purpose register) to
> "d" (data register).
>
> Fixes: e39d88ea3ce4a471 ("locking/atomic, arch/m68k: Implement atomic_fetch_{add,sub,and,or,xor}()")
> Fixes: d839bae4269aea46 ("locking,arch,m68k: Fold atomic_ops")
> Reported-by: kernel test robot <lkp@...el.com>
> Reported-by: Arnd Bergmann <arnd@...db.de>
> Reported-by: Alexander Viro <viro@...iv.linux.org.uk>
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
> Personally, I have never seen this failure in an 68020+ build, but I can
> reproduce it on Coldfire with the config provided by lkp (with bogus
> CONFIG_RMW_INSNS=y).
This fixed the problem for me in the 68020 build with all compiler versions.
Tested-by: Arnd Bergmann <arnd@...db.de>
Powered by blists - more mailing lists