]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/sparc/kernel/module.c
Merge branch 'master' into tk71
[mv-sheeva.git] / arch / sparc / kernel / module.c
index f848aadf54dc1c2c1feb537752fdf3410efbe9d8..8d348c474a2f3b7ffde344246c0e41856f3988fe 100644 (file)
 #include <asm/spitfire.h>
 
 #ifdef CONFIG_SPARC64
-static void *module_map(unsigned long size)
-{
-       struct vm_struct *area;
 
-       size = PAGE_ALIGN(size);
-       if (!size || size > MODULES_LEN)
-               return NULL;
+#include <linux/jump_label.h>
 
-       area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END);
-       if (!area)
+static void *module_map(unsigned long size)
+{
+       if (PAGE_ALIGN(size) > MODULES_LEN)
                return NULL;
-
-       return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL);
+       return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
+                               GFP_KERNEL, PAGE_KERNEL, -1,
+                               __builtin_return_address(0));
 }
 
 static char *dot2underscore(char *name)
@@ -227,6 +224,9 @@ int module_finalize(const Elf_Ehdr *hdr,
                    const Elf_Shdr *sechdrs,
                    struct module *me)
 {
+       /* make jump label nops */
+       jump_label_apply_nops(me);
+
        /* Cheetah's I-cache is fully coherent.  */
        if (tlb_type == spitfire) {
                unsigned long va;