diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:24:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:24:53 -0400 |
commit | d4b80afbba49e968623330f1336da8c724da8aad (patch) | |
tree | a9478bd77d8b001a6a7119328d34e9666d7bfe93 /virt/kvm/arm/arch_timer.c | |
parent | fcd709ef20a9d83bdb7524d27cd6719dac8690a0 (diff) | |
parent | 4cea8776571b18db7485930cb422faa739580c8c (diff) |
Merge branch 'linus' into x86/asm, to pick up recent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'virt/kvm/arm/arch_timer.c')
-rw-r--r-- | virt/kvm/arm/arch_timer.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index 4fde8c7dfcfe..77e6ccf14901 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c | |||
@@ -33,6 +33,7 @@ | |||
33 | static struct timecounter *timecounter; | 33 | static struct timecounter *timecounter; |
34 | static struct workqueue_struct *wqueue; | 34 | static struct workqueue_struct *wqueue; |
35 | static unsigned int host_vtimer_irq; | 35 | static unsigned int host_vtimer_irq; |
36 | static u32 host_vtimer_irq_flags; | ||
36 | 37 | ||
37 | void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu) | 38 | void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu) |
38 | { | 39 | { |
@@ -365,7 +366,7 @@ void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu) | |||
365 | 366 | ||
366 | static void kvm_timer_init_interrupt(void *info) | 367 | static void kvm_timer_init_interrupt(void *info) |
367 | { | 368 | { |
368 | enable_percpu_irq(host_vtimer_irq, 0); | 369 | enable_percpu_irq(host_vtimer_irq, host_vtimer_irq_flags); |
369 | } | 370 | } |
370 | 371 | ||
371 | int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value) | 372 | int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value) |
@@ -432,6 +433,14 @@ int kvm_timer_hyp_init(void) | |||
432 | } | 433 | } |
433 | host_vtimer_irq = info->virtual_irq; | 434 | host_vtimer_irq = info->virtual_irq; |
434 | 435 | ||
436 | host_vtimer_irq_flags = irq_get_trigger_type(host_vtimer_irq); | ||
437 | if (host_vtimer_irq_flags != IRQF_TRIGGER_HIGH && | ||
438 | host_vtimer_irq_flags != IRQF_TRIGGER_LOW) { | ||
439 | kvm_err("Invalid trigger for IRQ%d, assuming level low\n", | ||
440 | host_vtimer_irq); | ||
441 | host_vtimer_irq_flags = IRQF_TRIGGER_LOW; | ||
442 | } | ||
443 | |||
435 | err = request_percpu_irq(host_vtimer_irq, kvm_arch_timer_handler, | 444 | err = request_percpu_irq(host_vtimer_irq, kvm_arch_timer_handler, |
436 | "kvm guest timer", kvm_get_running_vcpus()); | 445 | "kvm guest timer", kvm_get_running_vcpus()); |
437 | if (err) { | 446 | if (err) { |