aboutsummaryrefslogtreecommitdiff
path: root/kernel/module.c
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2017-02-24 08:41:49 -0600
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2017-02-27 15:49:27 +0100
commita88182f3f1818407d738e832650085110cae1f29 (patch)
tree397f8363994b85ad78760b9da4a6a48153e6694c /kernel/module.c
parente6073e0de52c43b8cd2c5777cceba9ca7ad17c7d (diff)
lockdep: Fix compilation error for !CONFIG_MODULES and !CONFIG_SMP
When CONFIG_MODULES is not set then it fails to compile in lockdep: |kernel/locking/lockdep.c: In function 'look_up_lock_class': |kernel/locking/lockdep.c:684:12: error: implicit declaration of function | '__is_module_percpu_address' [-Werror=implicit-function-declaration] If CONFIG_MODULES is set but CONFIG_SMP is not, then it compiles but fails link at the end: |kernel/locking/lockdep.c:684: undefined reference to `__is_module_percpu_address' |kernel/built-in.o:(.debug_addr+0x1e674): undefined reference to `__is_module_percpu_address' This patch adds the function for both cases. Signed-off-by: Dan Murphy <dmurphy@ti.com> [bigeasy: merge the two patches from Dan into one, adapt changelog] Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 289616d8ccfd..3483a3743b44 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -734,6 +734,11 @@ bool is_module_percpu_address(unsigned long addr)
return false;
}
+bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr)
+{
+ return false;
+}
+
#endif /* CONFIG_SMP */
#define MODINFO_ATTR(field) \