module: Prepare for handling several RB trees

In order to separate text and data, we need to setup
two rb trees.

Modify functions to give the tree as a parameter.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
This commit is contained in:
Christophe Leroy
2022-02-23 13:02:12 +01:00
committed by Luis Chamberlain
parent 80b8bf4369
commit 446d55666d
3 changed files with 20 additions and 20 deletions

View File

@@ -157,13 +157,13 @@ extern struct mod_tree_root mod_tree;
void mod_tree_insert(struct module *mod);
void mod_tree_remove_init(struct module *mod);
void mod_tree_remove(struct module *mod);
struct module *mod_find(unsigned long addr);
struct module *mod_find(unsigned long addr, struct mod_tree_root *tree);
#else /* !CONFIG_MODULES_TREE_LOOKUP */
static inline void mod_tree_insert(struct module *mod) { }
static inline void mod_tree_remove_init(struct module *mod) { }
static inline void mod_tree_remove(struct module *mod) { }
static inline struct module *mod_find(unsigned long addr)
static inline struct module *mod_find(unsigned long addr, struct mod_tree_root *tree)
{
struct module *mod;