diff options
author | Will Deacon <will.deacon@arm.com> | 2017-12-01 17:33:48 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-12-11 13:41:17 +0000 |
commit | b519538dfefc2f8478a1bcb458459c861d431784 (patch) | |
tree | 67c2118ec03d3ba0464620ecc5f5f6117b87e6f8 /arch/arm64/kernel/entry.S | |
parent | 7a4a0c1555b824e0d3dd72942481b1190abea604 (diff) | |
download | kernel_replicant_linux-b519538dfefc2f8478a1bcb458459c861d431784.tar.gz kernel_replicant_linux-b519538dfefc2f8478a1bcb458459c861d431784.tar.bz2 kernel_replicant_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/kernel/entry.S')
-rw-r--r-- | arch/arm64/kernel/entry.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 5d51bdbb2131..3eabcb194c87 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -205,7 +205,7 @@ alternative_else_nop_endif .if \el != 0 mrs x21, ttbr1_el1 - tst x21, #0xffff << 48 // Check for the reserved ASID + tst x21, #TTBR_ASID_MASK // Check for the reserved ASID orr x23, x23, #PSR_PAN_BIT // Set the emulated PAN in the saved SPSR b.eq 1f // TTBR0 access already disabled and x23, x23, #~PSR_PAN_BIT // Clear the emulated PAN in the saved SPSR |