aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/kernel')
-rw-r--r--arch/cris/kernel/module.c43
-rw-r--r--arch/cris/kernel/process.c2
2 files changed, 4 insertions, 41 deletions
diff --git a/arch/cris/kernel/module.c b/arch/cris/kernel/module.c
index bcd502f74cd..37400f5869e 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}
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index c99aeab7cef..aa585e4e979 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -12,7 +12,7 @@
12 * This file handles the architecture-dependent parts of process handling.. 12 * This file handles the architecture-dependent parts of process handling..
13 */ 13 */
14 14
15#include <asm/atomic.h> 15#include <linux/atomic.h>
16#include <asm/pgtable.h> 16#include <asm/pgtable.h>
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <asm/irq.h> 18#include <asm/irq.h>