arm64: tlbflush: Move invocation of __flush_tlb_range_op() to a macro
__flush_tlb_range_op() is a pre-processor macro that takes the TLB
operation as a string, and builds the instruction from it. This
prevents passing the TLB operation around as a variable.
__flush_tlb_range_op() also takes 7 other arguments.
Adding extra invocations for different TLB operations means duplicating
the whole thing, but those 7 extra arguments are the same each time.
Add an enum for the TLB operations that __flush_tlb_range() uses,
and a macro to pass the operation name as a sctring to
__flush_tlb_range_op(), and the rest of the arguments using __VA_ARGS_.
The result is easier to add new TLB operations to, and to modify
any of the other arguments as they only appear once.
Signed-off-by:
James Morse <james.morse@arm.com>
Loading
Please register or sign in to comment