Skip to content

Commit 4d1044f

Browse files
committed
Merge tag 'riscv-for-linus-5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V updates from Palmer Dabbelt: - Enabling the FPU is now a static_key - Improvements to the Svpbmt support - CPU topology bindings for a handful of systems - Support for systems with 64-bit hart IDs - Many settings have been enabled in the defconfig, including both support for the StarFive systems and many of the Docker requirements There are also a handful of cleanups and improvements, as usual. * tag 'riscv-for-linus-5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (28 commits) riscv: enable Docker requirements in defconfig riscv: convert the t-head pbmt errata to use the __nops macro riscv: introduce nops and __nops macros for NOP sequences RISC-V: Add fast call path of crash_kexec() riscv: mmap with PROT_WRITE but no PROT_READ is invalid riscv/efi_stub: Add 64bit boot-hartid support on RV64 riscv: cpu: Add 64bit hartid support on RV64 riscv: smp: Add 64bit hartid support on RV64 riscv: spinwait: Fix hartid variable type riscv: cpu_ops_sbi: Add 64bit hartid support on RV64 riscv: dts: sifive: "fix" pmic watchdog node name riscv: dts: canaan: Add k210 topology information riscv: dts: sifive: Add fu740 topology information riscv: dts: sifive: Add fu540 topology information riscv: dts: starfive: Add JH7100 CPU topology RISC-V: Add CONFIG_{NON,}PORTABLE riscv: config: enable SOC_STARFIVE in defconfig riscv: dts: microchip: Add mpfs' topology information riscv: Kconfig.socs: Add comments riscv: Kconfig.erratas: Add comments ...
2 parents ea0c392 + ba6cfef commit 4d1044f

37 files changed

+359
-141
lines changed

arch/riscv/Kconfig

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,21 @@ source "arch/riscv/Kconfig.erratas"
223223

224224
menu "Platform type"
225225

226+
config NONPORTABLE
227+
bool "Allow configurations that result in non-portable kernels"
228+
help
229+
RISC-V kernel binaries are compatible between all known systems
230+
whenever possible, but there are some use cases that can only be
231+
satisfied by configurations that result in kernel binaries that are
232+
not portable between systems.
233+
234+
Selecting N does not guarantee kernels will be portable to all known
235+
systems. Selecting any of the options guarded by NONPORTABLE will
236+
result in kernel binaries that are unlikely to be portable between
237+
systems.
238+
239+
If unsure, say N.
240+
226241
choice
227242
prompt "Base ISA"
228243
default ARCH_RV64I
@@ -232,6 +247,7 @@ choice
232247

233248
config ARCH_RV32I
234249
bool "RV32I"
250+
depends on NONPORTABLE
235251
select 32BIT
236252
select GENERIC_LIB_ASHLDI3
237253
select GENERIC_LIB_ASHRDI3
@@ -352,11 +368,11 @@ config RISCV_ISA_C
352368
bool "Emit compressed instructions when building Linux"
353369
default y
354370
help
355-
Adds "C" to the ISA subsets that the toolchain is allowed to emit
356-
when building Linux, which results in compressed instructions in the
357-
Linux binary.
371+
Adds "C" to the ISA subsets that the toolchain is allowed to emit
372+
when building Linux, which results in compressed instructions in the
373+
Linux binary.
358374

359-
If you don't know what to do here, say Y.
375+
If you don't know what to do here, say Y.
360376

361377
config RISCV_ISA_SVPBMT
362378
bool "SVPBMT extension support"
@@ -385,7 +401,7 @@ config FPU
385401

386402
If you don't know what to do here, say Y.
387403

388-
endmenu
404+
endmenu # "Platform type"
389405

390406
menu "Kernel features"
391407

@@ -474,7 +490,7 @@ config COMPAT
474490

475491
If you want to execute 32-bit userspace applications, say Y.
476492

477-
endmenu
493+
endmenu # "Kernel features"
478494

479495
menu "Boot options"
480496

@@ -510,7 +526,6 @@ config CMDLINE_EXTEND
510526
cases where the provided arguments are insufficient and
511527
you don't want to or cannot modify them.
512528

513-
514529
config CMDLINE_FORCE
515530
bool "Always use the default kernel command string"
516531
help
@@ -553,6 +568,7 @@ config STACKPROTECTOR_PER_TASK
553568

554569
config PHYS_RAM_BASE_FIXED
555570
bool "Explicitly specified physical RAM address"
571+
depends on NONPORTABLE
556572
default n
557573

558574
config PHYS_RAM_BASE
@@ -566,7 +582,7 @@ config PHYS_RAM_BASE
566582

567583
config XIP_KERNEL
568584
bool "Kernel Execute-In-Place from ROM"
569-
depends on MMU && SPARSEMEM
585+
depends on MMU && SPARSEMEM && NONPORTABLE
570586
# This prevents XIP from being enabled by all{yes,mod}config, which
571587
# fail to build since XIP doesn't support large kernels.
572588
depends on !COMPILE_TEST
@@ -602,23 +618,30 @@ config XIP_PHYS_ADDR
602618
be linked for and stored to. This address is dependent on your
603619
own flash usage.
604620

605-
endmenu
621+
endmenu # "Boot options"
606622

607623
config BUILTIN_DTB
608624
bool
609-
depends on OF
625+
depends on OF && NONPORTABLE
610626
default y if XIP_KERNEL
611627

628+
config PORTABLE
629+
bool
630+
default !NONPORTABLE
631+
select EFI
632+
select OF
633+
select MMU
634+
612635
menu "Power management options"
613636

614637
source "kernel/power/Kconfig"
615638

616-
endmenu
639+
endmenu # "Power management options"
617640

618641
menu "CPU Power Management"
619642

620643
source "drivers/cpuidle/Kconfig"
621644

622-
endmenu
645+
endmenu # "CPU Power Management"
623646

624647
source "arch/riscv/kvm/Kconfig"

arch/riscv/Kconfig.erratas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ config ERRATA_THEAD_PBMT
5555

5656
If you don't know what to do here, say "Y".
5757

58-
endmenu
58+
endmenu # "CPU errata selection"

arch/riscv/Kconfig.socs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ config SOC_CANAAN_K210_DTB_SOURCE
7878
for the DTS file that will be used to produce the DTB linked into the
7979
kernel.
8080

81-
endif
81+
endif # SOC_CANAAN
8282

83-
endmenu
83+
endmenu # "SoC selection"

arch/riscv/boot/dts/canaan/k210.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@
6565
compatible = "riscv,cpu-intc";
6666
};
6767
};
68+
69+
cpu-map {
70+
cluster0 {
71+
core0 {
72+
cpu = <&cpu0>;
73+
};
74+
75+
core1 {
76+
cpu = <&cpu1>;
77+
};
78+
};
79+
};
6880
};
6981

7082
sram: memory@80000000 {

arch/riscv/boot/dts/microchip/mpfs.dtsi

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,30 @@
142142
interrupt-controller;
143143
};
144144
};
145+
146+
cpu-map {
147+
cluster0 {
148+
core0 {
149+
cpu = <&cpu0>;
150+
};
151+
152+
core1 {
153+
cpu = <&cpu1>;
154+
};
155+
156+
core2 {
157+
cpu = <&cpu2>;
158+
};
159+
160+
core3 {
161+
cpu = <&cpu3>;
162+
};
163+
164+
core4 {
165+
cpu = <&cpu4>;
166+
};
167+
};
168+
};
145169
};
146170

147171
refclk: mssrefclk {
@@ -291,7 +315,6 @@
291315
interrupt-parent = <&plic>;
292316
interrupts = <54>;
293317
clocks = <&clkcfg CLK_SPI0>;
294-
spi-max-frequency = <25000000>;
295318
status = "disabled";
296319
};
297320

@@ -303,7 +326,6 @@
303326
interrupt-parent = <&plic>;
304327
interrupts = <55>;
305328
clocks = <&clkcfg CLK_SPI1>;
306-
spi-max-frequency = <25000000>;
307329
status = "disabled";
308330
};
309331

@@ -315,7 +337,6 @@
315337
interrupt-parent = <&plic>;
316338
interrupts = <85>;
317339
clocks = <&clkcfg CLK_QSPI>;
318-
spi-max-frequency = <25000000>;
319340
status = "disabled";
320341
};
321342

arch/riscv/boot/dts/sifive/fu540-c000.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,30 @@
133133
interrupt-controller;
134134
};
135135
};
136+
137+
cpu-map {
138+
cluster0 {
139+
core0 {
140+
cpu = <&cpu0>;
141+
};
142+
143+
core1 {
144+
cpu = <&cpu1>;
145+
};
146+
147+
core2 {
148+
cpu = <&cpu2>;
149+
};
150+
151+
core3 {
152+
cpu = <&cpu3>;
153+
};
154+
155+
core4 {
156+
cpu = <&cpu4>;
157+
};
158+
};
159+
};
136160
};
137161
soc {
138162
#address-cells = <2>;

arch/riscv/boot/dts/sifive/fu740-c000.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,30 @@
134134
interrupt-controller;
135135
};
136136
};
137+
138+
cpu-map {
139+
cluster0 {
140+
core0 {
141+
cpu = <&cpu0>;
142+
};
143+
144+
core1 {
145+
cpu = <&cpu1>;
146+
};
147+
148+
core2 {
149+
cpu = <&cpu2>;
150+
};
151+
152+
core3 {
153+
cpu = <&cpu3>;
154+
};
155+
156+
core4 {
157+
cpu = <&cpu4>;
158+
};
159+
};
160+
};
137161
};
138162
soc {
139163
#address-cells = <2>;

arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
compatible = "dlg,da9063-rtc";
9191
};
9292

93-
wdt {
93+
watchdog {
9494
compatible = "dlg,da9063-watchdog";
9595
};
9696

arch/riscv/boot/dts/starfive/jh7100.dtsi

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#address-cells = <1>;
1818
#size-cells = <0>;
1919

20-
cpu@0 {
20+
U74_0: cpu@0 {
2121
compatible = "sifive,u74-mc", "riscv";
2222
reg = <0>;
2323
d-cache-block-size = <64>;
@@ -42,7 +42,7 @@
4242
};
4343
};
4444

45-
cpu@1 {
45+
U74_1: cpu@1 {
4646
compatible = "sifive,u74-mc", "riscv";
4747
reg = <1>;
4848
d-cache-block-size = <64>;
@@ -66,6 +66,18 @@
6666
#interrupt-cells = <1>;
6767
};
6868
};
69+
70+
cpu-map {
71+
cluster0 {
72+
core0 {
73+
cpu = <&U74_0>;
74+
};
75+
76+
core1 {
77+
cpu = <&U74_1>;
78+
};
79+
};
80+
};
6981
};
7082

7183
osc_sys: osc_sys {

arch/riscv/configs/32-bit.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
CONFIG_ARCH_RV32I=y
22
CONFIG_32BIT=y
3+
# CONFIG_PORTABLE is not set
4+
CONFIG_NONPORTABLE=y

0 commit comments

Comments
 (0)