From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Implement cpu_v7_reset.
Date: Wed, 01 Sep 2010 14:18:11 -0700 [thread overview]
Message-ID: <4C7EC313.7050705@codeaurora.org> (raw)
In-Reply-To: <1283349719-21115-1-git-send-email-linus.walleij@stericsson.com>
On 09/01/2010 07:01 AM, Linus Walleij wrote:
> From: Per Fransson <per.xx.fransson@stericsson.com>
>
> This implementation of cpu_v7_reset flushes the L1 cache
> and turns off the MMU.
>
> Signed-off-by: Per Fransson <per.xx.fransson@stericsson.com>
> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
> ---
Is this needed to make kexec work on v7? It would be nice if something
like that was noted in the commit message besides what the patch is doing.
> diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
> index d5d9b58..f2e2c92 100644
> --- a/arch/arm/mm/proc-v7.S
> +++ b/arch/arm/mm/proc-v7.S
> @@ -63,7 +63,18 @@ ENDPROC(cpu_v7_proc_fin)
> */
> .align 5
> ENTRY(cpu_v7_reset)
> - mov pc, r0
> + mov r4, r0
> + mov ip, #0
> + bl v7_flush_kern_cache_all @ invalidate I,D caches
> + dsb @ drain WB
Is this necessary considering that machine_kexec.c calls
flush_cache_all() right before calling cpu_reset()?
> +#ifdef CONFIG_MMU
> + mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
> +#endif
> + mrc p15, 0, ip, c1, c0, 0 @ ctrl register
> + bic ip, ip, #0x000f @ ............wcam
> + bic ip, ip, #0x1100 @ ...i...s........
> + mcr p15, 0, ip, c1, c0, 0 @ ctrl register
On a related note, I was always a bit confused since proc-v6 and proc-v7
don't turn off the MMU in their cpu_reset functions, which doesn't seem
correct with respect to Documentation/arm/Booting. Is it necessary to
turn off the MMU when kexec'ing the kernel? Last time I tried kexec'ing
on a v6 it worked fine without turning off the MMU.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2010-09-01 21:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-01 14:01 [PATCH] ARM: Implement cpu_v7_reset Linus Walleij
2010-09-01 21:18 ` Stephen Boyd [this message]
2010-09-02 5:03 ` Uwe Kleine-König
2010-09-02 8:43 ` Russell King - ARM Linux
2010-09-01 23:23 ` Russell King - ARM Linux
2010-09-02 8:34 ` Mika Westerberg
2010-09-02 8:41 ` Russell King - ARM Linux
2010-09-02 8:53 ` Mika Westerberg
2010-09-02 10:39 ` Russell King - ARM Linux
2010-09-02 11:52 ` Mika Westerberg
2010-09-02 12:18 ` Russell King - ARM Linux
2010-09-02 13:48 ` Mika Westerberg
2010-09-03 6:04 ` Mika Westerberg
2010-09-06 8:58 ` Per Fransson
2010-09-06 17:24 ` Mika Westerberg
2010-09-02 13:30 ` Per Fransson
2010-09-03 18:17 ` 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=4C7EC313.7050705@codeaurora.org \
--to=sboyd@codeaurora.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).