All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 3/4] arm64: Switch to ldr for loading the stub vectors
Date: Tue, 3 Jun 2014 16:22:51 +0100	[thread overview]
Message-ID: <20140603152251.GQ23149@arm.com> (raw)
In-Reply-To: <1401742658-11841-4-git-send-email-lauraa@codeaurora.org>

On Mon, Jun 02, 2014 at 09:57:37PM +0100, Laura Abbott wrote:
> 
> The hyp stub vectors are currently loaded using adr. This
> instruction has a +/- 1MB range for the loading address. If
> the alignment for sections is changed. the address may be more
> than 1MB away, resulting in reclocation errors. Switch to using
> ldr for getting the address to ensure we aren't affected by the
> location of the __hyp_stub_vectors.
> 
> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> ---
>  arch/arm64/kernel/head.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
> index 0fd5650..07574f4 100644
> --- a/arch/arm64/kernel/head.S
> +++ b/arch/arm64/kernel/head.S
> @@ -208,7 +208,7 @@ CPU_LE(	movk	x0, #0x30d0, lsl #16	)	// Clear EE and E0E on LE systems
>  	msr	vttbr_el2, xzr
>  
>  	/* Hypervisor stub */
> -	adr	x0, __hyp_stub_vectors
> +	ldr	x0, =__hyp_stub_vectors
>  	msr	vbar_el2, x0

Or use Ard's trick with adrp and the lo12 relocation?

Will

  reply	other threads:[~2014-06-03 15:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 20:57 [PATCHv2 0/4] Page protections for arm64 Laura Abbott
2014-06-02 20:57 ` [PATCHv2 1/4] arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support Laura Abbott
2014-06-03 15:22   ` Will Deacon
2014-06-03 15:31     ` Steve Capper
2014-06-03 15:37       ` Will Deacon
2014-06-03 16:04         ` Steve Capper
2014-06-04  0:56     ` Laura Abbott
2014-06-04 18:00       ` Will Deacon
2014-06-02 20:57 ` [PATCHv2 2/4] arm64: Treat handle_arch_irq as a function pointer Laura Abbott
2014-06-03  9:13   ` Mark Rutland
2014-06-03  9:36     ` Ard Biesheuvel
2014-06-02 20:57 ` [PATCHv2 3/4] arm64: Switch to ldr for loading the stub vectors Laura Abbott
2014-06-03 15:22   ` Will Deacon [this message]
2014-06-02 20:57 ` [PATCHv2 4/4] arm64: add better page protections to arm64 Laura Abbott
2014-06-03 16:04   ` Steve Capper

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=20140603152251.GQ23149@arm.com \
    --to=will.deacon@arm.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 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.