pussuw commented on code in PR #6050: URL: https://github.com/apache/incubator-nuttx/pull/6050#discussion_r848447553
########## arch/risc-v/src/common/riscv_macros.S: ########## @@ -152,3 +152,23 @@ .endm #endif /* !defined(CONFIG_SMP) && !defined(CONFIG_ARCH_USE_S_MODE) */ #endif /* CONFIG_ARCH_INTERRUPTSTACK > 15 */ + +/**************************************************************************** + * Name: riscv_mhartid + * + * Description: + * Context aware way to query hart id + * + * Returned Value: + * Hart id + * + ****************************************************************************/ + +.macro riscv_mhartid out +#ifdef CONFIG_ARCH_USE_S_MODE + csrr \out, CSR_SCRATCH + REGLOAD \out, RISCV_PERCPU_HARTID(a0) Review Comment: bug here, a0 should be \out :( -- 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]
