From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>, "Sergio Lopez" <slp@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-ppc@nongnu.org, "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PATCH 01/11] hw/intc/i8259: Document i8259_init()
Date: Fri, 10 Feb 2023 17:37:34 +0100 [thread overview]
Message-ID: <20230210163744.32182-2-philmd@linaro.org> (raw)
In-Reply-To: <20230210163744.32182-1-philmd@linaro.org>
i8259_init() helper creates a i8259 device on an ISA bus,
connects its IRQ output to the parent's input IRQ, and
returns an array of 16 ISA input IRQs.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/intc/i8259.c | 4 ++--
include/hw/intc/i8259.h | 10 +++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
index 0261f087b2..17910f3bcb 100644
--- a/hw/intc/i8259.c
+++ b/hw/intc/i8259.c
@@ -406,7 +406,7 @@ static void pic_realize(DeviceState *dev, Error **errp)
pc->parent_realize(dev, errp);
}
-qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
+qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq_in)
{
qemu_irq *irq_set;
DeviceState *dev;
@@ -418,7 +418,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
isadev = i8259_init_chip(TYPE_I8259, bus, true);
dev = DEVICE(isadev);
- qdev_connect_gpio_out(dev, 0, parent_irq);
+ qdev_connect_gpio_out(dev, 0, parent_irq_in);
for (i = 0 ; i < 8; i++) {
irq_set[i] = qdev_get_gpio_in(dev, i);
}
diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h
index a0e34dd990..c412575775 100644
--- a/include/hw/intc/i8259.h
+++ b/include/hw/intc/i8259.h
@@ -4,7 +4,15 @@
/* i8259.c */
extern PICCommonState *isa_pic;
-qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq);
+
+/*
+ * i8259_init()
+ *
+ * Create a i8259 device on an ISA @bus,
+ * connect its output to @parent_irq_in,
+ * return an (allocated) array of 16 input IRQs.
+ */
+qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq_in);
qemu_irq *kvm_i8259_init(ISABus *bus);
int pic_get_output(PICCommonState *s);
int pic_read_irq(PICCommonState *s);
--
2.38.1
next prev parent reply other threads:[~2023-02-10 16:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 16:37 [PATCH 00/11] hw/isa: More housekeeping Philippe Mathieu-Daudé
2023-02-10 16:37 ` Philippe Mathieu-Daudé [this message]
2023-02-11 17:09 ` [PATCH 01/11] hw/intc/i8259: Document i8259_init() Richard Henderson
2023-02-10 16:37 ` [PATCH 02/11] hw/isa/i82378: Rename output IRQ as 'cpu_intr' Philippe Mathieu-Daudé
2023-02-11 17:10 ` Richard Henderson
2023-02-10 16:37 ` [PATCH 03/11] hw/isa/i82378: Remove intermediate IRQ forwarder Philippe Mathieu-Daudé
2023-02-11 17:13 ` Richard Henderson
2023-02-10 16:37 ` [PATCH 04/11] hw/isa/vt82c686: " Philippe Mathieu-Daudé
2023-02-10 16:37 ` [PATCH 05/11] hw/mips/jazz: Rename ISA input IRQs as 'isa_irqs_in' Philippe Mathieu-Daudé
2023-02-11 17:18 ` Richard Henderson
2023-02-10 16:37 ` [PATCH 06/11] hw/sparc64/sun4u: Keep reference to ISA input IRQs in EbusState Philippe Mathieu-Daudé
2023-02-11 17:30 ` Richard Henderson
2023-02-10 16:37 ` [PATCH 07/11] hw/isa: Reorder to separate ISABus* vs ISADevice* functions Philippe Mathieu-Daudé
2023-02-11 17:32 ` Richard Henderson
2023-02-10 16:37 ` [PATCH 08/11] hw/isa: Un-inline isa_bus_from_device() Philippe Mathieu-Daudé
2023-02-10 16:37 ` [PATCH 09/11] hw/isa: Rename isa_bus_irqs() -> isa_bus_register_input_irqs() Philippe Mathieu-Daudé
2023-02-11 17:37 ` Richard Henderson
2023-02-10 16:37 ` [PATCH 10/11] hw/isa: Use isa_address_space_io() to reduce access on global 'isabus' Philippe Mathieu-Daudé
2023-02-10 16:37 ` [PATCH 11/11] hw/isa: Factor isa_bus_get_irq() out of isa_get_irq() Philippe Mathieu-Daudé
2023-02-11 17:46 ` Richard Henderson
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=20230210163744.32182-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=slp@redhat.com \
--cc=thuth@redhat.com \
/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).