From: james.morse@arm.com (James Morse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] arm64: kernel: preparatory: Move config_sctlr_el1
Date: Thu, 16 Jul 2015 17:01:55 +0100 [thread overview]
Message-ID: <1437062519-18883-2-git-send-email-james.morse@arm.com> (raw)
In-Reply-To: <1437062519-18883-1-git-send-email-james.morse@arm.com>
Later patches need config_sctlr_el1 to set/clear bits in the sctlr_el1
register.
This patch moves this function into header a file.
Signed-off-by: James Morse <james.morse@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
---
arch/arm64/include/asm/sysreg.h | 9 +++++++++
arch/arm64/kernel/armv8_deprecated.c | 11 +----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
index 5c89df0acbcb..7e419fabe75a 100644
--- a/arch/arm64/include/asm/sysreg.h
+++ b/arch/arm64/include/asm/sysreg.h
@@ -55,6 +55,15 @@ asm(
" .endm\n"
);
+static inline void config_sctlr_el1(u32 clear, u32 set)
+{
+ u32 val;
+
+ asm volatile("mrs %0, sctlr_el1" : "=r" (val));
+ val &= ~clear;
+ val |= set;
+ asm volatile("msr sctlr_el1, %0" : : "r" (val));
+}
#endif
#endif /* __ASM_SYSREG_H */
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c
index 7922c2e710ca..78d56bff91fd 100644
--- a/arch/arm64/kernel/armv8_deprecated.c
+++ b/arch/arm64/kernel/armv8_deprecated.c
@@ -16,6 +16,7 @@
#include <asm/insn.h>
#include <asm/opcodes.h>
+#include <asm/sysreg.h>
#include <asm/system_misc.h>
#include <asm/traps.h>
#include <asm/uaccess.h>
@@ -504,16 +505,6 @@ ret:
return 0;
}
-static inline void config_sctlr_el1(u32 clear, u32 set)
-{
- u32 val;
-
- asm volatile("mrs %0, sctlr_el1" : "=r" (val));
- val &= ~clear;
- val |= set;
- asm volatile("msr sctlr_el1, %0" : : "r" (val));
-}
-
static int cp15_barrier_set_hw_mode(bool enable)
{
if (enable)
--
2.1.4
next prev parent reply other threads:[~2015-07-16 16:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 16:01 [PATCH 0/5] arm64: kernel: Add support for Privileged Access Never James Morse
2015-07-16 16:01 ` James Morse [this message]
2015-07-17 11:06 ` [PATCH 1/5] arm64: kernel: preparatory: Move config_sctlr_el1 Catalin Marinas
2015-07-17 12:59 ` Catalin Marinas
2015-07-16 16:01 ` [PATCH 2/5] arm64: kernel: Add cpufeature 'enable' callback James Morse
2015-07-17 11:06 ` Catalin Marinas
2015-07-16 16:01 ` [PATCH 3/5] arm64: kernel: Add min/max values in feature-detection register values James Morse
2015-07-17 10:51 ` Will Deacon
2015-07-17 11:05 ` Catalin Marinas
2015-07-17 11:05 ` James Morse
2015-07-17 12:45 ` Will Deacon
2015-07-16 16:01 ` [PATCH 4/5] arm64: kernel: Add optional CONFIG_ parameter to ALTERNATIVE() James Morse
2015-07-17 11:08 ` Catalin Marinas
2015-07-16 16:01 ` [PATCH 5/5] arm64: kernel: Add support for Privileged Access Never James Morse
2015-07-17 12:57 ` Catalin Marinas
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=1437062519-18883-2-git-send-email-james.morse@arm.com \
--to=james.morse@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 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).