diff options
author | Mark Rutland <mark.rutland@arm.com> | 2016-09-08 13:55:38 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-09-09 11:43:50 +0100 |
commit | adf7589997927b1d84a5d003027b866bbef61ef2 (patch) | |
tree | f3bb449f2bda4e8992983b5d87e7dab1415fa17e /arch/arm64/kernel/sys_compat.c | |
parent | 1f3d8699be82583c713e2a1099c597a740ebaf4d (diff) | |
download | linux-stable-adf7589997927b1d84a5d003027b866bbef61ef2.tar.gz linux-stable-adf7589997927b1d84a5d003027b866bbef61ef2.tar.bz2 linux-stable-adf7589997927b1d84a5d003027b866bbef61ef2.zip |
arm64: simplify sysreg manipulation
A while back we added {read,write}_sysreg accessors to handle accesses
to system registers, without the usual boilerplate asm volatile,
temporary variable, etc.
This patch makes use of these across arm64 to make code shorter and
clearer. For sequences with a trailing ISB, the existing isb() macro is
also used so that asm blocks can be removed entirely.
A few uses of inline assembly for msr/mrs are left as-is. Those
manipulating sp_el0 for the current thread_info value have special
clobber requiremends.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/sys_compat.c')
-rw-r--r-- | arch/arm64/kernel/sys_compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/sys_compat.c b/arch/arm64/kernel/sys_compat.c index 28c511b06edf..abaf582fc7a8 100644 --- a/arch/arm64/kernel/sys_compat.c +++ b/arch/arm64/kernel/sys_compat.c @@ -94,7 +94,7 @@ long compat_arm_syscall(struct pt_regs *regs) * See comment in tls_thread_flush. */ barrier(); - asm ("msr tpidrro_el0, %0" : : "r" (regs->regs[0])); + write_sysreg(regs->regs[0], tpidrro_el0); return 0; default: |