diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2014-05-16 06:08:29 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-07-21 07:22:42 -0400 |
commit | ea74c0ea1b24a6978a6ebc80ba4dbc7b7848b32d (patch) | |
tree | f17c10e3cc17e2c182447f5c95ef6bdeea1eb7db /arch/s390 | |
parent | 0e9c85a5a312fef3e2e79d3ce2d8b6e5b6115e90 (diff) |
KVM: s390: remove the tasklet used by the hrtimer
We can get rid of the tasklet used for waking up a VCPU in the hrtimer
code but wakeup the VCPU directly.
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 1 | ||||
-rw-r--r-- | arch/s390/kvm/interrupt.c | 13 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 2 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.h | 1 |
4 files changed, 1 insertions, 16 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index b3acf28c8c96..773bef7614d8 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -366,7 +366,6 @@ struct kvm_vcpu_arch { | |||
366 | s390_fp_regs guest_fpregs; | 366 | s390_fp_regs guest_fpregs; |
367 | struct kvm_s390_local_interrupt local_int; | 367 | struct kvm_s390_local_interrupt local_int; |
368 | struct hrtimer ckc_timer; | 368 | struct hrtimer ckc_timer; |
369 | struct tasklet_struct tasklet; | ||
370 | struct kvm_s390_pgm_info pgm; | 369 | struct kvm_s390_pgm_info pgm; |
371 | union { | 370 | union { |
372 | struct cpuid cpu_id; | 371 | struct cpuid cpu_id; |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 65396e14ff05..1be3d8da49e9 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -629,23 +629,12 @@ void kvm_s390_vcpu_wakeup(struct kvm_vcpu *vcpu) | |||
629 | } | 629 | } |
630 | } | 630 | } |
631 | 631 | ||
632 | void kvm_s390_tasklet(unsigned long parm) | ||
633 | { | ||
634 | struct kvm_vcpu *vcpu = (struct kvm_vcpu *) parm; | ||
635 | kvm_s390_vcpu_wakeup(vcpu); | ||
636 | } | ||
637 | |||
638 | /* | ||
639 | * low level hrtimer wake routine. Because this runs in hardirq context | ||
640 | * we schedule a tasklet to do the real work. | ||
641 | */ | ||
642 | enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer) | 632 | enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer) |
643 | { | 633 | { |
644 | struct kvm_vcpu *vcpu; | 634 | struct kvm_vcpu *vcpu; |
645 | 635 | ||
646 | vcpu = container_of(timer, struct kvm_vcpu, arch.ckc_timer); | 636 | vcpu = container_of(timer, struct kvm_vcpu, arch.ckc_timer); |
647 | vcpu->preempted = true; | 637 | kvm_s390_vcpu_wakeup(vcpu); |
648 | tasklet_schedule(&vcpu->arch.tasklet); | ||
649 | 638 | ||
650 | return HRTIMER_NORESTART; | 639 | return HRTIMER_NORESTART; |
651 | } | 640 | } |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index b29a03132ecb..dd902e64c033 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -649,8 +649,6 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | |||
649 | return rc; | 649 | return rc; |
650 | } | 650 | } |
651 | hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); | 651 | hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); |
652 | tasklet_init(&vcpu->arch.tasklet, kvm_s390_tasklet, | ||
653 | (unsigned long) vcpu); | ||
654 | vcpu->arch.ckc_timer.function = kvm_s390_idle_wakeup; | 652 | vcpu->arch.ckc_timer.function = kvm_s390_idle_wakeup; |
655 | get_cpu_id(&vcpu->arch.cpu_id); | 653 | get_cpu_id(&vcpu->arch.cpu_id); |
656 | vcpu->arch.cpu_id.version = 0xff; | 654 | vcpu->arch.cpu_id.version = 0xff; |
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index 665eaccb9ca5..3862fa2cefe0 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h | |||
@@ -138,7 +138,6 @@ static inline int kvm_s390_user_cpu_state_ctrl(struct kvm *kvm) | |||
138 | int kvm_s390_handle_wait(struct kvm_vcpu *vcpu); | 138 | int kvm_s390_handle_wait(struct kvm_vcpu *vcpu); |
139 | void kvm_s390_vcpu_wakeup(struct kvm_vcpu *vcpu); | 139 | void kvm_s390_vcpu_wakeup(struct kvm_vcpu *vcpu); |
140 | enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer); | 140 | enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer); |
141 | void kvm_s390_tasklet(unsigned long parm); | ||
142 | void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu); | 141 | void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu); |
143 | void kvm_s390_deliver_pending_machine_checks(struct kvm_vcpu *vcpu); | 142 | void kvm_s390_deliver_pending_machine_checks(struct kvm_vcpu *vcpu); |
144 | void kvm_s390_clear_local_irqs(struct kvm_vcpu *vcpu); | 143 | void kvm_s390_clear_local_irqs(struct kvm_vcpu *vcpu); |