Skip to content

riscv: Add Zalasr ISA extension support

Xu Lu kvm kvm-riscv linux-devicetree linux-doc linux-kselftest linux-riscv lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest10 patches 9 repliesIn review 4 of 10 applied
  2. v38 patches 5 repliesSuperseded
  3. v24 patches 12 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches1 replySuperseded

Changes in v4 from the cover letter

- Apply acquire/release semantics to arch_atomic operations. Thanks to Andrea.

Patches in v4 4 of 10 applied

#Subject and filesSizeRepliesApplied
1/10riscv: Add ISA extension parsing for Zalasrarch/riscv/include/asm/hwcap.h arch/riscv/kernel/cpufeature.c+2 -00 repliesApplied
2/10dt-bindings: riscv: Add Zalasr ISA extension descriptionDocumentation/devicetree/bindings/riscv/extensions.yaml+5 -01 replyApplied
3/10riscv: hwprobe: Export Zalasr extensionDocumentation/arch/riscv/hwprobe.rst arch/riscv/include/uapi/asm/hwprobe.h arch/riscv/kernel/sys_hwprobe.c+6 -11 replyApplied
4/10riscv: Introduce Zalasr instructionsarch/riscv/include/asm/insn-def.h+79 -01 replyApplied
5/10riscv: Apply Zalasr to smp_load_acquire/smp_store_releasearch/riscv/include/asm/barrier.h+80 -110 replies
6/10riscv: Apply acquire/release semantics to arch_xchg/arch_cmpxchg operationsarch/riscv/include/asm/cmpxchg.h+71 -730 replies
7/10riscv: Apply acquire/release semantics to arch_atomic operationsarch/riscv/include/asm/atomic.h+64 -00 replies
8/10riscv: Remove arch specific __atomic_acquire/release_fencearch/riscv/include/asm/atomic.h arch/riscv/include/asm/fence.h+0 -100 replies
9/10RISC-V: KVM: Allow Zalasr extensions for Guest/VMarch/riscv/include/uapi/asm/kvm.h arch/riscv/kvm/vcpu_onereg.c+3 -01 reply
10/10RISC-V: KVM: selftests: Add Zalasr extensions to get-reg-list testtools/testing/selftests/kvm/riscv/get-reg-list.c+4 -01 reply

Reviews trailers per patch

4 of 10 patches have a Reviewed-by or Acked-by.

PatchGuo RenConor DooleyAnup Patel
1/10
2/10A-b
3/10
4/10R-b
5/10
6/10
7/10
8/10
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 00/10] riscv: Add Zalasr ISA extension support

This patch adds support for the Zalasr ISA extension, which supplies the real load acquire/store release instructions.

The specification can be found here:
https://github.com/riscv/riscv-zalasr/blob/main/chapter2.adoc

This patch seires has been tested with ltp on Qemu with Brensan's zalasr support patch[1].

Some false positive spacing error happens during patch checking. Thus I CCed maintainers of checkpatch.pl as well.

[1] https://lore.kernel.org/all/CAGPSXwJEdtqW=nx71oufZp64nK6tK=0rytVEcz4F-gfvCOXk2w@mail.gmail.com/

v4:
- Apply acquire/release semantics to arch_atomic operations. Thanks to Andrea.

v3:
- Apply acquire/release semantics to arch_xchg/arch_cmpxchg operations so as to ensure FENCE.TSO ordering between operations which precede the UNLOCK+LOCK sequence and operations which follow the sequence. Thanks to Andrea.
- Support hwprobe of Zalasr.
- Allow Zalasr extensions for Guest/VM.

v2:
- Adjust the order of Zalasr and Zalrsc in dt-bindings. Thanks to Conor.

Xu Lu (10):
riscv: Add ISA extension parsing for Zalasr
dt-bindings: riscv: Add Zalasr ISA extension description
riscv: hwprobe: Export Zalasr extension
riscv: Introduce Zalasr instructions
riscv: Apply Zalasr to smp_load_acquire/smp_store_release
riscv: Apply acquire/release semantics to arch_xchg/arch_cmpxchg
operations
riscv: Apply acquire/release semantics to arch_atomic operations
riscv: Remove arch specific __atomic_acquire/release_fence
RISC-V: KVM: Allow Zalasr extensions for Guest/VM
RISC-V: KVM: selftests: Add Zalasr extensions to get-reg-list test

 Documentation/arch/riscv/hwprobe.rst          |   5 +-
 .../devicetree/bindings/riscv/extensions.yaml |   5 +
 arch/riscv/include/asm/atomic.h               |  70 ++++++++-
 arch/riscv/include/asm/barrier.h              |  91 +++++++++--
 arch/riscv/include/asm/cmpxchg.h              | 144 +++++++++---------
 arch/riscv/include/asm/fence.h                |   4 -
 arch/riscv/include/asm/hwcap.h                |   1 +
 arch/riscv/include/asm/insn-def.h             |  79 ++++++++++
 arch/riscv/include/uapi/asm/hwprobe.h         |   1 +
 arch/riscv/include/uapi/asm/kvm.h             |   1 +
 arch/riscv/kernel/cpufeature.c                |   1 +
 arch/riscv/kernel/sys_hwprobe.c               |   1 +
 arch/riscv/kvm/vcpu_onereg.c                  |   2 +
 .../selftests/kvm/riscv/get-reg-list.c        |   4 +
 14 files changed, 314 insertions(+), 95 deletions(-)
Signature · 1 line
2.20.1