linux-stable/arch/arm64/mm
Mark Rutland 25b92693a1 arm64: mm: convert cpu_do_switch_mm() to C
There's no reason that cpu_do_switch_mm() needs to be written as an
assembly function, and having it as a C function would make it easier to
maintain.

This patch converts cpu_do_switch_mm() to C, removing code that this
change makes redundant (e.g. the mmid macro). Since the header comment
was stale and the prototype now implies all the necessary information,
this comment is removed. The 'pgd_phys' argument is made a phys_addr_t
to match the return type of virt_to_phys().

At the same time, post_ttbr_update_workaround() is updated to use
IS_ENABLED(), which allows the compiler to figure out it can elide calls
for !CONFIG_CAVIUM_ERRATUM_27456 builds.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
[catalin.marinas@arm.com: change comments from asm-style to C-style]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2020-02-27 14:30:50 +00:00
..
cache.S arm64: mm: Use modern annotations for assembly functions 2020-01-08 12:23:38 +00:00
context.c arm64: mm: convert cpu_do_switch_mm() to C 2020-02-27 14:30:50 +00:00
copypage.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
dma-mapping.c dma-mapping: drop the dev argument to arch_sync_dma_for_* 2019-11-20 20:31:38 +01:00
dump.c x86: mm: avoid allocating struct mm_struct on the stack 2020-02-04 03:05:25 +00: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: Revert support for execute-only user mappings 2020-01-06 10:10:07 -08:00
flush.c mm: introduce page_size() 2019-09-24 15:54:08 -07:00
hugetlbpage.c arm64/hugetlb: Use macros for contiguous huge page sizes 2019-06-03 16:58:37 +01:00
init.c arm64: mm: Fix initialisation of DMA zones on non-NUMA systems 2019-12-04 11:25:20 +00:00
ioremap.c arm64: remove __iounmap 2019-09-04 13:12:26 +01:00
kasan_init.c arm64: memory: rename VA_START to PAGE_END 2019-08-14 17:06:58 +01:00
Makefile arm64: mm: convert mm/dump.c to use walk_page_range() 2020-02-04 03:05:25 +00:00
mmap.c arm64, mm: move generic mmap layout functions to mm 2019-09-24 15:54:11 -07:00
mmu.c arm64: mm: convert mm/dump.c to use walk_page_range() 2020-02-04 03:05:25 +00:00
numa.c arm64: Replace strncmp with str_has_prefix 2019-08-05 11:06:34 +01:00
pageattr.c mm: change_memory_common: add spaces for * operator 2020-01-08 17:30:33 +00:00
pgd.c mm: consolidate pgtable_cache_init() and pgd_cache_init() 2019-09-24 15:54:09 -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: convert cpu_do_switch_mm() to C 2020-02-27 14:30:50 +00:00
ptdump_debugfs.c arm64: mm: convert mm/dump.c to use walk_page_range() 2020-02-04 03:05:25 +00:00