This patch adds a personality flag that requests hugetlb pages be used for
a processes stack. It adds a helper function that chooses the proper ALIGN
macro based on tthe process personality and calls this function from
setup_arg_pages when aligning the stack address.
Signed-off-by: Andy
On Mon, 2008-07-28 at 12:17 -0700, Eric Munson wrote:
+static unsigned long personality_page_align(unsigned long addr)
+{
+ if (current-personality HUGETLB_STACK)
+#ifdef CONFIG_STACK_GROWSUP
+ return HPAGE_ALIGN(addr);
+#else
+ return addr HPAGE_MASK;