Skip to content

Commit

Permalink
clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the vi…
Browse files Browse the repository at this point in the history
…rtual 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>
  • Loading branch information
Julien Grall authored and Christoffer Dall committed May 3, 2016
1 parent b4d6ce9 commit d9b5e41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/clocksource/arm_arch_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions include/clocksource/arm_arch_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ enum arch_timer_reg {

struct arch_timer_kvm_info {
struct timecounter timecounter;
int virtual_irq;
};

#ifdef CONFIG_ARM_ARCH_TIMER
Expand Down

0 comments on commit d9b5e41

Please sign in to comment.