From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH 4/5] xen/irq: Export 'xen_pirq_from_irq' function.
Date: Thu, 14 Apr 2011 11:30:13 -0400 [thread overview]
Message-ID: <1302795014-13289-5-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1302795014-13289-1-git-send-email-konrad.wilk@oracle.com>
We need this to find the real Xen PIRQ value for a device
that requests an MSI or MSI-X. In the past we used
'xen_gsi_from_irq' since that function would return
an Xen PIRQ or GSI depending on the provided IRQ. Now that
we have seperated that we need to use the correct
function.
[v2: Deal with rebase on stable/irq.cleanup]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
drivers/xen/events.c | 6 ++++++
include/xen/events.h | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 0ac7a14..e4e8e9a 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -763,6 +763,12 @@ out:
return irq;
}
+
+int xen_pirq_from_irq(unsigned irq)
+{
+ return pirq_from_irq(irq);
+}
+EXPORT_SYMBOL_GPL(xen_pirq_from_irq);
int bind_evtchn_to_irq(unsigned int evtchn)
{
int irq;
diff --git a/include/xen/events.h b/include/xen/events.h
index 932e540..9af21e1 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -95,6 +95,9 @@ int xen_destroy_irq(int irq);
/* Return irq from pirq */
int xen_irq_from_pirq(unsigned pirq);
+/* Return the pirq allocated to the irq. */
+int xen_pirq_from_irq(unsigned irq);
+
/* Determine whether to ignore this IRQ if it is passed to a guest. */
int xen_test_irq_shared(int irq);
--
1.7.1
next prev parent reply other threads:[~2011-04-14 15:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 15:30 [PATCH] Provide infrastructure changes for backends (especially pciback) for 2.6.40 Konrad Rzeszutek Wilk
2011-04-14 15:30 ` [PATCH 1/5] xen/pci: Add xen_[find|register|unregister]_device_domain_owner functions Konrad Rzeszutek Wilk
2011-04-14 15:30 ` [PATCH 2/5] xen/irq: Check if the PCI device is owned by a domain different than DOMID_SELF Konrad Rzeszutek Wilk
2011-04-14 15:30 ` [PATCH 3/5] xen/irq: Add support to check if IRQ line is shared with other domains Konrad Rzeszutek Wilk
2011-04-14 15:30 ` Konrad Rzeszutek Wilk [this message]
2011-04-14 15:30 ` [PATCH 5/5] xen/irq: The Xen hypervisor cleans up the PIRQs if the other domain forgot Konrad Rzeszutek Wilk
2011-04-18 15:20 ` [PATCH] Provide infrastructure changes for backends (and blkback) for 2.6.40 Konrad Rzeszutek Wilk
2011-04-18 15:20 ` [PATCH] xen/p2m/m2p/gnttab: Support GNTMAP_host_map in the M2P override Konrad Rzeszutek Wilk
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=1302795014-13289-5-git-send-email-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.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).