From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: kernel/sleep.S: fix Thumb2 compilation issues
Date: Sat, 26 Mar 2011 10:20:41 +0000 [thread overview]
Message-ID: <20110326102041.GA24620@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.00.1103182256330.26889@xanadu.home>
On Fri, Mar 18, 2011 at 11:00:02PM -0400, Nicolas Pitre wrote:
>
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
>
> diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S
> index bfad698..6398ead 100644
> --- a/arch/arm/kernel/sleep.S
> +++ b/arch/arm/kernel/sleep.S
> @@ -119,11 +119,19 @@ ENTRY(cpu_resume)
> #else
> ldr r0, sleep_save_sp @ stack phys addr
> #endif
> - msr cpsr_c, #PSR_I_BIT | PSR_F_BIT | SVC_MODE @ set SVC, irqs off
> + setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off
> #ifdef MULTI_CPU
> - ldmia r0!, {r1, sp, lr, pc} @ load v:p, stack, return fn, resume fn
> + @ load v:p, stack, return fn, resume fn
> + ARM( ldmia r0!, {r1, sp, lr, pc} )
> +THUMB( ldmia r0!, {r1, r2, r3, r4} )
> +THUMB( mov sp, r2 )
> +THUMB( mov lr, r3 )
> +THUMB( bx r4 )
> #else
> - ldmia r0!, {r1, sp, lr} @ load v:p, stack, return fn
> + @ load v:p, stack, return fn
> + ARM( ldmia r0!, {r1, sp, lr} )
> +THUMB( ldmia r0!, {r1, r2, lr} )
> +THUMB( mov sp, r2 )
> b cpu_do_resume
> #endif
> ENDPROC(cpu_resume)
Do we know whether boot loaders support calling the resume path in Thumb
mode, and is the necessary setup in place for telling boot loaders that
they are to call the resume path in Thumb mode?
next prev parent reply other threads:[~2011-03-26 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-19 3:00 [PATCH] ARM: kernel/sleep.S: fix Thumb2 compilation issues Nicolas Pitre
2011-03-22 12:52 ` Dave Martin
2011-03-26 10:20 ` Russell King - ARM Linux [this message]
2011-03-26 15:41 ` Nicolas Pitre
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=20110326102041.GA24620@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).