From: Conor Dooley <conor@kernel.org>
To: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>, Bin Meng <bmeng@tinylab.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, stable@vger.kernel.org,
Guo Ren <guoren@kernel.org>
Subject: Re: [PATCH v2] riscv: Handle zicsr/zifencei issue between gcc and binutils
Date: Sat, 29 Jul 2023 18:48:03 +0100 [thread overview]
Message-ID: <20230729-chaps-coauthor-95557d86b189@spud> (raw)
In-Reply-To: <d75ef570-c0ad-cea4-687a-d02b560aa676@iscas.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 1542 bytes --]
On Sun, Jul 30, 2023 at 01:36:49AM +0800, Mingzheng Xing wrote:
> I reproduced the error with gcc-12.2.0 and binutils-2.35. I tried a
> different solution, which I think makes the logic easier. Showing
> the new patch code:
It is indeed simpler, neat.
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 4c07b9189c86..a6fa1eed895c 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -569,25 +569,24 @@ config TOOLCHAIN_HAS_ZIHINTPAUSE
>
> config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
> def_bool y
> - # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
> - depends on AS_IS_GNU && AS_VERSION >= 23800
> + depends on AS_IS_GNU && AS_VERSION >= 23600
> help
> - Newer binutils versions default to ISA spec version 20191213 which
> - moves some instructions from the I extension to the Zicsr and Zifencei
> - extensions.
> + Binutils has supported zicsr and zifencei extensions since version 2.36,
> + try to adapt to the changes by using explicit zicsr and zifencei via
> + -march.
This sentence no longer makes sense to me, the motivation for why we are
doing this is lost. Please preserve the link & explanation about the
20191213 version of the spec, adding to it the commentary about how we
can relax the check to 2.36, since that makes our lives easier.
The rest of this looks fine to me, if you resubmit I'll look at it
further on Monday.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-07-29 17:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 17:45 [PATCH v2] riscv: Handle zicsr/zifencei issue between gcc and binutils Mingzheng Xing
2023-07-26 17:49 ` kernel test robot
2023-07-26 18:02 ` Conor Dooley
2023-07-26 19:34 ` Mingzheng Xing
2023-07-26 19:41 ` Conor Dooley
2023-07-27 7:53 ` Conor Dooley
2023-07-29 17:36 ` Mingzheng Xing
2023-07-29 17:48 ` Conor Dooley [this message]
2023-07-31 10:16 ` Mingzheng Xing
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=20230729-chaps-coauthor-95557d86b189@spud \
--to=conor@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=bmeng@tinylab.org \
--cc=guoren@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=stable@vger.kernel.org \
--cc=trix@redhat.com \
--cc=xingmingzheng@iscas.ac.cn \
/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