]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: Fix Maximum Physical Memory 2GiB option for 64bit systems
authorAnup Patel <Anup.Patel@wdc.com>
Fri, 5 Apr 2019 05:49:34 +0000 (05:49 +0000)
committerPalmer Dabbelt <palmer@sifive.com>
Wed, 10 Apr 2019 16:41:40 +0000 (09:41 -0700)
commit6c23b20b6bb387af5bbd268c9c5c40f3a8086dda
treebf43cde7dbc80911ccd86c3a87170ba1d2a68ee2
parent9e54dc7ab2d3c7fadd028d7e4135503c89436781
RISC-V: Fix Maximum Physical Memory 2GiB option for 64bit systems

The Maximum Physical Memory 2GiB option for 64bit systems is currently
broken because kernel hangs at boot-time when this option is enabled
and the underlying system has more than 2GiB memory.

This issue can be easily reproduced on SiFive Unleashed board where
we have 8GiB of memory.

This patch fixes above issue by removing unusable memory region in
setup_bootmem().

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/mm/init.c