[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vt-d: Clean up variable types and remove useless variables



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1214574047 -3600
# Node ID 73b798732e77235fbf0742f6c9edf8eb6883aa19
# Parent  7eab6475c60afc47d1b33231d7b768232370aee6
vt-d: Clean up variable types and remove useless variables

Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/dmar.h  |   16 ++++++++--------
 xen/drivers/passthrough/vtd/iommu.c |   16 ++++++----------
 2 files changed, 14 insertions(+), 18 deletions(-)

diff -r 7eab6475c60a -r 73b798732e77 xen/drivers/passthrough/vtd/dmar.h
--- a/xen/drivers/passthrough/vtd/dmar.h        Fri Jun 27 14:38:41 2008 +0100
+++ b/xen/drivers/passthrough/vtd/dmar.h        Fri Jun 27 14:40:47 2008 +0100
@@ -42,28 +42,28 @@ struct acpi_ioapic_unit {
 
 struct acpi_drhd_unit {
     struct list_head list;
-    unsigned long    address; /* register base address of the unit */
-    struct    pci_dev *devices; /* target devices */
+    u64    address; /* register base address of the unit */
+    struct pci_dev *devices; /* target devices */
     int    devices_cnt;
-    u8    include_all:1;
+    u8     include_all:1;
     struct iommu *iommu;
     struct list_head ioapic_list;
 };
 
 struct acpi_rmrr_unit {
     struct list_head list;
-    unsigned long base_address;
-    unsigned long end_address;
+    u64    base_address;
+    u64    end_address;
     struct pci_dev *devices; /* target devices */
     int    devices_cnt;
-    u8    allow_all:1;
+    u8     allow_all:1;
 };
 
 struct acpi_atsr_unit {
     struct list_head list;
-    struct    pci_dev *devices; /* target devices */
+    struct pci_dev *devices; /* target devices */
     int    devices_cnt;
-    u8    all_ports:1;
+    u8     all_ports:1;
 };
 
 #define for_each_iommu(domain, iommu) \
diff -r 7eab6475c60a -r 73b798732e77 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Fri Jun 27 14:38:41 2008 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c       Fri Jun 27 14:40:47 2008 +0100
@@ -1269,7 +1269,6 @@ static int domain_context_mapping(
 }
 
 static int domain_context_unmap_one(
-    struct domain *domain,
     struct iommu *iommu,
     u8 bus, u8 devfn)
 {
@@ -1300,7 +1299,6 @@ static int domain_context_unmap_one(
 }
 
 static int domain_context_unmap(
-    struct domain *domain,
     struct iommu *iommu,
     struct pci_dev *pdev)
 {
@@ -1320,14 +1318,13 @@ static int domain_context_unmap(
             PCI_FUNC(pdev->devfn), PCI_SUBORDINATE_BUS);
         break;
     case DEV_TYPE_PCIe_ENDPOINT:
-        ret = domain_context_unmap_one(domain, iommu,
+        ret = domain_context_unmap_one(iommu,
                                        (u8)(pdev->bus), (u8)(pdev->devfn));
         break;
     case DEV_TYPE_PCI:
         if ( pdev->bus == 0 )
             ret = domain_context_unmap_one(
-                domain, iommu,
-                (u8)(pdev->bus), (u8)(pdev->devfn));
+                iommu, (u8)(pdev->bus), (u8)(pdev->devfn));
         else
         {
             if ( bus2bridge[pdev->bus].bus != 0 )
@@ -1335,7 +1332,7 @@ static int domain_context_unmap(
                          "domain_context_unmap:"
                          "bus2bridge[%d].bus != 0\n", pdev->bus);
 
-            ret = domain_context_unmap_one(domain, iommu,
+            ret = domain_context_unmap_one(iommu,
                                            (u8)(bus2bridge[pdev->bus].bus),
                                            (u8)(bus2bridge[pdev->bus].devfn));
 
@@ -1345,8 +1342,7 @@ static int domain_context_unmap(
                 for ( func = 0; func < 8; func++ )
                 {
                     ret = domain_context_unmap_one(
-                        domain, iommu,
-                        pdev->bus, (u8)PCI_DEVFN(dev, func));
+                        iommu, pdev->bus, (u8)PCI_DEVFN(dev, func));
                     if ( ret )
                         return ret;
                 }
@@ -1389,7 +1385,7 @@ void reassign_device_ownership(
  found:
     drhd = acpi_find_matched_drhd_unit(pdev);
     iommu = drhd->iommu;
-    domain_context_unmap(source, iommu, pdev);
+    domain_context_unmap(iommu, pdev);
 
     /* Move pci device from the source domain to target domain. */
     spin_lock_irqsave(&source_hd->iommu_list_lock, flags);
@@ -1589,7 +1585,7 @@ static int iommu_prepare_rmrr_dev(
     struct pci_dev *pdev)
 {
     struct acpi_drhd_unit *drhd;
-    unsigned long size;
+    u64 size;
     int ret;
 
     /* page table init */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.