qemu-irix/include/hw
Greg Kurz a8eeafda19 spapr/pci: populate PCI DT in reverse order
Since commit 1d2d974244 "spapr_pci: enumerate and add PCI device tree", QEMU
populates the PCI device tree in the opposite order compared to SLOF.

Before 1d2d974244c6:

Populating /pci@800000020000000
                     00 0000 (D) : 1af4 1000    virtio [ net ]
                     00 0800 (D) : 1af4 1001    virtio [ block ]
                     00 1000 (D) : 1af4 1009    virtio [ network ]
Populating /pci@800000020000000/unknown-legacy-device@2

7e5294b8 :  /pci@800000020000000
7e52b998 :  |-- ethernet@0
7e52c0c8 :  |-- scsi@1
7e52c7e8 :  +-- unknown-legacy-device@2 ok

Since 1d2d974244c6:

Populating /pci@800000020000000
                     00 1000 (D) : 1af4 1009    virtio [ network ]
Populating /pci@800000020000000/unknown-legacy-device@2
                     00 0800 (D) : 1af4 1001    virtio [ block ]
                     00 0000 (D) : 1af4 1000    virtio [ net ]

7e5e8118 :  /pci@800000020000000
7e5ea6a0 :  |-- unknown-legacy-device@2
7e5eadb8 :  |-- scsi@1
7e5eb4d8 :  +-- ethernet@0 ok

This behaviour change is not actually a bug since no assumptions should be
made on DT ordering. But it has no real justification either, other than
being the consequence of the way fdt_add_subnode() inserts new elements
to the front of the FDT rather than adding them to the tail.

This patch reverts to the historical SLOF ordering by walking PCI devices
in reverse order. This reconciles pseries with x86 machine types behavior.
It is expected to make things easier when porting existing applications to
power.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
(slight update to the changelog)
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-03-01 11:23:39 +11:00
..
acpi machine: Make possible_cpu_arch_ids() return const pointer 2017-01-23 21:25:37 -02:00
adc
arm hw/arm/virt: Add a user option to disallow ITS instantiation 2017-02-28 12:08:16 +00:00
audio
block
char char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
core
cpu
cris char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
display
dma include: Fix typos found by codespell 2017-01-24 23:26:52 +03:00
gpio
i2c i2c: Allow I2C devices to NAK start events 2017-01-09 11:40:20 +00:00
i386 machine: move possible_cpus to MachineState 2017-02-22 11:28:28 +11:00
ide
input ps2: fix mouse mappings for right/middle button 2017-02-20 11:25:38 +01:00
intc hw/intc/arm_gicv3: Implement gicv3_cpuif_virt_update() 2017-01-20 11:15:10 +00:00
ipack
ipmi
isa
kvm
lm32
m68k hw/char/mcf_uart: QOMify the ColdFire UART 2017-02-16 14:06:56 +01:00
mem nvdimm acpi: rename nvdimm_acpi_hotplug 2016-11-15 17:20:37 +02:00
mips Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
misc target-arm: Implement BCM2835 hardware RNG 2017-02-28 12:08:13 +00:00
net
nvram fw-cfg: turn FW_CFG_FILE_SLOTS into a device property 2017-01-18 22:59:53 +02:00
pci spapr/pci: populate PCI DT in reverse order 2017-03-01 11:23:39 +11:00
pci-host hw: xilinx-pcie: Add support for Xilinx AXI PCIe Controller 2017-02-21 23:49:29 +00:00
ppc spapr: reuse machine->possible_cpus instead of cores[] 2017-02-22 11:28:28 +11:00
s390x virtio-ccw: support VIRTIO_QUEUE_MAX virtqueues 2017-02-24 10:15:18 +01:00
scsi hw: Deprecate -drive if=scsi with non-onboard HBAs 2017-02-21 13:17:45 +01:00
sd bcm2835_sdhost: add bcm2835 sdhost controller 2017-02-28 12:08:19 +00:00
sh4 char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
smbios smbios: filter based on CONFIG_SMBIOS rather than TARGET 2017-01-16 17:52:34 +01:00
sparc char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
ssi aspeed/smc: handle SPI flash Command mode 2017-01-20 11:15:08 +00:00
timer hw/mips_gictimer: provide API for retrieving frequency 2017-02-21 22:24:58 +00:00
tricore
unicore32
usb
vfio
virtio virtio: add MemoryListener to cache ring translations 2017-02-17 21:52:30 +02:00
watchdog wdt: Add Aspeed watchdog device model 2017-02-07 18:29:59 +00:00
xen trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
boards.h machine: replace query_hotpluggable_cpus() callback with has_hotpluggable_cpus flag 2017-02-22 11:28:28 +11:00
bt.h char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
compat.h hw/pci: disable pci-bridge's shpc by default 2017-02-01 03:37:18 +02:00
devices.h char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
elf_ops.h
empty_slot.h
fw-path-provider.h
hotplug.h qdev: hotplug: drop HotplugHandler.post_plug callback 2016-11-15 17:20:37 +02:00
hw.h hw: move reset handlers from vl.c to hw/core 2017-01-16 17:52:35 +01:00
ide.h xen-platform: add missing disk unplug option 2017-01-27 15:23:29 -08:00
irq.h
loader-fit.h loader: Support Flattened Image Trees (FIT images) 2017-02-21 23:47:40 +00:00
loader.h loader: Support Flattened Image Trees (FIT images) 2017-02-21 23:47:40 +00:00
nmi.h
or-irq.h
pcmcia.h
platform-bus.h
ptimer.h
qdev-core.h Introduce DEVICE_CATEGORY_CPU for CPU devices 2017-01-27 18:07:31 +01:00
qdev-dma.h
qdev-properties.h char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
qdev.h
register.h hw/registerfields.h: Pull FIELD etc macros out of hw/register.h 2017-01-27 15:20:21 +00:00
registerfields.h hw/registerfields.h: Pull FIELD etc macros out of hw/register.h 2017-01-27 15:20:21 +00:00
stream.h
sysbus.h
usb.h usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00