diff mbox series

arm64: timer: ensure pending signal was cleared

Message ID 20190527162636.28878-1-drjones@redhat.com (mailing list archive)
State New, archived
Headers show
Series arm64: timer: ensure pending signal was cleared | expand

Commit Message

Andrew Jones May 27, 2019, 4:26 p.m. UTC
Ensure set_timer_irq_enabled() clears the pending interrupt from
the gic before proceeding with the next test.

Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 arm/timer.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrew Jones May 28, 2019, 6:58 a.m. UTC | #1
I see I forgot 'kvm-unit-tests' in the [PATCH] tag. Sorry about that.

On Mon, May 27, 2019 at 06:26:36PM +0200, Andrew Jones wrote:
> Ensure set_timer_irq_enabled() clears the pending interrupt from
> the gic before proceeding with the next test.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  arm/timer.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arm/timer.c b/arm/timer.c
> index 275d0494083d..eebc451722d9 100644
> --- a/arm/timer.c
> +++ b/arm/timer.c
> @@ -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);
> -- 
> 2.18.1
>
Andrew Jones June 3, 2019, 9:13 a.m. UTC | #2
On Mon, May 27, 2019 at 06:26:36PM +0200, Andrew Jones wrote:
> Ensure set_timer_irq_enabled() clears the pending interrupt from
> the gic before proceeding with the next test.
> 
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  arm/timer.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arm/timer.c b/arm/timer.c
> index 275d0494083d..eebc451722d9 100644
> --- a/arm/timer.c
> +++ b/arm/timer.c
> @@ -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);
> -- 
> 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 <20190603090933.20312-1-drjones@redhat.com>
diff mbox series

Patch

diff --git a/arm/timer.c b/arm/timer.c
index 275d0494083d..eebc451722d9 100644
--- a/arm/timer.c
+++ b/arm/timer.c
@@ -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);