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 3/9] intc/grlib_irqmp: implements the multiprocessor status register
Date: Fri, 5 Jan 2024 12:32:18 +0100 [thread overview]
Message-ID: <702936da-4931-40b7-8f82-b256cdf8d9f1@linaro.org> (raw)
In-Reply-To: <20240105102421.163554-4-chigot@adacore.com>
Hi Clément,
On 5/1/24 11:24, Clément Chigot wrote:
> This implements the multiprocessor status register in grlib-irqmp and bind
> it to a start signal, which will be later wired in leon3-generic to
> start a cpu.
>
> Co-developed-by: Frederic Konrad <konrad.frederic@yahoo.fr>
> Signed-off-by: Clément Chigot <chigot@adacore.com>
> ---
> hw/intc/grlib_irqmp.c | 22 +++++++++++++++++++---
> 1 file changed, 19 insertions(+), 3 deletions(-)
> @@ -323,6 +334,8 @@ static void grlib_irqmp_reset(DeviceState *d)
>
> memset(irqmp->state, 0, sizeof *irqmp->state);
> irqmp->state->parent = irqmp;
> + irqmp->state->mpstatus = ((irqmp->ncpus - 1) << 28)
Can you #define this magic '28' number?
> + | ((1 << irqmp->ncpus) - 2);
> }
>
> static void grlib_irqmp_realize(DeviceState *dev, Error **errp)
> @@ -336,6 +349,9 @@ static void grlib_irqmp_realize(DeviceState *dev, Error **errp)
> }
>
> qdev_init_gpio_in(dev, grlib_irqmp_set_irq, MAX_PILS);
> + /* Transitionning from 0 to 1 starts the CPUs. */
What about 1 -> 0?
> + qdev_init_gpio_out_named(dev, irqmp->start_signal, "grlib-start-cpu",
> + IRQMP_MAX_CPU);
> qdev_init_gpio_out_named(dev, &irqmp->irq, "grlib-irq", 1);
> memory_region_init_io(&irqmp->iomem, OBJECT(dev), &grlib_irqmp_ops, irqmp,
> "irqmp", IRQMP_REG_SIZE);
next prev parent reply other threads:[~2024-01-05 11:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 10:24 [PATCH 0/9] sparc/leon3: Add support for -smp Clément Chigot
2024-01-05 10:24 ` [PATCH 1/9] sparc/grlib: split out the headers for each peripherals Clément Chigot
2024-01-05 14:00 ` Philippe Mathieu-Daudé
2024-01-05 14:39 ` Clément Chigot
2024-01-05 10:24 ` [PATCH 2/9] intc/grlib_irqmp: add ncpus property Clément Chigot
2024-01-05 11:25 ` Philippe Mathieu-Daudé
2024-01-05 10:24 ` [PATCH 3/9] intc/grlib_irqmp: implements the multiprocessor status register Clément Chigot
2024-01-05 11:32 ` Philippe Mathieu-Daudé [this message]
2024-01-05 13:23 ` Clément Chigot
2024-01-05 13:37 ` Philippe Mathieu-Daudé
2024-01-05 14:15 ` Clément Chigot
2024-01-05 10:24 ` [PATCH 4/9] intc/grlib_irqmp: implements multicore irq Clément Chigot
2024-01-05 14:15 ` Philippe Mathieu-Daudé
2024-01-05 10:24 ` [PATCH 5/9] target/sparc: implement asr17 feature for smp Clément Chigot
2024-01-09 17:31 ` Richard Henderson
2024-01-05 10:24 ` [PATCH 6/9] target/sparc: simplify qemu_irq_ack Clément Chigot
2024-01-05 11:33 ` Philippe Mathieu-Daudé
2024-01-05 10:24 ` [PATCH 7/9] leon3: implement multiprocessor Clément Chigot
2024-01-05 10:24 ` [PATCH 8/9] leon3: check cpu_id in the tiny bootloader Clément Chigot
2024-01-05 10:24 ` [PATCH 9/9] MAINTAINERS: replace Fabien by myself as Leon3 maintainer Clément Chigot
2024-01-05 10:29 ` Clément Chigot
2024-01-05 10:42 ` Fabien Chouteau
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=702936da-4931-40b7-8f82-b256cdf8d9f1@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).