summaryrefslogtreecommitdiff
path: root/kernel/module/main.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-02-23 13:02:11 +0100
committerLuis Chamberlain <mcgrof@kernel.org>2022-04-05 08:43:05 -0700
commit80b8bf4369906aefbcb63a03012aed7a1abcbd18 (patch)
tree079dffe467e5d50246048f7d49ec33f2e89e74cc /kernel/module/main.c
parent7337f929d5672e37a80c8582d357f084320f475f (diff)
module: Always have struct mod_tree_root
In order to separate text and data, we need to setup two rb trees. This means that struct mod_tree_root is required even without MODULES_TREE_LOOKUP. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: Aaron Tomlin <atomlin@atomlin.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/main.c')
-rw-r--r--kernel/module/main.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c
index e6a72c3651f6..84d567c57575 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -74,7 +74,6 @@ static void do_free_init(struct work_struct *w);
static DECLARE_WORK(init_free_wq, do_free_init);
static LLIST_HEAD(init_free_list);
-#ifdef CONFIG_MODULES_TREE_LOOKUP
struct mod_tree_root mod_tree __cacheline_aligned = {
.addr_min = -1UL,
};
@@ -82,10 +81,6 @@ struct mod_tree_root mod_tree __cacheline_aligned = {
#define module_addr_min mod_tree.addr_min
#define module_addr_max mod_tree.addr_max
-#else /* !CONFIG_MODULES_TREE_LOOKUP */
-static unsigned long module_addr_min = -1UL, module_addr_max;
-#endif /* CONFIG_MODULES_TREE_LOOKUP */
-
struct symsearch {
const struct kernel_symbol *start, *stop;
const s32 *crcs;