]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Use arch_timer_get_rate when trapping CNTFRQ_EL0
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 21 Jul 2017 17:15:27 +0000 (18:15 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 1 Aug 2017 11:14:06 +0000 (12:14 +0100)
commit32be105fb296b3029bf9a7491e55bc5d5450979c
treec8cb6bd8f2298b13a329c0d5c9fb6507614ae783
parent8b74f4f4576ba4882ca9e92e5c3794c2476fd0af
arm64: Use arch_timer_get_rate when trapping CNTFRQ_EL0

In an ideal world, CNTFRQ_EL0 always contains the timer frequency
for the kernel to use. Sadly, we get quite a few broken systems
where the firmware authors cannot be bothered to program that
register on all CPUs, and rely on DT to provide that frequency.

So when trapping CNTFRQ_EL0, make sure to return the actual rate
(as known by the kernel), and not CNTFRQ_EL0.

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/arm64/kernel/traps.c