Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nommu: Provide vmalloc_exec().

Now that SH has switched to vmalloc_exec() for PAGE_KERNEL_EXEC usage,
it's apparent that nommu has no vmalloc_exec() definition of its own.
Stub in the one from mm/vmalloc.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+21
+21
mm/nommu.c
··· 266 266 } 267 267 EXPORT_SYMBOL(vmalloc_node); 268 268 269 + #ifndef PAGE_KERNEL_EXEC 270 + # define PAGE_KERNEL_EXEC PAGE_KERNEL 271 + #endif 272 + 273 + /** 274 + * vmalloc_exec - allocate virtually contiguous, executable memory 275 + * @size: allocation size 276 + * 277 + * Kernel-internal function to allocate enough pages to cover @size 278 + * the page level allocator and map them into contiguous and 279 + * executable kernel virtual space. 280 + * 281 + * For tight control over page level allocator and protection flags 282 + * use __vmalloc() instead. 283 + */ 284 + 285 + void *vmalloc_exec(unsigned long size) 286 + { 287 + return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC); 288 + } 289 + 269 290 /** 270 291 * vmalloc_32 - allocate virtually contiguous memory (32bit addressable) 271 292 * @size: allocation size