summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2026-06-15 11:50:29 +0100
committerPeter Maydell <peter.maydell@linaro.org>2026-06-29 11:03:46 +0100
commit517e357eeacd525eee2c95f91d47e35242cbdbe8 (patch)
tree1459437f889b080f81b7002f6a0ab68cdf33395b /include
parente21eb48f3253abff636964090860a015744c4370 (diff)
downloadqemu-517e357eeacd525eee2c95f91d47e35242cbdbe8.tar.gz
qemu-517e357eeacd525eee2c95f91d47e35242cbdbe8.zip
hw/intc/gicv5: Define and use GICV5_PENDING_IRQ_NONE
The GICv5PendingIrq struct representation of "there is no pending interrupt" sets the prio field to PRIO_IDLE, and generally to avoid confusion we also set the intid to 0. We want to return this value or initialize some variable to it in several places in the GICv5 implementation, and the support for the virtual interrupt domain introduces more. Define a convenience macro for this special-case struct value, and use it instead of opencoding either the structure initializer or explicit assignment to the two fields. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-id: 20260615105029.2898872-6-peter.maydell@linaro.org
Diffstat (limited to 'include')
-rw-r--r--include/hw/intc/arm_gicv5_types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/intc/arm_gicv5_types.h b/include/hw/intc/arm_gicv5_types.h
index de4f78a149..851286b1b5 100644
--- a/include/hw/intc/arm_gicv5_types.h
+++ b/include/hw/intc/arm_gicv5_types.h
@@ -105,6 +105,10 @@ typedef struct GICv5PendingIrq {
uint8_t prio;
} GICv5PendingIrq;
+/* A GICv5PendingIrq struct initializer for "no pending interrupt" */
+#define GICV5_PENDING_IRQ_NONE \
+ ((GICv5PendingIrq) { .intid = 0, .prio = PRIO_IDLE })
+
/* Fields in a generic 32-bit INTID, per R_TJPHS */
FIELD(INTID, ID, 0, 24)
FIELD(INTID, TYPE, 29, 3)