From 91b891fda9932d0b6841aea96d116913804425f9 Mon Sep 17 00:00:00 2001 From: Adrian Lees Date: Fri, 11 Oct 2024 12:19:01 +0100 Subject: [PATCH] Ensure Status-type interrupts are disabled too Disable all interrupts after they've occurred, including Status type interrupts, because leaving them enabled can lead to spurious failures of subsequent tests or a re-run of test_runner. --- sw/cheri/tests/plic_tests.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/cheri/tests/plic_tests.hh b/sw/cheri/tests/plic_tests.hh index aac957970..b3da4f1fd 100644 --- a/sw/cheri/tests/plic_tests.hh +++ b/sw/cheri/tests/plic_tests.hh @@ -80,10 +80,10 @@ struct PlicTest { if (plic_test->is_irq_clearable) { uart->interruptState = plic_test->ip_irq_id; } else { - uart->interrupt_disable(static_cast(plic_test->ip_irq_id)); // Ensure that the `intr_test` bit does not keep the Status-type interrupt asserted. uart->interruptTest = 0; } + uart->interrupt_disable(static_cast(plic_test->ip_irq_id)); }; uart->interrupt_enable(uartMap[i].first.id); uart->interruptTest = ip_irq_id; @@ -137,10 +137,10 @@ struct PlicTest { if (plic_test->is_irq_clearable) { i2c->interruptState = 0x1 << plic_test->ip_irq_id; } else { - i2c->interrupt_disable(static_cast(plic_test->ip_irq_id)); // Ensure that the `intr_test` bit does not keep the Status-type interrupt asserted. i2c->interruptTest = 0; } + i2c->interrupt_disable(static_cast(plic_test->ip_irq_id)); }; i2c->interruptTest = 0x01 << ip_irq_id; wfi();