Lines Matching defs: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. */
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.
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")
178 * So, make it no-op when this is being built as a module
205 * merely stating that the module is licensed under the GPL v2, but are not
208 * information in the MODULE_LICENSE string. For module loading the
213 * exported with EXPORT_SYMBOL_GPL when a non free module is loaded.
216 * states, that the module is licensed under one of the compatible BSD
238 /* What your module does. */
288 /* Optional firmware file (or files) needed by the module
309 struct module *source, *target;
320 struct module *mod;
387 * struct klp_modinfo - ELF information preserved from the livepatch module
402 struct module {
408 /* Unique handle for this module */
462 /* Arch-specific module values */
551 bool klp; /* Is this a livepatch module? */
602 (IDE & SCSI) require entry into the module during init.*/
603 static inline bool module_is_live(struct module *mod)
608 struct module *__module_text_address(unsigned long addr);
609 struct module *__module_address(unsigned long addr);
616 const struct module *mod,
627 const struct module *mod)
637 const struct module *mod)
646 static inline bool within_module(unsigned long addr, const struct module *mod)
651 /* Search for module by name: must be in a RCU-sched critical section. */
652 struct module *find_module(const char *name);
654 extern void __noreturn __module_put_and_kthread_exit(struct module *mod,
659 int module_refcount(struct module *mod);
666 extern void __module_get(struct module *module);
669 * try_module_get() - take module refcount unless module is being removed
670 * @module: the module we should check for
672 * Only try to get a module reference count if the module is not being removed.
673 * This call will fail if the module is in the process of being removed.
675 * Care must also be taken to ensure the module exists and is alive prior to
679 * module reference through __module_get(). This can typically be achieved
680 * by having another entity other than the module itself increment the
681 * module reference count.
683 * 2) Implied protection: there is an implied protection against module
688 * active. Therefore, if a sysfs file is being read or written to the module
690 * try_module_get() on module sysfs store / read ops.
694 * module removal requests and gracefully fail if the module is on its way out.
698 extern bool try_module_get(struct module *module);
701 * module_put() - release a reference count to a module
702 * @module: the module we should release a reference count for
704 * If you successfully bump a reference count to a module with try_module_get(),
708 extern void module_put(struct module *module);
711 static inline bool try_module_get(struct module *module)
713 return !module || module_is_live(module);
715 static inline void module_put(struct module *module)
718 static inline void __module_get(struct module *module)
729 struct module *__mod = (mod); \
733 /* Dereference module function descriptor */
734 void *dereference_module_function_descriptor(struct module *mod, void *ptr);
741 static inline bool module_requested_async_probing(struct module *module)
743 return module && module->async_probe_requested;
746 static inline bool is_livepatch_module(struct module *mod)
759 static inline struct module *__module_address(unsigned long addr)
764 static inline struct module *__module_text_address(unsigned long addr)
790 const struct module *mod)
796 const struct module *mod)
801 static inline bool within_module(unsigned long addr, const struct module *mod)
811 static inline void __module_get(struct module *module)
815 static inline bool try_module_get(struct module *module)
820 static inline void module_put(struct module *module)
843 static inline bool module_requested_async_probing(struct module *module)
853 /* Dereference module function descriptor */
855 void *dereference_module_function_descriptor(struct module *mod, void *ptr)
875 struct module *);
876 void module_bug_cleanup(struct module *);
882 struct module *mod)
885 static inline void module_bug_cleanup(struct module *mod) {}
900 static inline bool module_sig_ok(struct module *module)
902 return module->sig_ok;
910 static inline bool module_sig_ok(struct module *module)
943 /* Look for this name: can be of form module:name. */
946 unsigned long find_kallsyms_symbol_value(struct module *mod, const char *name);
985 static inline unsigned long find_kallsyms_symbol_value(struct module *mod,