Skip to content

Commit

Permalink
Merge tag 'riscv-for-linus-5.20-mw0' 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:

 - 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
  ...
  • Loading branch information
Linus Torvalds committed Aug 6, 2022
2 parents ea0c392 + ba6cfef commit 4d1044f
Show file tree
Hide file tree
Showing 37 changed files with 359 additions and 141 deletions.
47 changes: 35 additions & 12 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,21 @@ source "arch/riscv/Kconfig.erratas"

menu "Platform type"

config NONPORTABLE
bool "Allow configurations that result in non-portable kernels"
help
RISC-V kernel binaries are compatible between all known systems
whenever possible, but there are some use cases that can only be
satisfied by configurations that result in kernel binaries that are
not portable between systems.

Selecting N does not guarantee kernels will be portable to all known
systems. Selecting any of the options guarded by NONPORTABLE will
result in kernel binaries that are unlikely to be portable between
systems.

If unsure, say N.

choice
prompt "Base ISA"
default ARCH_RV64I
Expand All @@ -232,6 +247,7 @@ choice

config ARCH_RV32I
bool "RV32I"
depends on NONPORTABLE
select 32BIT
select GENERIC_LIB_ASHLDI3
select GENERIC_LIB_ASHRDI3
Expand Down Expand Up @@ -352,11 +368,11 @@ config RISCV_ISA_C
bool "Emit compressed instructions when building Linux"
default y
help
Adds "C" to the ISA subsets that the toolchain is allowed to emit
when building Linux, which results in compressed instructions in the
Linux binary.
Adds "C" to the ISA subsets that the toolchain is allowed to emit
when building Linux, which results in compressed instructions in the
Linux binary.

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

config RISCV_ISA_SVPBMT
bool "SVPBMT extension support"
Expand Down Expand Up @@ -385,7 +401,7 @@ config FPU

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

endmenu
endmenu # "Platform type"

menu "Kernel features"

Expand Down Expand Up @@ -474,7 +490,7 @@ config COMPAT

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

endmenu
endmenu # "Kernel features"

menu "Boot options"

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


config CMDLINE_FORCE
bool "Always use the default kernel command string"
help
Expand Down Expand Up @@ -553,6 +568,7 @@ config STACKPROTECTOR_PER_TASK

config PHYS_RAM_BASE_FIXED
bool "Explicitly specified physical RAM address"
depends on NONPORTABLE
default n

config PHYS_RAM_BASE
Expand All @@ -566,7 +582,7 @@ config PHYS_RAM_BASE

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

endmenu
endmenu # "Boot options"

config BUILTIN_DTB
bool
depends on OF
depends on OF && NONPORTABLE
default y if XIP_KERNEL

config PORTABLE
bool
default !NONPORTABLE
select EFI
select OF
select MMU

menu "Power management options"

source "kernel/power/Kconfig"

endmenu
endmenu # "Power management options"

menu "CPU Power Management"

source "drivers/cpuidle/Kconfig"

endmenu
endmenu # "CPU Power Management"

source "arch/riscv/kvm/Kconfig"
2 changes: 1 addition & 1 deletion arch/riscv/Kconfig.erratas
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ config ERRATA_THEAD_PBMT

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

endmenu
endmenu # "CPU errata selection"
4 changes: 2 additions & 2 deletions arch/riscv/Kconfig.socs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ config SOC_CANAAN_K210_DTB_SOURCE
for the DTS file that will be used to produce the DTB linked into the
kernel.

endif
endif # SOC_CANAAN

endmenu
endmenu # "SoC selection"
12 changes: 12 additions & 0 deletions arch/riscv/boot/dts/canaan/k210.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@
compatible = "riscv,cpu-intc";
};
};

cpu-map {
cluster0 {
core0 {
cpu = <&cpu0>;
};

core1 {
cpu = <&cpu1>;
};
};
};
};

sram: memory@80000000 {
Expand Down
27 changes: 24 additions & 3 deletions arch/riscv/boot/dts/microchip/mpfs.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,30 @@
interrupt-controller;
};
};

cpu-map {
cluster0 {
core0 {
cpu = <&cpu0>;
};

core1 {
cpu = <&cpu1>;
};

core2 {
cpu = <&cpu2>;
};

core3 {
cpu = <&cpu3>;
};

core4 {
cpu = <&cpu4>;
};
};
};
};

refclk: mssrefclk {
Expand Down Expand Up @@ -291,7 +315,6 @@
interrupt-parent = <&plic>;
interrupts = <54>;
clocks = <&clkcfg CLK_SPI0>;
spi-max-frequency = <25000000>;
status = "disabled";
};

Expand All @@ -303,7 +326,6 @@
interrupt-parent = <&plic>;
interrupts = <55>;
clocks = <&clkcfg CLK_SPI1>;
spi-max-frequency = <25000000>;
status = "disabled";
};

Expand All @@ -315,7 +337,6 @@
interrupt-parent = <&plic>;
interrupts = <85>;
clocks = <&clkcfg CLK_QSPI>;
spi-max-frequency = <25000000>;
status = "disabled";
};

Expand Down
24 changes: 24 additions & 0 deletions arch/riscv/boot/dts/sifive/fu540-c000.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,30 @@
interrupt-controller;
};
};

cpu-map {
cluster0 {
core0 {
cpu = <&cpu0>;
};

core1 {
cpu = <&cpu1>;
};

core2 {
cpu = <&cpu2>;
};

core3 {
cpu = <&cpu3>;
};

core4 {
cpu = <&cpu4>;
};
};
};
};
soc {
#address-cells = <2>;
Expand Down
24 changes: 24 additions & 0 deletions arch/riscv/boot/dts/sifive/fu740-c000.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,30 @@
interrupt-controller;
};
};

cpu-map {
cluster0 {
core0 {
cpu = <&cpu0>;
};

core1 {
cpu = <&cpu1>;
};

core2 {
cpu = <&cpu2>;
};

core3 {
cpu = <&cpu3>;
};

core4 {
cpu = <&cpu4>;
};
};
};
};
soc {
#address-cells = <2>;
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
compatible = "dlg,da9063-rtc";
};

wdt {
watchdog {
compatible = "dlg,da9063-watchdog";
};

Expand Down
16 changes: 14 additions & 2 deletions arch/riscv/boot/dts/starfive/jh7100.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#address-cells = <1>;
#size-cells = <0>;

cpu@0 {
U74_0: cpu@0 {
compatible = "sifive,u74-mc", "riscv";
reg = <0>;
d-cache-block-size = <64>;
Expand All @@ -42,7 +42,7 @@
};
};

cpu@1 {
U74_1: cpu@1 {
compatible = "sifive,u74-mc", "riscv";
reg = <1>;
d-cache-block-size = <64>;
Expand All @@ -66,6 +66,18 @@
#interrupt-cells = <1>;
};
};

cpu-map {
cluster0 {
core0 {
cpu = <&U74_0>;
};

core1 {
cpu = <&U74_1>;
};
};
};
};

osc_sys: osc_sys {
Expand Down
2 changes: 2 additions & 0 deletions arch/riscv/configs/32-bit.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CONFIG_ARCH_RV32I=y
CONFIG_32BIT=y
# CONFIG_PORTABLE is not set
CONFIG_NONPORTABLE=y
Loading

0 comments on commit 4d1044f

Please sign in to comment.