Skip to content

Commit f5bd450

Browse files
committed
arch: arm: cortex_m: Rephrase comment on IRQ decrement
Move and rephrase the comment to better explain reason why obtained IRQ number is decremented. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 590258b commit f5bd450

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/arm/core/cortex_m/isr_wrapper.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ void _isr_wrapper(void)
6868
#if defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER)
6969
int32_t irq_number = z_soc_irq_get_active();
7070
#else
71-
/* _sw_isr_table does not map the exceptions, only the interrupts. */
7271
int32_t irq_number = __get_IPSR();
7372
#endif
73+
/* _sw_isr_table does not map the core system exceptions,
74+
* which take first 16 interrupt numbers, only the external
75+
* interrupts.
76+
*/
7477
irq_number -= 16;
7578

7679
struct _isr_table_entry *entry = &_sw_isr_table[irq_number];

0 commit comments

Comments
 (0)