Skip to content

Commit 6221061

Browse files
John Garryjoergroedel
authored andcommitted
iova: Delete copy_reserved_iova()
Since commit c588072 ("iommu/vt-d: Convert intel iommu driver to the iommu ops"), function copy_reserved_iova() is not referenced, so delete it. Signed-off-by: John Garry <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 9cc0aae commit 6221061

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

drivers/iommu/iova.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -710,36 +710,6 @@ reserve_iova(struct iova_domain *iovad,
710710
}
711711
EXPORT_SYMBOL_GPL(reserve_iova);
712712

713-
/**
714-
* copy_reserved_iova - copies the reserved between domains
715-
* @from: - source domain from where to copy
716-
* @to: - destination domin where to copy
717-
* This function copies reserved iova's from one domain to
718-
* other.
719-
*/
720-
void
721-
copy_reserved_iova(struct iova_domain *from, struct iova_domain *to)
722-
{
723-
unsigned long flags;
724-
struct rb_node *node;
725-
726-
spin_lock_irqsave(&from->iova_rbtree_lock, flags);
727-
for (node = rb_first(&from->rbroot); node; node = rb_next(node)) {
728-
struct iova *iova = rb_entry(node, struct iova, node);
729-
struct iova *new_iova;
730-
731-
if (iova->pfn_lo == IOVA_ANCHOR)
732-
continue;
733-
734-
new_iova = reserve_iova(to, iova->pfn_lo, iova->pfn_hi);
735-
if (!new_iova)
736-
pr_err("Reserve iova range %lx@%lx failed\n",
737-
iova->pfn_lo, iova->pfn_lo);
738-
}
739-
spin_unlock_irqrestore(&from->iova_rbtree_lock, flags);
740-
}
741-
EXPORT_SYMBOL_GPL(copy_reserved_iova);
742-
743713
/*
744714
* Magazine caches for IOVA ranges. For an introduction to magazines,
745715
* see the USENIX 2001 paper "Magazines and Vmem: Extending the Slab

include/linux/iova.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ unsigned long alloc_iova_fast(struct iova_domain *iovad, unsigned long size,
150150
unsigned long limit_pfn, bool flush_rcache);
151151
struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo,
152152
unsigned long pfn_hi);
153-
void copy_reserved_iova(struct iova_domain *from, struct iova_domain *to);
154153
void init_iova_domain(struct iova_domain *iovad, unsigned long granule,
155154
unsigned long start_pfn);
156155
int init_iova_flush_queue(struct iova_domain *iovad,
@@ -211,11 +210,6 @@ static inline struct iova *reserve_iova(struct iova_domain *iovad,
211210
return NULL;
212211
}
213212

214-
static inline void copy_reserved_iova(struct iova_domain *from,
215-
struct iova_domain *to)
216-
{
217-
}
218-
219213
static inline void init_iova_domain(struct iova_domain *iovad,
220214
unsigned long granule,
221215
unsigned long start_pfn)

0 commit comments

Comments
 (0)