Skip to contentSkip to conversation

arm64: timer: ensure pending signal was cleared

PATCH In review Andrew Jones 1 participant 3 messages May 27, 2019 – Jun 3, 2019 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: timer: ensure pending signal was cleared

Ensure set_timer_irq_enabled() clears the pending interrupt from the gic before proceeding with the next test.

---
 arm/timer.c | 1 +
 1 file changed, 1 insertion(+)
arm/timer.c +1 -0
index 275d0494083d..eebc451722d9 100644
@@ -231,6 +231,7 @@ static void test_timer(struct timer_info *info)
 	/* Disable the timer again and prepare to take interrupts */
 	info->write_ctl(0);
 	set_timer_irq_enabled(info, true);
+	report("interrupt signal no longer pending", !gic_timer_pending(info));
 
 	report("latency within 10 ms", test_cval_10msec(info));
 	report("interrupt received", info->irq_received);
Signature · 1 line
2.18.1
#1 lore raw

I see I forgot 'kvm-unit-tests' in the [PATCH] tag. Sorry about that.

Quoted 23 lines · Andrew Jones

Ensure set_timer_irq_enabled() clears the pending interrupt from the gic before proceeding with the next test.

---
 arm/timer.c | 1 +
 1 file changed, 1 insertion(+)
arm/timer.c +1 -0
index 275d0494083d..eebc451722d9 100644
@@ -231,6 +231,7 @@ static void test_timer(struct timer_info *info)
 	/* Disable the timer again and prepare to take interrupts */
 	info->write_ctl(0);
 	set_timer_irq_enabled(info, true);
+	report("interrupt signal no longer pending", !gic_timer_pending(info));
 
 	report("latency within 10 ms", test_cval_10msec(info));
 	report("interrupt received", info->irq_received);
Signature · 1 line
2.18.1
#2 lore raw
In reply to Andrew Jones
Quoted 23 lines · Andrew Jones

Ensure set_timer_irq_enabled() clears the pending interrupt from the gic before proceeding with the next test.

---
 arm/timer.c | 1 +
 1 file changed, 1 insertion(+)
arm/timer.c +1 -0
index 275d0494083d..eebc451722d9 100644
@@ -231,6 +231,7 @@ static void test_timer(struct timer_info *info)
 	/* Disable the timer again and prepare to take interrupts */
 	info->write_ctl(0);
 	set_timer_irq_enabled(info, true);
+	report("interrupt signal no longer pending", !gic_timer_pending(info));
 
 	report("latency within 10 ms", test_cval_10msec(info));
 	report("interrupt received", info->irq_received);
Signature · 1 line
2.18.1

This patch is now superseded by ("[PATCH kvm-unit-tests] arm64: timer: a few test improvements", Jun 3, 2019)[*], as I've added a couple more improvements to the timer test and squashed them altogether.

Thanks,
drew

[*] message id <[email protected]>