diff options
author | James Bottomley <jbottomley@parallels.com> | 2011-05-22 03:04:55 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-22 03:04:55 -0400 |
commit | 7fe2ac6882f74e8bd5b3891f63c09cb10aee9d03 (patch) | |
tree | 3358215354ae27d86411963ab33c2d8f07c5e427 /arch/parisc/kernel/module.c | |
parent | 2e7bad5f34b5beed47542490c760ed26574e38ba (diff) | |
parent | b7d45818444a31948cfc7849136013a0ea54b2fb (diff) |
Merge branch 'flushing' into for-linus
Diffstat (limited to 'arch/parisc/kernel/module.c')
-rw-r--r-- | arch/parisc/kernel/module.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index 6e81bb596e5b..cedbbb8b18d9 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
@@ -61,8 +61,10 @@ | |||
61 | #include <linux/string.h> | 61 | #include <linux/string.h> |
62 | #include <linux/kernel.h> | 62 | #include <linux/kernel.h> |
63 | #include <linux/bug.h> | 63 | #include <linux/bug.h> |
64 | #include <linux/mm.h> | ||
64 | #include <linux/slab.h> | 65 | #include <linux/slab.h> |
65 | 66 | ||
67 | #include <asm/pgtable.h> | ||
66 | #include <asm/unwind.h> | 68 | #include <asm/unwind.h> |
67 | 69 | ||
68 | #if 0 | 70 | #if 0 |
@@ -214,7 +216,13 @@ void *module_alloc(unsigned long size) | |||
214 | { | 216 | { |
215 | if (size == 0) | 217 | if (size == 0) |
216 | return NULL; | 218 | return NULL; |
217 | return vmalloc(size); | 219 | /* using RWX means less protection for modules, but it's |
220 | * easier than trying to map the text, data, init_text and | ||
221 | * init_data correctly */ | ||
222 | return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END, | ||
223 | GFP_KERNEL | __GFP_HIGHMEM, | ||
224 | PAGE_KERNEL_RWX, -1, | ||
225 | __builtin_return_address(0)); | ||
218 | } | 226 | } |
219 | 227 | ||
220 | #ifndef CONFIG_64BIT | 228 | #ifndef CONFIG_64BIT |