From 8a71f0c656e0521867931eecff54eb3a35ca65a7 Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Tue, 6 Sep 2016 14:04:45 +0100 Subject: 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 Signed-off-by: Will Deacon --- arch/arm64/include/asm/cputype.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'arch/arm64/include/asm/cputype.h') 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 -#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 -- cgit v1.2.3-59-g8ed1b