From: Conor Dooley <conor@kernel.org>
To: Vladimir Kondratiev <Vladimir.Kondratiev@mobileye.com>
Cc: Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>, Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Mark Rutland <mark.rutland@arm.com>, Gary Guo <gary@garyguo.net>,
Yury Norov <yury.norov@gmail.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
cfu@wavecomp.com, torvalds@linux-foundation.org, olof@lixom.net,
aleksa.paunovic@htecgroup.com, arikalo@gmail.com,
Boqun Feng <boqun@kernel.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] riscv: build kernel atomics from LR/SC when Zaamo is disabled
Date: Tue, 3 Nov 2026 18:49:22 +0000 [thread overview]
Message-ID: <20261103-abnormal-remedy-05f07229b231@spud> (raw)
In-Reply-To: <1bcc885c-b013-4ab3-9b08-1d1f89b09762@mobileye.com>
[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]
On Tue, Nov 03, 2026 at 02:57:29PM +0200, Vladimir Kondratiev wrote:
> Some of issues already fixed on v4.
> - Link to v4:
> https://patch.msgid.link/20261101-lrsc-only-v4-0-4e1d010463b3@mobileye.com
>
> On 11/2/26 20:46, Conor Dooley wrote:
> > On Mon, Oct 26, 2026 at 11:20:02AM +0200, Vladimir Kondratiev wrote:
> >> The A extension is Zaamo plus Zalrsc. MIPS P8700 implements only
> >> Zalrsc, and its AMO instructions trap to SBI. A typical atomic is
> >> about 40 cycles with LR/SC and about 600 cycles with an emulated AMO,
> >> so keep the existing AMO sequences when the toolchain defines
> >> __riscv_zaamo or __riscv_atomic, and use an LR/SC loop otherwise.
> >>
> >> Add RISCV_ISA_ZAAMO and RISCV_ISA_ZALRSC. Both default on, and that
> >> selection still passes "a" in -march. Zaamo can be turned off only
> >> with CONFIG_NONPORTABLE; Zalrsc remains required because cmpxchg and
> >> the conditional atomics are LR/SC sequences. An LR/SC-only build
> >> passes _zalrsc instead of "a".
> >>
> >> Suggested-by: Chao-ying Fu <cfu@wavecomp.com>
> >> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
> >
> > As you can see by the lkp reports, this is not the right way to do this.
>
> I fixed these lkp reported bugs in v4 by TOOLCHAIN_HAS_ZALRSC that test
> compiler support of _zalrsc in -march
Right, I'll go conjure up a reply to v4 so.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-11-03 18:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 9:20 [PATCH v3 0/2] riscv: support CPUs with Zalrsc but not Zaamo Vladimir Kondratiev
2026-10-26 9:20 ` [PATCH v3 1/2] riscv: build kernel atomics from LR/SC when Zaamo is disabled Vladimir Kondratiev
2026-10-31 1:54 ` kernel test robot
2026-10-31 2:14 ` kernel test robot
2026-11-02 18:46 ` Conor Dooley
2026-11-03 12:57 ` Vladimir Kondratiev
2026-11-03 18:49 ` Conor Dooley [this message]
2026-10-26 9:20 ` [PATCH v3 2/2] riscv: accept the atomic extensions this kernel was built with Vladimir Kondratiev
2026-11-02 18:21 ` Conor Dooley
2026-11-03 14:31 ` Vladimir Kondratiev
2026-11-03 18:48 ` Conor Dooley
2026-10-26 10:30 ` [PATCH v3 0/2] riscv: support CPUs with Zalrsc but not Zaamo Peter Zijlstra
2026-10-26 11:06 ` Vladimir Kondratiev
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=20261103-abnormal-remedy-05f07229b231@spud \
--to=conor@kernel.org \
--cc=Vladimir.Kondratiev@mobileye.com \
--cc=aleksa.paunovic@htecgroup.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=arikalo@gmail.com \
--cc=boqun@kernel.org \
--cc=cfu@wavecomp.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mark.rutland@arm.com \
--cc=olof@lixom.net \
--cc=palmer@dabbelt.com \
--cc=peterz@infradead.org \
--cc=pjw@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=will@kernel.org \
--cc=yury.norov@gmail.com \
/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
all inboxes | Powered by JetHome®