target/hexagon: Implement cpu_mmu_index
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 27 Jul 2021 16:50:38 +0000 (06:50 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 13 Oct 2021 14:59:23 +0000 (07:59 -0700)
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

index f7d043865bf5cfeda2778f37208fa3c0fccd20fb..f90c1878884164a307bb24f36eb805e2257c3270 100644 (file)
@@ -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;