diff --git a/include/zephyr/arch/riscv/thread.h b/include/zephyr/arch/riscv/thread.h index 08f14b61cebf7..c6ca4d7ae4162 100644 --- a/include/zephyr/arch/riscv/thread.h +++ b/include/zephyr/arch/riscv/thread.h @@ -81,8 +81,8 @@ struct _thread_arch { #endif #ifdef CONFIG_PMP_STACK_GUARD unsigned int m_mode_pmp_end_index; - unsigned long m_mode_pmpaddr_regs[PMP_M_MODE_SLOTS]; - unsigned long m_mode_pmpcfg_regs[PMP_M_MODE_SLOTS / sizeof(unsigned long)]; + unsigned long m_mode_pmpaddr_regs[CONFIG_PMP_SLOTS]; + unsigned long m_mode_pmpcfg_regs[CONFIG_PMP_SLOTS / sizeof(unsigned long)]; #endif };