linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/8] ARM: add macro to perform far branches (b/bl)
Date: Fri, 13 Mar 2015 16:40:06 +0000	[thread overview]
Message-ID: <20150313164005.GU8656@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1426248452-4773-4-git-send-email-ard.biesheuvel@linaro.org>

On Fri, Mar 13, 2015 at 01:07:27PM +0100, Ard Biesheuvel wrote:
> +	.macro	bl_abs, target, c=
> +#if defined(CONFIG_CPU_32v7) || defined(CONFIG_CPU_32v7M)
> +	movt\c	lr, #:upper16:\target
> +	movw\c	lr, #:lower16:\target
> +	blx\c	lr

So I've looked this up, and it's valid, which is surprising because BLX
itself writes to LR - the read from LR must happen before BLX itself
writes to LR.  Thankfully, because of the pipelining, this is probably
guaranteed.

I wonder whether there will be any errata on this... maybe on non-ARM
CPUs?  It'll be interesting to find out what happens once we merge
this... :)

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-03-13 16:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 12:07 [PATCH v2 0/8] ARM kernel size fixes Ard Biesheuvel
2015-03-13 12:07 ` [PATCH v2 1/8] ARM: replace PROCINFO embedded branch with relative offset Ard Biesheuvel
2015-04-19 16:59   ` Joachim Eastwood
2015-04-19 17:08     ` Russell King - ARM Linux
2015-04-19 17:41       ` Ard Biesheuvel
2015-04-19 19:28         ` Russell King - ARM Linux
2015-04-19 19:45           ` Joachim Eastwood
2015-04-19 21:52           ` Ard Biesheuvel
2015-04-19 19:24       ` Joachim Eastwood
2015-03-13 12:07 ` [PATCH v2 2/8] ARM: move HYP text to end of .text section Ard Biesheuvel
2015-03-13 12:07 ` [PATCH v2 3/8] ARM: add macro to perform far branches (b/bl) Ard Biesheuvel
2015-03-13 16:40   ` Russell King - ARM Linux [this message]
2015-03-17 20:35     ` Ard Biesheuvel
2015-03-18 10:07   ` Ard Biesheuvel
2015-03-19  9:01     ` [PATCH] " Ard Biesheuvel
2015-03-13 12:07 ` [PATCH v2 4/8] ARM: use bl_far to call __hyp_stub_install_secondary from the .data section Ard Biesheuvel
2015-03-13 12:07 ` [PATCH v2 5/8] ARM: move the .idmap.text section closer to .head.text Ard Biesheuvel
2015-03-13 12:07 ` [PATCH v2 6/8] asm-generic: introduce .text.fixup input section Ard Biesheuvel
2015-03-18 18:58   ` Arnd Bergmann
2015-03-13 12:07 ` [PATCH v2 7/8] ARM: keep .text and .fixup regions together Ard Biesheuvel
2015-03-13 12:07 ` [PATCH v2 8/8] kallsyms: allow kallsyms data to reside in the .data section Ard Biesheuvel
2015-03-18  7:54 ` [PATCH v2 0/8] ARM kernel size fixes Ard Biesheuvel

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=20150313164005.GU8656@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).