Commit 7867e402 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'riscv-for-linus-5.17-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull more RISC-V updates from Palmer Dabbelt:

 - Support for sv48 paging

 - Hart ID mappings are now sparse, which enables more CPUs to come up
   on systems with sparse hart IDs

 - A handful of cleanups and fixes

* tag 'riscv-for-linus-5.17-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (27 commits)
  RISC-V: nommu_virt: Drop unused SLAB_MERGE_DEFAULT
  RISC-V: Remove redundant err variable
  riscv: dts: sifive unmatched: Add gpio poweroff
  riscv: canaan: remove useless select of non-existing config SYSCON
  RISC-V: Do not use cpumask data structure for hartid bitmap
  RISC-V: Move spinwait booting method to its own config
  RISC-V: Move the entire hart selection via lottery to SMP
  RISC-V: Use __cpu_up_stack/task_pointer only for spinwait method
  RISC-V: Do not print the SBI version during HSM extension boot print
  RISC-V: Avoid using per cpu array for ordered booting
  riscv: default to CONFIG_RISCV_SBI_V01=n
  riscv: fix boolconv.cocci warnings
  riscv: Explicit comment about user virtual address space size
  riscv: Use pgtable_l4_enabled to output mmu_type in cpuinfo
  riscv: Implement sv48 support
  asm-generic: Prepare for riscv use of pud_alloc_one and pud_free
  riscv: Allow to dynamically define VA_BITS
  riscv: Introduce functions to switch pt_ops
  riscv: Split early kasan mapping to prepare sv48 introduction
  riscv: Move KASAN mapping next to the kernel mapping
  ...
parents b21bae9a c59cd507
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -47,12 +47,12 @@ RISC-V Linux Kernel SV39
                                                              | Kernel-space virtual memory, shared between all processes:
  ____________________________________________________________|___________________________________________________________
                    |            |                  |         |
   ffffffc000000000 | -256    GB | ffffffc7ffffffff |   32 GB | kasan
   ffffffcefee00000 | -196    GB | ffffffcefeffffff |    2 MB | fixmap
   ffffffceff000000 | -196    GB | ffffffceffffffff |   16 MB | PCI io
   ffffffcf00000000 | -196    GB | ffffffcfffffffff |    4 GB | vmemmap
   ffffffd000000000 | -192    GB | ffffffdfffffffff |   64 GB | vmalloc/ioremap space
   ffffffe000000000 | -128    GB | ffffffff7fffffff |  124 GB | direct mapping of all physical memory
   ffffffc6fee00000 | -228    GB | ffffffc6feffffff |    2 MB | fixmap
   ffffffc6ff000000 | -228    GB | ffffffc6ffffffff |   16 MB | PCI io
   ffffffc700000000 | -228    GB | ffffffc7ffffffff |    4 GB | vmemmap
   ffffffc800000000 | -224    GB | ffffffd7ffffffff |   64 GB | vmalloc/ioremap space
   ffffffd800000000 | -160    GB | fffffff6ffffffff |  124 GB | direct mapping of all physical memory
   fffffff700000000 |  -36    GB | fffffffeffffffff |   32 GB | kasan
  __________________|____________|__________________|_________|____________________________________________________________
                                                              |
                                                              |
+18 −34
Original line number Diff line number Diff line
@@ -147,27 +147,16 @@ config MMU
	  Select if you want MMU-based virtualised addressing space
	  support by paged memory management. If unsure, say 'Y'.

config VA_BITS
	int
	default 32 if 32BIT
	default 39 if 64BIT

config PA_BITS
	int
	default 34 if 32BIT
	default 56 if 64BIT

config PAGE_OFFSET
	hex
	default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB
	default 0xC0000000 if 32BIT
	default 0x80000000 if 64BIT && !MMU
	default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
	default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
	default 0xffffaf8000000000 if 64BIT

config KASAN_SHADOW_OFFSET
	hex
	depends on KASAN_GENERIC
	default 0xdfffffc800000000 if 64BIT
	default 0xdfffffff00000000 if 64BIT
	default 0xffffffff if 32BIT

config ARCH_FLATMEM_ENABLE
@@ -213,7 +202,7 @@ config FIX_EARLYCON_MEM

config PGTABLE_LEVELS
	int
	default 3 if 64BIT
	default 4 if 64BIT
	default 2

config LOCKDEP_SUPPORT
@@ -271,24 +260,6 @@ config MODULE_SECTIONS
	bool
	select HAVE_MOD_ARCH_SPECIFIC

choice
	prompt "Maximum Physical Memory"
	default MAXPHYSMEM_1GB if 32BIT
	default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
	default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY

	config MAXPHYSMEM_1GB
		depends on 32BIT
		bool "1GiB"
	config MAXPHYSMEM_2GB
		depends on 64BIT
		bool "2GiB"
	config MAXPHYSMEM_128GB
		depends on 64BIT && CMODEL_MEDANY
		bool "128GiB"
endchoice


config SMP
	bool "Symmetric Multi-Processing"
	help
@@ -392,12 +363,25 @@ source "kernel/Kconfig.hz"

config RISCV_SBI_V01
	bool "SBI v0.1 support"
	default y
	depends on RISCV_SBI
	help
	  This config allows kernel to use SBI v0.1 APIs. This will be
	  deprecated in future once legacy M-mode software are no longer in use.

config RISCV_BOOT_SPINWAIT
	bool "Spinwait booting method"
	depends on SMP
	default y
	help
	  This enables support for booting Linux via spinwait method. In the
	  spinwait method, all cores randomly jump to Linux. One of the cores
	  gets chosen via lottery and all other keep spinning on a percpu
	  variable. This method cannot support CPU hotplug and sparse hartid
	  scheme. It should be only enabled for M-mode Linux or platforms relying
	  on older firmware without SBI HSM extension. All other platforms should
	  rely on ordered booting via SBI HSM extension which gets chosen
	  dynamically at runtime if the firmware supports it.

config KEXEC
	bool "Kexec system call"
	select KEXEC_CORE
+5 −0
Original line number Diff line number Diff line
@@ -39,6 +39,11 @@
		clock-frequency = <RTCCLK_FREQ>;
		clock-output-names = "rtcclk";
	};

	gpio-poweroff {
		compatible = "gpio-poweroff";
		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
	};
};

&uart0 {
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ CONFIG_EMBEDDED=y
CONFIG_SLOB=y
# CONFIG_MMU is not set
CONFIG_SOC_CANAAN=y
CONFIG_MAXPHYSMEM_2GB=y
CONFIG_SMP=y
CONFIG_NR_CPUS=2
CONFIG_CMDLINE="earlycon console=ttySIF0"
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ CONFIG_EMBEDDED=y
CONFIG_SLOB=y
# CONFIG_MMU is not set
CONFIG_SOC_CANAAN=y
CONFIG_MAXPHYSMEM_2GB=y
CONFIG_SMP=y
CONFIG_NR_CPUS=2
CONFIG_CMDLINE="earlycon console=ttySIF0 rootdelay=2 root=/dev/mmcblk0p1 ro"
Loading