arch/risc-v: move PRIxREG to inttypes.h

This moves PRIxREG to inttypes.h to make it available for both kernel
and user spaces.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2024-06-22 07:32:35 +08:00 committed by Xiang Xiao
parent d7ab3cc1be
commit 3fb56c9218
2 changed files with 8 additions and 8 deletions

View File

@ -136,4 +136,12 @@
#define UINT8_C(x) x
#define UINT16_C(x) x
/* Format output with register width and hex */
#ifdef CONFIG_ARCH_RV32
# define PRIxREG "08" PRIx32
#else
# define PRIxREG "016" PRIx64
#endif
#endif /* __ARCH_RISCV_INCLUDE_INTTYPES_H */

View File

@ -85,14 +85,6 @@
/* Interrupt Stack macros */
#define INT_STACK_SIZE (STACK_ALIGN_DOWN(CONFIG_ARCH_INTERRUPTSTACK))
/* Format output with register width and hex */
#ifdef CONFIG_ARCH_RV32
# define PRIxREG "08" PRIx32
#else
# define PRIxREG "016" PRIx64
#endif
/* In the RISC-V model, the state is saved in stack,
* only a reference stored in TCB.
*/