diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2009-07-20 11:30:12 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 08:33:16 +0300 |
commit | e601e3be7a5324fcfd34fdb8796688cfe48bd0fe (patch) | |
tree | a8539bdf1fa47d3ff681b67339de031200c8e34e /virt | |
parent | 84fde248fe42f130cdda39faaa8bb1224c6a13ff (diff) | |
download | kernel-crypto-e601e3be7a5324fcfd34fdb8796688cfe48bd0fe.tar.gz kernel-crypto-e601e3be7a5324fcfd34fdb8796688cfe48bd0fe.tar.xz kernel-crypto-e601e3be7a5324fcfd34fdb8796688cfe48bd0fe.zip |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 532af9b41ee..646cf2ae32f 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) if (alloc_cpumask_var(&cpus, GFP_ATOMIC)) cpumask_clear(cpus); - me = get_cpu(); spin_lock(&kvm->requests_lock); + me = smp_processor_id(); kvm_for_each_vcpu(i, vcpu, kvm) { if (test_and_set_bit(req, &vcpu->requests)) continue; @@ -757,7 +757,6 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) else called = false; spin_unlock(&kvm->requests_lock); - put_cpu(); free_cpumask_var(cpus); return called; } |