diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-12-25 00:53:25 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-12-25 02:10:46 -0500 |
commit | 883be197745c9a9ea626cf0671e8bb0109d21a36 (patch) | |
tree | 0c19d5fa5fb39952a439f495c29c32e5ea777738 /sim/bpf | |
parent | fc9b04458287e58365b1de8eaf6b626ac11743c2 (diff) | |
download | binutils-883be197745c9a9ea626cf0671e8bb0109d21a36.zip binutils-883be197745c9a9ea626cf0671e8bb0109d21a36.tar.gz binutils-883be197745c9a9ea626cf0671e8bb0109d21a36.tar.bz2 |
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/bpf')
-rw-r--r-- | sim/bpf/sim-if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/bpf/sim-if.c b/sim/bpf/sim-if.c index b29300f..4c9aa83 100644 --- a/sim/bpf/sim-if.c +++ b/sim/bpf/sim-if.c @@ -132,7 +132,7 @@ sim_open (SIM_OPEN_KIND kind, STATE_MACHS (sd) = bpf_sim_machs; STATE_MODEL_NAME (sd) = "bpf-def"; - if (sim_cpu_alloc_all_extra (sd, 1, sizeof (struct bpf_sim_cpu)) != SIM_RC_OK) + if (sim_cpu_alloc_all_extra (sd, 0, sizeof (struct bpf_sim_cpu)) != SIM_RC_OK) goto error; if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK) |