Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[pandora-kernel.git] / include / linux / module.h
index ac28e87..68e0955 100644 (file)
@@ -23,7 +23,7 @@
 /* Not Yet Implemented */
 #define MODULE_SUPPORTED_DEVICE(name)
 
-/* v850 toolchain uses a `_' prefix for all user symbols */
+/* some toolchains uses a `_' prefix for all user symbols */
 #ifndef MODULE_SYMBOL_PREFIX
 #define MODULE_SYMBOL_PREFIX ""
 #endif
@@ -190,7 +190,7 @@ void *__symbol_get_gpl(const char *symbol);
        extern typeof(sym) sym;                                 \
        __CRC_SYMBOL(sym, sec)                                  \
        static const char __kstrtab_##sym[]                     \
-       __attribute__((section("__ksymtab_strings")))           \
+       __attribute__((section("__ksymtab_strings"), aligned(1))) \
        = MODULE_SYMBOL_PREFIX #sym;                            \
        static const struct kernel_symbol __ksymtab_##sym       \
        __used                                                  \
@@ -229,23 +229,6 @@ enum module_state
        MODULE_STATE_GOING,
 };
 
-/* Similar stuff for section attributes. */
-struct module_sect_attr
-{
-       struct module_attribute mattr;
-       char *name;
-       unsigned long address;
-};
-
-struct module_sect_attrs
-{
-       struct attribute_group grp;
-       int nsections;
-       struct module_sect_attr attrs[0];
-};
-
-struct module_param_attrs;
-
 struct module
 {
        enum module_state state;
@@ -266,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;
@@ -302,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;
@@ -317,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 */
@@ -359,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 {}
@@ -465,7 +452,7 @@ int unregister_module_notifier(struct notifier_block * nb);
 
 extern void print_modules(void);
 
-extern void module_update_markers(struct module *probe_module, int *refcount);
+extern void module_update_markers(void);
 
 #else /* !CONFIG_MODULES... */
 #define EXPORT_SYMBOL(sym)
@@ -567,8 +554,7 @@ static inline void print_modules(void)
 {
 }
 
-static inline void module_update_markers(struct module *probe_module,
-               int *refcount)
+static inline void module_update_markers(void)
 {
 }