From: Arnd Bergmann <arnd@arndb.de>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
arcml <linux-snps-arc@lists.infradead.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Peter Zijlstra <peterz@infradead.org>,
Michal Marek <mmarek@suse.cz>
Subject: Re: Build regressions/improvements in v4.9-rc1
Date: Mon, 17 Oct 2016 23:02:02 +0200 [thread overview]
Message-ID: <5541266.ySlPfDOezF@wuerfel> (raw)
In-Reply-To: <00b16c44-79b8-43b8-6516-13c8bb92eb03@synopsys.com>
On Monday, October 17, 2016 9:59:24 AM CEST Vineet Gupta wrote:
> +CC Arnd, Michal
>
> Hi Geert, Arnd
>
> Need some guidance here.
>
> On 10/17/2016 12:34 AM, Geert Uytterhoeven wrote:
> >> 48 error regressions:
> >> > + /home/kisskb/slave/src/arch/arc/include/asm/atomic.h: Error: bad instruction `llockd r2,[r0]': => 476
> >> > + /home/kisskb/slave/src/arch/arc/include/asm/atomic.h: Error: bad instruction `llockd r2,[r13]': => 475
>
> [snip...]
>
> >> > + /home/kisskb/slave/src/arch/arc/include/asm/atomic.h: Error: bad instruction `scondd r4,[r8]': => 516
> >> > + /home/kisskb/slave/src/arch/arc/include/asm/atomic.h: Error: bad instruction `scondd r6,[r3]': => 478
> > arcv2/axs103_smp_defconfig
>
>
> I'm thinking how to address this correctly.
>
> This is due to the older version of compiler. The fix itself is trivial - add an
> "call as-instr" construct in Makefile to get -DARC_TOOLS_SUPPORT_LLOCKD
>
> However the atomic64 API variant (CONFIG_GENERIC_ATOMIC64 or arch native) which
> gets included in build comes from Kconfig (ISA supports them or not). How do we
> tie the Makefile info into the Kconfig.
>
> We could trigger a build failure for invalid combinations of GENERIC_ATOMIC64 and
> ARC_TOOLS_SUPPORT_LLOCKD but that would be less than ideal out of box experience.
>
> Or the simpler solution is that kisskb upgrades the ARC GNU compiler
Some ideas, none of which are perfect:
- add an #ifndef ARC_TOOLS_SUPPORT_LLOCKD clause in asm/atomic.h that uses
.long with hardcoded opcodes in place of the mnemonics.
- instead of setting CONFIG_GENERIC_ATOMIC64 from Kconfig, add a file
in arch/arc/kernel/ that includes lib/atomic64.c if ARC_TOOLS_SUPPORT_LLOCKD
is not set.
- add "-DCONFIG_GENERIC_ATOMIC64" to cflags-y from arch/arc/Makefile if
old binutils are found.
I think someone was suggesting in the past that Kconfig could be extended
to make decisions based on the gcc version, and the same thing could
be done for binutils. Don't remember who that was though. I think a number
of awkward hacks in the kernel could be simplified if we had this.
And
next prev parent reply other threads:[~2016-10-17 21:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 7:21 Build regressions/improvements in v4.9-rc1 Geert Uytterhoeven
2016-10-17 7:34 ` Geert Uytterhoeven
2016-10-17 16:59 ` Vineet Gupta
2016-10-17 21:02 ` Arnd Bergmann [this message]
2016-10-17 22:37 ` Vineet Gupta
2016-10-19 11:50 ` Michael Ellerman
2016-10-19 12:23 ` Alexey Brodkin
2016-10-19 20:32 ` Thomas Petazzoni
2016-10-26 23:56 ` Michael Ellerman
2016-10-27 7:07 ` Thomas Petazzoni
2016-10-27 9:07 ` Alexey Brodkin
2016-10-27 9:11 ` Thomas Petazzoni
2016-10-27 9:24 ` Geert Uytterhoeven
2016-10-27 9:39 ` Alexey Brodkin
2016-10-27 17:21 ` Vineet Gupta
2016-10-28 10:42 ` Arnd Bergmann
2016-10-27 9:32 ` Arnd Bergmann
2016-10-27 10:04 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5541266.ySlPfDOezF@wuerfel \
--to=arnd@arndb.de \
--cc=Vineet.Gupta1@synopsys.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=mmarek@suse.cz \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox