pussuw commented on code in PR #5985: URL: https://github.com/apache/incubator-nuttx/pull/5985#discussion_r842664179
########## arch/risc-v/src/common/riscv_exception_common.S: ########## @@ -91,24 +93,12 @@ exception_common: mv a1, sp /* context = sp */ #if CONFIG_ARCH_INTERRUPTSTACK > 15 - - /* Offset to hartid */ - - mv s0, a0 /* save cause */ - jal x1, riscv_mhartid /* get hartid */ - /* Switch to interrupt stack */ -#if IRQ_NSTACKS > 1 - li t0, (CONFIG_ARCH_INTERRUPTSTACK & ~15) - mul t0, a0, t0 - la a0, g_intstacktop - sub sp, a0, t0 -#else - la sp, g_intstacktop -#endif - - mv a0, s0 /* restore cause */ + mv t0, a0 /* save cause */ + jal x1, riscv_percpu_get_irqstack Review Comment: This could be wrapped so that the percpu module is not a strict requirement here -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
