summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-01-21 11:50:28 +0100
committerJoerg Roedel <joerg.roedel@amd.com>2010-03-07 18:01:13 +0100
commit12c7389abe5786349d3ea6da1961cf78d0c1c7cd (patch)
tree02ba72cf32986de8327a6146d5fd0b2448935958 /arch/x86/kernel/amd_iommu.c
parent468e2366cdb80cf8a691b8bc212260cfbdbd518e (diff)
downloadlinux-12c7389abe5786349d3ea6da1961cf78d0c1c7cd.tar.gz
linux-12c7389abe5786349d3ea6da1961cf78d0c1c7cd.tar.bz2
linux-12c7389abe5786349d3ea6da1961cf78d0c1c7cd.zip
iommu-api: Remove iommu_{un}map_range functions
These functions are not longer used and can be removed savely. There functionality is now provided by the iommu_{un}map functions which are also capable of multiple page sizes. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r--arch/x86/kernel/amd_iommu.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 0e068c9ca5f5..d8da9988edd9 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -2506,52 +2506,6 @@ static int amd_iommu_attach_device(struct iommu_domain *dom,
return ret;
}
-static int amd_iommu_map_range(struct iommu_domain *dom,
- unsigned long iova, phys_addr_t paddr,
- size_t size, int iommu_prot)
-{
- struct protection_domain *domain = dom->priv;
- unsigned long i, npages = iommu_num_pages(paddr, size, PAGE_SIZE);
- int prot = 0;
- int ret;
-
- if (iommu_prot & IOMMU_READ)
- prot |= IOMMU_PROT_IR;
- if (iommu_prot & IOMMU_WRITE)
- prot |= IOMMU_PROT_IW;
-
- iova &= PAGE_MASK;
- paddr &= PAGE_MASK;
-
- for (i = 0; i < npages; ++i) {
- ret = iommu_map_page(domain, iova, paddr, prot, PAGE_SIZE);
- if (ret)
- return ret;
-
- iova += PAGE_SIZE;
- paddr += PAGE_SIZE;
- }
-
- return 0;
-}
-
-static void amd_iommu_unmap_range(struct iommu_domain *dom,
- unsigned long iova, size_t size)
-{
-
- struct protection_domain *domain = dom->priv;
- unsigned long i, npages = iommu_num_pages(iova, size, PAGE_SIZE);
-
- iova &= PAGE_MASK;
-
- for (i = 0; i < npages; ++i) {
- iommu_unmap_page(domain, iova, PAGE_SIZE);
- iova += PAGE_SIZE;
- }
-
- iommu_flush_tlb_pde(domain);
-}
-
static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova,
phys_addr_t paddr, int gfp_order, int iommu_prot)
{
@@ -2616,8 +2570,6 @@ static struct iommu_ops amd_iommu_ops = {
.detach_dev = amd_iommu_detach_device,
.map = amd_iommu_map,
.unmap = amd_iommu_unmap,
- .map_range = amd_iommu_map_range,
- .unmap_range = amd_iommu_unmap_range,
.iova_to_phys = amd_iommu_iova_to_phys,
.domain_has_cap = amd_iommu_domain_has_cap,
};