Skip to content

Commit

Permalink
hw/mips/malta: Do not initialize MT registers if MT ASE absent
Browse files Browse the repository at this point in the history
Do not initialize MT-related config register if the MT ASE
is not present.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201204222622.2743175-5-f4bug@amsat.org>
  • Loading branch information
philmd committed Dec 13, 2020
1 parent ecc268e commit 8de0f28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/mips/malta.c
Expand Up @@ -1135,8 +1135,10 @@ static void malta_mips_config(MIPSCPU *cpu)
CPUMIPSState *env = &cpu->env;
CPUState *cs = CPU(cpu);

env->mvp->CP0_MVPConf0 |= ((smp_cpus - 1) << CP0MVPC0_PVPE) |
if (ase_mt_available(env)) {
env->mvp->CP0_MVPConf0 |= ((smp_cpus - 1) << CP0MVPC0_PVPE) |
((smp_cpus * cs->nr_threads - 1) << CP0MVPC0_PTC);
}
}

static void main_cpu_reset(void *opaque)
Expand Down

0 comments on commit 8de0f28

Please sign in to comment.