From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/7] ARM: Thumb-2: Fix CONFIG_THUMB2_KERNEL breakage in compressed/head.S
Date: Tue, 16 Nov 2010 13:14:36 +0000 [thread overview]
Message-ID: <1289913277-8822-6-git-send-email-dave.martin@linaro.org> (raw)
In-Reply-To: <1289913277-8822-1-git-send-email-dave.martin@linaro.org>
Some instruction operand combinations are used here
which are nor permitted in Thumb-2.
In particular, most uses of pc as an operand are
disallowed in Thumb-2, and deprecated in ARM from
ARMv7 onwards.
The modified code introduced by this patch should be
compatible with all architecture versions >= v3, with
or without CONFIG_THUMB2_KERNEL.
Applies cleanly on v2.6.37-rc1.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/boot/compressed/head.S | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 6825c34..1f65080 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -174,7 +174,8 @@ not_angel:
ldr sp, [r0, #28]
#ifdef CONFIG_AUTO_ZRELADDR
@ determine final kernel image address
- and r4, pc, #0xf8000000
+ mov r4, pc
+ and r4, r4, #0xf8000000
add r4, r4, #TEXT_OFFSET
#else
ldr r4, =zreladdr
@@ -445,7 +446,8 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size
*/
mov r1, #0x1e
orr r1, r1, #3 << 10
- mov r2, pc, lsr #20
+ mov r2, pc
+ mov r2, r2, lsr #20
orr r1, r1, r2, lsl #20
add r0, r3, r2, lsl #2
str r1, [r0], #4
--
1.7.1
next prev parent reply other threads:[~2010-11-16 13:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 13:14 [PATCH 1/7] ARM: kexec: Correct data alignment for CONFIG_THUMB2_KERNEL Dave Martin
2010-11-16 13:14 ` [PATCH 2/7] ARM: vfp: " Dave Martin
2010-11-16 13:14 ` [PATCH 3/7] ARM: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in bootp/init.S Dave Martin
2010-11-16 13:14 ` [PATCH 4/7] ARM: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in kernel/head.S Dave Martin
2010-11-16 18:22 ` Russell King - ARM Linux
2010-11-17 10:16 ` Catalin Marinas
2010-11-17 10:16 ` Dave Martin
2010-11-16 13:14 ` [PATCH 5/7] ARM: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in mm/proc-v7.S Dave Martin
2010-11-16 13:14 ` Dave Martin [this message]
2010-11-16 13:14 ` [PATCH 7/7] ARM: Thumb-2: Restore sensible zImage header layout for CONFIG_THUMB2_KERNEL Dave Martin
2010-11-16 18:26 ` Russell King - ARM Linux
2010-11-16 20:28 ` Nicolas Pitre
2010-11-16 20:35 ` Russell King - ARM Linux
2010-11-16 20:58 ` Uwe Kleine-König
2010-11-17 9:16 ` Dave Martin
2010-11-17 9:19 ` Dave Martin
2010-11-17 10:21 ` Catalin Marinas
2010-11-17 11:11 ` [PATCH 7/7 v1.1] " Dave Martin
2010-11-17 16:17 ` Nicolas Pitre
2010-11-17 16:46 ` Dave Martin
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=1289913277-8822-6-git-send-email-dave.martin@linaro.org \
--to=dave.martin@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.