Lines Matching full:module

33 #include <asm/module.h>
42 struct module;
47 struct module *mod;
59 void (*setup)(struct module *, const char *);
60 int (*test)(struct module *);
61 void (*free)(struct module *);
75 /* These are either module local, or the kernel's dummy ones. */
79 #ifndef MODULE
82 * @x: function to be run at kernel boot time or module insertion
85 * builtin) or at module insertion time (if a module). There can only
86 * be one per module.
96 * the driver is a module. If the driver is statically
98 * There can only be one per module.
102 #else /* MODULE */
108 * matter when built as a loadable module. Like bus
129 /* Each module must use one module_init(). */
147 /* This means "can be init if no module support, otherwise module load
171 /* Soft module dependencies. See man modprobe.d for details.
172 * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz")
177 * Weak module dependencies. See man modprobe.d for details.
178 * Example: MODULE_WEAKDEP("module-foo")
184 * So, make it no-op when this is being built as a module
186 #ifdef MODULE
211 * merely stating that the module is licensed under the GPL v2, but are not
214 * information in the MODULE_LICENSE string. For module loading the
219 * exported with EXPORT_SYMBOL_GPL when a non free module is loaded.
222 * states, that the module is licensed under one of the compatible BSD
244 /* What your module does. */
247 #ifdef MODULE
252 #else /* !MODULE */
273 #if defined(MODULE) || !defined(CONFIG_SYSFS)
294 /* Optional firmware file (or files) needed by the module
315 struct module *source, *target;
326 struct module *mod;
393 * struct klp_modinfo - ELF information preserved from the livepatch module
408 struct module { struct
414 /* Unique handle for this module */ argument
418 /* Module build ID */
468 /* Arch-specific module values */ argument
559 bool klp; /* Is this a livepatch module? */ argument
610 (IDE & SCSI) require entry into the module during init.*/ argument
611 static inline bool module_is_live(struct module *mod) in module_is_live()
616 static inline bool module_is_coming(struct module *mod) in module_is_coming()
621 struct module *__module_text_address(unsigned long addr);
622 struct module *__module_address(unsigned long addr);
629 const struct module *mod, in within_module_mem_type()
640 const struct module *mod) in within_module_core()
650 const struct module *mod) in within_module_init()
659 static inline bool within_module(unsigned long addr, const struct module *mod) in within_module()
664 /* Search for module by name: must be in a RCU-sched critical section. */
665 struct module *find_module(const char *name);
667 extern void __noreturn __module_put_and_kthread_exit(struct module *mod,
672 int module_refcount(struct module *mod);
679 extern void __module_get(struct module *module);
682 * try_module_get() - take module refcount unless module is being removed
683 * @module: the module we should check for
685 * Only try to get a module reference count if the module is not being removed.
686 * This call will fail if the module is in the process of being removed.
688 * Care must also be taken to ensure the module exists and is alive prior to
692 * module reference through __module_get(). This can typically be achieved
693 * by having another entity other than the module itself increment the
694 * module reference count.
696 * 2) Implied protection: there is an implied protection against module
701 * active. Therefore, if a sysfs file is being read or written to the module
703 * try_module_get() on module sysfs store / read ops.
707 * module removal requests and gracefully fail if the module is on its way out.
711 extern bool try_module_get(struct module *module);
714 * module_put() - release a reference count to a module
715 * @module: the module we should release a reference count for
717 * If you successfully bump a reference count to a module with try_module_get(),
721 extern void module_put(struct module *module);
724 static inline bool try_module_get(struct module *module) in try_module_get() argument
726 return !module || module_is_live(module); in try_module_get()
728 static inline void module_put(struct module *module) in module_put() argument
731 static inline void __module_get(struct module *module) in __module_get() argument
742 struct module *__mod = (mod); \
746 /* Dereference module function descriptor */
747 void *dereference_module_function_descriptor(struct module *mod, void *ptr);
754 static inline bool module_requested_async_probing(struct module *module) in module_requested_async_probing() argument
756 return module && module->async_probe_requested; in module_requested_async_probing()
759 static inline bool is_livepatch_module(struct module *mod) in is_livepatch_module()
772 static inline struct module *__module_address(unsigned long addr) in __module_address()
777 static inline struct module *__module_text_address(unsigned long addr) in __module_text_address()
803 const struct module *mod) in within_module_core()
809 const struct module *mod) in within_module_init()
814 static inline bool within_module(unsigned long addr, const struct module *mod) in within_module()
824 static inline void __module_get(struct module *module) in __module_get() argument
828 static inline bool try_module_get(struct module *module) in try_module_get() argument
833 static inline void module_put(struct module *module) in module_put() argument
856 static inline bool module_requested_async_probing(struct module *module) in module_requested_async_probing() argument
866 /* Dereference module function descriptor */
868 void *dereference_module_function_descriptor(struct module *mod, void *ptr) in dereference_module_function_descriptor()
873 static inline bool module_is_coming(struct module *mod) in module_is_coming()
892 struct module *);
893 void module_bug_cleanup(struct module *);
899 struct module *mod) in module_bug_finalize()
902 static inline void module_bug_cleanup(struct module *mod) {} in module_bug_cleanup()
917 static inline bool module_sig_ok(struct module *module) in module_sig_ok() argument
919 return module->sig_ok; in module_sig_ok()
927 static inline bool module_sig_ok(struct module *module) in module_sig_ok() argument
960 /* Look for this name: can be of form module:name. */
963 unsigned long find_kallsyms_symbol_value(struct module *mod, const char *name);
1002 static inline unsigned long find_kallsyms_symbol_value(struct module *mod, in find_kallsyms_symbol_value()