aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/cputype.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2016-09-06 14:04:45 +0100
committerWill Deacon <will.deacon@arm.com>2016-09-09 18:12:08 +0100
commit8a71f0c656e0521867931eecff54eb3a35ca65a7 (patch)
tree4c460a0145d2a9a1c2a70b93ceb294a2c7280ac7 /arch/arm64/include/asm/cputype.h
parentarm64: Remove shadowed asm-generic headers (diff)
downloadlinux-dev-8a71f0c656e0521867931eecff54eb3a35ca65a7.tar.xz
linux-dev-8a71f0c656e0521867931eecff54eb3a35ca65a7.zip
arm64: sysreg: replace open-coded mrs_s/msr_s with {read,write}_sysreg_s
Similar to our {read,write}_sysreg accessors for architected, named system registers, this patch introduces {read,write}_sysreg_s variants that can take arbitrary sys_reg output and therefore access IMPDEF registers or registers that unsupported by binutils. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/cputype.h')
-rw-r--r--arch/arm64/include/asm/cputype.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h
index 9d9fd4b9a72e..26a68ddb11c1 100644
--- a/arch/arm64/include/asm/cputype.h
+++ b/arch/arm64/include/asm/cputype.h
@@ -93,11 +93,7 @@
#include <asm/sysreg.h>
-#define read_cpuid(reg) ({ \
- u64 __val; \
- asm("mrs_s %0, " __stringify(SYS_ ## reg) : "=r" (__val)); \
- __val; \
-})
+#define read_cpuid(reg) read_sysreg_s(SYS_ ## reg)
/*
* The CPU ID never changes at run time, so we might as well tell the