diff options
Diffstat (limited to 'arch/sparc/kernel/module.c')
-rw-r--r-- | arch/sparc/kernel/module.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index f848aadf54dc..99ba5baa9497 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
@@ -18,19 +18,16 @@ | |||
18 | #include <asm/spitfire.h> | 18 | #include <asm/spitfire.h> |
19 | 19 | ||
20 | #ifdef CONFIG_SPARC64 | 20 | #ifdef CONFIG_SPARC64 |
21 | static void *module_map(unsigned long size) | ||
22 | { | ||
23 | struct vm_struct *area; | ||
24 | 21 | ||
25 | size = PAGE_ALIGN(size); | 22 | #include <linux/jump_label.h> |
26 | if (!size || size > MODULES_LEN) | ||
27 | return NULL; | ||
28 | 23 | ||
29 | area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); | 24 | static void *module_map(unsigned long size) |
30 | if (!area) | 25 | { |
26 | if (PAGE_ALIGN(size) > MODULES_LEN) | ||
31 | return NULL; | 27 | return NULL; |
32 | 28 | return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, | |
33 | return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); | 29 | GFP_KERNEL, PAGE_KERNEL, -1, |
30 | __builtin_return_address(0)); | ||
34 | } | 31 | } |
35 | 32 | ||
36 | static char *dot2underscore(char *name) | 33 | static char *dot2underscore(char *name) |
@@ -217,7 +214,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, | |||
217 | me->name, | 214 | me->name, |
218 | (int) (ELF_R_TYPE(rel[i].r_info) & 0xff)); | 215 | (int) (ELF_R_TYPE(rel[i].r_info) & 0xff)); |
219 | return -ENOEXEC; | 216 | return -ENOEXEC; |
220 | }; | 217 | } |
221 | } | 218 | } |
222 | return 0; | 219 | return 0; |
223 | } | 220 | } |
@@ -227,6 +224,9 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
227 | const Elf_Shdr *sechdrs, | 224 | const Elf_Shdr *sechdrs, |
228 | struct module *me) | 225 | struct module *me) |
229 | { | 226 | { |
227 | /* make jump label nops */ | ||
228 | jump_label_apply_nops(me); | ||
229 | |||
230 | /* Cheetah's I-cache is fully coherent. */ | 230 | /* Cheetah's I-cache is fully coherent. */ |
231 | if (tlb_type == spitfire) { | 231 | if (tlb_type == spitfire) { |
232 | unsigned long va; | 232 | unsigned long va; |