aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-07-20 05:30:12 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:33:16 -0400
commite601e3be7a5324fcfd34fdb8796688cfe48bd0fe (patch)
treea8539bdf1fa47d3ff681b67339de031200c8e34e /virt
parent84fde248fe42f130cdda39faaa8bb1224c6a13ff (diff)
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>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 532af9b41ee3..646cf2ae32fd 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -741,8 +741,8 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
741 if (alloc_cpumask_var(&cpus, GFP_ATOMIC)) 741 if (alloc_cpumask_var(&cpus, GFP_ATOMIC))
742 cpumask_clear(cpus); 742 cpumask_clear(cpus);
743 743
744 me = get_cpu();
745 spin_lock(&kvm->requests_lock); 744 spin_lock(&kvm->requests_lock);
745 me = smp_processor_id();
746 kvm_for_each_vcpu(i, vcpu, kvm) { 746 kvm_for_each_vcpu(i, vcpu, kvm) {
747 if (test_and_set_bit(req, &vcpu->requests)) 747 if (test_and_set_bit(req, &vcpu->requests))
748 continue; 748 continue;
@@ -757,7 +757,6 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
757 else 757 else
758 called = false; 758 called = false;
759 spin_unlock(&kvm->requests_lock); 759 spin_unlock(&kvm->requests_lock);
760 put_cpu();
761 free_cpumask_var(cpus); 760 free_cpumask_var(cpus);
762 return called; 761 return called;
763} 762}