qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-block@nongnu.org, "John Snow" <jsnow@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	qemu-ppc@nongnu.org, "Hanna Reitz" <hreitz@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [PATCH v2 08/18] hw/isa: Deprecate isa_get_irq() in favor of isa_bus_get_irq()
Date: Wed, 15 Feb 2023 17:16:31 +0100	[thread overview]
Message-ID: <20230215161641.32663-9-philmd@linaro.org> (raw)
In-Reply-To: <20230215161641.32663-1-philmd@linaro.org>

Last commit removed the last use of isa_get_irq(NULL).
Add an assertion to ensure we won't use that hack again.
Deprecate in favor of the BUS API: isa_bus_get_irq().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/isa/isa-bus.c     | 6 +++---
 include/hw/isa/isa.h | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index 96bfee9aa7..a9b94e6c8a 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -85,10 +85,10 @@ qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum)
  * This function is only for special cases such as the 'ferr', and
  * temporary use for normal devices until they are converted to qdev.
  */
-qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq)
+qemu_irq isa_get_irq(ISADevice *dev, unsigned irqnum)
 {
-    assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus);
-    return isa_bus_get_irq(isabus, isairq);
+    assert(dev);
+    return isa_bus_get_irq(ISA_BUS(qdev_get_parent_bus(DEVICE(dev))), irqnum);
 }
 
 void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq)
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index 42d36b21a3..1084d68ead 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -74,7 +74,6 @@ struct ISADevice {
 ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space,
                     MemoryRegion *address_space_io, Error **errp);
 void isa_bus_irqs(ISABus *bus, qemu_irq *irqs);
-qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq);
 void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq);
 void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16);
 IsaDma *isa_bus_get_dma(ISABus *bus, int nchan);
@@ -95,6 +94,9 @@ ISADevice *isa_create_simple(ISABus *bus, const char *name);
 
 ISADevice *isa_vga_init(ISABus *bus);
 
+/*  isa_get_irq() is deprecated, please use isa_bus_get_irq() instead. */
+qemu_irq isa_get_irq(ISADevice *dev, unsigned irqnum);
+
 /**
  * isa_register_ioport: Install an I/O port region on the ISA bus.
  *
-- 
2.38.1



  parent reply	other threads:[~2023-02-15 16:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 16:16 [PATCH v2 00/18] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport() Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 01/18] hw/isa: Rename isa_get_dma() -> isa_bus_get_dma() Philippe Mathieu-Daudé
2023-02-24  8:42   ` Thomas Huth
2023-02-15 16:16 ` [PATCH v2 02/18] hw/isa: Factor isa_bus_get_irq() out of isa_get_irq() Philippe Mathieu-Daudé
2023-02-24  8:44   ` Thomas Huth
2023-02-15 16:16 ` [PATCH v2 03/18] hw: Replace isa_get_irq() by isa_bus_get_irq() when ISABus is available Philippe Mathieu-Daudé
2023-02-24  8:51   ` Thomas Huth
2023-02-15 16:16 ` [PATCH v2 04/18] hw/ide/piix: Expose output IRQ as properties for late object population Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 05/18] hw/i386/pc_piix: Wire PIIX3 IDE ouput IRQs to ISA bus IRQs 14/15 Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 06/18] hw/isa/piix4: Wire PIIX4 " Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 07/18] hw/ide/piix: Ensure IDE output IRQs are wired at realization Philippe Mathieu-Daudé
2023-02-16 14:43   ` Bernhard Beschow
2023-02-16 15:33     ` Philippe Mathieu-Daudé
2023-02-16 17:10       ` Bernhard Beschow
2023-02-19 21:54       ` Philippe Mathieu-Daudé
2023-02-20 23:49         ` Bernhard Beschow
2023-02-20 23:58           ` BALATON Zoltan
2023-02-21 11:45         ` Daniel P. Berrangé
2023-02-15 16:16 ` Philippe Mathieu-Daudé [this message]
2023-02-15 16:16 ` [PATCH v2 09/18] hw/isa: Simplify isa_address_space[_io]() Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 10/18] hw/isa: Use isa_address_space_io() in isa_register_ioport() Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 11/18] hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h' Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 12/18] hw/ide: Rename ISA specific ide_init_ioport -> ide_bus_init_ioport_isa Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 13/18] hw/ide: Introduce generic ide_init_ioport() Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 14/18] hw/ide/piix: Use generic ide_bus_init_ioport() Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 15/18] hw/isa: Ensure isa_register_portio_list() do not get NULL ISA device Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 16/18] hw/isa: Reduce 'isabus' singleton scope to isa_bus_new() Philippe Mathieu-Daudé
2023-02-15 16:16 ` [PATCH v2 17/18] hw/isa: Un-inline isa_bus_from_device() Philippe Mathieu-Daudé
2023-02-16 15:28   ` Bernhard Beschow
2023-02-15 16:16 ` [PATCH v2 18/18] hw/isa: Remove empty ISADeviceClass structure Philippe Mathieu-Daudé
2023-02-16 15:28   ` Bernhard Beschow
2023-02-20  8:00 ` [PATCH v2 06.5/18] hw/ide/piix: Allow using PIIX3-IDE as standalone PCI function Philippe Mathieu-Daudé
2023-02-20  9:10   ` Gerd Hoffmann
2023-02-20  9:52     ` Philippe Mathieu-Daudé
2023-02-27 22:26       ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230215161641.32663-9-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=eduardo@habkost.net \
    --cc=hpoussin@reactos.org \
    --cc=hreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).