tools: remove type parameter from xc_physdev_map_pirq{,_msi}()
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 24 Jul 2008 13:18:58 +0000 (14:18 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 24 Jul 2008 13:18:58 +0000 (14:18 +0100)
... as it's implied by the function name.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
tools/ioemu/hw/pass-through.c
tools/ioemu/hw/pt-msi.c
tools/libxc/xc_physdev.c
tools/libxc/xenctrl.h
tools/python/xen/lowlevel/xc/xc.c

index 0e17af915e609862b02a7b7dfa571b58dbc5d260..cfd0a7696bce59ad2bdafead2565df9849fceefc 100644 (file)
@@ -2785,8 +2785,7 @@ struct pt_dev * register_real_device(PCIBus *e_bus,
         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 1936677335c771339381889ec07b0930a2c6d757..68a952f059040d67344a4bc9fef094205eed547b 100644 (file)
@@ -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_dev *dev, int entry_nr)
     /* 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 2b619664cbd57f338136e9817486cef9b40d45a7..b320f19dc85cd4c599c3bf1152681286d8adbbee 100644 (file)
@@ -22,7 +22,6 @@ int xc_physdev_pci_access_modify(int xc_handle,
 
 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_handle,
         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 2f6aafb0c8e764f4d04ae93018b8d30297f77603..0639d3fd237b957bb55a7546c46f1c0f35236f0a 100644 (file)
@@ -907,13 +907,11 @@ int xc_gnttab_set_max_grants(int xcg_handle,
 
 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 d45aa85dc79dc0128f924c30ac32329bff5014c7..01e0542c9eaff38638abb448c906a78432a217b8 100644 (file)
@@ -958,8 +958,7 @@ static PyObject *pyxc_physdev_map_pirq(PyObject *self,
     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);