From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Leif Lindholm <leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org"
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org"
<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
"patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"roy.franz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<roy.franz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v4 2/5] arm: add new asm macro update_sctlr
Date: Wed, 22 Jan 2014 11:20:55 +0000 [thread overview]
Message-ID: <20140122112055.GF1621@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <1389445524-30623-3-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On Sat, Jan 11, 2014 at 01:05:21PM +0000, Leif Lindholm wrote:
> A new macro for setting/clearing bits in the SCTLR.
>
> Signed-off-by: Leif Lindholm <leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Suggested-by: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
> ---
> arch/arm/include/asm/assembler.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
> index 5c22851..aba6458 100644
> --- a/arch/arm/include/asm/assembler.h
> +++ b/arch/arm/include/asm/assembler.h
> @@ -383,4 +383,17 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
> #endif
> .endm
>
> +#ifdef CONFIG_CPU_CP15
> +/* Macro for setting/clearing bits in sctlr */
> + .macro update_sctlr, set:req, clear:req, tmp:req, tmp2:req
> + mrc p15, 0, \tmp, c1, c0, 0
> + ldr \tmp2, =\set
> + orr \tmp, \tmp, \tmp2
> + ldr \tmp2, =\clear
> + mvn \tmp2, \tmp2
> + and \tmp, \tmp, \tmp2
> + mcr p15, 0, \tmp, c1, c0, 0
I think this would be cleaner if you force the caller to put set and clear
into registers beforehand, rather than have to do the literal load every
time. Also, I don't think set and clear should be required (and then you can
lose tmp2 as well).
Will
next prev parent reply other threads:[~2014-01-22 11:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-11 13:05 [PATCH v4 0/5] arm: add UEFI runtime services support Leif Lindholm
2014-01-11 13:05 ` [PATCH v4 1/5] arm: break part of __soft_restart out into separate function Leif Lindholm
[not found] ` <1389445524-30623-2-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-01-22 11:09 ` Will Deacon
[not found] ` <1389445524-30623-1-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-01-11 13:05 ` [PATCH v4 2/5] arm: add new asm macro update_sctlr Leif Lindholm
[not found] ` <1389445524-30623-3-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-01-22 11:20 ` Will Deacon [this message]
[not found] ` <20140122112055.GF1621-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2014-01-29 18:28 ` Leif Lindholm
2014-01-29 19:27 ` Will Deacon
2014-01-29 20:58 ` Mark Salter
[not found] ` <1391029124.2488.50.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2014-01-30 13:12 ` Leif Lindholm
2014-02-03 10:34 ` Will Deacon
[not found] ` <20140203103415.GA12187-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2014-02-03 15:55 ` Leif Lindholm
2014-02-03 16:00 ` Will Deacon
2014-02-03 16:20 ` Rob Herring
2014-02-03 16:46 ` Leif Lindholm
2014-02-03 16:57 ` Will Deacon
[not found] ` <20140203165718.GO14112-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2014-02-03 18:15 ` Leif Lindholm
2014-01-11 13:05 ` [PATCH v4 3/5] Documentation: arm: add UEFI support documentation Leif Lindholm
2014-01-11 13:05 ` [PATCH v4 4/5] arm: Add [U]EFI runtime services support Leif Lindholm
[not found] ` <1389445524-30623-5-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-01-13 15:40 ` Matt Fleming
2014-01-13 18:43 ` Arnd Bergmann
2014-01-13 20:01 ` Leif Lindholm
[not found] ` <20140113200135.GF30907-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-01-14 6:52 ` Arnd Bergmann
[not found] ` <201401140752.33257.arnd-r2nGTMty4D4@public.gmane.org>
2014-01-14 11:44 ` Leif Lindholm
[not found] ` <20140114114419.GH30907-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-01-14 13:26 ` Arnd Bergmann
[not found] ` <201401141426.16497.arnd-r2nGTMty4D4@public.gmane.org>
2014-01-14 15:25 ` Leif Lindholm
2014-01-11 13:05 ` [PATCH v4 5/5] init: efi: arm: enable (U)EFI runtime services on arm Leif Lindholm
2014-01-13 18:29 ` Arnd Bergmann
[not found] ` <201401131929.07236.arnd-r2nGTMty4D4@public.gmane.org>
2014-01-13 18:57 ` Leif Lindholm
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=20140122112055.GF1621@mudshark.cambridge.arm.com \
--to=will.deacon-5wv7dgnigg8@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=roy.franz-QSEj5FYQhm4dnm+yROfE0A@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 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).