From: kgene.kim@samsung.com (Kukjin Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] arm: plat-samsung: check processor type before cache restoration in resume
Date: Mon, 11 Mar 2013 16:05:44 +0900 [thread overview]
Message-ID: <052201ce1e26$d9886bf0$8c9943d0$%kim@samsung.com> (raw)
In-Reply-To: <1361961363-28412-1-git-send-email-inderpal.singh@linaro.org>
Inderpal Singh wrote:
>
> Only cortex-a9 based samsung platforms have l2x0 cache controller. Hence check
> the same before restoring the cache in resume.
>
> This is needed for single kernel image.
>
> Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
> ---
> changes in v2:
> - check processor midr instead of checking all soc ids as
> suggested by Kukjin
>
> changes in v3:
> - simplify by reading midr in assembly as per Russell
>
> arch/arm/plat-samsung/s5p-sleep.S | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/plat-samsung/s5p-sleep.S b/arch/arm/plat-samsung/s5p-
> sleep.S
> index bdf6dad..6e15993 100644
> --- a/arch/arm/plat-samsung/s5p-sleep.S
> +++ b/arch/arm/plat-samsung/s5p-sleep.S
> @@ -25,6 +25,9 @@
> #include <asm/asm-offsets.h>
> #include <asm/hardware/cache-l2x0.h>
>
> +#define CPU_MASK 0xff0ffff0
> +#define CPU_CORTEX_A9 0x410fc090
> +
> /*
> * The following code is located into the .data section. This is to
> * allow l2x0_regs_phys to be accessed with a relative load while we
> @@ -51,6 +54,12 @@
>
> ENTRY(s3c_cpu_resume)
> #ifdef CONFIG_CACHE_L2X0
> + mrc p15, 0, r0, c0, c0, 0
> + ldr r1, =CPU_MASK
> + and r0, r0, r1
> + ldr r1, =CPU_CORTEX_A9
> + cmp r0, r1
> + bne resume_l2on
> adr r0, l2x0_regs_phys
> ldr r0, [r0]
> ldr r1, [r0, #L2X0_R_PHY_BASE]
> --
> 1.7.9.5
Looks good to me, applied.
Thanks.
- Kukjin
prev parent reply other threads:[~2013-03-11 7:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 10:36 [PATCH v3] arm: plat-samsung: check processor type before cache restoration in resume Inderpal Singh
2013-03-11 7:05 ` Kukjin Kim [this message]
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='052201ce1e26$d9886bf0$8c9943d0$%kim@samsung.com' \
--to=kgene.kim@samsung.com \
--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).