mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Kondratiev <Vladimir.Kondratiev@mobileye.com>
To: Conor Dooley <conor@kernel.org>
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 2/2] riscv: accept the atomic extensions this kernel was built with
Date: Tue, 3 Nov 2026 16:31:21 +0200	[thread overview]
Message-ID: <4197b67b-0ef1-4ea2-84f6-b142f67739de@mobileye.com> (raw)
In-Reply-To: <20261102-shredder-pauper-67ef6eaae556@spud>

On 11/2/26 20:21, Conor Dooley wrote:
> On Mon, Oct 26, 2026 at 11:20:03AM +0200, Vladimir Kondratiev wrote:
>> riscv_early_of_processor_hartid() rejects a hart unless its
>> riscv,isa-extensions property contains "a". That rejects a Zalrsc-only
>> hart even when the kernel was built to use only LR/SC.
>>
>> Require "a" or "zaamo" when the kernel emits AMO, and "a" or "zalrsc"
>> when it emits LR/SC. A normal build defines both toolchain macros and
>> still requires the full A extension. The legacy "riscv,isa" fallback
>> keeps its rv{32,64}ima check.
>>
>> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com
>>
> 
> IMO, this should not be a separate patch.

I can squash it with previous patch.
My thought was: it address different aspect. While previous patch allows
compiling code that don't use AMO, this one is about correct
manifestation of the extensions supported by CPU. One can use only
previous patch and declare "a" support in the riscv,isa-extensions. Not
exactly true but works. With this patch, one can say "zalrsc" instead of
"a". This have no effect on how kernel get compiled but let user space
know exact CPU features.

Thanks, Vladimir

  reply	other threads:[~2026-11-03 14:31 UTC|newest]

Thread overview: 11+ 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-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 [this message]
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=4197b67b-0ef1-4ea2-84f6-b142f67739de@mobileye.com \
    --to=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=conor@kernel.org \
    --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®