RISC-V: KVM: use bitmap_zero() API
authorYe Xingchen <ye.xingchen@zte.com.cn>
Sat, 6 May 2023 09:10:30 +0000 (17:10 +0800)
committerAnup Patel <anup@brainfault.org>
Tue, 6 Jun 2023 03:21:50 +0000 (08:51 +0530)
bitmap_zero() is faster than bitmap_clear(), so use bitmap_zero()
instead of bitmap_clear().

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/tlb.c

index 0e54796006959460b8836053edd20e91c9516d01..44bc324aeeb08d824804fd1138e4ab2b0d5e2d8e 100644 (file)
@@ -296,7 +296,7 @@ static void make_xfence_request(struct kvm *kvm,
        unsigned int actual_req = req;
        DECLARE_BITMAP(vcpu_mask, KVM_MAX_VCPUS);
 
-       bitmap_clear(vcpu_mask, 0, KVM_MAX_VCPUS);
+       bitmap_zero(vcpu_mask, KVM_MAX_VCPUS);
        kvm_for_each_vcpu(i, vcpu, kvm) {
                if (hbase != -1UL) {
                        if (vcpu->vcpu_id < hbase)