[Qemu-devel] [PATCH v1 for-2.11 02/10] target/s390x: move cpu_mmu_idx_to_asc() to excp_helper.c

David Hildenbrand posted 10 patches 8 years, 5 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v1 for-2.11 02/10] target/s390x: move cpu_mmu_idx_to_asc() to excp_helper.c
Posted by David Hildenbrand 8 years, 5 months ago
Only used in that file.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 target/s390x/cpu.h         | 14 --------------
 target/s390x/excp_helper.c | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 3e798ef..6567cfa 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -393,20 +393,6 @@ static inline int cpu_mmu_index(CPUS390XState *env, bool ifetch)
     }
 }
 
-static inline uint64_t cpu_mmu_idx_to_asc(int mmu_idx)
-{
-    switch (mmu_idx) {
-    case MMU_PRIMARY_IDX:
-        return PSW_ASC_PRIMARY;
-    case MMU_SECONDARY_IDX:
-        return PSW_ASC_SECONDARY;
-    case MMU_HOME_IDX:
-        return PSW_ASC_HOME;
-    default:
-        abort();
-    }
-}
-
 static inline void cpu_get_tb_cpu_state(CPUS390XState* env, target_ulong *pc,
                                         target_ulong *cs_base, uint32_t *flags)
 {
diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
index d183377..db86259 100644
--- a/target/s390x/excp_helper.c
+++ b/target/s390x/excp_helper.c
@@ -68,6 +68,20 @@ int s390_cpu_handle_mmu_fault(CPUState *cs, vaddr address,
 
 #else /* !CONFIG_USER_ONLY */
 
+static inline uint64_t cpu_mmu_idx_to_asc(int mmu_idx)
+{
+    switch (mmu_idx) {
+    case MMU_PRIMARY_IDX:
+        return PSW_ASC_PRIMARY;
+    case MMU_SECONDARY_IDX:
+        return PSW_ASC_SECONDARY;
+    case MMU_HOME_IDX:
+        return PSW_ASC_HOME;
+    default:
+        abort();
+    }
+}
+
 int s390_cpu_handle_mmu_fault(CPUState *cs, vaddr orig_vaddr,
                               int rw, int mmu_idx)
 {
-- 
2.9.4


Re: [Qemu-devel] [PATCH v1 for-2.11 02/10] target/s390x: move cpu_mmu_idx_to_asc() to excp_helper.c
Posted by Thomas Huth 8 years, 5 months ago
On 17.08.2017 11:22, David Hildenbrand wrote:
> Only used in that file.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/cpu.h         | 14 --------------
>  target/s390x/excp_helper.c | 14 ++++++++++++++
>  2 files changed, 14 insertions(+), 14 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>

Re: [Qemu-devel] [PATCH v1 for-2.11 02/10] target/s390x: move cpu_mmu_idx_to_asc() to excp_helper.c
Posted by Richard Henderson 8 years, 5 months ago
On 08/17/2017 02:22 AM, David Hildenbrand wrote:
> Only used in that file.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/cpu.h         | 14 --------------
>  target/s390x/excp_helper.c | 14 ++++++++++++++
>  2 files changed, 14 insertions(+), 14 deletions(-)

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


r~