Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: remove CONFIG_KMOD from core kernel code remove CONFIG_KMOD from lib remove CONFIG_KMOD from sparc64 rework try_then_request_module to do less in non-modular kernels remove mention of CONFIG_KMOD from documentation make CONFIG_KMOD invisible modules: Take a shortcut for checking if an address is in a module module: turn longs into ints for module sizes Shrink struct module: CONFIG_UNUSED_SYMBOLS ifdefs module: reorder struct module to save space on 64 bit builds module: generic each_symbol iterator function module: don't use stop_machine for waiting rmmod
This commit is contained in:
@@ -25,15 +25,16 @@
|
||||
|
||||
#define KMOD_PATH_LEN 256
|
||||
|
||||
#ifdef CONFIG_KMOD
|
||||
#ifdef CONFIG_MODULES
|
||||
/* modprobe exit status on success, -ve on error. Return value
|
||||
* usually useless though. */
|
||||
extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x)))
|
||||
#else
|
||||
static inline int request_module(const char * name, ...) { return -ENOSYS; }
|
||||
#define try_then_request_module(x, mod...) (x)
|
||||
#endif
|
||||
|
||||
#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x)))
|
||||
|
||||
struct key;
|
||||
struct file;
|
||||
|
||||
+27
-23
@@ -249,27 +249,30 @@ struct module
|
||||
|
||||
/* Exported symbols */
|
||||
const struct kernel_symbol *syms;
|
||||
unsigned int num_syms;
|
||||
const unsigned long *crcs;
|
||||
unsigned int num_syms;
|
||||
|
||||
/* GPL-only exported symbols. */
|
||||
const struct kernel_symbol *gpl_syms;
|
||||
unsigned int num_gpl_syms;
|
||||
const struct kernel_symbol *gpl_syms;
|
||||
const unsigned long *gpl_crcs;
|
||||
|
||||
#ifdef CONFIG_UNUSED_SYMBOLS
|
||||
/* unused exported symbols. */
|
||||
const struct kernel_symbol *unused_syms;
|
||||
unsigned int num_unused_syms;
|
||||
const unsigned long *unused_crcs;
|
||||
unsigned int num_unused_syms;
|
||||
|
||||
/* GPL-only, unused exported symbols. */
|
||||
const struct kernel_symbol *unused_gpl_syms;
|
||||
unsigned int num_unused_gpl_syms;
|
||||
const struct kernel_symbol *unused_gpl_syms;
|
||||
const unsigned long *unused_gpl_crcs;
|
||||
#endif
|
||||
|
||||
/* symbols that will be GPL-only in the near future. */
|
||||
const struct kernel_symbol *gpl_future_syms;
|
||||
unsigned int num_gpl_future_syms;
|
||||
const unsigned long *gpl_future_crcs;
|
||||
unsigned int num_gpl_future_syms;
|
||||
|
||||
/* Exception table */
|
||||
unsigned int num_exentries;
|
||||
@@ -285,10 +288,10 @@ struct module
|
||||
void *module_core;
|
||||
|
||||
/* Here are the sizes of the init and core sections */
|
||||
unsigned long init_size, core_size;
|
||||
unsigned int init_size, core_size;
|
||||
|
||||
/* The size of the executable code in each section. */
|
||||
unsigned long init_text_size, core_text_size;
|
||||
unsigned int init_text_size, core_text_size;
|
||||
|
||||
/* The handle returned from unwind_add_table. */
|
||||
void *unwind_info;
|
||||
@@ -300,29 +303,15 @@ struct module
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
/* Support for BUG */
|
||||
unsigned num_bugs;
|
||||
struct list_head bug_list;
|
||||
struct bug_entry *bug_table;
|
||||
unsigned num_bugs;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MODULE_UNLOAD
|
||||
/* Reference counts */
|
||||
struct module_ref ref[NR_CPUS];
|
||||
|
||||
/* What modules depend on me? */
|
||||
struct list_head modules_which_use_me;
|
||||
|
||||
/* Who is waiting for us to be unloaded */
|
||||
struct task_struct *waiter;
|
||||
|
||||
/* Destruction function. */
|
||||
void (*exit)(void);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KALLSYMS
|
||||
/* We keep the symbol and string tables for kallsyms. */
|
||||
Elf_Sym *symtab;
|
||||
unsigned long num_symtab;
|
||||
unsigned int num_symtab;
|
||||
char *strtab;
|
||||
|
||||
/* Section attributes */
|
||||
@@ -342,6 +331,21 @@ struct module
|
||||
struct marker *markers;
|
||||
unsigned int num_markers;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MODULE_UNLOAD
|
||||
/* What modules depend on me? */
|
||||
struct list_head modules_which_use_me;
|
||||
|
||||
/* Who is waiting for us to be unloaded */
|
||||
struct task_struct *waiter;
|
||||
|
||||
/* Destruction function. */
|
||||
void (*exit)(void);
|
||||
|
||||
/* Reference counts */
|
||||
struct module_ref ref[NR_CPUS];
|
||||
#endif
|
||||
|
||||
};
|
||||
#ifndef MODULE_ARCH_INIT
|
||||
#define MODULE_ARCH_INIT {}
|
||||
|
||||
Reference in New Issue
Block a user