From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org,
kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org
Subject: Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)
Date: Tue, 01 Jul 2014 13:26:18 -0600 [thread overview]
Message-ID: <53B30B5A.5030600@wwwdotorg.org> (raw)
In-Reply-To: <E1X20mL-00083I-Sv-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
On 07/01/2014 10:19 AM, Russell King wrote:
> ARMv6 and greater introduced a new instruction ("bx") which can be used
> to return from function calls. Recent CPUs perform better when the
> "bx lr" instruction is used rather than the "mov pc, lr" instruction,
> and this sequence is strongly recommended to be used by the ARM
> architecture manual (section A.4.1.1).
>
> We provide a new macro "ret" with all its variants for the condition
> code which will resolve to the appropriate instruction.
>
> Rather than doing this piecemeal, and miss some instances, change all
> the "mov pc" instances to use the new macro, with the exception of
> the "movs" instruction and the kprobes code. This allows us to detect
> the "mov pc, lr" case and fix it up - and also gives us the possibility
> of deploying this for other registers depending on the CPU selection.
Tested-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
(On an NVIDIA Tegra Jetson TK1 board, both CPU hotplug and system sleep
were tested, which are the use-cases that actually use the edited
assembly files)
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org,
kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org
Subject: Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)
Date: Tue, 01 Jul 2014 19:26:18 +0000 [thread overview]
Message-ID: <53B30B5A.5030600@wwwdotorg.org> (raw)
In-Reply-To: <E1X20mL-00083I-Sv-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
On 07/01/2014 10:19 AM, Russell King wrote:
> ARMv6 and greater introduced a new instruction ("bx") which can be used
> to return from function calls. Recent CPUs perform better when the
> "bx lr" instruction is used rather than the "mov pc, lr" instruction,
> and this sequence is strongly recommended to be used by the ARM
> architecture manual (section A.4.1.1).
>
> We provide a new macro "ret" with all its variants for the condition
> code which will resolve to the appropriate instruction.
>
> Rather than doing this piecemeal, and miss some instances, change all
> the "mov pc" instances to use the new macro, with the exception of
> the "movs" instruction and the kprobes code. This allows us to detect
> the "mov pc, lr" case and fix it up - and also gives us the possibility
> of deploying this for other registers depending on the CPU selection.
Tested-by: Stephen Warren <swarren@nvidia.com>
(On an NVIDIA Tegra Jetson TK1 board, both CPU hotplug and system sleep
were tested, which are the use-cases that actually use the edited
assembly files)
WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)
Date: Tue, 01 Jul 2014 13:26:18 -0600 [thread overview]
Message-ID: <53B30B5A.5030600@wwwdotorg.org> (raw)
In-Reply-To: <E1X20mL-00083I-Sv@rmk-PC.arm.linux.org.uk>
On 07/01/2014 10:19 AM, Russell King wrote:
> ARMv6 and greater introduced a new instruction ("bx") which can be used
> to return from function calls. Recent CPUs perform better when the
> "bx lr" instruction is used rather than the "mov pc, lr" instruction,
> and this sequence is strongly recommended to be used by the ARM
> architecture manual (section A.4.1.1).
>
> We provide a new macro "ret" with all its variants for the condition
> code which will resolve to the appropriate instruction.
>
> Rather than doing this piecemeal, and miss some instances, change all
> the "mov pc" instances to use the new macro, with the exception of
> the "movs" instruction and the kprobes code. This allows us to detect
> the "mov pc, lr" case and fix it up - and also gives us the possibility
> of deploying this for other registers depending on the CPU selection.
Tested-by: Stephen Warren <swarren@nvidia.com>
(On an NVIDIA Tegra Jetson TK1 board, both CPU hotplug and system sleep
were tested, which are the use-cases that actually use the edited
assembly files)
next prev parent reply other threads:[~2014-07-01 19:26 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 16:19 [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1) Russell King
2014-07-01 16:19 ` Russell King
2014-07-01 16:19 ` Russell King
2014-07-01 16:42 ` Måns Rullgård
[not found] ` <E1X20mL-00083I-Sv-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2014-07-01 16:42 ` Måns Rullgård
2014-07-01 16:42 ` Måns Rullgård
2014-07-01 16:42 ` Måns Rullgård
2014-07-01 16:42 ` Måns Rullgård
2014-07-01 17:13 ` Russell King - ARM Linux
2014-07-01 17:13 ` Russell King - ARM Linux
2014-07-01 17:13 ` Russell King - ARM Linux
2014-07-01 17:13 ` Russell King - ARM Linux
2014-07-01 17:24 ` Måns Rullgård
2014-07-01 17:24 ` Måns Rullgård
2014-07-01 17:24 ` Måns Rullgård
2014-07-01 17:35 ` Will Deacon
2014-07-01 17:35 ` Will Deacon
2014-07-01 17:35 ` Will Deacon
2014-07-01 20:04 ` Måns Rullgård
2014-07-01 20:04 ` Måns Rullgård
2014-07-01 20:04 ` Måns Rullgård
2014-07-01 20:04 ` Måns Rullgård
2014-07-01 20:04 ` Måns Rullgård
2014-07-02 3:17 ` Nicolas Pitre
2014-07-02 3:17 ` Nicolas Pitre
2014-07-02 3:17 ` Nicolas Pitre
2014-07-02 3:17 ` Nicolas Pitre
2014-07-01 17:35 ` Will Deacon
2014-07-01 17:24 ` Måns Rullgård
2014-07-01 19:26 ` Stephen Warren [this message]
2014-07-01 19:26 ` Stephen Warren
2014-07-01 19:26 ` Stephen Warren
2014-07-01 19:26 ` Stephen Warren
2014-07-01 22:42 ` Robert Jarzmik
2014-07-01 22:42 ` Robert Jarzmik
2014-07-01 22:42 ` Robert Jarzmik
2014-07-01 22:42 ` Robert Jarzmik
2014-07-05 1:06 ` Tomasz Figa
2014-07-05 1:06 ` Tomasz Figa
2014-07-05 1:06 ` Tomasz Figa
2014-07-05 1:06 ` Tomasz Figa
-- strict thread matches above, loose matches on Subject: below --
2014-07-01 16:19 Russell King
2014-07-01 16:19 [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part2) Russell King
2014-07-01 16:19 ` Russell King
2014-07-01 16:19 ` Russell King
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=53B30B5A.5030600@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.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.