From: John Jacques <john.jacq...@intel.com>

Add the setup_mm_for_reboot() function needed for kexec.

Signed-off-by: Geoff Levand <ge...@infradead.org>
Signed-off-by: John Jacques <john.jacq...@intel.com>
Signed-off-by: Charlie Paul <charlie.p...@windriver.com>
Signed-off-by: Daniel Dragomir <daniel.drago...@windriver.com>
---
 arch/arm64/mm/mmu.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 0fa5581..755adcd 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -660,6 +660,17 @@ void __init paging_init(void)
 }
 
 /*
+ * Enable the identity mapping to allow the MMU disabling.
+ */
+void setup_mm_for_reboot(void)
+{
+       cpu_set_reserved_ttbr0();
+       flush_tlb_all();
+       cpu_set_idmap_tcr_t0sz();
+       cpu_switch_mm(idmap_pg_dir, &init_mm);
+}
+
+/*
  * Check whether a kernel address is valid (derived from arch/x86/).
  */
 int kern_addr_valid(unsigned long addr)
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9501): 
https://lists.yoctoproject.org/g/linux-yocto/message/9501
Mute This Topic: https://lists.yoctoproject.org/mt/81082029/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to