[PATCH v2 02/13] arm64: mm: Introduce a C wrapper for by-range TLB invalidation
Jonathan Cameron
jonathan.cameron at huawei.com
Tue Jan 27 03:19:07 PST 2026
On Mon, 19 Jan 2026 17:21:49 +0000
Ryan Roberts <ryan.roberts at arm.com> wrote:
> As part of efforts to reduce our reliance on complex preprocessor macros
> for TLB invalidation routines, introduce a new C wrapper for by-range
> TLB invalidation which can be used instead of the __tlbi() macro and can
> additionally be called from C code.
>
> Each specific tlbi range op is implemented as a C function and the
> appropriate function pointer is passed to __tlbi_range(). Since
> everything is declared inline and is statically resolvable, the compiler
> will convert the indirect function call to a direct inline execution.
>
> Suggested-by: Linus Torvalds <torvalds at linux-foundation.org>
> Signed-off-by: Ryan Roberts <ryan.roberts at arm.com>
It's a little awkward to have the __flush_tlb_range_op documentation
20 odd lines before the code, but I can see why you want to keep
these new helpers tightly coupled with the macro in which they
are used, so fair enough.
Reviewed-by: Jonathan Cameron <jonathan.cameron at huawei.com>
More information about the linux-arm-kernel
mailing list