Message ID | 20250310045842.2650784-7-pierrick.bouvier@linaro.org |
---|---|
State | New |
Headers | show |
Series | make system memory API available for common code | expand |
On 3/9/25 21:58, Pierrick Bouvier wrote: > Functions declared in bswap.h will be used instead. > > At this point, we finished to extract memory API from cpu-all.h, and it > can be called from any common or target dependent code. > > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> > --- > include/exec/cpu-all.h | 25 ------------------------- > 1 file changed, 25 deletions(-) I think this should be squashed with the previous patch. r~
On 3/10/25 09:39, Richard Henderson wrote: > On 3/9/25 21:58, Pierrick Bouvier wrote: >> Functions declared in bswap.h will be used instead. >> >> At this point, we finished to extract memory API from cpu-all.h, and it >> can be called from any common or target dependent code. >> >> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> >> --- >> include/exec/cpu-all.h | 25 ------------------------- >> 1 file changed, 25 deletions(-) > > I think this should be squashed with the previous patch. > No specific opinion here. I'm ok with it, just thought it was more easy to split this, considering previous state compiles cleanly as well. > > r~
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 1c2e18f492b..625b4c51f3c 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -38,31 +38,6 @@ #define BSWAP_NEEDED #endif -/* Target-endianness CPU memory access functions. These fit into the - * {ld,st}{type}{sign}{size}{endian}_p naming scheme described in bswap.h. - */ -#if TARGET_BIG_ENDIAN -#define lduw_p(p) lduw_be_p(p) -#define ldsw_p(p) ldsw_be_p(p) -#define ldl_p(p) ldl_be_p(p) -#define ldq_p(p) ldq_be_p(p) -#define stw_p(p, v) stw_be_p(p, v) -#define stl_p(p, v) stl_be_p(p, v) -#define stq_p(p, v) stq_be_p(p, v) -#define ldn_p(p, sz) ldn_be_p(p, sz) -#define stn_p(p, sz, v) stn_be_p(p, sz, v) -#else -#define lduw_p(p) lduw_le_p(p) -#define ldsw_p(p) ldsw_le_p(p) -#define ldl_p(p) ldl_le_p(p) -#define ldq_p(p) ldq_le_p(p) -#define stw_p(p, v) stw_le_p(p, v) -#define stl_p(p, v) stl_le_p(p, v) -#define stq_p(p, v) stq_le_p(p, v) -#define ldn_p(p, sz) ldn_le_p(p, sz) -#define stn_p(p, sz, v) stn_le_p(p, sz, v) -#endif - /* MMU memory access macros */ #if !defined(CONFIG_USER_ONLY)
Functions declared in bswap.h will be used instead. At this point, we finished to extract memory API from cpu-all.h, and it can be called from any common or target dependent code. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 25 ------------------------- 1 file changed, 25 deletions(-)