mm: introduce execmem_alloc() and execmem_free()
[linux-block.git] / arch / powerpc / kernel / kprobes.c
index bbca90a5e2ec07a59903b87bf2d50f6a194235fd..9fcd01bb2ce6cd957ec9509bc3de2aefb868c49a 100644 (file)
@@ -19,8 +19,8 @@
 #include <linux/extable.h>
 #include <linux/kdebug.h>
 #include <linux/slab.h>
-#include <linux/moduleloader.h>
 #include <linux/set_memory.h>
+#include <linux/execmem.h>
 #include <asm/code-patching.h>
 #include <asm/cacheflush.h>
 #include <asm/sstep.h>
@@ -130,7 +130,7 @@ void *alloc_insn_page(void)
 {
        void *page;
 
-       page = module_alloc(PAGE_SIZE);
+       page = execmem_alloc(EXECMEM_KPROBES, PAGE_SIZE);
        if (!page)
                return NULL;
 
@@ -142,7 +142,7 @@ void *alloc_insn_page(void)
        }
        return page;
 error:
-       module_memfree(page);
+       execmem_free(page);
        return NULL;
 }