summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/i8254.h
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2016-10-19 14:50:47 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-12-08 17:31:11 +0300
commit36da91bdf568e804aac3ef02a5e3d867585f08fb (patch)
treeb1bd594acd9e661f26cdcb2afc4c0f0949555682 /arch/x86/kvm/i8254.h
parent16c2aec6a295f8a4916dbcbaa5051cf5c78be56a (diff)
downloadlinux-36da91bdf568e804aac3ef02a5e3d867585f08fb.tar.xz
KVM: x86: Handle the kthread worker using the new API
Use the new API to create and destroy the "kvm-pit" kthread worker. The API hides some implementation details. In particular, kthread_create_worker() allocates and initializes struct kthread_worker. It runs the kthread the right way and stores task_struct into the worker structure. kthread_destroy_worker() flushes all pending works, stops the kthread and frees the structure. This patch does not change the existing behavior except for dynamically allocating struct kthread_worker and storing only the pointer of this structure. It is compile tested only because I did not find an easy way how to run the code. Well, it should be pretty safe given the nature of the change. Signed-off-by: Petr Mladek <pmladek@suse.com> Message-Id: <1476877847-11217-1-git-send-email-pmladek@suse.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8254.h')
-rw-r--r--arch/x86/kvm/i8254.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/i8254.h b/arch/x86/kvm/i8254.h
index 2f5af0798326..600bee9dcbbd 100644
--- a/arch/x86/kvm/i8254.h
+++ b/arch/x86/kvm/i8254.h
@@ -44,8 +44,7 @@ struct kvm_pit {
struct kvm_kpit_state pit_state;
int irq_source_id;
struct kvm_irq_mask_notifier mask_notifier;
- struct kthread_worker worker;
- struct task_struct *worker_task;
+ struct kthread_worker *worker;
struct kthread_work expired;
};