Skip to content
Commit 3966e8ce authored by James Morse's avatar James Morse Committed by Ryan Roberts
Browse files

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's avatarJames Morse <james.morse@arm.com>
parent 0ff41df1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment