qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Clément Chigot" <chigot@adacore.com>, qemu-devel@nongnu.org
Cc: Frederic Konrad <konrad.frederic@yahoo.fr>
Subject: Re: [PATCH v2 6/8] leon3: implement multiprocessor
Date: Tue, 30 Jan 2024 12:52:29 +0100	[thread overview]
Message-ID: <cbc72601-31c8-456f-886b-641d746499c8@linaro.org> (raw)
In-Reply-To: <20240116130213.172358-7-chigot@adacore.com>

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.
  +     */

> +}



  parent reply	other threads:[~2024-01-30 11:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 13:02 [PATCH v2 0/8] sparc/leon3: Add support for -smp Clément Chigot
2024-01-16 13:02 ` [PATCH v2 1/8] sparc/grlib: split out the headers for each peripherals Clément Chigot
2024-01-30  8:50   ` Philippe Mathieu-Daudé
2024-01-16 13:02 ` [PATCH v2 2/8] intc/grlib_irqmp: add ncpus property Clément Chigot
2024-01-16 13:02 ` [PATCH v2 3/8] intc/grlib_irqmp: implements the multiprocessor status register Clément Chigot
2024-01-30 11:53   ` Philippe Mathieu-Daudé
2024-01-16 13:02 ` [PATCH v2 4/8] intc/grlib_irqmp: implements multicore irq Clément Chigot
2024-01-30  8:59   ` Philippe Mathieu-Daudé
2024-01-16 13:02 ` [PATCH v2 5/8] target/sparc: implement asr17 feature for smp Clément Chigot
2024-01-30 11:44   ` Philippe Mathieu-Daudé
2024-01-16 13:02 ` [PATCH v2 6/8] leon3: implement multiprocessor Clément Chigot
2024-01-30 11:43   ` Philippe Mathieu-Daudé
2024-01-30 14:07     ` Clément Chigot
2024-01-30 11:52   ` Philippe Mathieu-Daudé [this message]
2024-01-16 13:02 ` [PATCH v2 7/8] leon3: check cpu_id in the tiny bootloader Clément Chigot
2024-01-30  9:15   ` Philippe Mathieu-Daudé
2024-01-30 12:41     ` Clément Chigot
2024-01-16 13:02 ` [PATCH v2 8/8] MAINTAINERS: replace Fabien by myself as Leon3 maintainer Clément Chigot
2024-01-30  8:38 ` [PATCH v2 0/8] sparc/leon3: Add support for -smp Clément Chigot
2024-01-30 11:55 ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbc72601-31c8-456f-886b-641d746499c8@linaro.org \
    --to=philmd@linaro.org \
    --cc=chigot@adacore.com \
    --cc=konrad.frederic@yahoo.fr \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).