aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2011-06-30 15:22:12 -0400
committerRusty Russell <rusty@rustcorp.com.au>2011-07-24 08:36:04 -0400
commit66574cc05438dd0907029075d7e6ec5ac0036fbc (patch)
tree8516792e486a535840e09b67f0831c303df3d45d /arch/cris/kernel
parent74e08fcf7bef973512a1f813700f802a93678670 (diff)
modules: make arch's use default loader hooks
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>
Diffstat (limited to 'arch/cris/kernel')
-rw-r--r--arch/cris/kernel/module.c43
1 files changed, 3 insertions, 40 deletions
diff --git a/arch/cris/kernel/module.c b/arch/cris/kernel/module.c
index bcd502f74cda..37400f5869e6 100644
--- a/arch/cris/kernel/module.c
+++ b/arch/cris/kernel/module.c
@@ -30,45 +30,19 @@
30#endif 30#endif
31 31
32#ifdef CONFIG_ETRAX_KMALLOCED_MODULES 32#ifdef CONFIG_ETRAX_KMALLOCED_MODULES
33#define MALLOC_MODULE(size) kmalloc(size, GFP_KERNEL)
34#define FREE_MODULE(region) kfree(region)
35#else
36#define MALLOC_MODULE(size) vmalloc_exec(size)
37#define FREE_MODULE(region) vfree(region)
38#endif
39
40void *module_alloc(unsigned long size) 33void *module_alloc(unsigned long size)
41{ 34{
42 if (size == 0) 35 if (size == 0)
43 return NULL; 36 return NULL;
44 return MALLOC_MODULE(size); 37 return kmalloc(size, GFP_KERNEL);
45} 38}
46 39
47
48/* Free memory returned from module_alloc */ 40/* Free memory returned from module_alloc */
49void module_free(struct module *mod, void *module_region) 41void module_free(struct module *mod, void *module_region)
50{ 42{
51 FREE_MODULE(module_region); 43 kfree(module_region);
52}
53
54/* We don't need anything special. */
55int module_frob_arch_sections(Elf_Ehdr *hdr,
56 Elf_Shdr *sechdrs,
57 char *secstrings,
58 struct module *mod)
59{
60 return 0;
61}
62
63int apply_relocate(Elf32_Shdr *sechdrs,
64 const char *strtab,
65 unsigned int symindex,
66 unsigned int relsec,
67 struct module *me)
68{
69 printk(KERN_ERR "module %s: REL relocation unsupported\n", me->name);
70 return -ENOEXEC;
71} 44}
45#endif
72 46
73int apply_relocate_add(Elf32_Shdr *sechdrs, 47int apply_relocate_add(Elf32_Shdr *sechdrs,
74 const char *strtab, 48 const char *strtab,
@@ -108,14 +82,3 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
108 82
109 return 0; 83 return 0;
110} 84}
111
112int module_finalize(const Elf_Ehdr *hdr,
113 const Elf_Shdr *sechdrs,
114 struct module *me)
115{
116 return 0;
117}
118
119void module_arch_cleanup(struct module *mod)
120{
121}