clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ
authorJulien Grall <julien.grall@arm.com>
Mon, 11 Apr 2016 15:32:52 +0000 (16:32 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Tue, 3 May 2016 10:54:21 +0000 (12:54 +0200)
Currently, the firmware table is parsed by the virtual timer code in
order to retrieve the virtual timer interrupt. However, this is already
done by the arch timer driver.

To avoid code duplication, extend arch_timer_kvm_info to get the virtual
IRQ.

Note that the KVM code will be modified in a subsequent patch.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
drivers/clocksource/arm_arch_timer.c
include/clocksource/arm_arch_timer.h

index 62bdfe7067e3a2a5a6ad1d415ea1383d868bde79..bb58224eea36cdef85b75e79542d2c3382dec31f 100644 (file)
@@ -750,6 +750,8 @@ static void __init arch_timer_init(void)
 
        arch_timer_register();
        arch_timer_common_init();
+
+       arch_timer_kvm_info.virtual_irq = arch_timer_ppi[VIRT_PPI];
 }
 
 static void __init arch_timer_of_init(struct device_node *np)
index 9101ed6b555011cec29ab2965db724f4970d53ff..9dd996a67e9e30249c1f1d62630548c8e2889839 100644 (file)
@@ -51,6 +51,7 @@ enum arch_timer_reg {
 
 struct arch_timer_kvm_info {
        struct timecounter timecounter;
+       int virtual_irq;
 };
 
 #ifdef CONFIG_ARM_ARCH_TIMER