qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [RFC v2 3/6] pci: Rename and change signatures of pci_bus


From: Peter Maydell
Subject: Re: [Qemu-arm] [RFC v2 3/6] pci: Rename and change signatures of pci_bus_new() & related functions
Date: Wed, 19 Apr 2017 09:41:42 +0100

On 18 April 2017 at 23:17, Eduardo Habkost <address@hidden> wrote:
> pci_bus_new*() and pci_register_bus() work only when the 'parent'
> argument is a PCI_HOST_BRIDGE object. Rename them to reflect that they
> are meant to initialize a bus that's in a PCI host bridge.
>
> The new function names are:
> * pci_host_bus_init() (replacing pci_bus_new())
> * pci_host_bus_init_inplace() (replacing pci_bus_new_inplace())
> * pci_host_bus_init_irqs() (replacing pci_register_bus())

This is moving these functions away from the convention that
we seem to mostly follow for buses (eg ISA, SCSI) of
foo_bus_new() to allocate and return a new bus, and
foo_bus_new_inplace() to initialize a bus that's inline in
some other struct.

I'm not sure this is a good idea unless we have a plan to
convert all the other QOM buses and document that this is
the right way to implement init for a bus.

thanks
-- PMM



reply via email to

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