]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 8 Apr 2019 15:49:07 +0000 (16:49 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 30 Apr 2019 15:12:54 +0000 (16:12 +0100)
commitb487b899ada9949759d16561dd4c156d64c61ed0
tree42ee44177c52347a95d17106ce1d89bc87bad7ac
parentd08e5ea88d58a525ae6ddce69c4d6ebd0ac8198e
clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters

Instead of always going via arch_counter_get_cntvct_stable to access the
counter workaround, let's have arch_timer_read_counter point to the
right method.

For that, we need to track whether any CPU in the system has a
workaround for the counter. This is done by having an atomic variable
tracking this.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/include/asm/arch_timer.h
arch/arm64/include/asm/arch_timer.h
drivers/clocksource/arm_arch_timer.c