debuggers.hg
changeset 17938:73b798732e77
vt-d: Clean up variable types and remove useless variables
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Fri Jun 27 14:40:47 2008 +0100 (2008-06-27) |
parents | 7eab6475c60a |
children | 3edc443ae8ce |
files | xen/drivers/passthrough/vtd/dmar.h xen/drivers/passthrough/vtd/iommu.c |
line diff
1.1 --- a/xen/drivers/passthrough/vtd/dmar.h Fri Jun 27 14:38:41 2008 +0100 1.2 +++ b/xen/drivers/passthrough/vtd/dmar.h Fri Jun 27 14:40:47 2008 +0100 1.3 @@ -42,28 +42,28 @@ struct acpi_ioapic_unit { 1.4 1.5 struct acpi_drhd_unit { 1.6 struct list_head list; 1.7 - unsigned long address; /* register base address of the unit */ 1.8 - struct pci_dev *devices; /* target devices */ 1.9 + u64 address; /* register base address of the unit */ 1.10 + struct pci_dev *devices; /* target devices */ 1.11 int devices_cnt; 1.12 - u8 include_all:1; 1.13 + u8 include_all:1; 1.14 struct iommu *iommu; 1.15 struct list_head ioapic_list; 1.16 }; 1.17 1.18 struct acpi_rmrr_unit { 1.19 struct list_head list; 1.20 - unsigned long base_address; 1.21 - unsigned long end_address; 1.22 + u64 base_address; 1.23 + u64 end_address; 1.24 struct pci_dev *devices; /* target devices */ 1.25 int devices_cnt; 1.26 - u8 allow_all:1; 1.27 + u8 allow_all:1; 1.28 }; 1.29 1.30 struct acpi_atsr_unit { 1.31 struct list_head list; 1.32 - struct pci_dev *devices; /* target devices */ 1.33 + struct pci_dev *devices; /* target devices */ 1.34 int devices_cnt; 1.35 - u8 all_ports:1; 1.36 + u8 all_ports:1; 1.37 }; 1.38 1.39 #define for_each_iommu(domain, iommu) \
2.1 --- a/xen/drivers/passthrough/vtd/iommu.c Fri Jun 27 14:38:41 2008 +0100 2.2 +++ b/xen/drivers/passthrough/vtd/iommu.c Fri Jun 27 14:40:47 2008 +0100 2.3 @@ -1269,7 +1269,6 @@ static int domain_context_mapping( 2.4 } 2.5 2.6 static int domain_context_unmap_one( 2.7 - struct domain *domain, 2.8 struct iommu *iommu, 2.9 u8 bus, u8 devfn) 2.10 { 2.11 @@ -1300,7 +1299,6 @@ static int domain_context_unmap_one( 2.12 } 2.13 2.14 static int domain_context_unmap( 2.15 - struct domain *domain, 2.16 struct iommu *iommu, 2.17 struct pci_dev *pdev) 2.18 { 2.19 @@ -1320,14 +1318,13 @@ static int domain_context_unmap( 2.20 PCI_FUNC(pdev->devfn), PCI_SUBORDINATE_BUS); 2.21 break; 2.22 case DEV_TYPE_PCIe_ENDPOINT: 2.23 - ret = domain_context_unmap_one(domain, iommu, 2.24 + ret = domain_context_unmap_one(iommu, 2.25 (u8)(pdev->bus), (u8)(pdev->devfn)); 2.26 break; 2.27 case DEV_TYPE_PCI: 2.28 if ( pdev->bus == 0 ) 2.29 ret = domain_context_unmap_one( 2.30 - domain, iommu, 2.31 - (u8)(pdev->bus), (u8)(pdev->devfn)); 2.32 + iommu, (u8)(pdev->bus), (u8)(pdev->devfn)); 2.33 else 2.34 { 2.35 if ( bus2bridge[pdev->bus].bus != 0 ) 2.36 @@ -1335,7 +1332,7 @@ static int domain_context_unmap( 2.37 "domain_context_unmap:" 2.38 "bus2bridge[%d].bus != 0\n", pdev->bus); 2.39 2.40 - ret = domain_context_unmap_one(domain, iommu, 2.41 + ret = domain_context_unmap_one(iommu, 2.42 (u8)(bus2bridge[pdev->bus].bus), 2.43 (u8)(bus2bridge[pdev->bus].devfn)); 2.44 2.45 @@ -1345,8 +1342,7 @@ static int domain_context_unmap( 2.46 for ( func = 0; func < 8; func++ ) 2.47 { 2.48 ret = domain_context_unmap_one( 2.49 - domain, iommu, 2.50 - pdev->bus, (u8)PCI_DEVFN(dev, func)); 2.51 + iommu, pdev->bus, (u8)PCI_DEVFN(dev, func)); 2.52 if ( ret ) 2.53 return ret; 2.54 } 2.55 @@ -1389,7 +1385,7 @@ void reassign_device_ownership( 2.56 found: 2.57 drhd = acpi_find_matched_drhd_unit(pdev); 2.58 iommu = drhd->iommu; 2.59 - domain_context_unmap(source, iommu, pdev); 2.60 + domain_context_unmap(iommu, pdev); 2.61 2.62 /* Move pci device from the source domain to target domain. */ 2.63 spin_lock_irqsave(&source_hd->iommu_list_lock, flags); 2.64 @@ -1589,7 +1585,7 @@ static int iommu_prepare_rmrr_dev( 2.65 struct pci_dev *pdev) 2.66 { 2.67 struct acpi_drhd_unit *drhd; 2.68 - unsigned long size; 2.69 + u64 size; 2.70 int ret; 2.71 2.72 /* page table init */