Skip to content

Commit 62ce7af

Browse files
Anshuman Khandualwilldeacon
authored andcommitted
arm64/mm: Directly use ID_AA64MMFR2_EL1_VARange_MASK
Tools generated register fields have in place mask macros which can be used directly instead of shifting the older right end sided masks. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20230711092055.245756-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent d099955 commit 62ce7af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/head.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ SYM_CODE_START(primary_entry)
113113
*/
114114
#if VA_BITS > 48
115115
mrs_s x0, SYS_ID_AA64MMFR2_EL1
116-
tst x0, #0xf << ID_AA64MMFR2_EL1_VARange_SHIFT
116+
tst x0, ID_AA64MMFR2_EL1_VARange_MASK
117117
mov x0, #VA_BITS
118118
mov x25, #VA_BITS_MIN
119119
csel x25, x25, x0, eq
@@ -756,7 +756,7 @@ SYM_FUNC_START(__cpu_secondary_check52bitva)
756756
b.ne 2f
757757

758758
mrs_s x0, SYS_ID_AA64MMFR2_EL1
759-
and x0, x0, #(0xf << ID_AA64MMFR2_EL1_VARange_SHIFT)
759+
and x0, x0, ID_AA64MMFR2_EL1_VARange_MASK
760760
cbnz x0, 2f
761761

762762
update_early_cpu_boot_status \

0 commit comments

Comments
 (0)