diff --git a/tests/kernel/context/src/context.c b/tests/kernel/context/src/context.c index 7501b802cd6..cd66490a704 100644 --- a/tests/kernel/context/src/context.c +++ b/tests/kernel/context/src/context.c @@ -65,6 +65,10 @@ #define TICK_IRQ TIMER_0_IRQ #elif defined(CONFIG_ARCV2_TIMER) #define TICK_IRQ IRQ_TIMER0 +#elif defined(CONFIG_PULPINO_TIMER) +#define TICK_IRQ PULP_TIMER_A_CMP_IRQ +#elif defined(CONFIG_RISCV_QEMU_TIMER) +#define TICK_IRQ RISCV_QEMU_TIMER_IRQ #elif defined(CONFIG_CPU_CORTEX_M) /* * The Cortex-M use the SYSTICK exception for the system timer, which is @@ -75,13 +79,16 @@ #error Timer type is not defined for this platform #endif -/* Nios II doesn't have a power saving instruction, so k_cpu_idle() - * returns immediately +/* Nios II and RISCV32 without CONFIG_RISCV_HAS_CPU_IDLE + * do have a power saving instruction, so k_cpu_idle() returns immediately */ -#if !defined(CONFIG_NIOS2) +#if !defined(CONFIG_NIOS2) && \ + (!defined(CONFIG_RISCV32) || defined(CONFIG_RISCV_HAS_CPU_IDLE)) #define HAS_POWERSAVE_INSTRUCTION #endif + + extern uint32_t _tick_get_32(void); extern int64_t _tick_get(void);