arm64: timer: Use correct counter for !pending_before
PATCH 1/1 arm64: timer: Use correct counter for !pending_before
We were using the virtual counter to calculate a timer cval which is 10 seconds in the future, but this obviously doesn't work for the physical timer which is bases on the physical counter.
Make sure we use a properly paired timer/counter pair.
Reported-by Andrew Jones <[email protected]>
Signed-off-by Christoffer Dall <[email protected]>
--- arm/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arm/timer.c +1 -1
@@ -174,7 +174,7 @@ static bool test_cval_10msec(struct timer_info *info)static void test_timer (struct timer_info *info) { -u64 now =read_sysreg (cntvct_el0); +u64 now = info->read_counter ();u64 time_10s =read_sysreg (cntfrq_el0) *10 ;u64 later = now + time_10s;
Signature · 1 line
2.9.0
Radim Krčmář
Applied2017-08-03 08:25+0200, Christoffer Dall:
Quoted 9 lines
We were using the virtual counter to calculate a timer cval which is 10 seconds in the future, but this obviously doesn't work for the physical timer which is bases on the physical counter.
Make sure we use a properly paired timer/counter pair.
Reported-by Andrew Jones <[email protected]>Signed-off-by Christoffer Dall <[email protected]>---
Applied, thanks.