[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <162818328044.1511194.11410182995960067691.stgit@omen>
Date: Thu, 05 Aug 2021 11:08:00 -0600
From: Alex Williamson <alex.williamson@...hat.com>
To: alex.williamson@...hat.com
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org, jgg@...dia.com,
peterx@...hat.com
Subject: [PATCH 5/7] mm/interval_tree.c: Export vma interval tree iterators
In order to make use of vma_interval_tree_foreach() from a module
we need to export the first and next interators. vfio code would
like to use this foreach helper to create a remapping helper,
essentially the reverse of unmap_mapping_range() for specific vmas
mapping vfio device memory.
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org
Signed-off-by: Alex Williamson <alex.williamson@...hat.com>
---
mm/interval_tree.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/interval_tree.c b/mm/interval_tree.c
index 32e390c42c53..faa50767496c 100644
--- a/mm/interval_tree.c
+++ b/mm/interval_tree.c
@@ -24,6 +24,9 @@ INTERVAL_TREE_DEFINE(struct vm_area_struct, shared.rb,
unsigned long, shared.rb_subtree_last,
vma_start_pgoff, vma_last_pgoff, /* empty */, vma_interval_tree)
+EXPORT_SYMBOL_GPL(vma_interval_tree_iter_first);
+EXPORT_SYMBOL_GPL(vma_interval_tree_iter_next);
+
/* Insert node immediately after prev in the interval tree */
void vma_interval_tree_insert_after(struct vm_area_struct *node,
struct vm_area_struct *prev,
Powered by blists - more mailing lists