On Wed, 23 Oct 2019 at 18:34, Marc-André Lureau <[email protected]> wrote: > > Rather than tweaking CPU bits from leon3 machine, move it to cpu.c. > > Suggested-by: Peter Maydell <[email protected]> > Signed-off-by: Marc-André Lureau <[email protected]> > --- > 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
