modules and stop_machine
Subsystems (3)
The following changes since commit 7d3b56ba37a95f1f370f50258ed3954c304c524b:
Linus Torvalds (1):
Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/.../tip/linux-2.6-tip
are available in the git repository at:
ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master
Heiko Carstens (2):
stop_machine: introduce stop_machine_create/destroy.
module: convert to stop_machine_create/destroy.
Helge Deller (2):
module: fix module loading failure of large kernel modules for parisc
parisc: fix module loading failure of large kernel modules
Jianjun Kong (1):
module: fix warning of unused function when !CONFIG_PROC_FS
Johannes Berg (1):
remove CONFIG_KMOD
Tim Abbott (1):
kernel/module.c: compare symbol values when marking symbols as exported in /proc/kallsyms.
arch/parisc/include/asm/module.h | 6 +- arch/parisc/kernel/module.c | 216 ++++++++++++++++++++++++-------------- include/linux/moduleloader.h | 3 + include/linux/stop_machine.h | 22 ++++ init/Kconfig | 6 - kernel/cpu.c | 6 +- kernel/module.c | 59 ++++++++--- kernel/stop_machine.c | 55 ++++++++-- 8 files changed, 258 insertions(+), 115 deletions(-)
arch/parisc/include/asm/module.h +4 -2
@@ -23,8 +23,10 @@ struct mod_arch_specific {unsigned long got_offset, got_count, got_max;unsigned long fdesc_offset, fdesc_count, fdesc_max; -unsigned long stub_offset, stub_count, stub_max; -unsigned long init_stub_offset, init_stub_count, init_stub_max; +struct { +unsigned long stub_offset; +unsigned int stub_entries; + } *section;int unwind_section;struct unwind_table *unwind; };
arch/parisc/kernel/module.c +135 -81
352 lines not on this page · raw message
include/linux/moduleloader.h +3 -0
@@ -13,6 +13,9 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,char *secstrings, struct module *mod); +/* Additional bytes needed by arch in front of individual sections */ +unsigned int arch_mod_section_prepend (struct module *mod,unsigned int section); +/* Allocator used for allocating struct module, core sections and init sections. Returns NULL on failure. */ void *module_alloc (unsigned long size);
include/linux/stop_machine.h +22 -0
@@ -35,6 +35,24 @@ int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus);* won't come or go while it's being called. Used by hotplug cpu. */ int __stop_machine (int (*fn)(void *),void *data,const struct cpumask *cpus); + +/** +* stop_machine_create: create all stop_machine threads +* +* Description: This causes all stop_machine threads to be created before +* stop_machine actually gets called. This can be used by subsystems that +* need a non failing stop_machine infrastructure. +*/ +int stop_machine_create (void ); + +/** +* stop_machine_destroy: destroy all stop_machine threads +* +* Description: This causes all stop_machine threads which were created with +* stop_machine_create to be destroyed again. +*/ +void stop_machine_destroy (void ); +#else static inline int stop_machine(int (*fn)(void *), void *data,
@@ -46,5 +64,9 @@ static inline int stop_machine(int (*fn)(void *), void *data,local_irq_enable ();return ret; } + +static inline int stop_machine_create (void ) {return 0 ; } +static inline void stop_machine_destroy (void ) { } +#endif /* CONFIG_SMP */ #endif /* _LINUX_STOP_MACHINE */
init/Kconfig +0 -6
@@ -916,12 +916,6 @@ config MODULE_SRCVERSION_ALL the version). With this option, such a "srcversion" field will be created for all modules. If unsure, say N. -config KMOD - def_bool y - help - This is being removed soon. These days, CONFIG_MODULES - implies CONFIG_KMOD, so use that instead. - endif # MODULES config INIT_ALL_POSSIBLE
kernel/cpu.c +5 -1
@@ -269,8 +269,11 @@ out_release:int __ref cpu_down (unsigned int cpu) { -int err =0 ; +int err; + err =stop_machine_create (); +if (err) +return err;cpu_maps_update_begin ();if (cpu_hotplug_disabled) {
@@ -297,6 +300,7 @@ int __ref cpu_down(unsigned int cpu) out:cpu_maps_update_done (); +stop_machine_destroy ();return err; }EXPORT_SYMBOL (cpu_down);
kernel/module.c +44 -15
134 lines not on this page · raw message
kernel/stop_machine.c +45 -10
77 lines not on this page · raw message