All CP15 registers are bit fields or counters, don't use signed type

when accessing them.

MFC after:	3 weeks
This commit is contained in:
mmel 2017-11-05 16:52:54 +00:00
parent 9963a47393
commit 1f066c248f
2 changed files with 6 additions and 6 deletions

View File

@ -51,10 +51,10 @@
#define _FX(s...) #s #define _FX(s...) #s
#define _RF0(fname, aname...) \ #define _RF0(fname, aname...) \
static __inline register_t \ static __inline uint32_t \
fname(void) \ fname(void) \
{ \ { \
register_t reg; \ uint32_t reg; \
__asm __volatile("mrc\t" _FX(aname): "=r" (reg)); \ __asm __volatile("mrc\t" _FX(aname): "=r" (reg)); \
return(reg); \ return(reg); \
} }
@ -77,7 +77,7 @@ fname(void) \
#define _WF1(fname, aname...) \ #define _WF1(fname, aname...) \
static __inline void \ static __inline void \
fname(register_t reg) \ fname(uint32_t reg) \
{ \ { \
__asm __volatile("mcr\t" _FX(aname):: "r" (reg)); \ __asm __volatile("mcr\t" _FX(aname):: "r" (reg)); \
} }

View File

@ -103,10 +103,10 @@ extern int pmu_attched;
#define _FX(s...) #s #define _FX(s...) #s
#define _RF0(fname, aname...) \ #define _RF0(fname, aname...) \
static __inline register_t \ static __inline uint32_t \
fname(void) \ fname(void) \
{ \ { \
register_t reg; \ uint32_t reg; \
__asm __volatile("mrc\t" _FX(aname): "=r" (reg)); \ __asm __volatile("mrc\t" _FX(aname): "=r" (reg)); \
return(reg); \ return(reg); \
} }
@ -129,7 +129,7 @@ fname(void) \
#define _WF1(fname, aname...) \ #define _WF1(fname, aname...) \
static __inline void \ static __inline void \
fname(register_t reg) \ fname(uint32_t reg) \
{ \ { \
__asm __volatile("mcr\t" _FX(aname):: "r" (reg)); \ __asm __volatile("mcr\t" _FX(aname):: "r" (reg)); \
} }