From: geoff@infradead.org (Geoff Levand)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/15] Revert "arm64: remove dead code"
Date: Fri, 06 Nov 2015 19:14:36 +0000 [thread overview]
Message-ID: <c87c444834fbc48dc9ce60df9462b2b3357dee01.1446836443.git.geoff@infradead.org> (raw)
In-Reply-To: <cover.1446836442.git.geoff@infradead.org>
This reverts commit b08d4640a3dca68670fc5af2fe9205b395a02388.
Add back the setup_mm_for_reboot() needed for kexec.
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/arm64/include/asm/mmu.h | 1 +
arch/arm64/mm/mmu.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
index 0302087..79fcfb0 100644
--- a/arch/arm64/include/asm/mmu.h
+++ b/arch/arm64/include/asm/mmu.h
@@ -28,6 +28,7 @@ typedef struct {
#define ASID(mm) ((mm)->context.id & 0xffff)
extern void paging_init(void);
+extern void setup_mm_for_reboot(void);
extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
extern void init_mem_pgprot(void);
extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 9211b85..8cffad9 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -461,6 +461,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.5.0
next prev parent reply other threads:[~2015-11-06 19:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 19:14 [PATCH 00/15] arm64 kexec kernel patches v11 Geoff Levand
2015-11-06 19:14 ` [PATCH 05/15] arm64: Add back cpu_reset routines Geoff Levand
2015-11-06 19:14 ` [PATCH 07/15] arm64/kexec: Add core kexec support Geoff Levand
2015-11-06 19:14 ` [PATCH 03/15] arm64: Add new hcall HVC_CALL_FUNC Geoff Levand
2015-11-06 19:14 ` [PATCH 08/15] arm64/kexec: Add pr_devel output Geoff Levand
2015-11-06 19:14 ` Geoff Levand [this message]
2015-11-06 19:14 ` [PATCH 01/15] arm64: Fold proc-macros.S into assembler.h Geoff Levand
2015-11-06 19:14 ` [PATCH 09/15] arm64/kexec: Enable kexec in the arm64 defconfig Geoff Levand
2015-11-06 19:14 ` [PATCH 04/15] arm64: kvm: allows kvm cpu hotplug Geoff Levand
2015-11-06 19:14 ` [PATCH 02/15] arm64: Convert hcalls to use HVC immediate value Geoff Levand
2015-11-06 19:14 ` [PATCH 13/15] arm64: kdump: update a kernel doc Geoff Levand
2015-11-06 19:14 ` [PATCH 14/15] arm64: kdump: enable kdump in the arm64 defconfig Geoff Levand
2015-11-06 19:14 ` [PATCH 10/15] arm64: kdump: reserve memory for crash dump kernel Geoff Levand
2015-11-06 19:14 ` [PATCH 15/15] arm64: kdump: relax BUG_ON() if more than one cpus are still active Geoff Levand
2015-11-06 19:14 ` [PATCH 12/15] arm64: kdump: add kdump support Geoff Levand
2015-11-06 19:14 ` [PATCH 11/15] arm64: kdump: implement machine_crash_shutdown() Geoff Levand
2015-11-10 1:23 ` AKASHI Takahiro
2015-11-10 9:54 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c87c444834fbc48dc9ce60df9462b2b3357dee01.1446836443.git.geoff@infradead.org \
--to=geoff@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).