[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200116231717.499584577@linuxfoundation.org>
Date: Fri, 17 Jan 2020 00:18:06 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Christian König <christian.koenig@....com>,
Michel Dänzer <michel.daenzer@....com>,
Junwei Zhang <Jerry.Zhang@....com>,
Huang Rui <ray.huang@....com>,
Alex Deucher <alexander.deucher@....com>,
Zubin Mithra <zsm@...omium.org>
Subject: [PATCH 4.19 32/84] drm/ttm: fix start page for huge page check in ttm_put_pages()
From: Christian König <christian.koenig@....com>
commit ac1e516d5a4c56bf0cb4a3dfc0672f689131cfd4 upstream.
The first page entry is always the same with itself.
Signed-off-by: Christian König <christian.koenig@....com>
Reviewed-by: Michel Dänzer <michel.daenzer@....com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@....com>
Reviewed-by: Huang Rui <ray.huang@....com>
Signed-off-by: Alex Deucher <alexander.deucher@....com>
Cc: Zubin Mithra <zsm@...omium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -732,7 +732,7 @@ static void ttm_put_pages(struct page **
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
if (!(flags & TTM_PAGE_FLAG_DMA32) &&
(npages - i) >= HPAGE_PMD_NR) {
- for (j = 0; j < HPAGE_PMD_NR; ++j)
+ for (j = 1; j < HPAGE_PMD_NR; ++j)
if (p++ != pages[i + j])
break;
@@ -767,7 +767,7 @@ static void ttm_put_pages(struct page **
if (!p)
break;
- for (j = 0; j < HPAGE_PMD_NR; ++j)
+ for (j = 1; j < HPAGE_PMD_NR; ++j)
if (p++ != pages[i + j])
break;
Powered by blists - more mailing lists