linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Make sure memblock reserves the memory containing DT
@ 2020-10-01 19:04 Atish Patra
  2020-10-02 10:11 ` Anup Patel
  2020-10-04 23:20 ` Palmer Dabbelt
  0 siblings, 2 replies; 3+ messages in thread
From: Atish Patra @ 2020-10-01 19:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Damien Le Moal, Albert Ou, Anup Patel, Atish Patra,
	Palmer Dabbelt, Zong Li, Paul Walmsley, Alistair Francis,
	linux-riscv, Christoph Hellwig

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")
Signed-off-by: Atish Patra <atish.patra@wdc.com>

---
@Palmer This patch is applicable for v5.9 & before. This fix is already
part of the "RISC-V: Move DT mapping outof fixmap" patch from UEFI support
series. That's why, this patch doesn't need to go into for-next.
---
 arch/riscv/mm/init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 564e0be677b7..cabf1697e748 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -510,6 +510,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)
-- 
2.25.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-04 23:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 19:04 [PATCH] RISC-V: Make sure memblock reserves the memory containing DT Atish Patra
2020-10-02 10:11 ` Anup Patel
2020-10-04 23:20 ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).