arm64: microbench: fix unexpected PPI
PATCH 1/1 arm64: microbench: fix unexpected PPI
For the origin value of CNTV_CVAL_EL0 architecturally UNKNOWN, we may receive an unexpected PPI before we actual trigger the timer interrupt. So we should set ARCH_TIMER_CTL_IMASK in timer_prep.
Signed-off-by Jingyi Wang <[email protected]>
--- arm/micro-bench.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arm/micro-bench.c +1 -1
@@ -227,7 +227,7 @@ static bool timer_prep(void) }writel (1 <<PPI (TIMER_VTIMER_IRQ ), gic_isenabler); -write_sysreg (ARCH_TIMER_CTL_ENABLE , cntv_ctl_el0); +write_sysreg (ARCH_TIMER_CTL_IMASK |ARCH_TIMER_CTL_ENABLE , cntv_ctl_el0);isb ();gic_prep_common ();
Signature · 6 lines
2.19.1 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Quoted 25 lines · Jingyi Wang
For the origin value of
CNTV_CVAL_EL0architecturally UNKNOWN, we may receive an unexpected PPI before we actual trigger the timer interrupt. So we should setARCH_TIMER_CTL_IMASKintimer_prep.Signed-off-by Jingyi Wang <[email protected]>--- arm/micro-bench.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arm/micro-bench.c +1
-1@@ -227,7 +227,7 @@ static bool timer_prep(void) }writel (1 <<PPI (TIMER_VTIMER_IRQ ), gic_isenabler); -write_sysreg (ARCH_TIMER_CTL_ENABLE , cntv_ctl_el0); +write_sysreg (ARCH_TIMER_CTL_IMASK |ARCH_TIMER_CTL_ENABLE , cntv_ctl_el0);isb ();gic_prep_common ();Signature · 1 line
2.19.1
Queued, https://gitlab.com/rhdrjones/kvm-unit-tests/commits/arm/queue
Thanks,
drew
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm