aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/kernel/module.c
AgeCommit message (Collapse)Author
2011-07-24modules: make arch's use default loader hooksJonas Bonn
This patch removes all the module loader hook implementations in the architecture specific code where the functionality is the same as that now provided by the recently added default hooks. Signed-off-by: Jonas Bonn <jonas@southpole.se> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-05-23sh: Ignore R_SH_NONE module relocations.Paul Mundt
Some modules may end up with R_SH_NONE relocs with the right combination of compiler/kernel config (specifically dwarf unwinder), so simply trap and ignore them instead of letting them get down to the error path. Reported-by: Carmelo AMOROSO <carmelo.amoroso@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-05modules: Fix module_bug_list list corruption raceLinus Torvalds
With all the recent module loading cleanups, we've minimized the code that sits under module_mutex, fixing various deadlocks and making it possible to do most of the module loading in parallel. However, that whole conversion totally missed the rather obscure code that adds a new module to the list for BUG() handling. That code was doubly obscure because (a) the code itself lives in lib/bugs.c (for dubious reasons) and (b) it gets called from the architecture-specific "module_finalize()" rather than from generic code. Calling it from arch-specific code makes no sense what-so-ever to begin with, and is now actively wrong since that code isn't protected by the module loading lock any more. So this commit moves the "module_bug_{finalize,cleanup}()" calls away from the arch-specific code, and into the generic code - and in the process protects it with the module_mutex so that the list operations are now safe. Future fixups: - move the module list handling code into kernel/module.c where it belongs. - get rid of 'module_bug_list' and just use the regular list of modules (called 'modules' - imagine that) that we already create and maintain for other reasons. Reported-and-tested-by: Thomas Gleixner <tglx@linutronix.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Adrian Bunk <bunk@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-13sh: Tidy up the dwarf module helpers.Paul Mundt
This enables us to build the dwarf unwinder both with modules enabled and disabled in addition to reducing code size in the latter case. The helpers are also consolidated, and modified to resemble the BUG module helpers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-11sh: Teach the DWARF unwinder about modulesMatt Fleming
Pass a module's .eh_frame section to the DWARF unwinder at module load time so that the section's FDEs and CIEs can be registered with the DWARF unwinder. This allows us to unwind the stack through module code when generating backtraces. Signed-off-by: Matt Fleming <matt@console-pimps.org>
2009-06-12module: cleanup FIXME comments about trimming exception table entries.Rusty Russell
Everyone cut and paste this comment from my original one. We now do it generically, so cut the comments. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Amerigo Wang <amwang@redhat.com>
2009-05-09sh: Fix up SHmedia module ELF relocations.Paul Mundt
This fixes up the LSB setting for SHmedia branching in updated symbols when processing module relocations. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-04sh: module_alloc() should be using vmalloc_exec().Paul Mundt
SH-X2 extended mode TLB allows for toggling of the exec bit, so make sure we are using the right protection bits for module space there also. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-04sh: Fix up __bug_table handling in module loader.Paul Mundt
We should be calling in to the lib/bug.c module helpers, fix that up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-06-02sh: module.c use kernel unaligned helpersHarvey Harrison
Replace the COPY_UNALIGNED_WORD helper. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Merge sh and sh64 module.c.Paul Mundt
This is trivial, in that they're both effectively the same for the base relocations anyways. SH-5 doesn't need the unaligned bits, and has a few extra relocations, which are never hit on non-SH5 parts. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!