arch_helpers: use u_register_t for register read/write

u_register_t is preferred rather than uint64_t.  This is more
consistent with the aarch32 implementation.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Masahiro Yamada 2018-02-02 21:19:17 +09:00
parent 57d1e5faf2
commit 8f4dbaab64
1 changed files with 3 additions and 3 deletions

View File

@ -18,15 +18,15 @@
*********************************************************************/
#define _DEFINE_SYSREG_READ_FUNC(_name, _reg_name) \
static inline uint64_t read_ ## _name(void) \
static inline u_register_t read_ ## _name(void) \
{ \
uint64_t v; \
u_register_t v; \
__asm__ volatile ("mrs %0, " #_reg_name : "=r" (v)); \
return v; \
}
#define _DEFINE_SYSREG_WRITE_FUNC(_name, _reg_name) \
static inline void write_ ## _name(uint64_t v) \
static inline void write_ ## _name(u_register_t v) \
{ \
__asm__ volatile ("msr " #_reg_name ", %0" : : "r" (v)); \
}