]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Parse all memory blocks to remove unusable memory
authorAtish Patra <atish.patra@wdc.com>
Wed, 15 Jul 2020 23:30:09 +0000 (16:30 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Sat, 25 Jul 2020 05:08:25 +0000 (22:08 -0700)
commita21d4b0a2f2be0fb23aa2026aa9fd1079850d204
tree2f5f2132f89018fe9963519b85409e00ecdf1dc2
parent5c6a7e7b9db641363433d5764bea1737f06fa16e
riscv: Parse all memory blocks to remove unusable memory

Currently, maximum physical memory allowed is equal to -PAGE_OFFSET.
That's why we remove any memory blocks spanning beyond that size. However,
it is done only for memblock containing linux kernel which will not work
if there are multiple memblocks.

Process all memory blocks to figure out how much memory needs to be removed
and remove at the end instead of updating the memblock list in place.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/init.c