[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 25/33] sparc: move PIL irq handling to cpu.c
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 25/33] sparc: move PIL irq handling to cpu.c |
Date: |
Mon, 18 Nov 2019 15:38:27 +0000 |
On Wed, 23 Oct 2019 at 18:34, Marc-André Lureau
<address@hidden> wrote:
>
> Rather than tweaking CPU bits from leon3 machine, move it to cpu.c.
>
> Suggested-by: Peter Maydell <address@hidden>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> hw/sparc/leon3.c | 37 -------------------------------------
> hw/sparc/trace-events | 4 ----
> target/sparc/cpu.c | 39 +++++++++++++++++++++++++++++++++++++++
> target/sparc/trace-events | 4 ++++
> 4 files changed, 43 insertions(+), 41 deletions(-)
> @@ -762,6 +799,8 @@ static void sparc_cpu_realizefn(DeviceState *dev, Error
> **errp)
> env->version |= env->def.nwindows - 1;
> #endif
>
> + env->pil_irq = qemu_allocate_irq(sparc_set_pil_in, env, 0);
> +
I think what I had in mind when I suggested this was that
once this was part of a DeviceState device you would then
create the IRQs with gpio_init_gpio_in_named() and
connect them on the board side with the usual gpio
connection functions.
I also don't know enough SPARC stuff to suggest whether this
irq creation should be conditional on "is this CPU a leon3"
or not.
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v3 25/33] sparc: move PIL irq handling to cpu.c,
Peter Maydell <=