]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm64: mm: More flags for __flush_tlb_range()
authorRyan Roberts <ryan.roberts@arm.com>
Mon, 2 Mar 2026 13:55:58 +0000 (13:55 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 13 Mar 2026 17:24:09 +0000 (17:24 +0000)
commit0477fc56960d91ac98412534188741a09e5d8a18
treed632a4aa1dfe8dc4187d636158304fd484a6516b
parent11f6dd8dd2838703fe3d149118b8c785150cc92f
arm64: mm: More flags for __flush_tlb_range()

Refactor function variants with "_nosync", "_local" and "_nonotify" into
a single __always_inline implementation that takes flags and rely on
constant folding to select the parts that are actually needed at any
given callsite, based on the provided flags.

Flags all live in the tlbf_t (TLB flags) type; TLBF_NONE (0) continues
to provide the strongest semantics (i.e. evict from walk cache,
broadcast, synchronise and notify). Each flag reduces the strength in
some way; TLBF_NONOTIFY, TLBF_NOSYNC and TLBF_NOBROADCAST are added to
complement the existing TLBF_NOWALKCACHE.

There are no users that require TLBF_NOBROADCAST without
TLBF_NOWALKCACHE so implement that as BUILD_BUG() to avoid needing to
introduce dead code for vae1 invalidations.

The result is a clearer, simpler, more powerful API.

Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/tlbflush.h
arch/arm64/mm/contpte.c