Re: [PATCH v6 2/6] riscv: build kernel atomics from LR/SC when Zaamo is disabled

From: Vladimir Kondratiev

Date: Tue Nov 17 2026 - 08:22:24 EST


On 11/16/26 19:14, Conor Dooley wrote:
> On Wed, Nov 11, 2026 at 08:37:23AM +0200, Vladimir Kondratiev wrote:
>> On 11/10/26 21:02, Conor Dooley wrote:
>>> I had a quick glance at this revision, and I think you've at least tried
>>> to resolve the things I was pointing out. Did I miss something, or why
>>> have you kept the NAK after having resolved the things that I was
>>> objecting to?
>>
>> I'll be happy to remove it. Was not feeling right to do this without
>> your permission.
>
> IMO, if you sort out what the NAK was complaining about, you can drop it
> without permission. Worth calling out in the cover maybe.

Sure, will mention in cover

>
> I'll take another look at this later in the week..

I have v7 in preparation. Need to complete test cycle before sending it.
In order to save your time, these are changes planned.

Changes in v7:
- remove patch rejecting probes inside LR/SC block (was patch 1),
submitted on its own
Link:
https://patch.msgid.link/20261111-probes-in-lrsc-v1-1-4f99ddea5f68@xxxxxxxxxxxx
- Drop Conor Dooley's Nacked-by from patch 1, as agreed on the v6
thread.
- hwprobe reports RISCV_HWPROBE_BASE_BEHAVIOR_IMA only when every
selected hart has A, so a Zalrsc-only hart is not described as IMA
(patch 2).
- BPF JIT: the fetch and xchg LR/SC loops are fully ordered the way
emit_cmpxchg() is, plain lr, sc.rl and a trailing fence rw,rw,
instead of lr.aqrl/sc.aqrl (patch 4).
- New patch 5: refresh the vDSO hwprobe data after the boot-time
speed probes; fixes the stale MISALIGNED_*_PERF values in the vDSO
since v7.3-rc1.
- AMO speed probe: refresh the vDSO data when done, report a CPU
without Zaamo as unsupported even with amo_speed= on the command
line, and return 0 from the __setup() handler on a bad value
(patch 6).