summaryrefslogtreecommitdiffstats
path: root/hw/core/sysbus.c
diff options
context:
space:
mode:
authorPeter Maydell2018-08-20 10:48:03 +0200
committerPeter Maydell2018-08-20 10:48:03 +0200
commitadaec191bfb31e12d40af8ab1b869f5b40d61ee9 (patch)
tree9a2b89fcf729fa1c4db7d4fd9331b921e97edff8 /hw/core/sysbus.c
parentMerge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20180817.0' i... (diff)
parentfw_cfg: ignore suffixes in the bootdevice list dependent on machine class (diff)
downloadqemu-adaec191bfb31e12d40af8ab1b869f5b40d61ee9.tar.gz
qemu-adaec191bfb31e12d40af8ab1b869f5b40d61ee9.tar.xz
qemu-adaec191bfb31e12d40af8ab1b869f5b40d61ee9.zip
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging
Machine queue, 2018-08-17 * Allow machine classes to specify if boot device suffixes should be ignored by get_boot_devices_list() * Tiny coding style fixup # gpg: Signature made Fri 17 Aug 2018 19:29:22 BST # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-next-pull-request: fw_cfg: ignore suffixes in the bootdevice list dependent on machine class sysbus: always allow explicit_ofw_unit_address() to override address generation machine: Fix coding style at machine_run_board_init() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/sysbus.c')
-rw-r--r--hw/core/sysbus.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index 3c8e53b188..7ac36ad3e7 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -293,16 +293,8 @@ static char *sysbus_get_fw_dev_path(DeviceState *dev)
{
SysBusDevice *s = SYS_BUS_DEVICE(dev);
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_GET_CLASS(s);
- /* for the explicit unit address fallback case: */
char *addr, *fw_dev_path;
- if (s->num_mmio) {
- return g_strdup_printf("%s@" TARGET_FMT_plx, qdev_fw_name(dev),
- s->mmio[0].addr);
- }
- if (s->num_pio) {
- return g_strdup_printf("%s@i%04x", qdev_fw_name(dev), s->pio[0]);
- }
if (sbc->explicit_ofw_unit_address) {
addr = sbc->explicit_ofw_unit_address(s);
if (addr) {
@@ -311,6 +303,13 @@ static char *sysbus_get_fw_dev_path(DeviceState *dev)
return fw_dev_path;
}
}
+ if (s->num_mmio) {
+ return g_strdup_printf("%s@" TARGET_FMT_plx, qdev_fw_name(dev),
+ s->mmio[0].addr);
+ }
+ if (s->num_pio) {
+ return g_strdup_printf("%s@i%04x", qdev_fw_name(dev), s->pio[0]);
+ }
return g_strdup(qdev_fw_name(dev));
}