Skip to content

Commit 7d19ea5

Browse files
committed
Merge tag 'riscv-for-linus-5.12-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull more RISC-V updates from Palmer Dabbelt: "A pair of patches that slipped through the cracks: - enable CPU hotplug in the defconfigs - some cleanups to setup_bootmem There's also a single fix for some randconfig build failures: - make NUMA depend on SMP" * tag 'riscv-for-linus-5.12-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Cleanup setup_bootmem() RISC-V: Enable CPU Hotplug in defconfigs RISC-V: Make NUMA depend on SMP
2 parents 0b311e3 + dd2d082 commit 7d19ea5

File tree

4 files changed

+5
-19
lines changed

4 files changed

+5
-19
lines changed

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ endchoice
314314
# Common NUMA Features
315315
config NUMA
316316
bool "NUMA Memory Allocation and Scheduler Support"
317+
depends on SMP
317318
select GENERIC_ARCH_NUMA
318319
select OF_NUMA
319320
select ARCH_SUPPORTS_NUMA_BALANCING

arch/riscv/configs/defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ CONFIG_BPF_SYSCALL=y
1717
CONFIG_SOC_SIFIVE=y
1818
CONFIG_SOC_VIRT=y
1919
CONFIG_SMP=y
20+
CONFIG_HOTPLUG_CPU=y
2021
CONFIG_JUMP_LABEL=y
2122
CONFIG_MODULES=y
2223
CONFIG_MODULE_UNLOAD=y

arch/riscv/configs/rv32_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ CONFIG_SOC_SIFIVE=y
1818
CONFIG_SOC_VIRT=y
1919
CONFIG_ARCH_RV32I=y
2020
CONFIG_SMP=y
21+
CONFIG_HOTPLUG_CPU=y
2122
CONFIG_JUMP_LABEL=y
2223
CONFIG_MODULES=y
2324
CONFIG_MODULE_UNLOAD=y

arch/riscv/mm/init.c

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,34 +108,17 @@ void __init mem_init(void)
108108

109109
void __init setup_bootmem(void)
110110
{
111-
phys_addr_t mem_start = 0;
112-
phys_addr_t start, dram_end, end = 0;
113111
phys_addr_t vmlinux_end = __pa_symbol(&_end);
114112
phys_addr_t vmlinux_start = __pa_symbol(&_start);
113+
phys_addr_t dram_end = memblock_end_of_DRAM();
115114
phys_addr_t max_mapped_addr = __pa(~(ulong)0);
116-
u64 i;
117-
118-
/* Find the memory region containing the kernel */
119-
for_each_mem_range(i, &start, &end) {
120-
phys_addr_t size = end - start;
121-
if (!mem_start)
122-
mem_start = start;
123-
if (start <= vmlinux_start && vmlinux_end <= end)
124-
BUG_ON(size == 0);
125-
}
126115

127-
/*
128-
* The maximal physical memory size is -PAGE_OFFSET.
129-
* Make sure that any memory beyond mem_start + (-PAGE_OFFSET) is removed
130-
* as it is unusable by kernel.
131-
*/
116+
/* The maximal physical memory size is -PAGE_OFFSET. */
132117
memblock_enforce_memory_limit(-PAGE_OFFSET);
133118

134119
/* Reserve from the start of the kernel to the end of the kernel */
135120
memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
136121

137-
dram_end = memblock_end_of_DRAM();
138-
139122
/*
140123
* memblock allocator is not aware of the fact that last 4K bytes of
141124
* the addressable memory can not be mapped because of IS_ERR_VALUE

0 commit comments

Comments
 (0)