Skip to content

Commit 1aaa3d2

Browse files
Andrew Boieandrewboie
authored andcommitted
riscv: properly pull in irq_offload logic
This is an optional feature and no logic for it should be present unless CONFIG_IRQ_OFFLOAD is enabled. Signed-off-by: Andrew Boie <[email protected]>
1 parent 9c76d28 commit 1aaa3d2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arch/riscv/core/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ zephyr_sources(
44
cpu_idle.c
55
fatal.c
66
irq_manage.c
7-
irq_offload.c
87
isr.S
98
prep_c.c
109
reset.S
1110
swap.S
1211
thread.c
1312
)
13+
14+
zephyr_sources_if_kconfig(irq_offload.c)

arch/riscv/core/isr.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ on_irq_stack:
211211
addi t3, t3, 1
212212
sw t3, _kernel_offset_to_nested(t2)
213213

214+
#ifdef CONFIG_IRQ_OFFLOAD
214215
/*
215216
* If we are here due to a system call, t1 register should != 0.
216217
* In this case, perform IRQ offloading, otherwise jump to call_irq
@@ -226,6 +227,7 @@ on_irq_stack:
226227
tail z_irq_do_offload
227228

228229
call_irq:
230+
#endif /* CONFIG_IRQ_OFFLOAD */
229231
#ifdef CONFIG_TRACING
230232
call sys_trace_isr_enter
231233
#endif

0 commit comments

Comments
 (0)