Message ID | 20240208181245.96617-6-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | hw: Strengthen SysBus & QBus API | expand |
On Thu, 8 Feb 2024 at 18:14, Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > We should not wire IRQs on unrealized device. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
On 08/02/2024 18:12, Philippe Mathieu-Daudé wrote: > We should not wire IRQs on unrealized device. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > hw/ppc/prep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c > index 1a6cd05c61..4eb5477069 100644 > --- a/hw/ppc/prep.c > +++ b/hw/ppc/prep.c > @@ -278,9 +278,9 @@ static void ibm_40p_init(MachineState *machine) > > /* PCI -> ISA bridge */ > i82378_dev = DEVICE(pci_new(PCI_DEVFN(11, 0), "i82378")); > + qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); > qdev_connect_gpio_out(i82378_dev, 0, > qdev_get_gpio_in(DEVICE(cpu), PPC6xx_INPUT_INT)); > - qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); > > sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(i82378_dev, 15)); > isa_bus = ISA_BUS(qdev_get_child_bus(i82378_dev, "isa.0")); Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> ATB, Mark.
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 1a6cd05c61..4eb5477069 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -278,9 +278,9 @@ static void ibm_40p_init(MachineState *machine) /* PCI -> ISA bridge */ i82378_dev = DEVICE(pci_new(PCI_DEVFN(11, 0), "i82378")); + qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); qdev_connect_gpio_out(i82378_dev, 0, qdev_get_gpio_in(DEVICE(cpu), PPC6xx_INPUT_INT)); - qdev_realize_and_unref(i82378_dev, BUS(pci_bus), &error_fatal); sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(i82378_dev, 15)); isa_bus = ISA_BUS(qdev_get_child_bus(i82378_dev, "isa.0"));
We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)