diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-14 09:28:06 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-28 19:25:51 +0200 |
commit | d8bb00d6d72eba317f78501434fc37db4968fa31 (patch) | |
tree | ff256818d8ffb51d20ba626db9a5f20f6e411c1f /hw/spapr_vio.c | |
parent | afd4030c16d290e460cc93f8f9e353516b5451a2 (diff) | |
download | qemu-d8bb00d6d72eba317f78501434fc37db4968fa31.zip qemu-d8bb00d6d72eba317f78501434fc37db4968fa31.tar.gz qemu-d8bb00d6d72eba317f78501434fc37db4968fa31.tar.bz2 |
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>
Diffstat (limited to 'hw/spapr_vio.c')
-rw-r--r-- | hw/spapr_vio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c index 35818e1..977603f 100644 --- a/hw/spapr_vio.c +++ b/hw/spapr_vio.c @@ -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); |