From: "Jan Beulich" <jbeulich@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] tools: remove type parameter from xc_physdev_map_pirq{,_msi}()
Date: Thu, 24 Jul 2008 13:43:33 +0100 [thread overview]
Message-ID: <48889515.76E4.0078.0@novell.com> (raw)
.. as it's implied by the function name.
While the patch touches the deprecated ioemu sub-tree, I'm unsure in
what shape to submit patches againt the new qemu tree, so ideally the
respective parts would just be taken from this patch and also applied
to that tree.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Index: 2008-07-21/tools/ioemu/hw/pass-through.c
===================================================================
--- 2008-07-21.orig/tools/ioemu/hw/pass-through.c 2008-07-18 16:19:33.000000000 +0200
+++ 2008-07-21/tools/ioemu/hw/pass-through.c 2008-07-24 11:51:44.000000000 +0200
@@ -2785,8 +2785,7 @@ struct pt_dev * register_real_device(PCI
int pirq = pci_dev->irq;
machine_irq = pci_dev->irq;
- rc = xc_physdev_map_pirq(xc_handle, domid, MAP_PIRQ_TYPE_GSI,
- machine_irq, &pirq);
+ rc = xc_physdev_map_pirq(xc_handle, domid, machine_irq, &pirq);
if ( rc )
{
Index: 2008-07-21/tools/ioemu/hw/pt-msi.c
===================================================================
--- 2008-07-21.orig/tools/ioemu/hw/pt-msi.c 2008-07-18 16:19:33.000000000 +0200
+++ 2008-07-21/tools/ioemu/hw/pt-msi.c 2008-07-24 11:52:34.000000000 +0200
@@ -37,8 +37,7 @@ int pt_msi_setup(struct pt_dev *dev)
return -1;
}
- if ( xc_physdev_map_pirq_msi(xc_handle, domid, MAP_PIRQ_TYPE_MSI,
- AUTO_ASSIGN, &pirq,
+ if ( xc_physdev_map_pirq_msi(xc_handle, domid, AUTO_ASSIGN, &pirq,
dev->pci_dev->dev << 3 | dev->pci_dev->func,
dev->pci_dev->bus, 0, 1) )
{
@@ -120,8 +119,7 @@ static int pt_msix_update_one(struct pt_
/* Check if this entry is already mapped */
if ( entry->pirq == -1 )
{
- ret = xc_physdev_map_pirq_msi(xc_handle, domid, MAP_PIRQ_TYPE_MSI,
- AUTO_ASSIGN, &pirq,
+ ret = xc_physdev_map_pirq_msi(xc_handle, domid, AUTO_ASSIGN, &pirq,
dev->pci_dev->dev << 3 | dev->pci_dev->func,
dev->pci_dev->bus, entry_nr, 0);
if ( ret )
Index: 2008-07-21/tools/libxc/xc_physdev.c
===================================================================
--- 2008-07-21.orig/tools/libxc/xc_physdev.c 2008-05-13 11:02:22.000000000 +0200
+++ 2008-07-21/tools/libxc/xc_physdev.c 2008-07-24 11:50:46.000000000 +0200
@@ -22,7 +22,6 @@ int xc_physdev_pci_access_modify(int xc_
int xc_physdev_map_pirq(int xc_handle,
int domid,
- int type,
int index,
int *pirq)
{
@@ -33,7 +32,7 @@ int xc_physdev_map_pirq(int xc_handle,
return -EINVAL;
map.domid = domid;
- map.type = type;
+ map.type = MAP_PIRQ_TYPE_GSI;
map.index = index;
map.pirq = *pirq;
@@ -47,7 +46,6 @@ int xc_physdev_map_pirq(int xc_handle,
int xc_physdev_map_pirq_msi(int xc_handle,
int domid,
- int type,
int index,
int *pirq,
int devfn,
@@ -62,7 +60,7 @@ int xc_physdev_map_pirq_msi(int xc_handl
return -EINVAL;
map.domid = domid;
- map.type = type;
+ map.type = MAP_PIRQ_TYPE_MSI;
map.index = index;
map.pirq = *pirq;
map.msi_info.devfn = devfn;
Index: 2008-07-21/tools/libxc/xenctrl.h
===================================================================
--- 2008-07-21.orig/tools/libxc/xenctrl.h 2008-07-18 16:19:34.000000000 +0200
+++ 2008-07-21/tools/libxc/xenctrl.h 2008-07-24 11:51:02.000000000 +0200
@@ -907,13 +907,11 @@ int xc_gnttab_set_max_grants(int xcg_han
int xc_physdev_map_pirq(int xc_handle,
int domid,
- int type,
int index,
int *pirq);
int xc_physdev_map_pirq_msi(int xc_handle,
int domid,
- int type,
int index,
int *pirq,
int devfn,
Index: 2008-07-21/tools/python/xen/lowlevel/xc/xc.c
===================================================================
--- 2008-07-21.orig/tools/python/xen/lowlevel/xc/xc.c 2008-07-18 16:19:34.000000000 +0200
+++ 2008-07-21/tools/python/xen/lowlevel/xc/xc.c 2008-07-24 11:53:02.000000000 +0200
@@ -958,8 +958,7 @@ static PyObject *pyxc_physdev_map_pirq(P
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iii", kwd_list,
&dom, &index, &pirq) )
return NULL;
- ret = xc_physdev_map_pirq(xc->xc_handle, dom, MAP_PIRQ_TYPE_GSI,
- index, &pirq);
+ ret = xc_physdev_map_pirq(xc->xc_handle, dom, index, &pirq);
if ( ret != 0 )
return pyxc_error_to_exception();
return PyLong_FromUnsignedLong(pirq);
next reply other threads:[~2008-07-24 12:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 12:43 Jan Beulich [this message]
2008-07-24 13:42 ` [PATCH] tools: remove type parameter from xc_physdev_map_pirq{,_msi}() Ian Jackson
2008-08-12 8:07 ` [PATCH] tools: remove type parameter from xc_physdev_map_pirq{, _msi}() Jonkery Huang
2008-08-12 8:37 ` Keir Fraser
2008-08-12 8:51 ` Jonkery Huang
2008-08-12 8:57 ` Keir Fraser
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=48889515.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--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 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.