Commit 74ccd095 authored by Jack Steiner's avatar Jack Steiner Committed by Linus Torvalds

gru: add hugepage support

Add support for hugepages. Easier than I originally thought.
Signed-off-by: default avatarJack Steiner <steiner@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0cd2b081
...@@ -192,10 +192,11 @@ static int non_atomic_pte_lookup(struct vm_area_struct *vma, ...@@ -192,10 +192,11 @@ static int non_atomic_pte_lookup(struct vm_area_struct *vma,
{ {
struct page *page; struct page *page;
/* ZZZ Need to handle HUGE pages */ #ifdef CONFIG_HUGETLB_PAGE
if (is_vm_hugetlb_page(vma)) *pageshift = is_vm_hugetlb_page(vma) ? HPAGE_SHIFT : PAGE_SHIFT;
return -EFAULT; #else
*pageshift = PAGE_SHIFT; *pageshift = PAGE_SHIFT;
#endif
if (get_user_pages if (get_user_pages
(current, current->mm, vaddr, 1, write, 0, &page, NULL) <= 0) (current, current->mm, vaddr, 1, write, 0, &page, NULL) <= 0)
return -EFAULT; return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment