public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: dave.martin@linaro•org (Dave Martin)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 3/3] ARM: tegra: make sure the pointer on 4 byte align when THUMB2_KERNEL enabled
Date: Wed, 17 Apr 2013 17:59:27 +0100	[thread overview]
Message-ID: <20130417165927.GD2249@linaro.org> (raw)
In-Reply-To: <1366066255-18192-3-git-send-email-swarren@wwwdotorg.org>

On Mon, Apr 15, 2013 at 04:50:55PM -0600, Stephen Warren wrote:
> From: Joseph Lo <josephl@nvidia•com>
> 
> When building kernel with CONFIG_THUMB2_KERNEL, the data pointer in the
> assembly may not on the 4 byte alignment. Then causing a data abort when
> accessing the pointer. This patch add a ".align" flag in the head of the
> pointer. And always using 32-bit ADR Thumb instruction to make sure it
> won't build failure.
> 
> Signed-off-by: Joseph Lo <josephl@nvidia•com>
> Signed-off-by: Stephen Warren <swarren@nvidia•com>

With the change to W(adr), Reviewed-by: Dave Martin <dave.martin@linaro•org>

> ---
>  arch/arm/mach-tegra/reset-handler.S |    1 +
>  arch/arm/mach-tegra/sleep.h         |    3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S
> index e6de88a..519a8c5 100644
> --- a/arch/arm/mach-tegra/reset-handler.S
> +++ b/arch/arm/mach-tegra/reset-handler.S
> @@ -83,6 +83,7 @@ ENDPROC(tegra_resume)
>  
>  #ifdef CONFIG_CACHE_L2X0
>  	.globl	l2x0_saved_regs_addr
> +	.align
>  l2x0_saved_regs_addr:
>  	.long	0
>  #endif
> diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h
> index 4ffae54..8e9b6af 100644
> --- a/arch/arm/mach-tegra/sleep.h
> +++ b/arch/arm/mach-tegra/sleep.h
> @@ -92,7 +92,8 @@
>  
>  #ifdef CONFIG_CACHE_L2X0
>  .macro l2_cache_resume, tmp1, tmp2, tmp3, phys_l2x0_saved_regs
> -	adr	\tmp1, \phys_l2x0_saved_regs
> + ARM(	adr	\tmp1, \phys_l2x0_saved_regs )
> + THUMB(	adr.w	\tmp1, \phys_l2x0_saved_regs )
>  	ldr	\tmp1, [\tmp1]
>  	ldr	\tmp2, [\tmp1, #L2X0_R_PHY_BASE]
>  	ldr	\tmp3, [\tmp2, #L2X0_CTRL]
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2013-04-17 16:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 22:50 [PATCH 1/3] ARM: tegra: fix build error when THUMB2_KERNEL enabled Stephen Warren
2013-04-15 22:50 ` [PATCH 2/3] ARM: tegra: fix relocation truncated " Stephen Warren
2013-04-17 17:01   ` Dave Martin
2013-04-18 16:32   ` Olof Johansson
2013-04-15 22:50 ` [PATCH 3/3] ARM: tegra: make sure the pointer on 4 byte align " Stephen Warren
2013-04-16 14:13   ` Dave Martin
2013-04-16 16:20     ` Stephen Warren
2013-04-17 10:30       ` Dave Martin
2013-04-17 16:22         ` Stephen Warren
2013-04-17 16:57           ` Dave Martin
2013-04-18 16:32       ` Olof Johansson
2013-04-17 16:59   ` Dave Martin [this message]
2013-04-17 17:00 ` [PATCH 1/3] ARM: tegra: fix build error " Dave Martin
2013-04-18 16:31 ` Olof Johansson
  -- strict thread matches above, loose matches on Subject: below --
2013-04-15 12:42 Joseph Lo
2013-04-15 12:42 ` [PATCH 3/3] ARM: tegra: make sure the pointer on 4 byte align " Joseph Lo

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=20130417165927.GD2249@linaro.org \
    --to=dave.martin@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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