qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 6/8] leon3: implement multiprocessor


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 6/8] leon3: implement multiprocessor
Date: Tue, 30 Jan 2024 12:52:29 +0100
User-agent: Mozilla Thunderbird

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.frederic@yahoo.fr>
Signed-off-by: Clément Chigot <chigot@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

[Prev in Thread] Current Thread [Next in Thread]