]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
IOMMU/PCI: make a few functions static
authorJan Beulich <jbeulich@suse.com>
Thu, 3 Aug 2017 10:20:17 +0000 (12:20 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 3 Aug 2017 10:20:17 +0000 (12:20 +0200)
Add forward declarations in order to not move things around.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/drivers/passthrough/pci.c
xen/include/xen/iommu.h

index 6e7126b2e86de1ea467f5ff12e4fccfb01001b40..b02d48953b3715ce5efafa0351929645de1c503c 100644 (file)
@@ -587,6 +587,10 @@ static void pci_enable_acs(struct pci_dev *pdev)
     pci_conf_write16(seg, bus, dev, func, pos + PCI_ACS_CTRL, ctrl);
 }
 
+static int iommu_add_device(struct pci_dev *pdev);
+static int iommu_enable_device(struct pci_dev *pdev);
+static int iommu_remove_device(struct pci_dev *pdev);
+
 int pci_add_device(u16 seg, u8 bus, u8 devfn,
                    const struct pci_dev_info *info, nodeid_t node)
 {
@@ -1254,7 +1258,7 @@ void iommu_read_msi_from_ire(
         iommu_get_ops()->read_msi_from_ire(msi_desc, msg);
 }
 
-int iommu_add_device(struct pci_dev *pdev)
+static int iommu_add_device(struct pci_dev *pdev)
 {
     const struct domain_iommu *hd;
     int rc;
@@ -1285,7 +1289,7 @@ int iommu_add_device(struct pci_dev *pdev)
     }
 }
 
-int iommu_enable_device(struct pci_dev *pdev)
+static int iommu_enable_device(struct pci_dev *pdev)
 {
     const struct domain_iommu *hd;
 
@@ -1302,7 +1306,7 @@ int iommu_enable_device(struct pci_dev *pdev)
     return hd->platform_ops->enable_device(pci_to_dev(pdev));
 }
 
-int iommu_remove_device(struct pci_dev *pdev)
+static int iommu_remove_device(struct pci_dev *pdev)
 {
     const struct domain_iommu *hd;
     u8 devfn;
index 5803e3f95bfd6b89b838b25ab3e8d2ddda5913e7..918ee995b1765591429e972376a29bec17d045a9 100644 (file)
@@ -53,9 +53,6 @@ extern unsigned int iommu_dev_iotlb_timeout;
 
 int iommu_setup(void);
 
-int iommu_add_device(struct pci_dev *pdev);
-int iommu_enable_device(struct pci_dev *pdev);
-int iommu_remove_device(struct pci_dev *pdev);
 int iommu_domain_init(struct domain *d);
 void iommu_hwdom_init(struct domain *d);
 void iommu_domain_destroy(struct domain *d);