[Intel-gfx] [PATCH 1/3] lib: Always build and export interval_tree
Chris Wilson
chris at chris-wilson.co.uk
Tue Jan 21 16:07:50 CET 2014
lib/interval_tree.c provides a simple interface for an interval-tree
(an augmented red-black tree) but is only built when testing the generic
macros for building interval-trees. For drivers with modest needs,
export the simple interval-tree library as is.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Michel Lespinasse <walken at google.com>
Cc: Rik van Riel <riel at redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra at chello.nl>
Cc: Andrea Arcangeli <aarcange at redhat.com>
Cc: David Woodhouse <dwmw2 at infradead.org>
Cc: Andrew Morton <akpm at linux-foundation.org>
---
lib/Makefile | 5 +++--
lib/interval_tree.c | 5 +++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/Makefile b/lib/Makefile
index a459c31e8c6b..6b9cc0c4cc36 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -8,7 +8,8 @@ KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))
endif
lib-y := ctype.o string.o vsprintf.o cmdline.o \
- rbtree.o radix-tree.o dump_stack.o timerqueue.o\
+ rbtree.o radix-tree.o interval_tree.o \
+ dump_stack.o timerqueue.o\
idr.o int_sqrt.o extable.o \
sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \
proportions.o flex_proportions.o prio_heap.o ratelimit.o show_mem.o \
@@ -152,7 +153,7 @@ lib-$(CONFIG_LIBFDT) += $(libfdt_files)
obj-$(CONFIG_RBTREE_TEST) += rbtree_test.o
obj-$(CONFIG_INTERVAL_TREE_TEST) += interval_tree_test.o
-interval_tree_test-objs := interval_tree_test_main.o interval_tree.o
+interval_tree_test-objs := interval_tree_test_main.o
obj-$(CONFIG_PERCPU_TEST) += percpu_test.o
diff --git a/lib/interval_tree.c b/lib/interval_tree.c
index e6eb406f2d65..7b466e419740 100644
--- a/lib/interval_tree.c
+++ b/lib/interval_tree.c
@@ -8,3 +8,8 @@
INTERVAL_TREE_DEFINE(struct interval_tree_node, rb,
unsigned long, __subtree_last,
START, LAST,, interval_tree)
+
+EXPORT_SYMBOL(interval_tree_insert);
+EXPORT_SYMBOL(interval_tree_remove);
+EXPORT_SYMBOL(interval_tree_iter_first);
+EXPORT_SYMBOL(interval_tree_iter_next);
--
1.8.5.3
More information about the Intel-gfx
mailing list