[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set
From: |
David Gibson |
Subject: |
Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set |
Date: |
Mon, 12 Oct 2020 09:34:46 +1100 |
On Sun, Oct 11, 2020 at 09:03:32PM +0200, Philippe Mathieu-Daudé wrote:
> The Grackle PCI host model expects the interrupt controller
> being set, but does not verify it is present. Add a check to
> help developers using this model.
I don't think thaqt's very likely, but, sure, applied to ppc-for-5.2
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/pci-host/grackle.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
> index 57c29b20afb..20361d215ca 100644
> --- a/hw/pci-host/grackle.c
> +++ b/hw/pci-host/grackle.c
> @@ -76,6 +76,10 @@ static void grackle_realize(DeviceState *dev, Error **errp)
> GrackleState *s = GRACKLE_PCI_HOST_BRIDGE(dev);
> PCIHostState *phb = PCI_HOST_BRIDGE(dev);
>
> + if (!s->pic) {
> + error_setg(errp, TYPE_GRACKLE_PCI_HOST_BRIDGE ": 'pic' link not
> set");
> + return;
> + }
> phb->bus = pci_register_root_bus(dev, NULL,
> pci_grackle_set_irq,
> pci_grackle_map_irq,
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, Philippe Mathieu-Daudé, 2020/10/11
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set,
David Gibson <=
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, Philippe Mathieu-Daudé, 2020/10/12
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, David Gibson, 2020/10/12
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, BALATON Zoltan, 2020/10/12
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, Philippe Mathieu-Daudé, 2020/10/12
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, Markus Armbruster, 2020/10/19
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, BALATON Zoltan, 2020/10/19
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, Markus Armbruster, 2020/10/19
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, Mark Cave-Ayland, 2020/10/19
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, BALATON Zoltan, 2020/10/19
- Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set, Markus Armbruster, 2020/10/20