Skip to content

Commit

Permalink
Merge tag 'riscv-for-linus-6.15-mw1' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/riscv/linux

Pull RISC-V updates from Palmer Dabbelt:

 - The sub-architecture selection Kconfig system has been cleaned up,
   the documentation has been improved, and various detections have been
   fixed

 - The vector-related extensions dependencies are now validated when
   parsing from device tree and in the DT bindings

 - Misaligned access probing can be overridden via a kernel command-line
   parameter, along with various fixes to misalign access handling

 - Support for relocatable !MMU kernels builds

 - Support for hpge pfnmaps, which should improve TLB utilization

 - Support for runtime constants, which improves the d_hash()
   performance

 - Support for bfloat16, Zicbom, Zaamo, Zalrsc, Zicntr, Zihpm

 - Various fixes, including:
      - We were missing a secondary mmu notifier call when flushing the
        tlb which is required for IOMMU
      - Fix ftrace panics by saving the registers as expected by ftrace
      - Fix a couple of stimecmp usage related to cpu hotplug
      - purgatory_start is now aligned as per the STVEC requirements
      - A fix for hugetlb when calculating the size of non-present PTEs

* tag 'riscv-for-linus-6.15-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (65 commits)
  riscv: Add norvc after .option arch in runtime const
  riscv: Make sure toolchain supports zba before using zba instructions
  riscv/purgatory: 4B align purgatory_start
  riscv/kexec_file: Handle R_RISCV_64 in purgatory relocator
  selftests: riscv: fix v_exec_initval_nolibc.c
  riscv: Fix hugetlb retrieval of number of ptes in case of !present pte
  riscv: print hartid on bringup
  riscv: Add norvc after .option arch in runtime const
  riscv: Remove CONFIG_PAGE_OFFSET
  riscv: Support CONFIG_RELOCATABLE on riscv32
  asm-generic: Always define Elf_Rel and Elf_Rela
  riscv: Support CONFIG_RELOCATABLE on NOMMU
  riscv: Allow NOMMU kernels to access all of RAM
  riscv: Remove duplicate CONFIG_PAGE_OFFSET definition
  RISC-V: errata: Use medany for relocatable builds
  dt-bindings: riscv: document vector crypto requirements
  dt-bindings: riscv: add vector sub-extension dependencies
  dt-bindings: riscv: d requires f
  RISC-V: add f & d extension validation checks
  RISC-V: add vector crypto extension validation checks
  ...
  • Loading branch information
Linus Torvalds committed Apr 4, 2025
2 parents 61f96e6 + 3eb6409 commit 4a1d8ab
Show file tree
Hide file tree
Showing 62 changed files with 1,250 additions and 399 deletions.
16 changes: 16 additions & 0 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7535,6 +7535,22 @@
Note that genuine overcurrent events won't be
reported either.

unaligned_scalar_speed=
[RISCV]
Format: {slow | fast | unsupported}
Allow skipping scalar unaligned access speed tests. This
is useful for testing alternative code paths and to skip
the tests in environments where they run too slowly. All
CPUs must have the same scalar unaligned access speed.

unaligned_vector_speed=
[RISCV]
Format: {slow | fast | unsupported}
Allow skipping vector unaligned access speed tests. This
is useful for testing alternative code paths and to skip
the tests in environments where they run too slowly. All
CPUs must have the same vector unaligned access speed.

unknown_nmi_panic
[X86] Cause panic on unknown NMI.

Expand Down
32 changes: 32 additions & 0 deletions Documentation/arch/riscv/hwprobe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ The following keys are defined:
defined in the Atomic Compare-and-Swap (CAS) instructions manual starting
from commit 5059e0ca641c ("update to ratified").

* :c:macro:`RISCV_HWPROBE_EXT_ZICNTR`: The Zicntr extension version 2.0
is supported as defined in the RISC-V ISA manual.

* :c:macro:`RISCV_HWPROBE_EXT_ZICOND`: The Zicond extension is supported as
defined in the RISC-V Integer Conditional (Zicond) operations extension
manual starting from commit 95cf1f9 ("Add changes requested by Ved
Expand All @@ -192,6 +195,9 @@ The following keys are defined:
supported as defined in the RISC-V ISA manual starting from commit
d8ab5c78c207 ("Zihintpause is ratified").

* :c:macro:`RISCV_HWPROBE_EXT_ZIHPM`: The Zihpm extension version 2.0
is supported as defined in the RISC-V ISA manual.

* :c:macro:`RISCV_HWPROBE_EXT_ZVE32X`: The Vector sub-extension Zve32x is
supported, as defined by version 1.0 of the RISC-V Vector extension manual.

Expand Down Expand Up @@ -239,9 +245,32 @@ The following keys are defined:
ratified in commit 98918c844281 ("Merge pull request #1217 from
riscv/zawrs") of riscv-isa-manual.

* :c:macro:`RISCV_HWPROBE_EXT_ZAAMO`: The Zaamo extension is supported as
defined in the in the RISC-V ISA manual starting from commit e87412e621f1
("integrate Zaamo and Zalrsc text (#1304)").

* :c:macro:`RISCV_HWPROBE_EXT_ZALRSC`: The Zalrsc extension is supported as
defined in the in the RISC-V ISA manual starting from commit e87412e621f1
("integrate Zaamo and Zalrsc text (#1304)").

* :c:macro:`RISCV_HWPROBE_EXT_SUPM`: The Supm extension is supported as
defined in version 1.0 of the RISC-V Pointer Masking extensions.

* :c:macro:`RISCV_HWPROBE_EXT_ZFBFMIN`: The Zfbfmin extension is supported as
defined in the RISC-V ISA manual starting from commit 4dc23d6229de
("Added Chapter title to BF16").

* :c:macro:`RISCV_HWPROBE_EXT_ZVFBFMIN`: The Zvfbfmin extension is supported as
defined in the RISC-V ISA manual starting from commit 4dc23d6229de
("Added Chapter title to BF16").

* :c:macro:`RISCV_HWPROBE_EXT_ZVFBFWMA`: The Zvfbfwma extension is supported as
defined in the RISC-V ISA manual starting from commit 4dc23d6229de
("Added Chapter title to BF16").

* :c:macro:`RISCV_HWPROBE_EXT_ZICBOM`: The Zicbom extension is supported, as
ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.

* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: Deprecated. Returns similar values to
:c:macro:`RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF`, but the key was
mistakenly classified as a bitmask rather than a value.
Expand Down Expand Up @@ -303,3 +332,6 @@ The following keys are defined:
* :c:macro:`RISCV_HWPROBE_VENDOR_EXT_XTHEADVECTOR`: The xtheadvector vendor
extension is supported in the T-Head ISA extensions spec starting from
commit a18c801634 ("Add T-Head VECTOR vendor extension. ").

* :c:macro:`RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE`: An unsigned int which
represents the size of the Zicbom block in bytes.
149 changes: 149 additions & 0 deletions Documentation/devicetree/bindings/riscv/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ properties:
as ratified at commit 4a69197e5617 ("Update to ratified state") of
riscv-svvptc.

- const: zaamo
description: |
The standard Zaamo extension for atomic memory operations as
ratified at commit e87412e621f1 ("integrate Zaamo and Zalrsc text
(#1304)") of the unprivileged ISA specification.
- const: zabha
description: |
The Zabha extension for Byte and Halfword Atomic Memory Operations
Expand All @@ -236,6 +242,12 @@ properties:
is supported as ratified at commit 5059e0ca641c ("update to
ratified") of the riscv-zacas.
- const: zalrsc
description: |
The standard Zalrsc extension for load-reserved/store-conditional as
ratified at commit e87412e621f1 ("integrate Zaamo and Zalrsc text
(#1304)") of the unprivileged ISA specification.
- const: zawrs
description: |
The Zawrs extension for entering a low-power state or for trapping
Expand Down Expand Up @@ -329,6 +341,12 @@ properties:
instructions, as ratified in commit 056b6ff ("Zfa is ratified") of
riscv-isa-manual.

- const: zfbfmin
description:
The standard Zfbfmin extension which provides minimal support for
16-bit half-precision brain floating-point instructions, as ratified
in commit 4dc23d62 ("Added Chapter title to BF16") of riscv-isa-manual.

- const: zfh
description:
The standard Zfh extension for 16-bit half-precision binary
Expand Down Expand Up @@ -525,6 +543,18 @@ properties:
in commit 6f702a2 ("Vector extensions are now ratified") of
riscv-v-spec.

- const: zvfbfmin
description:
The standard Zvfbfmin extension for minimal support for vectored
16-bit half-precision brain floating-point instructions, as ratified
in commit 4dc23d62 ("Added Chapter title to BF16") of riscv-isa-manual.

- const: zvfbfwma
description:
The standard Zvfbfwma extension for vectored half-precision brain
floating-point widening multiply-accumulate instructions, as ratified
in commit 4dc23d62 ("Added Chapter title to BF16") of riscv-isa-manual.

- const: zvfh
description:
The standard Zvfh extension for vectored half-precision
Expand Down Expand Up @@ -639,6 +669,12 @@ properties:
https://github.com/T-head-Semi/thead-extension-spec/blob/95358cb2cca9489361c61d335e03d3134b14133f/xtheadvector.adoc.

allOf:
- if:
contains:
const: d
then:
contains:
const: f
# Zcb depends on Zca
- if:
contains:
Expand Down Expand Up @@ -673,6 +709,119 @@ properties:
then:
contains:
const: zca
# Zfbfmin depends on F
- if:
contains:
const: zfbfmin
then:
contains:
const: f
# Zvfbfmin depends on V or Zve32f
- if:
contains:
const: zvfbfmin
then:
oneOf:
- contains:
const: v
- contains:
const: zve32f
# Zvfbfwma depends on Zfbfmin and Zvfbfmin
- if:
contains:
const: zvfbfwma
then:
allOf:
- contains:
const: zfbfmin
- contains:
const: zvfbfmin
# Zacas depends on Zaamo
- if:
contains:
const: zacas
then:
contains:
const: zaamo

- if:
contains:
const: zve32x
then:
contains:
const: zicsr

- if:
contains:
const: zve32f
then:
allOf:
- contains:
const: f
- contains:
const: zve32x

- if:
contains:
const: zve64x
then:
contains:
const: zve32x

- if:
contains:
const: zve64f
then:
allOf:
- contains:
const: f
- contains:
const: zve32f
- contains:
const: zve64x

- if:
contains:
const: zve64d
then:
allOf:
- contains:
const: d
- contains:
const: zve64f

- if:
contains:
anyOf:
- const: zvbc
- const: zvkn
- const: zvknc
- const: zvkng
- const: zvknhb
- const: zvksc
then:
contains:
anyOf:
- const: v
- const: zve64x

- if:
contains:
anyOf:
- const: zvbb
- const: zvkb
- const: zvkg
- const: zvkned
- const: zvknha
- const: zvksed
- const: zvksh
- const: zvks
- const: zvkt
then:
contains:
anyOf:
- const: v
- const: zve32x

allOf:
# Zcf extension does not exist on rv64
Expand Down
1 change: 0 additions & 1 deletion arch/riscv/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only

obj-y += kernel/ mm/ net/
obj-$(CONFIG_BUILTIN_DTB) += boot/dts/
obj-$(CONFIG_CRYPTO) += crypto/
obj-y += errata/
obj-$(CONFIG_KVM) += kvm/
Expand Down
Loading

0 comments on commit 4a1d8ab

Please sign in to comment.