From: Frederic Barrat <fbarrat@linux.ibm.com>
To: clg@kaod.org, mst@redhat.com, marcel.apfelbaum@gmail.com,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH 2/3] pci: Export the pci_intx() function
Date: Tue, 16 Nov 2021 18:01:32 +0100 [thread overview]
Message-ID: <20211116170133.724751-3-fbarrat@linux.ibm.com> (raw)
In-Reply-To: <20211116170133.724751-1-fbarrat@linux.ibm.com>
Move the pci_intx() definition to the PCI header file, so that it can
be called from other PCI files. It is used by the next patch.
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
---
hw/pci/pci.c | 5 -----
include/hw/pci/pci.h | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e5993c1ef5..249d7e4cf6 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1497,11 +1497,6 @@ static void pci_irq_handler(void *opaque, int irq_num, int level)
pci_change_irq_level(pci_dev, irq_num, change);
}
-static inline int pci_intx(PCIDevice *pci_dev)
-{
- return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1;
-}
-
qemu_irq pci_allocate_irq(PCIDevice *pci_dev)
{
int intx = pci_intx(pci_dev);
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index e7cdf2d5ec..35f8eb67bd 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -735,6 +735,11 @@ void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev);
qemu_irq pci_allocate_irq(PCIDevice *pci_dev);
void pci_set_irq(PCIDevice *pci_dev, int level);
+static inline int pci_intx(PCIDevice *pci_dev)
+{
+ return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1;
+}
+
static inline void pci_irq_assert(PCIDevice *pci_dev)
{
pci_set_irq(pci_dev, 1);
--
2.33.1
next prev parent reply other threads:[~2021-11-16 17:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 17:01 [PATCH 0/3] Fix irq allocation of PCI host bridge on powernv Frederic Barrat
2021-11-16 17:01 ` [PATCH 1/3] ppc/pnv: Tune the POWER9 PCIe Host bridge model Frederic Barrat
2021-11-18 14:45 ` Cédric Le Goater
2021-11-26 9:09 ` Cédric Le Goater
2021-11-26 17:08 ` Cédric Le Goater
2021-11-28 21:51 ` Michael S. Tsirkin
2021-11-29 14:40 ` Frederic Barrat
2021-11-16 17:01 ` Frederic Barrat [this message]
2021-11-18 14:45 ` [PATCH 2/3] pci: Export the pci_intx() function Cédric Le Goater
2021-11-16 17:01 ` [PATCH 3/3] pcie_aer: Don't trigger a LSI if none are defined Frederic Barrat
2021-11-18 14:46 ` Cédric Le Goater
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=20211116170133.724751-3-fbarrat@linux.ibm.com \
--to=fbarrat@linux.ibm.com \
--cc=clg@kaod.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--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 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).