From: Keir Fraser Date: Fri, 27 Jun 2008 13:40:47 +0000 (+0100) Subject: vt-d: Clean up variable types and remove useless variables X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14192^2~25 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7037c279e643f8bafd6d954c82b354b6d85c076f;p=xen.git vt-d: Clean up variable types and remove useless variables Signed-off-by: Weidong Han --- diff --git a/xen/drivers/passthrough/vtd/dmar.h b/xen/drivers/passthrough/vtd/dmar.h index 42b0a0be1b..444d7e4acb 100644 --- a/xen/drivers/passthrough/vtd/dmar.h +++ b/xen/drivers/passthrough/vtd/dmar.h @@ -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 --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 2e41d6f49e..f9e9e13ad4 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -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 */