ia64/xen-unstable

changeset 17592:2cc926c18a7b

VT-d: Remove unused function dma_pte_free_pagetable().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed May 07 09:22:05 2008 +0100 (2008-05-07)
parents fb58da516749
children a3b8a99c26eb
files xen/drivers/passthrough/vtd/iommu.c
line diff
     1.1 --- a/xen/drivers/passthrough/vtd/iommu.c	Wed May 07 09:19:40 2008 +0100
     1.2 +++ b/xen/drivers/passthrough/vtd/iommu.c	Wed May 07 09:22:05 2008 +0100
     1.3 @@ -623,61 +623,6 @@ static void dma_pte_clear_range(struct d
     1.4      }
     1.5  }
     1.6  
     1.7 -/* free page table pages. last level pte should already be cleared */
     1.8 -void dma_pte_free_pagetable(struct domain *domain, u64 start, u64 end)
     1.9 -{
    1.10 -    struct acpi_drhd_unit *drhd;
    1.11 -    struct hvm_iommu *hd = domain_hvm_iommu(domain);
    1.12 -    struct iommu *iommu;
    1.13 -    int addr_width = agaw_to_width(hd->agaw);
    1.14 -    struct dma_pte *page, *pte;
    1.15 -    int total = agaw_to_level(hd->agaw);
    1.16 -    int level;
    1.17 -    u64 tmp;
    1.18 -    u64 pg_maddr;
    1.19 -
    1.20 -    drhd = list_entry(acpi_drhd_units.next, typeof(*drhd), list);
    1.21 -    iommu = drhd->iommu;
    1.22 -
    1.23 -    start &= (((u64)1) << addr_width) - 1;
    1.24 -    end &= (((u64)1) << addr_width) - 1;
    1.25 -
    1.26 -    /* we don't need lock here, nobody else touches the iova range */
    1.27 -    level = 2;
    1.28 -    while ( level <= total )
    1.29 -    {
    1.30 -        tmp = align_to_level(start, level);
    1.31 -        if ( (tmp >= end) || ((tmp + level_size(level)) > end) )
    1.32 -            return;
    1.33 -
    1.34 -        while ( tmp < end )
    1.35 -        {
    1.36 -            pg_maddr = dma_addr_level_page_maddr(domain, tmp, level);
    1.37 -            if ( pg_maddr == 0 )
    1.38 -            {
    1.39 -                tmp += level_size(level);
    1.40 -                continue;
    1.41 -            }
    1.42 -            page = (struct dma_pte *)map_vtd_domain_page(pg_maddr);
    1.43 -            pte = page + address_level_offset(tmp, level);
    1.44 -            dma_clear_pte(*pte);
    1.45 -            iommu_flush_cache_entry(iommu, pte);
    1.46 -            unmap_vtd_domain_page(page);
    1.47 -            free_pgtable_maddr(pg_maddr);
    1.48 -
    1.49 -            tmp += level_size(level);
    1.50 -        }
    1.51 -        level++;
    1.52 -    }
    1.53 -
    1.54 -    /* free pgd */
    1.55 -    if ( start == 0 && end >= ((((u64)1) << addr_width) - 1) )
    1.56 -    {
    1.57 -        free_pgtable_maddr(hd->pgd_maddr);
    1.58 -        hd->pgd_maddr = 0;
    1.59 -    }
    1.60 -}
    1.61 -
    1.62  static void iommu_free_next_pagetable(u64 pt_maddr, unsigned long index,
    1.63                                        int level)
    1.64  {