From 8f1f9053fa9eb9b644a912d23f0aa516d1185b9c Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Tue, 3 Jan 2012 17:36:41 +0200 Subject: [PATCH] drm: ttm: Fix clearing of highmem pages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ttm might allocate highmem pages for GPU usage. But page_address works only for normal pages. clear_highpage can be used to clear both type of pages. Signed-off-by: Pauli Nieminen Reported-and-tested-by: Daniel Charles Reviewed-by: Ville Syrjälä Signed-off-by: Kirill A. Shutemov --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index d948575..0b8d340 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -708,7 +708,7 @@ int ttm_get_pages(struct list_head *pages, int flags, /* clear the pages coming from the pool if requested */ if (flags & TTM_PAGE_FLAG_ZERO_ALLOC) { list_for_each_entry(p, pages, lru) { - clear_page(page_address(p)); + clear_highpage(p); } } -- 2.7.4