diff mbox series

[PULL,06/15] target/hexagon: Implement cpu_mmu_index

Message ID 20211013182239.991127-7-richard.henderson@linaro.org
State Accepted
Commit f79e80899dbcd306ae2e8a43bc5e139b051f30f4
Headers show
Series tcg patch queue | expand

Commit Message

Richard Henderson Oct. 13, 2021, 6:22 p.m. UTC
The function is trivial for user-only, but still must be present.

Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>

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

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

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

-- 
2.25.1
diff mbox series

Patch

diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h
index f7d043865b..f90c187888 100644
--- a/target/hexagon/cpu.h
+++ b/target/hexagon/cpu.h
@@ -141,6 +141,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;