On 16/1/24 14:02, Clément Chigot wrote:
This allows to register more than one CPU on the leon3_generic machine.

Co-developed-by: Frederic Konrad <konrad.frede...@yahoo.fr>
Signed-off-by: Clément Chigot <chi...@adacore.com>
---
  hw/sparc/leon3.c | 106 +++++++++++++++++++++++++++++++++--------------
  1 file changed, 74 insertions(+), 32 deletions(-)


+static void leon3_start_cpu(void *opaque, int n, int level)
+{
+    CPUState *cs = CPU(opaque);
+
+    if (level) {
+        async_run_on_cpu(cs, leon3_start_cpu_async_work, RUN_ON_CPU_NULL);
+    }


What about instead:

    assert(level == 1);
    async_run_on_cpu(cs, leon3_start_cpu_async_work, RUN_ON_CPU_NULL);

since per patch #3:

 +    /*
 +     * Transitionning from 0 to 1 starts the CPUs. The opposite can't
 +     * happen.
 +     */

+}


Reply via email to