Commit 8585db69 authored by Charles Jacobsen's avatar Charles Jacobsen Committed by Vikram Narayanan
Browse files

build-refactor: Fix interval tree missing symbols.

Linux kernel doesn't export interval tree symbols. So we just
define our own (using the fancy generic macros Google made). This
is necessary for isolated liblcd anyway.
parent 528cecbd
......@@ -65,7 +65,7 @@ libcap/configure:
# clean
clean:
$(MAKE) -C .. M=$(PWD)/$(MICROKERNEL_BUILD_DIR) clean
$(MAKE) -C .. M=$(MICROKERNEL_BUILD_DIR) clean
if test -d $(MICROKERNEL_BUILD_DIR)/libcap.build; then \
$(MAKE) -C $(MICROKERNEL_BUILD_DIR)/libcap.build clean; \
fi
......
......@@ -10,13 +10,28 @@
#include <lcd_config/pre_hook.h>
#include <linux/slab.h>
#include <linux/interval_tree.h>
#include <linux/rbtree.h>
#include <linux/interval_tree.h>
#include <linux/interval_tree_generic.h>
#include <libcap.h>
#include <liblcd/liblcd.h>
#include <lcd_config/post_hook.h>
/*
* Interval tree functions are not exported (in lib/interval_tree.c),
* so we just make our own (this is necessary for liblcd anyway).
*/
#define START(node) ((node)->start)
#define LAST(node) ((node)->last)
INTERVAL_TREE_DEFINE(struct interval_tree_node, rb,
unsigned long, __subtree_last,
START, LAST,, interval_tree)
/* RESOURCE TREES -------------------------------------------------- */
int lcd_resource_tree_init(struct lcd_resource_tree *t)
{
/*
......
......@@ -1006,6 +1006,6 @@ void *lcd_page_address(const struct page *page)
void lcd_free_memcg_kmem_pages(unsigned long addr, unsigned int order)
{
/* Non-isolated code probably won't ever call this. */
free_memcg_kmem_pages(addr, order);
/* Non-isolated code probably should never call this. */
BUG();
}
......@@ -197,7 +197,7 @@ obj-$(CONFIG_PERCPU_TEST) += percpu_test.o
# Always include interval tree (for LCD Domains)
obj-y += interval_tree.o
interval_tree_test-objs := interval_tree_test_main.o
interval_tree_test-objs := interval_tree_test_main.o interval_tree.o
obj-$(CONFIG_ASN1) += asn1_decoder.o
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment