diff options
author | Jack Steiner <steiner@sgi.com> | 2009-12-15 19:48:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:17 -0500 |
commit | 74ccd09526a0254c362adcc6c862354d724aa803 (patch) | |
tree | a68e4a3be9d83eb7e6bb47eba131e73bd06684d8 /drivers/misc/sgi-gru | |
parent | 0cd2b0813aac660f5f7a6574083157a70c152dd5 (diff) |
gru: add hugepage support
Add support for hugepages. Easier than I originally thought.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru')
-rw-r--r-- | drivers/misc/sgi-gru/grufault.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c index b56009f9203a..929d6073e600 100644 --- a/drivers/misc/sgi-gru/grufault.c +++ b/drivers/misc/sgi-gru/grufault.c | |||
@@ -192,10 +192,11 @@ static int non_atomic_pte_lookup(struct vm_area_struct *vma, | |||
192 | { | 192 | { |
193 | struct page *page; | 193 | struct page *page; |
194 | 194 | ||
195 | /* ZZZ Need to handle HUGE pages */ | 195 | #ifdef CONFIG_HUGETLB_PAGE |
196 | if (is_vm_hugetlb_page(vma)) | 196 | *pageshift = is_vm_hugetlb_page(vma) ? HPAGE_SHIFT : PAGE_SHIFT; |
197 | return -EFAULT; | 197 | #else |
198 | *pageshift = PAGE_SHIFT; | 198 | *pageshift = PAGE_SHIFT; |
199 | #endif | ||
199 | if (get_user_pages | 200 | if (get_user_pages |
200 | (current, current->mm, vaddr, 1, write, 0, &page, NULL) <= 0) | 201 | (current, current->mm, vaddr, 1, write, 0, &page, NULL) <= 0) |
201 | return -EFAULT; | 202 | return -EFAULT; |