debuggers.hg
changeset 22741:55450858f414
vtd: Fix up iommu_flush_iotlb_psi().
1. Change missed usage of 'align' to 'order'
2. Remove unused 'pages' parameter
Signed-off-by: Keir Fraser <keir@xen.org>
1. Change missed usage of 'align' to 'order'
2. Remove unused 'pages' parameter
Signed-off-by: Keir Fraser <keir@xen.org>
author | Keir Fraser <keir@xen.org> |
---|---|
date | Mon Jan 10 10:31:09 2011 +0000 (2011-01-10) |
parents | 9b5d121c8805 |
children | f5b3fc5a5220 |
files | xen/drivers/passthrough/vtd/iommu.c |
line diff
1.1 --- a/xen/drivers/passthrough/vtd/iommu.c Mon Jan 10 08:45:19 2011 +0000 1.2 +++ b/xen/drivers/passthrough/vtd/iommu.c Mon Jan 10 10:31:09 2011 +0000 1.3 @@ -519,15 +519,14 @@ static int inline iommu_flush_iotlb_dsi( 1.4 } 1.5 1.6 static int inline iommu_flush_iotlb_psi( 1.7 - struct iommu *iommu, u16 did, u64 addr, unsigned int pages, 1.8 - int order, int flush_non_present_entry, int flush_dev_iotlb) 1.9 + struct iommu *iommu, u16 did, u64 addr, unsigned int order, 1.10 + int flush_non_present_entry, int flush_dev_iotlb) 1.11 { 1.12 unsigned int align; 1.13 struct iommu_flush *flush = iommu_get_flush(iommu); 1.14 int status; 1.15 1.16 ASSERT(!(addr & (~PAGE_MASK_4K))); 1.17 - ASSERT(pages > 0); 1.18 1.19 /* Fallback to domain selective flush if no PSI support */ 1.20 if ( !cap_pgsel_inv(iommu->cap) ) 1.21 @@ -543,7 +542,7 @@ static int inline iommu_flush_iotlb_psi( 1.22 /* apply platform specific errata workarounds */ 1.23 vtd_ops_preamble_quirk(iommu); 1.24 1.25 - status = flush->iotlb(iommu, did, addr, align, DMA_TLB_PSI_FLUSH, 1.26 + status = flush->iotlb(iommu, did, addr, order, DMA_TLB_PSI_FLUSH, 1.27 flush_non_present_entry, flush_dev_iotlb); 1.28 1.29 /* undo platform specific errata workarounds */ 1.30 @@ -615,7 +614,7 @@ static void dma_pte_clear_one(struct dom 1.31 if ( iommu_domid == -1 ) 1.32 continue; 1.33 if ( iommu_flush_iotlb_psi(iommu, iommu_domid, addr, 1.34 - 1, 0, 0, flush_dev_iotlb) ) 1.35 + 0, 0, flush_dev_iotlb) ) 1.36 iommu_flush_write_buffer(iommu); 1.37 } 1.38 } 1.39 @@ -1690,7 +1689,7 @@ static int intel_iommu_map_page( 1.40 if ( iommu_domid == -1 ) 1.41 continue; 1.42 if ( iommu_flush_iotlb_psi(iommu, iommu_domid, 1.43 - (paddr_t)gfn << PAGE_SHIFT_4K, 1, 0, 1.44 + (paddr_t)gfn << PAGE_SHIFT_4K, 0, 1.45 !dma_pte_present(old), flush_dev_iotlb) ) 1.46 iommu_flush_write_buffer(iommu); 1.47 } 1.48 @@ -1731,7 +1730,7 @@ void iommu_pte_flush(struct domain *d, u 1.49 if ( iommu_domid == -1 ) 1.50 continue; 1.51 if ( iommu_flush_iotlb_psi(iommu, iommu_domid, 1.52 - (paddr_t)gfn << PAGE_SHIFT_4K, 1, 1.53 + (paddr_t)gfn << PAGE_SHIFT_4K, 1.54 order, !present, flush_dev_iotlb) ) 1.55 iommu_flush_write_buffer(iommu); 1.56 }