mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
qdev: switch children device list to QTAILQ
SCSI buses will need to read the children list first-to-last. This requires using a QTAILQ, because hell breaks loose if you just try inserting at the tail (thus reversing the order of all existing visits from last-to-first to first-to-tail). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
afd4030c16
commit
d8bb00d6d7
8 changed files with 28 additions and 28 deletions
|
@ -63,7 +63,7 @@ VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg)
|
|||
DeviceState *qdev;
|
||||
VIOsPAPRDevice *dev = NULL;
|
||||
|
||||
QLIST_FOREACH(qdev, &bus->bus.children, sibling) {
|
||||
QTAILQ_FOREACH(qdev, &bus->bus.children, sibling) {
|
||||
dev = (VIOsPAPRDevice *)qdev;
|
||||
if (dev->reg == reg) {
|
||||
break;
|
||||
|
@ -588,7 +588,7 @@ static void rtas_quiesce(sPAPREnvironment *spapr, uint32_t token,
|
|||
return;
|
||||
}
|
||||
|
||||
QLIST_FOREACH(qdev, &bus->bus.children, sibling) {
|
||||
QTAILQ_FOREACH(qdev, &bus->bus.children, sibling) {
|
||||
dev = (VIOsPAPRDevice *)qdev;
|
||||
spapr_vio_quiesce_one(dev);
|
||||
}
|
||||
|
@ -726,7 +726,7 @@ int spapr_populate_vdevice(VIOsPAPRBus *bus, void *fdt)
|
|||
DeviceState *qdev;
|
||||
int ret = 0;
|
||||
|
||||
QLIST_FOREACH(qdev, &bus->bus.children, sibling) {
|
||||
QTAILQ_FOREACH(qdev, &bus->bus.children, sibling) {
|
||||
VIOsPAPRDevice *dev = (VIOsPAPRDevice *)qdev;
|
||||
|
||||
ret = vio_make_devnode(dev, fdt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue