|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH 6/9] pci.c: factor out while(bus) bus->next loop logic into pci_find_bus_from(). |
Date: | Thu, 01 Oct 2009 13:24:18 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 |
On 10/01/09 08:28, Michael S. Tsirkin wrote:
On Thu, Oct 01, 2009 at 12:29:34PM +0900, Isaku Yamahata wrote:+static PCIBus *pci_find_bus_from(PCIBus *from, int bus_num)Why what is "from"? pci_find_parent_bus a better name?Its intention is to go down from a given parent bus to find child bus of a given bus number, bus_num. The current implementation arranges PCIBus in a single linked list, and a single linked list doesn't represent pci bus topology well. So it may find a pci bus which isn't child of a given bus.
Can we have two pci busses with the same bus number in a system?
I won't be surprised if we need a tree to represent PCI bus topology. But we already have it, don't we: each bus lists devices behind it, some of these could be buses.
Yes, the qdev device tree has all the needed info already. cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |