Messages in this thread Patch in this message | | | Date | Tue, 24 Nov 2009 09:06:23 -0600 | From | steiner@sgi ... | Subject | [Patch 26/29] GRU - Add hugepage support |
| |
From: Jack Steiner <steiner@sgi.com>
Add support for hugepages. Easier than I originally thought.
Signed-off-by: Jack Steiner <steiner@sgi.com>
--- drivers/misc/sgi-gru/grufault.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Index: linux/drivers/misc/sgi-gru/grufault.c =================================================================== --- linux.orig/drivers/misc/sgi-gru/grufault.c 2009-11-20 09:32:36.000000000 -0600 +++ linux/drivers/misc/sgi-gru/grufault.c 2009-11-20 09:32:38.000000000 -0600 @@ -192,10 +192,11 @@ static int non_atomic_pte_lookup(struct { struct page *page; - /* ZZZ Need to handle HUGE pages */ - if (is_vm_hugetlb_page(vma)) - return -EFAULT; +#ifdef CONFIG_HUGETLB_PAGE + *pageshift = is_vm_hugetlb_page(vma) ? HPAGE_SHIFT : PAGE_SHIFT; +#else *pageshift = PAGE_SHIFT; +#endif if (get_user_pages (current, current->mm, vaddr, 1, write, 0, &page, NULL) <= 0) return -EFAULT;
| |