diff mbox series

[for-6.2,31/43] target/hexagon: Implement cpu_mmu_index

Message ID 20210729004647.282017-32-richard.henderson@linaro.org
State Superseded
Headers show
Series Unaligned accesses for user-only | expand

Commit Message

Richard Henderson July 29, 2021, 12:46 a.m. UTC
The function is trivial for user-only, but still must be present.

Cc: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/hexagon/cpu.h | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
2.25.1

Comments

Taylor Simpson July 29, 2021, 2:37 a.m. UTC | #1
> -----Original Message-----

> From: Richard Henderson <richard.henderson@linaro.org>

> Sent: Wednesday, July 28, 2021 6:47 PM

> To: qemu-devel@nongnu.org

> Cc: Taylor Simpson <tsimpson@quicinc.com>

> Subject: [PATCH for-6.2 31/43] target/hexagon: Implement cpu_mmu_index

> 

> The function is trivial for user-only, but still must be present.

> 

> Cc: Taylor Simpson <tsimpson@quicinc.com>

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

> ---

>  target/hexagon/cpu.h | 9 +++++++++

>  1 file changed, 9 insertions(+)

> 

> diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index

> 2855dd3881..bde538fd5c 100644

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

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

> @@ -144,6 +144,15 @@ static inline void

> cpu_get_tb_cpu_state(CPUHexagonState *env, target_ulong *pc,  #endif  }

> 

> +static inline int cpu_mmu_index(CPUHexagonState *env, bool ifetch) {

> +#ifdef CONFIG_USER_ONLY

> +    return MMU_USER_IDX;

> +#else

> +#error System mode not supported on Hexagon yet #endif }

> +


Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Philippe Mathieu-Daudé July 29, 2021, 6:35 a.m. UTC | #2
On 7/29/21 2:46 AM, Richard Henderson wrote:
> The function is trivial for user-only, but still must be present.

> 

> Cc: Taylor Simpson <tsimpson@quicinc.com>

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

> ---

>  target/hexagon/cpu.h | 9 +++++++++

>  1 file changed, 9 insertions(+)


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h
index 2855dd3881..bde538fd5c 100644
--- a/target/hexagon/cpu.h
+++ b/target/hexagon/cpu.h
@@ -144,6 +144,15 @@  static inline void cpu_get_tb_cpu_state(CPUHexagonState *env, target_ulong *pc,
 #endif
 }
 
+static inline int cpu_mmu_index(CPUHexagonState *env, bool ifetch)
+{
+#ifdef CONFIG_USER_ONLY
+    return MMU_USER_IDX;
+#else
+#error System mode not supported on Hexagon yet
+#endif
+}
+
 typedef struct CPUHexagonState CPUArchState;
 typedef HexagonCPU ArchCPU;