Skip to content

Commit

Permalink
KVM: arm64: Slightly optimize flush_context()
Browse files Browse the repository at this point in the history
bitmap_zero() is faster than bitmap_clear(), so use it to save a few
cycles.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/97bf2743f3a302b3066aced02218b9da60690dd3.1681854412.git.christophe.jaillet@wanadoo.fr
  • Loading branch information
Christophe JAILLET authored and Marc Zyngier committed Apr 20, 2023
1 parent 197b6b6 commit 4be8ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/kvm/vmid.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void flush_context(void)
int cpu;
u64 vmid;

bitmap_clear(vmid_map, 0, NUM_USER_VMIDS);
bitmap_zero(vmid_map, NUM_USER_VMIDS);

for_each_possible_cpu(cpu) {
vmid = atomic64_xchg_relaxed(&per_cpu(active_vmids, cpu), 0);
Expand Down

0 comments on commit 4be8ddb

Please sign in to comment.