From: nico@fluxnic.net (Nicolas Pitre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: introduce common set_auxcr/get_auxcr functions
Date: Wed, 16 Jan 2013 23:34:37 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.02.1301162334100.6300@xanadu.home> (raw)
In-Reply-To: <1358391205-23943-1-git-send-email-robherring2@gmail.com>
On Wed, 16 Jan 2013, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Move the private set_auxcr/get_auxcr functions from
> drivers/cpuidle/cpuidle-calxeda.c so they can be used across platforms.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/include/asm/cp15.h | 14 ++++++++++++++
> drivers/cpuidle/cpuidle-calxeda.c | 14 --------------
> 2 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h
> index 5ef4d80..ef0094a 100644
> --- a/arch/arm/include/asm/cp15.h
> +++ b/arch/arm/include/asm/cp15.h
> @@ -59,6 +59,20 @@ static inline void set_cr(unsigned int val)
> isb();
> }
>
> +static inline unsigned int get_auxcr(void)
> +{
> + unsigned int val;
> + asm("mrc p15, 0, %0, c1, c0, 1 @ get AUXCR" : "=r" (val) : : "cc");
> + return val;
> +}
> +
> +static inline void set_auxcr(unsigned int val)
> +{
> + asm volatile("mcr p15, 0, %0, c1, c0, 1 @ set AUXCR"
> + : : "r" (val) : "cc");
> + isb();
> +}
> +
> #ifndef CONFIG_SMP
> extern void adjust_cr(unsigned long mask, unsigned long set);
> #endif
> diff --git a/drivers/cpuidle/cpuidle-calxeda.c b/drivers/cpuidle/cpuidle-calxeda.c
> index e1aab38..ece83d6 100644
> --- a/drivers/cpuidle/cpuidle-calxeda.c
> +++ b/drivers/cpuidle/cpuidle-calxeda.c
> @@ -37,20 +37,6 @@ extern void *scu_base_addr;
>
> static struct cpuidle_device __percpu *calxeda_idle_cpuidle_devices;
>
> -static inline unsigned int get_auxcr(void)
> -{
> - unsigned int val;
> - asm("mrc p15, 0, %0, c1, c0, 1 @ get AUXCR" : "=r" (val) : : "cc");
> - return val;
> -}
> -
> -static inline void set_auxcr(unsigned int val)
> -{
> - asm volatile("mcr p15, 0, %0, c1, c0, 1 @ set AUXCR"
> - : : "r" (val) : "cc");
> - isb();
> -}
> -
> static noinline void calxeda_idle_restore(void)
> {
> set_cr(get_cr() | CR_C);
> --
> 1.7.10.4
>
prev parent reply other threads:[~2013-01-17 4:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 2:53 [PATCH 1/3] ARM: introduce common set_auxcr/get_auxcr functions Rob Herring
2013-01-17 2:53 ` [PATCH 2/3] ARM: convert platform hotplug inline assembly to C Rob Herring
2013-01-17 4:40 ` Nicolas Pitre
2013-01-17 14:18 ` Rob Herring
2013-01-17 15:42 ` Nicolas Pitre
2013-01-18 3:34 ` Rob Herring
2013-01-18 4:56 ` Nicolas Pitre
2013-01-17 2:53 ` [PATCH 3/3] ARM: omap2: use get_auxcr for aux ctrl register read Rob Herring
2013-01-17 4:41 ` Nicolas Pitre
2013-01-17 8:30 ` Santosh Shilimkar
2013-01-17 17:07 ` Tony Lindgren
2013-01-17 4:34 ` Nicolas Pitre [this message]
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=alpine.LFD.2.02.1301162334100.6300@xanadu.home \
--to=nico@fluxnic.net \
--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).