diff options
-rw-r--r-- | arch/x86/kernel/kvm.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index a91c6b482b4..08b973f6403 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
@@ -120,11 +120,6 @@ void kvm_async_pf_task_wait(u32 token) | |||
120 | struct kvm_task_sleep_head *b = &async_pf_sleepers[key]; | 120 | struct kvm_task_sleep_head *b = &async_pf_sleepers[key]; |
121 | struct kvm_task_sleep_node n, *e; | 121 | struct kvm_task_sleep_node n, *e; |
122 | DEFINE_WAIT(wait); | 122 | DEFINE_WAIT(wait); |
123 | int cpu, idle; | ||
124 | |||
125 | cpu = get_cpu(); | ||
126 | idle = idle_cpu(cpu); | ||
127 | put_cpu(); | ||
128 | 123 | ||
129 | spin_lock(&b->lock); | 124 | spin_lock(&b->lock); |
130 | e = _find_apf_task(b, token); | 125 | e = _find_apf_task(b, token); |
@@ -138,7 +133,7 @@ void kvm_async_pf_task_wait(u32 token) | |||
138 | 133 | ||
139 | n.token = token; | 134 | n.token = token; |
140 | n.cpu = smp_processor_id(); | 135 | n.cpu = smp_processor_id(); |
141 | n.halted = idle || preempt_count() > 1; | 136 | n.halted = is_idle_task(current) || preempt_count() > 1; |
142 | init_waitqueue_head(&n.wq); | 137 | init_waitqueue_head(&n.wq); |
143 | hlist_add_head(&n.link, &b->list); | 138 | hlist_add_head(&n.link, &b->list); |
144 | spin_unlock(&b->lock); | 139 | spin_unlock(&b->lock); |