KVM: arm64: Slightly optimize flush_context()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 18 Apr 2023 21:47:37 +0000 (23:47 +0200)
committerMarc Zyngier <maz@kernel.org>
Thu, 20 Apr 2023 08:10:28 +0000 (09:10 +0100)
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
arch/arm64/kvm/vmid.c

index 08978d0..bbf0677 100644 (file)
@@ -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);