]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/module.h
percpu, module: implement and use is_kernel/module_percpu_address()
[mirror_ubuntu-bionic-kernel.git] / include / linux / module.h
index dd618eb026aabc169e6b87b12f11191c27c5b431..f0e2659f4e3ec7224b672540cda24a7cdca3303d 100644 (file)
@@ -175,6 +175,7 @@ struct notifier_block;
 
 #ifdef CONFIG_MODULES
 
+extern int modules_disabled; /* for sysctl */
 /* Get/put a kernel symbol (calls must be symmetric) */
 void *__symbol_get(const char *symbol);
 void *__symbol_get_gpl(const char *symbol);
@@ -329,8 +330,11 @@ struct module
        struct module_notes_attrs *notes_attrs;
 #endif
 
+#ifdef CONFIG_SMP
        /* Per-cpu data. */
-       void *percpu;
+       void __percpu *percpu;
+       unsigned int percpu_size;
+#endif
 
        /* The command line arguments (may be mangled).  People like
           keeping pointers to this stuff */
@@ -391,6 +395,7 @@ static inline int module_is_live(struct module *mod)
 struct module *__module_text_address(unsigned long addr);
 struct module *__module_address(unsigned long addr);
 bool is_module_address(unsigned long addr);
+bool is_module_percpu_address(unsigned long addr);
 bool is_module_text_address(unsigned long addr);
 
 static inline int within_module_core(unsigned long addr, struct module *mod)