aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@arm.com>2016-04-11 16:32:52 +0100
committerGraeme Gregory <graeme.gregory@linaro.org>2016-05-17 11:45:26 +0100
commit1f03bc79cbe8699bb1ee8fcca1e23a7b554962d4 (patch)
treeeb524bcc1ec930165845bffde40e901ac02d9940
parent856e1e647390bf50426838809c4732dc1bea5fed (diff)
downloadleg-kernel-1f03bc79cbe8699bb1ee8fcca1e23a7b554962d4.tar.gz
clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ
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>
-rw-r--r--drivers/clocksource/arm_arch_timer.c2
-rw-r--r--include/clocksource/arm_arch_timer.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 62bdfe7067e3..bb58224eea36 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -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)
diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h
index 9101ed6b5550..9dd996a67e9e 100644
--- a/include/clocksource/arm_arch_timer.h
+++ b/include/clocksource/arm_arch_timer.h
@@ -51,6 +51,7 @@ enum arch_timer_reg {
struct arch_timer_kvm_info {
struct timecounter timecounter;
+ int virtual_irq;
};
#ifdef CONFIG_ARM_ARCH_TIMER