Skip to content

Commit d9b5e41

Browse files
Julien Grallchazy
authored andcommitted
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> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
1 parent b4d6ce9 commit d9b5e41

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/clocksource/arm_arch_timer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static void __init arch_timer_init(void)
750750

751751
arch_timer_register();
752752
arch_timer_common_init();
753+
754+
arch_timer_kvm_info.virtual_irq = arch_timer_ppi[VIRT_PPI];
753755
}
754756

755757
static void __init arch_timer_of_init(struct device_node *np)

include/clocksource/arm_arch_timer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ enum arch_timer_reg {
5151

5252
struct arch_timer_kvm_info {
5353
struct timecounter timecounter;
54+
int virtual_irq;
5455
};
5556

5657
#ifdef CONFIG_ARM_ARCH_TIMER

0 commit comments

Comments
 (0)