From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: cpu_pj4b_suspend_size should base on cpu_v7_suspend_size
Date: Thu, 3 Jul 2014 17:01:35 +0800 [thread overview]
Message-ID: <20140703090134.GB30239@dragon> (raw)
In-Reply-To: <1404283715-3631-1-git-send-email-shawn.guo@freescale.com>
On Wed, Jul 02, 2014 at 02:48:35PM +0800, Shawn Guo wrote:
> Since pj4b suspend/resume routines are implemented based on generic
> ARMv7 ones, instead of hard-coding cpu_pj4b_suspend_size, we should have
> it be cpu_v7_suspend_size plus pj4b specific bytes. Otherwise, if
> cpu_v7_suspend_size gets updated alone, the pj4b suspend/resume will
> likely be broken.
>
> While at it, fix the comments in cpu_pj4b_do_resume, as we're restoring
> CP15 registers rather than saving in there.
>
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> ---
> Completely untested.
>
> arch/arm/mm/proc-v7.S | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
> index 3db2c2f04a30..604dda5f65cc 100644
> --- a/arch/arm/mm/proc-v7.S
> +++ b/arch/arm/mm/proc-v7.S
> @@ -184,16 +184,16 @@ ENDPROC(cpu_pj4b_do_suspend)
>
> ENTRY(cpu_pj4b_do_resume)
> ldmia r0!, {r6 - r10}
> - mcr p15, 1, r6, c15, c1, 0 @ save CP15 - extra features
> - mcr p15, 1, r7, c15, c2, 0 @ save CP15 - Aux Func Modes Ctrl 0
> - mcr p15, 1, r8, c15, c1, 2 @ save CP15 - Aux Debug Modes Ctrl 2
> - mcr p15, 1, r9, c15, c1, 1 @ save CP15 - Aux Debug Modes Ctrl 1
> - mcr p15, 0, r10, c9, c14, 0 @ save CP15 - PMC
> + mcr p15, 1, r6, c15, c1, 0 @ retore CP15 - extra features
> + mcr p15, 1, r7, c15, c2, 0 @ retore CP15 - Aux Func Modes Ctrl 0
> + mcr p15, 1, r8, c15, c1, 2 @ retore CP15 - Aux Debug Modes Ctrl 2
> + mcr p15, 1, r9, c15, c1, 1 @ retore CP15 - Aux Debug Modes Ctrl 1
> + mcr p15, 0, r10, c9, c14, 0 @ retore CP15 - PMC
s/retore/restore
I fixed the typo, added Gregory's Acked-by and Tested-by tags, and put
it into patch system as 8089/1.
Shawn
> b cpu_v7_do_resume
> ENDPROC(cpu_pj4b_do_resume)
> #endif
> .globl cpu_pj4b_suspend_size
> -.equ cpu_pj4b_suspend_size, 4 * 14
> +.equ cpu_pj4b_suspend_size, cpu_v7_suspend_size + 4 * 5
>
> #endif
>
> --
> 1.8.3.2
>
prev parent reply other threads:[~2014-07-03 9:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 6:48 [PATCH] ARM: cpu_pj4b_suspend_size should base on cpu_v7_suspend_size Shawn Guo
2014-07-02 7:12 ` Gregory CLEMENT
2014-07-02 9:14 ` Gregory CLEMENT
2014-07-03 9:01 ` Shawn Guo [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=20140703090134.GB30239@dragon \
--to=shawn.guo@freescale.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