All of lore.kernel.org
 help / color / mirror / Atom feed
From: nico@fluxnic.net (Nicolas Pitre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 6/9] ARM: Thumb-2: Fix CONFIG_THUMB2_KERNEL breakage in compressed/head.S
Date: Mon, 22 Nov 2010 14:06:35 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1011221406040.9313@xanadu.home> (raw)
In-Reply-To: <1290449065-28843-7-git-send-email-dave.martin@linaro.org>

On Mon, 22 Nov 2010, Dave Martin wrote:

> 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>

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>

> ---
>  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
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

  reply	other threads:[~2010-11-22 19:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22 18:04 [PATCH v2 0/9] ARM: Thumb-2: Various fixes for building Thumb-2 kernels Dave Martin
2010-11-22 18:04 ` [PATCH v2 1/9] ARM: kexec: Correct data alignment for CONFIG_THUMB2_KERNEL Dave Martin
2010-11-22 18:04 ` [PATCH v2 2/9] ARM: vfp: " Dave Martin
2010-11-22 18:04 ` [PATCH v2 3/9] ARM: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in bootp/init.S Dave Martin
2010-11-22 18:04 ` [PATCH v2 4/9] ARM: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in kernel/head.S Dave Martin
2010-11-22 18:04 ` [PATCH v2 5/9] ARM: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in mm/proc-v7.S Dave Martin
2010-11-22 18:04 ` [PATCH v2 6/9] ARM: Thumb-2: Fix CONFIG_THUMB2_KERNEL breakage in compressed/head.S Dave Martin
2010-11-22 19:06   ` Nicolas Pitre [this message]
2010-11-22 18:04 ` [PATCH v2 7/9] ARM: Thumb-2: Restore sensible zImage header layout for CONFIG_THUMB2_KERNEL Dave Martin
2010-11-22 18:28   ` Nicolas Pitre
2010-11-22 18:39     ` Dave Martin
2010-11-22 18:04 ` [PATCH v2 8/9] ARM: Thumb-2: Fix long-distance conditional branches in head.S for Thumb-2 Dave Martin
2010-11-22 19:03   ` Nicolas Pitre
2010-11-22 19:17     ` Russell King - ARM Linux
2010-11-22 19:28       ` Dave Martin
2010-11-23  0:29         ` Nicolas Pitre
2010-11-22 20:24       ` Nicolas Pitre
2010-11-22 23:44         ` Russell King - ARM Linux
2010-11-23  0:26           ` Nicolas Pitre
2010-11-23  8:56             ` Russell King - ARM Linux
2010-11-23 17:56               ` Nicolas Pitre
2010-11-22 18:04 ` [PATCH v2 9/9] ARM: kprobes: Don't HAVE_KPROBES when CONFIG_THUMB2_KERNEL is selected Dave Martin
2010-11-22 18:38   ` Nicolas Pitre
2010-11-22 23:01   ` Sergei Shtylyov
2010-11-23 10:44     ` 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=alpine.LFD.2.00.1011221406040.9313@xanadu.home \
    --to=nico@fluxnic.net \
    --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.