summaryrefslogtreecommitdiff
path: root/sim/mips
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-12-25 00:53:25 -0500
committerMike Frysinger <vapier@gentoo.org>2022-12-25 02:10:46 -0500
commit883be197745c9a9ea626cf0671e8bb0109d21a36 (patch)
tree0c19d5fa5fb39952a439f495c29c32e5ea777738 /sim/mips
parentfc9b04458287e58365b1de8eaf6b626ac11743c2 (diff)
downloadbinutils-gdb-883be197745c9a9ea626cf0671e8bb0109d21a36.tar.gz
sim: cpu: change default init to handle all cpus
All the runtimes were only initializing a single CPU. When SMP is enabled, things quickly crash as none of the other CPU structs are setup. Change the default from 0 to the compile time value.
Diffstat (limited to 'sim/mips')
-rw-r--r--sim/mips/interp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index fa192d36f2e..d44c474ae1d 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -351,7 +351,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb,
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct mips_sim_cpu))
+ if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct mips_sim_cpu))
!= SIM_RC_OK)
return 0;