diff options
author | Dan Murphy <dmurphy@ti.com> | 2017-02-24 08:41:49 -0600 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2017-02-27 15:49:27 +0100 |
commit | a88182f3f1818407d738e832650085110cae1f29 (patch) | |
tree | 397f8363994b85ad78760b9da4a6a48153e6694c /include/linux/module.h | |
parent | e6073e0de52c43b8cd2c5777cceba9ca7ad17c7d (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 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 3d3d2188c7d9..5944baaa3f28 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -664,6 +664,11 @@ static inline bool is_module_percpu_address(unsigned long addr) return false; } +static inline bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr) +{ + return false; +} + static inline bool is_module_text_address(unsigned long addr) { return false; |