1 /* 2 * Copyright (c) 2018 Intel Corporation. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include "sw_isr_common.h" 8 #include <zephyr/sw_isr_table.h> 9 #include <zephyr/irq.h> 10 #include <zephyr/sys/__assert.h> 11 12 /* 13 * Common code for arches that use software ISR tables (CONFIG_GEN_ISR_TABLES) 14 */ 15 z_get_sw_isr_table_idx(unsigned int irq)16unsigned int __weak z_get_sw_isr_table_idx(unsigned int irq) 17 { 18 unsigned int table_idx = irq - CONFIG_GEN_IRQ_START_VECTOR; 19 20 __ASSERT_NO_MSG(table_idx < IRQ_TABLE_SIZE); 21 22 return table_idx; 23 } 24