Merge tag 'riscv-for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Dec 2020 22:05:05 +0000 (14:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Dec 2020 22:05:05 +0000 (14:05 -0800)
Pull RISC-V fix from Palmer Dabbelt
 "Avoid trying to initialize memory regions outside the usable range"

* tag 'riscv-for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  RISC-V: Fix usage of memblock_enforce_memory_limit

arch/riscv/mm/init.c

index 13ba533..bf53791 100644 (file)
@@ -176,7 +176,7 @@ void __init setup_bootmem(void)
         * Make sure that any memory beyond mem_start + (-PAGE_OFFSET) is removed
         * as it is unusable by kernel.
         */
-       memblock_enforce_memory_limit(mem_start - PAGE_OFFSET);
+       memblock_enforce_memory_limit(-PAGE_OFFSET);
 
        /* Reserve from the start of the kernel to the end of the kernel */
        memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);