KVM: Drop obsolete cpu_get/put in make_all_cpus_request
spin_lock disables preemption, so we can simply read the current cpu. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
84fde248fe
commit
e601e3be7a
1 changed files with 1 additions and 2 deletions
|
@ -741,8 +741,8 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
|
||||||
if (alloc_cpumask_var(&cpus, GFP_ATOMIC))
|
if (alloc_cpumask_var(&cpus, GFP_ATOMIC))
|
||||||
cpumask_clear(cpus);
|
cpumask_clear(cpus);
|
||||||
|
|
||||||
me = get_cpu();
|
|
||||||
spin_lock(&kvm->requests_lock);
|
spin_lock(&kvm->requests_lock);
|
||||||
|
me = smp_processor_id();
|
||||||
kvm_for_each_vcpu(i, vcpu, kvm) {
|
kvm_for_each_vcpu(i, vcpu, kvm) {
|
||||||
if (test_and_set_bit(req, &vcpu->requests))
|
if (test_and_set_bit(req, &vcpu->requests))
|
||||||
continue;
|
continue;
|
||||||
|
@ -757,7 +757,6 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
|
||||||
else
|
else
|
||||||
called = false;
|
called = false;
|
||||||
spin_unlock(&kvm->requests_lock);
|
spin_unlock(&kvm->requests_lock);
|
||||||
put_cpu();
|
|
||||||
free_cpumask_var(cpus);
|
free_cpumask_var(cpus);
|
||||||
return called;
|
return called;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue