Commit d9b5e415 authored by Julien Grall's avatar Julien Grall Committed by Christoffer Dall

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: default avatarJulien Grall <julien.grall@arm.com>
Acked-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent b4d6ce97
...@@ -750,6 +750,8 @@ static void __init arch_timer_init(void) ...@@ -750,6 +750,8 @@ static void __init arch_timer_init(void)
arch_timer_register(); arch_timer_register();
arch_timer_common_init(); 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) static void __init arch_timer_of_init(struct device_node *np)
......
...@@ -51,6 +51,7 @@ enum arch_timer_reg { ...@@ -51,6 +51,7 @@ enum arch_timer_reg {
struct arch_timer_kvm_info { struct arch_timer_kvm_info {
struct timecounter timecounter; struct timecounter timecounter;
int virtual_irq;
}; };
#ifdef CONFIG_ARM_ARCH_TIMER #ifdef CONFIG_ARM_ARCH_TIMER
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment