summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/asm-uaccess.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2017-12-01 18:33:48 +0100
committerWill Deacon <will.deacon@arm.com>2017-12-11 14:41:17 +0100
commitb519538dfefc2f8478a1bcb458459c861d431784 (patch)
tree67c2118ec03d3ba0464620ecc5f5f6117b87e6f8 /arch/arm64/include/asm/asm-uaccess.h
parentperf: arm_spe: Fail device probe when arm64_kernel_unmapped_at_el0() (diff)
downloadlinux-b519538dfefc2f8478a1bcb458459c861d431784.tar.xz
linux-b519538dfefc2f8478a1bcb458459c861d431784.zip
arm64: mm: Introduce TTBR_ASID_MASK for getting at the ASID in the TTBR
There are now a handful of open-coded masks to extract the ASID from a TTBR value, so introduce a TTBR_ASID_MASK and use that instead. Suggested-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Laura Abbott <labbott@redhat.com> Tested-by: Shanker Donthineni <shankerd@codeaurora.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/asm-uaccess.h')
-rw-r--r--arch/arm64/include/asm/asm-uaccess.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/asm-uaccess.h b/arch/arm64/include/asm/asm-uaccess.h
index 21b8cf304028..f4f234b6155e 100644
--- a/arch/arm64/include/asm/asm-uaccess.h
+++ b/arch/arm64/include/asm/asm-uaccess.h
@@ -4,6 +4,7 @@
#include <asm/alternative.h>
#include <asm/kernel-pgtable.h>
+#include <asm/mmu.h>
#include <asm/sysreg.h>
#include <asm/assembler.h>
@@ -17,7 +18,7 @@
msr ttbr0_el1, \tmp1 // set reserved TTBR0_EL1
isb
sub \tmp1, \tmp1, #SWAPPER_DIR_SIZE
- bic \tmp1, \tmp1, #(0xffff << 48)
+ bic \tmp1, \tmp1, #TTBR_ASID_MASK
msr ttbr1_el1, \tmp1 // set reserved ASID
isb
.endm