From: Bernhard Beschow <shentey@gmail.com>
All isabus_dev_print() did was to print up to two IRQ numbers per
device. This is redundant if the IRQ numbers are present as QOM
properties (see e.g. the modified tests/qemu-iotests/172.out).
Now that the last devices relying on isabus_dev_print() had their IRQ
numbers QOM'ified, the contribution of this function ultimately became
redundant. Remove it.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220301220037.76555-5-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/isa/isa-bus.c | 16 ----------------
tests/qemu-iotests/172.out | 26 --------------------------
2 files changed, 42 deletions(-)
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index 6c31398dda..af5add6a26 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -21,21 +21,18 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qapi/error.h"
-#include "monitor/monitor.h"
#include "hw/sysbus.h"
#include "sysemu/sysemu.h"
#include "hw/isa/isa.h"
static ISABus *isabus;
-static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent);
static char *isabus_get_fw_dev_path(DeviceState *dev);
static void isa_bus_class_init(ObjectClass *klass, void *data)
{
BusClass *k = BUS_CLASS(klass);
- k->print_dev = isabus_dev_print;
k->get_fw_dev_path = isabus_get_fw_dev_path;
}
@@ -222,19 +219,6 @@ void isa_build_aml(ISABus *bus, Aml *scope)
}
}
-static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent)
-{
- ISADevice *d = ISA_DEVICE(dev);
-
- if (d->isairq[1] != -1) {
- monitor_printf(mon, "%*sisa irqs %d,%d\n", indent, "",
- d->isairq[0], d->isairq[1]);
- } else if (d->isairq[0] != -1) {
- monitor_printf(mon, "%*sisa irq %d\n", indent, "",
- d->isairq[0]);
- }
-}
-
static void isabus_bridge_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
diff --git a/tests/qemu-iotests/172.out b/tests/qemu-iotests/172.out
index 4cf4d536b4..9479b92185 100644
--- a/tests/qemu-iotests/172.out
+++ b/tests/qemu-iotests/172.out
@@ -15,7 +15,6 @@ Testing:
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -43,7 +42,6 @@ Testing: -fda TEST_DIR/t.qcow2
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -81,7 +79,6 @@ Testing: -fdb TEST_DIR/t.qcow2
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -135,7 +132,6 @@ Testing: -fda TEST_DIR/t.qcow2 -fdb TEST_DIR/t.qcow2.2
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -190,7 +186,6 @@ Testing: -fdb
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -230,7 +225,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -268,7 +262,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2,index=1
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -322,7 +315,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive if=floppy,file=TEST_DIR/t
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -380,7 +372,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -418,7 +409,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,unit=1
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -456,7 +446,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qco
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -520,7 +509,6 @@ Testing: -fda TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -device fl
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -575,7 +563,6 @@ Testing: -fda TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -device fl
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -630,7 +617,6 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -device fl
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -685,7 +671,6 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -device fl
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -749,7 +734,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.q
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -804,7 +788,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.q
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -865,7 +848,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -global floppy.drive=none0 -device
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -933,7 +915,6 @@ Testing: -device floppy
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -958,7 +939,6 @@ Testing: -device floppy,drive-type=120
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -983,7 +963,6 @@ Testing: -device floppy,drive-type=144
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -1008,7 +987,6 @@ Testing: -device floppy,drive-type=288
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -1036,7 +1014,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,drive-t
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -1074,7 +1051,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,drive-t
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -1115,7 +1091,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,logical
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
@@ -1153,7 +1128,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,physica
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
- isa irq 6
bus: floppy-bus.0
type floppy-bus
dev: floppy, id ""
--
2.34.1
Am 7. März 2022 13:43:51 UTC schrieb "Philippe Mathieu-Daudé" <philippe.mathieu.daude@gmail.com>:
>From: Bernhard Beschow <shentey@gmail.com>
>
>All isabus_dev_print() did was to print up to two IRQ numbers per
>device. This is redundant if the IRQ numbers are present as QOM
>properties (see e.g. the modified tests/qemu-iotests/172.out).
>
>Now that the last devices relying on isabus_dev_print() had their IRQ
>numbers QOM'ified, the contribution of this function ultimately became
>redundant. Remove it.
>
>Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>Message-Id: <20220301220037.76555-5-shentey@gmail.com>
>Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>---
> hw/isa/isa-bus.c | 16 ----------------
> tests/qemu-iotests/172.out | 26 --------------------------
> 2 files changed, 42 deletions(-)
>
>diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
>index 6c31398dda..af5add6a26 100644
>--- a/hw/isa/isa-bus.c
>+++ b/hw/isa/isa-bus.c
>@@ -21,21 +21,18 @@
> #include "qemu/error-report.h"
> #include "qemu/module.h"
> #include "qapi/error.h"
>-#include "monitor/monitor.h"
> #include "hw/sysbus.h"
> #include "sysemu/sysemu.h"
> #include "hw/isa/isa.h"
>
> static ISABus *isabus;
>
>-static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent);
> static char *isabus_get_fw_dev_path(DeviceState *dev);
>
> static void isa_bus_class_init(ObjectClass *klass, void *data)
> {
> BusClass *k = BUS_CLASS(klass);
>
>- k->print_dev = isabus_dev_print;
> k->get_fw_dev_path = isabus_get_fw_dev_path;
> }
>
>@@ -222,19 +219,6 @@ void isa_build_aml(ISABus *bus, Aml *scope)
> }
> }
>
>-static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent)
>-{
>- ISADevice *d = ISA_DEVICE(dev);
>-
>- if (d->isairq[1] != -1) {
>- monitor_printf(mon, "%*sisa irqs %d,%d\n", indent, "",
>- d->isairq[0], d->isairq[1]);
>- } else if (d->isairq[0] != -1) {
>- monitor_printf(mon, "%*sisa irq %d\n", indent, "",
>- d->isairq[0]);
>- }
>-}
>-
> static void isabus_bridge_class_init(ObjectClass *klass, void *data)
> {
> DeviceClass *dc = DEVICE_CLASS(klass);
>diff --git a/tests/qemu-iotests/172.out b/tests/qemu-iotests/172.out
>index 4cf4d536b4..9479b92185 100644
>--- a/tests/qemu-iotests/172.out
>+++ b/tests/qemu-iotests/172.out
>@@ -15,7 +15,6 @@ Testing:
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -43,7 +42,6 @@ Testing: -fda TEST_DIR/t.qcow2
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -81,7 +79,6 @@ Testing: -fdb TEST_DIR/t.qcow2
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -135,7 +132,6 @@ Testing: -fda TEST_DIR/t.qcow2 -fdb TEST_DIR/t.qcow2.2
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -190,7 +186,6 @@ Testing: -fdb
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -230,7 +225,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -268,7 +262,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2,index=1
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -322,7 +315,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive if=floppy,file=TEST_DIR/t
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -380,7 +372,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -418,7 +409,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,unit=1
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -456,7 +446,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qco
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -520,7 +509,6 @@ Testing: -fda TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -device fl
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -575,7 +563,6 @@ Testing: -fda TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -device fl
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -630,7 +617,6 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -device fl
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -685,7 +671,6 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -device fl
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -749,7 +734,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.q
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -804,7 +788,6 @@ Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.q
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -865,7 +848,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -global floppy.drive=none0 -device
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -933,7 +915,6 @@ Testing: -device floppy
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -958,7 +939,6 @@ Testing: -device floppy,drive-type=120
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -983,7 +963,6 @@ Testing: -device floppy,drive-type=144
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -1008,7 +987,6 @@ Testing: -device floppy,drive-type=288
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -1036,7 +1014,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,drive-t
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -1074,7 +1051,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,drive-t
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -1115,7 +1091,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,logical
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
>@@ -1153,7 +1128,6 @@ Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0,physica
> fdtypeA = "auto"
> fdtypeB = "auto"
> fallback = "288"
>- isa irq 6
> bus: floppy-bus.0
> type floppy-bus
> dev: floppy, id ""
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
© 2016 - 2026 Red Hat, Inc.