[PATCH 05/19] cpus: Filter for target specific CPU (mips)

Philippe Mathieu-Daudé posted 19 patches 2 years, 1 month ago
[PATCH 05/19] cpus: Filter for target specific CPU (mips)
Posted by Philippe Mathieu-Daudé 2 years, 1 month ago
Enforce qemu_get_cpu() to return MIPS CPUs in MIPS specific files.

Mechanical change using the following coccinelle script:

  @@ expression index; @@
  -   qemu_get_cpu(index, NULL)
  +   qemu_get_cpu(index, TYPE_MIPS_CPU)

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/mips/tcg/sysemu/cp0_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/mips/tcg/sysemu/cp0_helper.c b/target/mips/tcg/sysemu/cp0_helper.c
index fcaba37c40..af0cd60829 100644
--- a/target/mips/tcg/sysemu/cp0_helper.c
+++ b/target/mips/tcg/sysemu/cp0_helper.c
@@ -126,7 +126,7 @@ static CPUMIPSState *mips_cpu_map_tc(CPUMIPSState *env, int *tc)
     cs = env_cpu(env);
     vpe_idx = tc_idx / cs->nr_threads;
     *tc = tc_idx % cs->nr_threads;
-    other_cs = qemu_get_cpu(vpe_idx, NULL);
+    other_cs = qemu_get_cpu(vpe_idx, TYPE_MIPS_CPU);
     if (other_cs == NULL) {
         return env;
     }
-- 
2.41.0