arch_helpers: use u_register_t for register read/write
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 2 Feb 2018 12:19:17 +0000 (21:19 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 27 Apr 2018 09:35:02 +0000 (18:35 +0900)
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>
include/lib/aarch64/arch_helpers.h

index 485ed432530b99547fcda5f80ad058869831d9ed..c346f7961f12c10ecb7fd8c517b7651051a082d4 100644 (file)
  *********************************************************************/
 
 #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));        \
 }