From: Palmer Dabbelt <palmer@dabbelt.com> To: Conor Dooley <conor@kernel.org> Cc: nathan@kernel.org, Conor Dooley <conor.dooley@microchip.com>, naresh.kamboju@linaro.org, linux-riscv@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [PATCH v1 1/2] RISC-V: move zicsr/zifencei spec version check to Kconfig Date: Tue, 07 Mar 2023 11:24:25 -0800 (PST) [thread overview] Message-ID: <mhng-2a3f3a1d-d4ee-4227-ac5b-cc37c494372b@palmer-ri-x1c9a> (raw) In-Reply-To: <299f2b9c-d72b-4b2c-9f42-f5b71a9d05e6@spud> On Tue, 07 Mar 2023 11:14:54 PST (-0800), Conor Dooley wrote: > On Mon, Mar 06, 2023 at 03:52:27PM -0800, Palmer Dabbelt wrote: >> On Fri, 24 Feb 2023 09:00:09 PST (-0800), Conor Dooley wrote: >> > On Fri, Feb 24, 2023 at 09:37:28AM -0700, Nathan Chancellor wrote: >> > > On Thu, Feb 23, 2023 at 10:05:45PM +0000, Conor Dooley wrote: >> > >> > > > --- >> > > > arch/riscv/Kconfig | 10 ++++++++++ >> > > > arch/riscv/Makefile | 5 +---- >> > > > 2 files changed, 11 insertions(+), 4 deletions(-) >> > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >> > > > index cebf0c5f8824..4eb0ef8314b3 100644 >> > > > --- a/arch/riscv/Kconfig >> > > > +++ b/arch/riscv/Kconfig >> > > > @@ -288,6 +288,16 @@ config ARCH_RV64I >> > > > > endchoice >> > > > > +config TOOLCHAIN_NEEDS_SPEC_20191213 >> > > >> > > This symbol's name is a little confusing to me, how does the toolchain >> > > need spec version 20191213. Maybe 'SPEC_20191213' should be something >> > > like 'EXPLICIT_ZICSR_ZIFENCEI'? Otherwise, maybe it should be something >> > > like 'TOOLCHAIN_HAS_DEFAULT_SPEC_20191213'? Sorry for the bikeshed but I >> > > think most Kconfig symbols should be self describing. >> > >> > Yah I can do that. I actually had this as the DEFAULT_SPEC variant >> > before and changed it - I'll switch it to the EXPLICIT one. >> > Thanks for taking a look Nathan :) >> >> Another option here would be to use the `-misa-spec` argument for GCC, to >> make it match LLVM's spec version. > > I'm not entirely sure what you're getting at. > You're the toolchain guy, but my understanding was that gas and gcc have > that option, but not ld, which rules out my initial interpretation. > Are you suggesting that we always pass -misa-spec=<pre-zicsr_zifencei> to > gcc so that we are using the same misa-spec for both gnu and llvm > toolchain bits? Pretty much, I think just $(cc-option -misa-spec=2.2) should do it. That should also cover older GCC versions, as we added the argument long before we changed the default. > My instinctive thought was that that is kinda fragile to things > misaligning between gcc/llvm, but given I seem to end up looking at this > every month, we're really fragile to changes in either camp anyway... Pretty much, but in this case we're essentially just disabling a form of change by sticking to an ISA spec version. > I can go spin an alternative v2 of this up if I have understood you > correctly. Thanks > > Thanks, > Conor.
WARNING: multiple messages have this Message-ID (diff)
From: Palmer Dabbelt <palmer@dabbelt.com> To: Conor Dooley <conor@kernel.org> Cc: nathan@kernel.org, Conor Dooley <conor.dooley@microchip.com>, naresh.kamboju@linaro.org, linux-riscv@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [PATCH v1 1/2] RISC-V: move zicsr/zifencei spec version check to Kconfig Date: Tue, 07 Mar 2023 11:24:25 -0800 (PST) [thread overview] Message-ID: <mhng-2a3f3a1d-d4ee-4227-ac5b-cc37c494372b@palmer-ri-x1c9a> (raw) In-Reply-To: <299f2b9c-d72b-4b2c-9f42-f5b71a9d05e6@spud> On Tue, 07 Mar 2023 11:14:54 PST (-0800), Conor Dooley wrote: > On Mon, Mar 06, 2023 at 03:52:27PM -0800, Palmer Dabbelt wrote: >> On Fri, 24 Feb 2023 09:00:09 PST (-0800), Conor Dooley wrote: >> > On Fri, Feb 24, 2023 at 09:37:28AM -0700, Nathan Chancellor wrote: >> > > On Thu, Feb 23, 2023 at 10:05:45PM +0000, Conor Dooley wrote: >> > >> > > > --- >> > > > arch/riscv/Kconfig | 10 ++++++++++ >> > > > arch/riscv/Makefile | 5 +---- >> > > > 2 files changed, 11 insertions(+), 4 deletions(-) >> > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >> > > > index cebf0c5f8824..4eb0ef8314b3 100644 >> > > > --- a/arch/riscv/Kconfig >> > > > +++ b/arch/riscv/Kconfig >> > > > @@ -288,6 +288,16 @@ config ARCH_RV64I >> > > > > endchoice >> > > > > +config TOOLCHAIN_NEEDS_SPEC_20191213 >> > > >> > > This symbol's name is a little confusing to me, how does the toolchain >> > > need spec version 20191213. Maybe 'SPEC_20191213' should be something >> > > like 'EXPLICIT_ZICSR_ZIFENCEI'? Otherwise, maybe it should be something >> > > like 'TOOLCHAIN_HAS_DEFAULT_SPEC_20191213'? Sorry for the bikeshed but I >> > > think most Kconfig symbols should be self describing. >> > >> > Yah I can do that. I actually had this as the DEFAULT_SPEC variant >> > before and changed it - I'll switch it to the EXPLICIT one. >> > Thanks for taking a look Nathan :) >> >> Another option here would be to use the `-misa-spec` argument for GCC, to >> make it match LLVM's spec version. > > I'm not entirely sure what you're getting at. > You're the toolchain guy, but my understanding was that gas and gcc have > that option, but not ld, which rules out my initial interpretation. > Are you suggesting that we always pass -misa-spec=<pre-zicsr_zifencei> to > gcc so that we are using the same misa-spec for both gnu and llvm > toolchain bits? Pretty much, I think just $(cc-option -misa-spec=2.2) should do it. That should also cover older GCC versions, as we added the argument long before we changed the default. > My instinctive thought was that that is kinda fragile to things > misaligning between gcc/llvm, but given I seem to end up looking at this > every month, we're really fragile to changes in either camp anyway... Pretty much, but in this case we're essentially just disabling a form of change by sticking to an ISA spec version. > I can go spin an alternative v2 of this up if I have understood you > correctly. Thanks > > Thanks, > Conor. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-03-07 19:24 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-23 22:05 [PATCH v1 0/2] RISC-V: avoid build issues for clang/llvm-17 with binutils 2.35 Conor Dooley 2023-02-23 22:05 ` Conor Dooley 2023-02-23 22:05 ` [PATCH v1 1/2] RISC-V: move zicsr/zifencei spec version check to Kconfig Conor Dooley 2023-02-23 22:05 ` Conor Dooley 2023-02-24 16:37 ` Nathan Chancellor 2023-02-24 16:37 ` Nathan Chancellor 2023-02-24 17:00 ` Conor Dooley 2023-02-24 17:00 ` Conor Dooley 2023-03-06 23:52 ` Palmer Dabbelt 2023-03-06 23:52 ` Palmer Dabbelt 2023-03-07 19:14 ` Conor Dooley 2023-03-07 19:14 ` Conor Dooley 2023-03-07 19:24 ` Palmer Dabbelt [this message] 2023-03-07 19:24 ` Palmer Dabbelt 2023-02-23 22:05 ` [PATCH v1 2/2] RISC-V: make TOOLCHAIN_NEEDS_SPEC_20191213 gas only Conor Dooley 2023-02-23 22:05 ` Conor Dooley 2023-02-24 16:32 ` Nathan Chancellor 2023-02-24 16:32 ` Nathan Chancellor
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=mhng-2a3f3a1d-d4ee-4227-ac5b-cc37c494372b@palmer-ri-x1c9a \ --to=palmer@dabbelt.com \ --cc=conor.dooley@microchip.com \ --cc=conor@kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=llvm@lists.linux.dev \ --cc=naresh.kamboju@linaro.org \ --cc=nathan@kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.