drm/ttm: Fix cached TTM page allocation.
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 26 May 2010 14:21:03 +0000 (16:21 +0200)
committerDave Airlie <airlied@redhat.com>
Mon, 31 May 2010 23:39:48 +0000 (09:39 +1000)
This patch fixes a regression introduced with the pool page allocator
in the event that there are no highmem pages (for example x86_64),
in which case cached page allocation would fail.

Tested with the vmwgfx driver on a 64-bit vm.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_page_alloc.c

index 0d9a42c2394f79983344cd8bd21d99204a288109..b6d152360675a67924cd63785d1bb878f1e13428 100644 (file)
@@ -671,7 +671,7 @@ int ttm_get_pages(struct list_head *pages, int flags,
                if (flags & TTM_PAGE_FLAG_DMA32)
                        gfp_flags |= GFP_DMA32;
                else
-                       gfp_flags |= __GFP_HIGHMEM;
+                       gfp_flags |= GFP_HIGHUSER;
 
                for (r = 0; r < count; ++r) {
                        p = alloc_page(gfp_flags);