Skip to content

Commit f557af0

Browse files
committed
Merge tag 'riscv-for-linus-6.11-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V updates from Palmer Dabbelt: - Support for various new ISA extensions: * The Zve32[xf] and Zve64[xfd] sub-extensios of the vector extension * Zimop and Zcmop for may-be-operations * The Zca, Zcf, Zcd and Zcb sub-extensions of the C extension * Zawrs - riscv,cpu-intc is now dtschema - A handful of performance improvements and cleanups to text patching - Support for memory hot{,un}plug - The highest user-allocatable virtual address is now visible in hwprobe * tag 'riscv-for-linus-6.11-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (58 commits) riscv: lib: relax assembly constraints in hweight riscv: set trap vector earlier KVM: riscv: selftests: Add Zawrs extension to get-reg-list test KVM: riscv: Support guest wrs.nto riscv: hwprobe: export Zawrs ISA extension riscv: Add Zawrs support for spinlocks dt-bindings: riscv: Add Zawrs ISA extension description riscv: Provide a definition for 'pause' riscv: hwprobe: export highest virtual userspace address riscv: Improve sbi_ecall() code generation by reordering arguments riscv: Add tracepoints for SBI calls and returns riscv: Optimize crc32 with Zbc extension riscv: Enable DAX VMEMMAP optimization riscv: mm: Add support for ZONE_DEVICE virtio-mem: Enable virtio-mem for RISC-V riscv: Enable memory hotplugging for RISC-V riscv: mm: Take memory hotplug read-lock during kernel page table dump riscv: mm: Add memory hotplugging support riscv: mm: Add pfn_to_kaddr() implementation riscv: mm: Refactor create_linear_mapping_range() for memory hot add ...
2 parents d2be38b + 93b63f6 commit f557af0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1642
-325
lines changed

Documentation/arch/riscv/hwprobe.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,53 @@ The following keys are defined:
192192
supported as defined in the RISC-V ISA manual starting from commit
193193
d8ab5c78c207 ("Zihintpause is ratified").
194194

195+
* :c:macro:`RISCV_HWPROBE_EXT_ZVE32X`: The Vector sub-extension Zve32x is
196+
supported, as defined by version 1.0 of the RISC-V Vector extension manual.
197+
198+
* :c:macro:`RISCV_HWPROBE_EXT_ZVE32F`: The Vector sub-extension Zve32f is
199+
supported, as defined by version 1.0 of the RISC-V Vector extension manual.
200+
201+
* :c:macro:`RISCV_HWPROBE_EXT_ZVE64X`: The Vector sub-extension Zve64x is
202+
supported, as defined by version 1.0 of the RISC-V Vector extension manual.
203+
204+
* :c:macro:`RISCV_HWPROBE_EXT_ZVE64F`: The Vector sub-extension Zve64f is
205+
supported, as defined by version 1.0 of the RISC-V Vector extension manual.
206+
207+
* :c:macro:`RISCV_HWPROBE_EXT_ZVE64D`: The Vector sub-extension Zve64d is
208+
supported, as defined by version 1.0 of the RISC-V Vector extension manual.
209+
210+
* :c:macro:`RISCV_HWPROBE_EXT_ZIMOP`: The Zimop May-Be-Operations extension is
211+
supported as defined in the RISC-V ISA manual starting from commit
212+
58220614a5f ("Zimop is ratified/1.0").
213+
214+
* :c:macro:`RISCV_HWPROBE_EXT_ZCA`: The Zca extension part of Zc* standard
215+
extensions for code size reduction, as ratified in commit 8be3419c1c0
216+
("Zcf doesn't exist on RV64 as it contains no instructions") of
217+
riscv-code-size-reduction.
218+
219+
* :c:macro:`RISCV_HWPROBE_EXT_ZCB`: The Zcb extension part of Zc* standard
220+
extensions for code size reduction, as ratified in commit 8be3419c1c0
221+
("Zcf doesn't exist on RV64 as it contains no instructions") of
222+
riscv-code-size-reduction.
223+
224+
* :c:macro:`RISCV_HWPROBE_EXT_ZCD`: The Zcd extension part of Zc* standard
225+
extensions for code size reduction, as ratified in commit 8be3419c1c0
226+
("Zcf doesn't exist on RV64 as it contains no instructions") of
227+
riscv-code-size-reduction.
228+
229+
* :c:macro:`RISCV_HWPROBE_EXT_ZCF`: The Zcf extension part of Zc* standard
230+
extensions for code size reduction, as ratified in commit 8be3419c1c0
231+
("Zcf doesn't exist on RV64 as it contains no instructions") of
232+
riscv-code-size-reduction.
233+
234+
* :c:macro:`RISCV_HWPROBE_EXT_ZCMOP`: The Zcmop May-Be-Operations extension is
235+
supported as defined in the RISC-V ISA manual starting from commit
236+
c732a4f39a4 ("Zcmop is ratified/1.0").
237+
238+
* :c:macro:`RISCV_HWPROBE_EXT_ZAWRS`: The Zawrs extension is supported as
239+
ratified in commit 98918c844281 ("Merge pull request #1217 from
240+
riscv/zawrs") of riscv-isa-manual.
241+
195242
* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
196243
information about the selected set of processors.
197244

@@ -214,3 +261,6 @@ The following keys are defined:
214261

215262
* :c:macro:`RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE`: An unsigned int which
216263
represents the size of the Zicboz block in bytes.
264+
265+
* :c:macro:`RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS`: An unsigned long which
266+
represent the highest userspace virtual address usable.

Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/riscv,cpu-intc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: RISC-V Hart-Level Interrupt Controller (HLIC)
8+
9+
description:
10+
RISC-V cores include Control Status Registers (CSRs) which are local to
11+
each CPU core (HART in RISC-V terminology) and can be read or written by
12+
software. Some of these CSRs are used to control local interrupts connected
13+
to the core. Every interrupt is ultimately routed through a hart's HLIC
14+
before it interrupts that hart.
15+
16+
The RISC-V supervisor ISA manual specifies three interrupt sources that are
17+
attached to every HLIC namely software interrupts, the timer interrupt, and
18+
external interrupts. Software interrupts are used to send IPIs between
19+
cores. The timer interrupt comes from an architecturally mandated real-
20+
time timer that is controlled via Supervisor Binary Interface (SBI) calls
21+
and CSR reads. External interrupts connect all other device interrupts to
22+
the HLIC, which are routed via the platform-level interrupt controller
23+
(PLIC).
24+
25+
All RISC-V systems that conform to the supervisor ISA specification are
26+
required to have a HLIC with these three interrupt sources present. Since
27+
the interrupt map is defined by the ISA it's not listed in the HLIC's device
28+
tree entry, though external interrupt controllers (like the PLIC, for
29+
example) will need to define how their interrupts map to the relevant HLICs.
30+
This means a PLIC interrupt property will typically list the HLICs for all
31+
present HARTs in the system.
32+
33+
maintainers:
34+
- Palmer Dabbelt <[email protected]>
35+
- Paul Walmsley <[email protected]>
36+
37+
properties:
38+
compatible:
39+
oneOf:
40+
- items:
41+
- const: andestech,cpu-intc
42+
- const: riscv,cpu-intc
43+
- const: riscv,cpu-intc
44+
45+
interrupt-controller: true
46+
47+
'#interrupt-cells':
48+
const: 1
49+
description: |
50+
The interrupt sources are defined by the RISC-V supervisor ISA manual,
51+
with only the following three interrupts being defined for
52+
supervisor mode:
53+
- Source 1 is the supervisor software interrupt, which can be sent by
54+
an SBI call and is reserved for use by software.
55+
- Source 5 is the supervisor timer interrupt, which can be configured
56+
by SBI calls and implements a one-shot timer.
57+
- Source 9 is the supervisor external interrupt, which chains to all
58+
other device interrupts.
59+
60+
required:
61+
- compatible
62+
- '#interrupt-cells'
63+
- interrupt-controller
64+
65+
additionalProperties: false
66+
67+
examples:
68+
- |
69+
interrupt-controller {
70+
#interrupt-cells = <1>;
71+
compatible = "riscv,cpu-intc";
72+
interrupt-controller;
73+
};

Documentation/devicetree/bindings/riscv/cpus.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -103,26 +103,7 @@ properties:
103103

104104
interrupt-controller:
105105
type: object
106-
additionalProperties: false
107-
description: Describes the CPU's local interrupt controller
108-
109-
properties:
110-
'#interrupt-cells':
111-
const: 1
112-
113-
compatible:
114-
oneOf:
115-
- items:
116-
- const: andestech,cpu-intc
117-
- const: riscv,cpu-intc
118-
- const: riscv,cpu-intc
119-
120-
interrupt-controller: true
121-
122-
required:
123-
- '#interrupt-cells'
124-
- compatible
125-
- interrupt-controller
106+
$ref: /schemas/interrupt-controller/riscv,cpu-intc.yaml#
126107

127108
cpu-idle-states:
128109
$ref: /schemas/types.yaml#/definitions/phandle-array

Documentation/devicetree/bindings/riscv/extensions.yaml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ properties:
177177
is supported as ratified at commit 5059e0ca641c ("update to
178178
ratified") of the riscv-zacas.
179179
180+
- const: zawrs
181+
description: |
182+
The Zawrs extension for entering a low-power state or for trapping
183+
to a hypervisor while waiting on a store to a memory location, as
184+
ratified in commit 98918c844281 ("Merge pull request #1217 from
185+
riscv/zawrs") of riscv-isa-manual.
186+
180187
- const: zba
181188
description: |
182189
The standard Zba bit-manipulation extension for address generation
@@ -220,6 +227,43 @@ properties:
220227
instructions as ratified at commit 6d33919 ("Merge pull request #158
221228
from hirooih/clmul-fix-loop-end-condition") of riscv-bitmanip.
222229
230+
- const: zca
231+
description: |
232+
The Zca extension part of Zc* standard extensions for code size
233+
reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on
234+
RV64 as it contains no instructions") of riscv-code-size-reduction,
235+
merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed
236+
of zc.adoc to src tree.").
237+
238+
- const: zcb
239+
description: |
240+
The Zcb extension part of Zc* standard extensions for code size
241+
reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on
242+
RV64 as it contains no instructions") of riscv-code-size-reduction,
243+
merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed
244+
of zc.adoc to src tree.").
245+
246+
- const: zcd
247+
description: |
248+
The Zcd extension part of Zc* standard extensions for code size
249+
reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on
250+
RV64 as it contains no instructions") of riscv-code-size-reduction,
251+
merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed
252+
of zc.adoc to src tree.").
253+
254+
- const: zcf
255+
description: |
256+
The Zcf extension part of Zc* standard extensions for code size
257+
reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on
258+
RV64 as it contains no instructions") of riscv-code-size-reduction,
259+
merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed
260+
of zc.adoc to src tree.").
261+
262+
- const: zcmop
263+
description:
264+
The standard Zcmop extension version 1.0, as ratified in commit
265+
c732a4f39a4 ("Zcmop is ratified/1.0") of the riscv-isa-manual.
266+
223267
- const: zfa
224268
description:
225269
The standard Zfa extension for additional floating point
@@ -363,6 +407,11 @@ properties:
363407
ratified in the 20191213 version of the unprivileged ISA
364408
specification.
365409

410+
- const: zimop
411+
description:
412+
The standard Zimop extension version 1.0, as ratified in commit
413+
58220614a5f ("Zimop is ratified/1.0") of the riscv-isa-manual.
414+
366415
- const: ztso
367416
description:
368417
The standard Ztso extension for total store ordering, as ratified
@@ -381,6 +430,36 @@ properties:
381430
instructions, as ratified in commit 56ed795 ("Update
382431
riscv-crypto-spec-vector.adoc") of riscv-crypto.
383432

433+
- const: zve32f
434+
description:
435+
The standard Zve32f extension for embedded processors, as ratified
436+
in commit 6f702a2 ("Vector extensions are now ratified") of
437+
riscv-v-spec.
438+
439+
- const: zve32x
440+
description:
441+
The standard Zve32x extension for embedded processors, as ratified
442+
in commit 6f702a2 ("Vector extensions are now ratified") of
443+
riscv-v-spec.
444+
445+
- const: zve64d
446+
description:
447+
The standard Zve64d extension for embedded processors, as ratified
448+
in commit 6f702a2 ("Vector extensions are now ratified") of
449+
riscv-v-spec.
450+
451+
- const: zve64f
452+
description:
453+
The standard Zve64f extension for embedded processors, as ratified
454+
in commit 6f702a2 ("Vector extensions are now ratified") of
455+
riscv-v-spec.
456+
457+
- const: zve64x
458+
description:
459+
The standard Zve64x extension for embedded processors, as ratified
460+
in commit 6f702a2 ("Vector extensions are now ratified") of
461+
riscv-v-spec.
462+
384463
- const: zvfh
385464
description:
386465
The standard Zvfh extension for vectored half-precision
@@ -484,5 +563,58 @@ properties:
484563
Registers in the AX45MP datasheet.
485564
https://www.andestech.com/wp-content/uploads/AX45MP-1C-Rev.-5.0.0-Datasheet.pdf
486565

566+
allOf:
567+
# Zcb depends on Zca
568+
- if:
569+
contains:
570+
const: zcb
571+
then:
572+
contains:
573+
const: zca
574+
# Zcd depends on Zca and D
575+
- if:
576+
contains:
577+
const: zcd
578+
then:
579+
allOf:
580+
- contains:
581+
const: zca
582+
- contains:
583+
const: d
584+
# Zcf depends on Zca and F
585+
- if:
586+
contains:
587+
const: zcf
588+
then:
589+
allOf:
590+
- contains:
591+
const: zca
592+
- contains:
593+
const: f
594+
# Zcmop depends on Zca
595+
- if:
596+
contains:
597+
const: zcmop
598+
then:
599+
contains:
600+
const: zca
601+
602+
allOf:
603+
# Zcf extension does not exist on rv64
604+
- if:
605+
properties:
606+
riscv,isa-extensions:
607+
contains:
608+
const: zcf
609+
riscv,isa-base:
610+
contains:
611+
const: rv64i
612+
then:
613+
properties:
614+
riscv,isa-extensions:
615+
not:
616+
contains:
617+
const: zcf
618+
487619
additionalProperties: true
488620
...

0 commit comments

Comments
 (0)