qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/6] spapr: Don't use qdev_get_machine() in spapr_msi_write()


From: David Gibson
Subject: Re: [PATCH 4/6] spapr: Don't use qdev_get_machine() in spapr_msi_write()
Date: Thu, 10 Dec 2020 14:30:13 +1100

On Wed, Dec 09, 2020 at 06:00:50PM +0100, Greg Kurz wrote:
> spapr_phb_realize() passes the sPAPR machine state as opaque data
> for the I/O callbacks:
> 
> memory_region_init_io(&sphb->msiwindow, OBJECT(sphb), &spapr_msi_ops, spapr,
>                                                                       ^^^^^
>                       "msi", msi_window_size);
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>

Applied to ppc-for-6.0.

> ---
>  hw/ppc/spapr_pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index 149bf4c21d22..890a0cc1d6af 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -747,7 +747,7 @@ static PCIINTxRoute spapr_route_intx_pin_to_irq(void 
> *opaque, int pin)
>  static void spapr_msi_write(void *opaque, hwaddr addr,
>                              uint64_t data, unsigned size)
>  {
> -    SpaprMachineState *spapr = SPAPR_MACHINE(qdev_get_machine());
> +    SpaprMachineState *spapr = opaque;
>      uint32_t irq = data;
>  
>      trace_spapr_pci_msi_write(addr, data, 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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]