Skip to content

Commit

Permalink
nommu: Provide vmalloc_exec().
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
pmundt committed Aug 4, 2008
1 parent d8eb2fa commit 1af446e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,27 @@ void *vmalloc_node(unsigned long size, int node)
}
EXPORT_SYMBOL(vmalloc_node);

#ifndef PAGE_KERNEL_EXEC
# define PAGE_KERNEL_EXEC PAGE_KERNEL
#endif

/**
* vmalloc_exec - allocate virtually contiguous, executable memory
* @size: allocation size
*
* Kernel-internal function to allocate enough pages to cover @size
* the page level allocator and map them into contiguous and
* executable kernel virtual space.
*
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/

void *vmalloc_exec(unsigned long size)
{
return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);
}

/**
* vmalloc_32 - allocate virtually contiguous memory (32bit addressable)
* @size: allocation size
Expand Down

0 comments on commit 1af446e

Please sign in to comment.