From: mika.westerberg@iki.fi (Mika Westerberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: kexec: selective MMU identity mapping
Date: Thu, 3 Feb 2011 09:32:32 +0200 [thread overview]
Message-ID: <20110203073232.GA2708@acer> (raw)
In-Reply-To: <1296657809-1589-1-git-send-email-per.xx.fransson@stericsson.com>
Hi,
Few questions, see below.
On Wed, Feb 02, 2011 at 03:43:29PM +0100, Per Fransson wrote:
> When restarting using the kernel kexec functionality the MMU
> needs to be turned off. Any code which does this needs to use
> identity mapped addresses to get reliable results. In the ARM
> kexec case this identity mapping is done:
[...]
> diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
> index 0c1172b..762bb43 100644
> --- a/arch/arm/mm/proc-v7.S
> +++ b/arch/arm/mm/proc-v7.S
> @@ -61,6 +61,10 @@ ENDPROC(cpu_v7_proc_fin)
> */
> .align 5
> ENTRY(cpu_v7_reset)
> + sub pc, pc, #PAGE_OFFSET+4 @ go to physical addresses
How the above is going to work if PHYS_OFFSET is something else than zero? Also
does this work with Thumb-2 kernels?
> + mrc p15, 0, ip, c1, c0, 0 @ ctrl register
> + bic ip, ip, #0x0001 @ ...............m
> + mcr p15, 0, ip, c1, c0, 0 @ ctrl register
> mov pc, r0
> ENDPROC(cpu_v7_reset)
>
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index 03e8e8d..6a1345b 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -106,7 +106,11 @@ struct kimage {
> #endif
> };
>
> -
> +struct kexec_mmu_ent {
> + pgd_t *ptr;
> + pgd_t store;
> +};
> +extern struct kexec_mmu_ent kexec_mmu_ents[4];
>
> /* kexec interface functions */
> extern void machine_kexec(struct kimage *image);
Is it good idea to place these in a generic header as they are only used in ARM?
Thanks,
MW
next prev parent reply other threads:[~2011-02-03 7:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 14:43 [PATCH v2] ARM: kexec: selective MMU identity mapping Per Fransson
2011-02-02 20:48 ` Nicolas Pitre
2011-02-02 21:09 ` Russell King - ARM Linux
2011-02-02 22:10 ` Nicolas Pitre
2011-02-02 22:19 ` Russell King - ARM Linux
2011-02-02 22:27 ` Nicolas Pitre
2011-02-02 22:47 ` Russell King - ARM Linux
2011-02-03 7:32 ` Mika Westerberg [this message]
2011-02-03 10:14 ` Per Fransson
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=20110203073232.GA2708@acer \
--to=mika.westerberg@iki.fi \
--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