summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2020-10-01 12:04:56 -0700
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-10-04 16:19:28 -0700
commita78c6f5956a949b496a5b087188dde52483edf51 (patch)
tree67ba16a086caf75f694114ec18032acd38e81976
parent549738f15da0e5a00275977623be199fbbf7df50 (diff)
downloadlinux-stable-a78c6f5956a949b496a5b087188dde52483edf51.tar.gz
linux-stable-a78c6f5956a949b496a5b087188dde52483edf51.tar.bz2
linux-stable-a78c6f5956a949b496a5b087188dde52483edf51.zip
RISC-V: Make sure memblock reserves the memory containing DT
Currently, the memory containing DT is not reserved. Thus, that region of memory can be reallocated or reused for other purposes. This may result in corrupted DT for nommu virt board in Qemu. We may not face any issue in kendryte as DT is embedded in the kernel image for that. Fixes: 6bd33e1ece52 ("riscv: add nommu support") Cc: stable@vger.kernel.org Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
-rw-r--r--arch/riscv/mm/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index ca03762a3733..f750e012dbe5 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -515,6 +515,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
#else
dtb_early_va = (void *)dtb_pa;
#endif
+ dtb_early_pa = dtb_pa;
}
static inline void setup_vm_final(void)