Skip to content

Commit 381d820

Browse files
mathieuchopstmfabiobaltieri
authored andcommitted
arm: irq: fail build if IRQ_CONNECT is used with ZLI
Commit 3b8e1fa updated the documentation to mention explicitly that ZLI must be registered using IRQ_DIRECT_CONNECT. Update the ARM IRQ macros such that attempts to register a ZLI using IRQ_CONNECT becomes a build failure instead of silently succeeding. Signed-off-by: Mathieu Choplain <[email protected]>
1 parent 7fbb0fd commit 381d820

File tree

1 file changed

+2
-2
lines changed
  • include/zephyr/arch/arm

1 file changed

+2
-2
lines changed

include/zephyr/arch/arm/irq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ extern void z_arm_interrupt_init(void);
118118
*/
119119
#define ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
120120
{ \
121-
BUILD_ASSERT(IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS) || !(flags_p & IRQ_ZERO_LATENCY), \
122-
"ZLI interrupt registered but feature is disabled"); \
121+
BUILD_ASSERT(!(flags_p & IRQ_ZERO_LATENCY), \
122+
"ZLI interrupts must be registered using IRQ_DIRECT_CONNECT()"); \
123123
_CHECK_PRIO(priority_p, flags_p) \
124124
Z_ISR_DECLARE(irq_p, 0, isr_p, isr_param_p); \
125125
z_arm_irq_priority_set(irq_p, priority_p, flags_p); \

0 commit comments

Comments
 (0)