All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: hpoussin@reactos.org, david@gibson.dropbear.id.au,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: [Qemu-devel] [PATCH v2 1/3] raven: some minor IRQ-related tidy-ups
Date: Sat,  8 Sep 2018 10:08:18 +0100	[thread overview]
Message-ID: <20180908090820.15591-2-mark.cave-ayland@ilande.co.uk> (raw)
In-Reply-To: <20180908090820.15591-1-mark.cave-ayland@ilande.co.uk>

This really lays the groundwork for the upcoming patches: it renames the
irqs PREPPCIState struct member to pci_irqs (as soon there will be a
distinction) and then changes the raven IRQ opaque to use PREPPCIState
instead of just irqs array.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/pci-host/prep.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 88f035c20b..9b36f19c97 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -55,7 +55,7 @@ typedef struct RavenPCIState {
 typedef struct PRePPCIState {
     PCIHostState parent_obj;
 
-    qemu_irq irq[PCI_NUM_PINS];
+    qemu_irq pci_irqs[PCI_NUM_PINS];
     PCIBus pci_bus;
     AddressSpace pci_io_as;
     MemoryRegion pci_io;
@@ -194,9 +194,9 @@ static int raven_map_irq(PCIDevice *pci_dev, int irq_num)
 
 static void raven_set_irq(void *opaque, int irq_num, int level)
 {
-    qemu_irq *pic = opaque;
+    PREPPCIState *s = opaque;
 
-    qemu_set_irq(pic[irq_num] , level);
+    qemu_set_irq(s->pci_irqs[irq_num], level);
 }
 
 static AddressSpace *raven_pcihost_set_iommu(PCIBus *bus, void *opaque,
@@ -223,13 +223,12 @@ static void raven_pcihost_realizefn(DeviceState *d, Error **errp)
     int i;
 
     for (i = 0; i < PCI_NUM_PINS; i++) {
-        sysbus_init_irq(dev, &s->irq[i]);
+        sysbus_init_irq(dev, &s->pci_irqs[i]);
     }
 
     qdev_init_gpio_in(d, raven_change_gpio, 1);
 
-    pci_bus_irqs(&s->pci_bus, raven_set_irq, raven_map_irq, s->irq,
-                 PCI_NUM_PINS);
+    pci_bus_irqs(&s->pci_bus, raven_set_irq, raven_map_irq, s, PCI_NUM_PINS);
 
     memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops, s,
                           "pci-conf-idx", 4);
-- 
2.11.0

  reply	other threads:[~2018-09-08  9:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-08  9:08 [Qemu-devel] [PATCH v2 0/3] 40p: fix PCI interrupt routing Mark Cave-Ayland
2018-09-08  9:08 ` Mark Cave-Ayland [this message]
2018-09-08 10:55   ` [Qemu-devel] [PATCH v2 1/3] raven: some minor IRQ-related tidy-ups Philippe Mathieu-Daudé
2018-09-08  9:08 ` [Qemu-devel] [PATCH v2 2/3] 40p: use OR gate to wire up raven PCI interrupts Mark Cave-Ayland
2018-09-08 10:57   ` Philippe Mathieu-Daudé
2018-09-08  9:08 ` [Qemu-devel] [PATCH v2 3/3] 40p: add fixed IRQ routing for LSI SCSI device Mark Cave-Ayland
2018-09-08 11:03   ` Philippe Mathieu-Daudé
2018-09-10  3:48   ` David Gibson
2018-09-10 20:32     ` Mark Cave-Ayland
2018-09-13 14:21   ` Artyom Tarasenko
2018-09-13 15:30     ` Mark Cave-Ayland
2018-09-14  8:59       ` Artyom Tarasenko
2018-09-08 16:07 ` [Qemu-devel] [PATCH v2 0/3] 40p: fix PCI interrupt routing Hervé Poussineau
2018-09-10  3:49 ` David Gibson

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=20180908090820.15591-2-mark.cave-ayland@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=david@gibson.dropbear.id.au \
    --cc=hpoussin@reactos.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.