Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm64/mm: Directly use TTBRx_EL1_CnP

Replace all TTBR_CNP_BIT macro instances with TTBRx_EL1_CNP_BIT which
is a standard field from tools sysreg format. Drop the now redundant
custom macro TTBR_CNP_BIT. No functional change.

Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oupton@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: kvmarm@lists.linux.dev
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Anshuman Khandual and committed by
Catalin Marinas
be6e9dee d989010b

+6 -8
-2
arch/arm64/include/asm/pgtable-hwdef.h
··· 223 223 */ 224 224 #define S1_TABLE_AP (_AT(pmdval_t, 3) << 61) 225 225 226 - #define TTBR_CNP_BIT (UL(1) << 0) 227 - 228 226 /* 229 227 * TCR flags. 230 228 */
+2 -2
arch/arm64/kernel/mte.c
··· 315 315 * CnP is not a boot feature so MTE gets enabled before CnP, but let's 316 316 * make sure that is the case. 317 317 */ 318 - BUG_ON(read_sysreg(ttbr0_el1) & TTBR_CNP_BIT); 319 - BUG_ON(read_sysreg(ttbr1_el1) & TTBR_CNP_BIT); 318 + BUG_ON(read_sysreg(ttbr0_el1) & TTBRx_EL1_CnP); 319 + BUG_ON(read_sysreg(ttbr1_el1) & TTBRx_EL1_CnP); 320 320 321 321 /* Normal Tagged memory type at the corresponding MAIR index */ 322 322 sysreg_clear_set(mair_el1,
+2 -2
arch/arm64/kvm/hyp/nvhe/hyp-init.S
··· 130 130 ldr x1, [x0, #NVHE_INIT_PGD_PA] 131 131 phys_to_ttbr x2, x1 132 132 alternative_if ARM64_HAS_CNP 133 - orr x2, x2, #TTBR_CNP_BIT 133 + orr x2, x2, #TTBRx_EL1_CnP 134 134 alternative_else_nop_endif 135 135 msr ttbr0_el2, x2 136 136 ··· 291 291 /* Install the new pgtables */ 292 292 phys_to_ttbr x5, x0 293 293 alternative_if ARM64_HAS_CNP 294 - orr x5, x5, #TTBR_CNP_BIT 294 + orr x5, x5, #TTBRx_EL1_CnP 295 295 alternative_else_nop_endif 296 296 msr ttbr0_el2, x5 297 297
+1 -1
arch/arm64/mm/context.c
··· 354 354 355 355 /* Skip CNP for the reserved ASID */ 356 356 if (system_supports_cnp() && asid) 357 - ttbr0 |= TTBR_CNP_BIT; 357 + ttbr0 |= TTBRx_EL1_CnP; 358 358 359 359 /* SW PAN needs a copy of the ASID in TTBR0 for entry */ 360 360 if (IS_ENABLED(CONFIG_ARM64_SW_TTBR0_PAN))
+1 -1
arch/arm64/mm/mmu.c
··· 2188 2188 phys_addr_t ttbr1 = phys_to_ttbr(virt_to_phys(pgdp)); 2189 2189 2190 2190 if (cnp) 2191 - ttbr1 |= TTBR_CNP_BIT; 2191 + ttbr1 |= TTBRx_EL1_CnP; 2192 2192 2193 2193 replace_phys = (void *)__pa_symbol(idmap_cpu_replace_ttbr1); 2194 2194