diff mbox series

[25/28] target/s390x: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX

Message ID 20191212040039.26546-26-richard.henderson@linaro.org
State New
Headers show
Series cputlb: Remove support for MMU_MODE*_SUFFIX | expand

Commit Message

Richard Henderson Dec. 12, 2019, 4 a.m. UTC
The generated functions aside from *_real are unused.
The *_real functions have a couple of users in mem_helper.c;
use *_mmuidx_ra instead, with MMU_REAL_IDX.

Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/s390x/cpu.h        | 5 -----
 target/s390x/mem_helper.c | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.20.1

Comments

David Hildenbrand Dec. 12, 2019, 10:38 a.m. UTC | #1
On 12.12.19 05:00, Richard Henderson wrote:
> The generated functions aside from *_real are unused.

> The *_real functions have a couple of users in mem_helper.c;

> use *_mmuidx_ra instead, with MMU_REAL_IDX.

> 

> Cc: David Hildenbrand <david@redhat.com>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  target/s390x/cpu.h        | 5 -----

>  target/s390x/mem_helper.c | 5 +++++

>  2 files changed, 5 insertions(+), 5 deletions(-)

> 

> diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h

> index 17460ed7b3..2670728e8a 100644

> --- a/target/s390x/cpu.h

> +++ b/target/s390x/cpu.h

> @@ -36,11 +36,6 @@

>  

>  #define TARGET_INSN_START_EXTRA_WORDS 2

>  

> -#define MMU_MODE0_SUFFIX _primary

> -#define MMU_MODE1_SUFFIX _secondary

> -#define MMU_MODE2_SUFFIX _home

> -#define MMU_MODE3_SUFFIX _real

> -

>  #define MMU_USER_IDX 0

>  

>  #define S390_MAX_CPUS 248

> diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c

> index 57ce17c252..d379be8418 100644

> --- a/target/s390x/mem_helper.c

> +++ b/target/s390x/mem_helper.c

> @@ -43,6 +43,11 @@

>  #define HELPER_LOG(x...)

>  #endif

>  

> +#define cpu_ldl_real_ra(e, p, r)    cpu_ldl_mmuidx_ra(e, p, MMU_REAL_IDX, r)

> +#define cpu_ldq_real_ra(e, p, r)    cpu_ldq_mmuidx_ra(e, p, MMU_REAL_IDX, r)

> +#define cpu_stl_real_ra(e, p, v, r) cpu_stl_mmuidx_ra(e, p, v, MMU_REAL_IDX, r)

> +#define cpu_stq_real_ra(e, p, v, r) cpu_stq_mmuidx_ra(e, p, v, MMU_REAL_IDX, r)

> +


I'd prefer to fixup all callers and not have these "looks like core TCG
functions", but anyhow

Reviewed-by: David Hildenbrand <david@redhat.com>


I would have thought we would have more of these _primary/_secondary ...
accesses, but I guess we removed them over the time.

-- 
Thanks,

David / dhildenb
diff mbox series

Patch

diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 17460ed7b3..2670728e8a 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -36,11 +36,6 @@ 
 
 #define TARGET_INSN_START_EXTRA_WORDS 2
 
-#define MMU_MODE0_SUFFIX _primary
-#define MMU_MODE1_SUFFIX _secondary
-#define MMU_MODE2_SUFFIX _home
-#define MMU_MODE3_SUFFIX _real
-
 #define MMU_USER_IDX 0
 
 #define S390_MAX_CPUS 248
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 57ce17c252..d379be8418 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -43,6 +43,11 @@ 
 #define HELPER_LOG(x...)
 #endif
 
+#define cpu_ldl_real_ra(e, p, r)    cpu_ldl_mmuidx_ra(e, p, MMU_REAL_IDX, r)
+#define cpu_ldq_real_ra(e, p, r)    cpu_ldq_mmuidx_ra(e, p, MMU_REAL_IDX, r)
+#define cpu_stl_real_ra(e, p, v, r) cpu_stl_mmuidx_ra(e, p, v, MMU_REAL_IDX, r)
+#define cpu_stq_real_ra(e, p, v, r) cpu_stq_mmuidx_ra(e, p, v, MMU_REAL_IDX, r)
+
 static inline bool psw_key_valid(CPUS390XState *env, uint8_t psw_key)
 {
     uint16_t pkm = env->cregs[3] >> 16;