Skip to content

Commit b062044

Browse files
committed
isr_tables: Support hardware interrupt vector table-only configuration.
The existing isr_tables implementation does not allow enabling only hardware interrupt vector table without software isr table. This commit ensures that CONFIG_GEN_IRQ_VECTOR_TABLE can be used without setting CONFIG_GEN_SW_ISR_TABLE. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent ec123a4 commit b062044

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

arch/common/isr_tables.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,21 @@ Z_GENERIC_SECTION(.irq_info) struct int_list_header _iheader = {
2929
/* These are placeholder tables. They will be replaced by the real tables
3030
* generated by gen_isr_tables.py.
3131
*
32-
* z_irq_spurious and _isr_wrapper are used as placeholder values to
33-
* ensure that they are not optimized out in the first link. The first
34-
* link must contain the same symbols as the second one for the code
35-
* generation to work.
32+
* z_irq_spurious is used as placeholder values to ensure that they are not
33+
* optimized out in the first link. The first link must contain the same
34+
* symbols as the second one for the code generation to work.
3635
*/
3736

3837
/* Some arches don't use a vector table, they have a common exception entry
3938
* point for all interrupts. Don't generate a table in this case.
4039
*/
4140
#ifdef CONFIG_GEN_IRQ_VECTOR_TABLE
4241
u32_t __irq_vector_table _irq_vector_table[IRQ_TABLE_SIZE] = {
42+
#ifdef CONFIG_GEN_SW_ISR_TABLE
4343
[0 ...(IRQ_TABLE_SIZE - 1)] = (u32_t)&_isr_wrapper,
44+
#else
45+
[0 ...(IRQ_TABLE_SIZE - 1)] = (u32_t)&z_irq_spurious,
46+
#endif
4447
};
4548
#endif
4649

include/linker/common-ram.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
DEVICE_INIT_SECTIONS()
66
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
77

8-
#if defined(CONFIG_GEN_ISR_TABLES) && defined(CONFIG_DYNAMIC_INTERRUPTS)
8+
#if defined(CONFIG_GEN_SW_ISR_TABLE) && defined(CONFIG_DYNAMIC_INTERRUPTS)
99
SECTION_DATA_PROLOGUE(sw_isr_table,,)
1010
{
1111
/*

include/linker/common-rom.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: Apache-2.0 */
22

3-
#if defined(CONFIG_GEN_ISR_TABLES) && !defined(CONFIG_DYNAMIC_INTERRUPTS)
3+
#if defined(CONFIG_GEN_SW_ISR_TABLE) && !defined(CONFIG_DYNAMIC_INTERRUPTS)
44
SECTION_PROLOGUE(sw_isr_table,,)
55
{
66
/*

0 commit comments

Comments
 (0)