]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 06:30:16 +0000 (07:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 06:30:16 +0000 (07:30 +0100)
added patches:
drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch
drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch

queue-4.19/drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch [new file with mode: 0644]
queue-4.19/drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch b/queue-4.19/drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch
new file mode 100644 (file)
index 0000000..8be5d80
--- /dev/null
@@ -0,0 +1,46 @@
+From 453393369dc9806d2455151e329c599684762428 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Wed, 10 Apr 2019 11:43:43 +0200
+Subject: drm/ttm: fix incrementing the page pointer for huge pages
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+commit 453393369dc9806d2455151e329c599684762428 upstream.
+
+When we increment the counter we need to increment the pointer as well.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Fixes: e16858a7e6e7 drm/ttm: fix start page for huge page check in ttm_put_pages()
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+Acked-by: Huang Rui <ray.huang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: Zubin Mithra <zsm@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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
+@@ -733,7 +733,7 @@ static void ttm_put_pages(struct page **
+                       if (!(flags & TTM_PAGE_FLAG_DMA32) &&
+                           (npages - i) >= HPAGE_PMD_NR) {
+                               for (j = 1; j < HPAGE_PMD_NR; ++j)
+-                                      if (p++ != pages[i + j])
++                                      if (++p != pages[i + j])
+                                           break;
+                               if (j == HPAGE_PMD_NR)
+@@ -768,7 +768,7 @@ static void ttm_put_pages(struct page **
+                               break;
+                       for (j = 1; j < HPAGE_PMD_NR; ++j)
+-                              if (p++ != pages[i + j])
++                              if (++p != pages[i + j])
+                                   break;
+                       if (j != HPAGE_PMD_NR)
diff --git a/queue-4.19/drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch b/queue-4.19/drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch
new file mode 100644 (file)
index 0000000..46f943a
--- /dev/null
@@ -0,0 +1,46 @@
+From ac1e516d5a4c56bf0cb4a3dfc0672f689131cfd4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Tue, 2 Apr 2019 09:29:35 +0200
+Subject: drm/ttm: fix start page for huge page check in ttm_put_pages()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+commit ac1e516d5a4c56bf0cb4a3dfc0672f689131cfd4 upstream.
+
+The first page entry is always the same with itself.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
+Reviewed-by: Huang Rui <ray.huang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: Zubin Mithra <zsm@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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;
index 1f491acd801d29a3f8d97818a492d32387bcca90..4530bceff81a38ff96dd46c79df79ad8146b85d7 100644 (file)
@@ -29,3 +29,5 @@ s390-qeth-fix-false-reporting-of-vnic-char-config-failure.patch
 s390-qeth-fix-vnicc_is_in_use-if-rx_bcast-not-set.patch
 cifs-adjust-indentation-in-smb2_open_file.patch
 afs-fix-missing-cell-comparison-in-afs_test_super.patch
+drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch
+drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch