linux/arch/arm64/mm
Steve Capper c812026c54 arm64: mm: Logic to make offset_ttbr1 conditional
When running with a 52-bit userspace VA and a 48-bit kernel VA we offset
ttbr1_el1 to allow the kernel pagetables with a 52-bit PTRS_PER_PGD to
be used for both userspace and kernel.

Moving on to a 52-bit kernel VA we no longer require this offset to
ttbr1_el1 should we be running on a system with HW support for 52-bit
VAs.

This patch introduces conditional logic to offset_ttbr1 to query
SYS_ID_AA64MMFR2_EL1 whenever 52-bit VAs are selected. If there is HW
support for 52-bit VAs then the ttbr1 offset is skipped.

We choose to read a system register rather than vabits_actual because
offset_ttbr1 can be called in places where the kernel data is not
actually mapped.

Calls to offset_ttbr1 appear to be made from rarely called code paths so
this extra logic is not expected to adversely affect performance.

Signed-off-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2019-08-09 11:17:24 +01:00
..
cache.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
context.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
copypage.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
dma-mapping.c IOMMU Updates for Linux v5.3 2019-07-09 09:21:02 -07:00
dump.c arm64: dump: De-constify VA_START and KASAN_SHADOW_START 2019-08-09 11:17:16 +01:00
extable.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fault.c arm64: mm: Introduce vabits_actual 2019-08-09 11:17:21 +01:00
flush.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
hugetlbpage.c arm64/hugetlb: Use macros for contiguous huge page sizes 2019-06-03 16:58:37 +01:00
init.c arm64: mm: Introduce vabits_actual 2019-08-09 11:17:21 +01:00
ioremap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
kasan_init.c arm64: mm: Introduce VA_BITS_MIN 2019-08-09 11:17:16 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
mmu.c arm64: mm: Introduce vabits_actual 2019-08-09 11:17:21 +01:00
numa.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
pageattr.c mm/pgtable: drop pgtable_t variable from pte_fn_t functions 2019-07-12 11:05:46 -07:00
pgd.c arm64: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
physaddr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.S arm64: mm: Logic to make offset_ttbr1 conditional 2019-08-09 11:17:24 +01:00
ptdump_debugfs.c arm64: dump: no need to check return value of debugfs_create functions 2019-01-31 17:38:19 +00:00