]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Jul 2014 05:50:10 +0000 (22:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Jul 2014 05:50:10 +0000 (22:50 -0700)
added patches:
drm-radeon-fix-cut-and-paste-issue-for-hawaii.patch
drm-radeon-fix-irq-ring-buffer-overflow-handling.patch
fix-gcc-4.9.0-miscompilation-of-load_balance-in-scheduler.patch
mm-hugetlb-fix-copy_hugetlb_page_range.patch

queue-3.15/drm-radeon-fix-cut-and-paste-issue-for-hawaii.patch [new file with mode: 0644]
queue-3.15/drm-radeon-fix-irq-ring-buffer-overflow-handling.patch [new file with mode: 0644]
queue-3.15/fix-gcc-4.9.0-miscompilation-of-load_balance-in-scheduler.patch [new file with mode: 0644]
queue-3.15/mm-hugetlb-fix-copy_hugetlb_page_range.patch [new file with mode: 0644]
queue-3.15/series

diff --git a/queue-3.15/drm-radeon-fix-cut-and-paste-issue-for-hawaii.patch b/queue-3.15/drm-radeon-fix-cut-and-paste-issue-for-hawaii.patch
new file mode 100644 (file)
index 0000000..b0f4dd5
--- /dev/null
@@ -0,0 +1,33 @@
+From 1b2c4869d8247f9e202fa8a73777c34adc62d409 Mon Sep 17 00:00:00 2001
+From: Jerome Glisse <jglisse@redhat.com>
+Date: Thu, 24 Jul 2014 16:34:17 -0400
+Subject: drm/radeon: fix cut and paste issue for hawaii.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jerome Glisse <jglisse@redhat.com>
+
+commit 1b2c4869d8247f9e202fa8a73777c34adc62d409 upstream.
+
+This is a halfway fix for hawaii acceleration. More fixes to come
+but hopefully isolated to userspace.
+
+Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/cik.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/radeon/cik.c
++++ b/drivers/gpu/drm/radeon/cik.c
+@@ -2290,6 +2290,7 @@ static void cik_tiling_mode_table_init(s
+                               gb_tile_moden = 0;
+                               break;
+                       }
++                      rdev->config.cik.macrotile_mode_array[reg_offset] = gb_tile_moden;
+                       WREG32(GB_MACROTILE_MODE0 + (reg_offset * 4), gb_tile_moden);
+               }
+       } else if (num_pipe_configs == 8) {
diff --git a/queue-3.15/drm-radeon-fix-irq-ring-buffer-overflow-handling.patch b/queue-3.15/drm-radeon-fix-irq-ring-buffer-overflow-handling.patch
new file mode 100644 (file)
index 0000000..3b26561
--- /dev/null
@@ -0,0 +1,68 @@
+From e8c214d22e76dd0ead38f97f8d2dc09aac70d651 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Wed, 23 Jul 2014 09:47:58 +0200
+Subject: drm/radeon: fix irq ring buffer overflow handling
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+
+commit e8c214d22e76dd0ead38f97f8d2dc09aac70d651 upstream.
+
+We must mask out the overflow bit as well, otherwise
+the wptr will never match the rptr again and the interrupt
+handler will loop forever.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/cik.c       |    1 +
+ drivers/gpu/drm/radeon/evergreen.c |    1 +
+ drivers/gpu/drm/radeon/r600.c      |    1 +
+ drivers/gpu/drm/radeon/si.c        |    1 +
+ 4 files changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/radeon/cik.c
++++ b/drivers/gpu/drm/radeon/cik.c
+@@ -7363,6 +7363,7 @@ static inline u32 cik_get_ih_wptr(struct
+               tmp = RREG32(IH_RB_CNTL);
+               tmp |= IH_WPTR_OVERFLOW_CLEAR;
+               WREG32(IH_RB_CNTL, tmp);
++              wptr &= ~RB_OVERFLOW;
+       }
+       return (wptr & rdev->ih.ptr_mask);
+ }
+--- a/drivers/gpu/drm/radeon/evergreen.c
++++ b/drivers/gpu/drm/radeon/evergreen.c
+@@ -4759,6 +4759,7 @@ static u32 evergreen_get_ih_wptr(struct
+               tmp = RREG32(IH_RB_CNTL);
+               tmp |= IH_WPTR_OVERFLOW_CLEAR;
+               WREG32(IH_RB_CNTL, tmp);
++              wptr &= ~RB_OVERFLOW;
+       }
+       return (wptr & rdev->ih.ptr_mask);
+ }
+--- a/drivers/gpu/drm/radeon/r600.c
++++ b/drivers/gpu/drm/radeon/r600.c
+@@ -3792,6 +3792,7 @@ static u32 r600_get_ih_wptr(struct radeo
+               tmp = RREG32(IH_RB_CNTL);
+               tmp |= IH_WPTR_OVERFLOW_CLEAR;
+               WREG32(IH_RB_CNTL, tmp);
++              wptr &= ~RB_OVERFLOW;
+       }
+       return (wptr & rdev->ih.ptr_mask);
+ }
+--- a/drivers/gpu/drm/radeon/si.c
++++ b/drivers/gpu/drm/radeon/si.c
+@@ -6090,6 +6090,7 @@ static inline u32 si_get_ih_wptr(struct
+               tmp = RREG32(IH_RB_CNTL);
+               tmp |= IH_WPTR_OVERFLOW_CLEAR;
+               WREG32(IH_RB_CNTL, tmp);
++              wptr &= ~RB_OVERFLOW;
+       }
+       return (wptr & rdev->ih.ptr_mask);
+ }
diff --git a/queue-3.15/fix-gcc-4.9.0-miscompilation-of-load_balance-in-scheduler.patch b/queue-3.15/fix-gcc-4.9.0-miscompilation-of-load_balance-in-scheduler.patch
new file mode 100644 (file)
index 0000000..51baa84
--- /dev/null
@@ -0,0 +1,70 @@
+From 2062afb4f804afef61cbe62a30cac9a46e58e067 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Sat, 26 Jul 2014 14:52:01 -0700
+Subject: Fix gcc-4.9.0 miscompilation of load_balance()  in scheduler
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 2062afb4f804afef61cbe62a30cac9a46e58e067 upstream.
+
+Michel Dänzer and a couple of other people reported inexplicable random
+oopses in the scheduler, and the cause turns out to be gcc mis-compiling
+the load_balance() function when debugging is enabled.  The gcc bug
+apparently goes back to gcc-4.5, but slight optimization changes means
+that it now showed up as a problem in 4.9.0 and 4.9.1.
+
+The instruction scheduling problem causes gcc to schedule a spill
+operation to before the stack frame has been created, which in turn can
+corrupt the spilled value if an interrupt comes in.  There may be other
+effects of this bug too, but that's the code generation problem seen in
+Michel's case.
+
+This is fixed in current gcc HEAD, but the workaround as suggested by
+Markus Trippelsdorf is pretty simple: use -fno-var-tracking-assignments
+when compiling the kernel, which disables the gcc code that causes the
+problem.  This can result in slightly worse debug information for
+variable accesses, but that is infinitely preferable to actual code
+generation problems.
+
+Doing this unconditionally (not just for CONFIG_DEBUG_INFO) also allows
+non-debug builds to verify that the debug build would be identical: we
+can do
+
+    export GCC_COMPARE_DEBUG=1
+
+to make gcc internally verify that the result of the build is
+independent of the "-g" flag (it will make the compiler build everything
+twice, toggling the debug flag, and compare the results).
+
+Without the "-fno-var-tracking-assignments" option, the build would fail
+(even with 4.8.3 that didn't show the actual stack frame bug) with a gcc
+compare failure.
+
+See also gcc bugzilla:
+
+  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
+
+Reported-by: Michel Dänzer <michel@daenzer.net>
+Suggested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
+Cc: Jakub Jelinek <jakub@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Makefile |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/Makefile
++++ b/Makefile
+@@ -669,6 +669,8 @@ KBUILD_CFLAGS      += -fomit-frame-pointer
+ endif
+ endif
++KBUILD_CFLAGS   += $(call cc-option, -fno-var-tracking-assignments)
++
+ ifdef CONFIG_DEBUG_INFO
+ KBUILD_CFLAGS += -g
+ KBUILD_AFLAGS += -Wa,--gdwarf-2
diff --git a/queue-3.15/mm-hugetlb-fix-copy_hugetlb_page_range.patch b/queue-3.15/mm-hugetlb-fix-copy_hugetlb_page_range.patch
new file mode 100644 (file)
index 0000000..b4a46e4
--- /dev/null
@@ -0,0 +1,70 @@
+From 0253d634e0803a8376a0d88efee0bf523d8673f9 Mon Sep 17 00:00:00 2001
+From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
+Date: Wed, 23 Jul 2014 14:00:19 -0700
+Subject: mm: hugetlb: fix copy_hugetlb_page_range()
+
+From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
+
+commit 0253d634e0803a8376a0d88efee0bf523d8673f9 upstream.
+
+Commit 4a705fef9862 ("hugetlb: fix copy_hugetlb_page_range() to handle
+migration/hwpoisoned entry") changed the order of
+huge_ptep_set_wrprotect() and huge_ptep_get(), which leads to breakage
+in some workloads like hugepage-backed heap allocation via libhugetlbfs.
+This patch fixes it.
+
+The test program for the problem is shown below:
+
+  $ cat heap.c
+  #include <unistd.h>
+  #include <stdlib.h>
+  #include <string.h>
+
+  #define HPS 0x200000
+
+  int main() {
+       int i;
+       char *p = malloc(HPS);
+       memset(p, '1', HPS);
+       for (i = 0; i < 5; i++) {
+               if (!fork()) {
+                       memset(p, '2', HPS);
+                       p = malloc(HPS);
+                       memset(p, '3', HPS);
+                       free(p);
+                       return 0;
+               }
+       }
+       sleep(1);
+       free(p);
+       return 0;
+  }
+
+  $ export HUGETLB_MORECORE=yes ; export HUGETLB_NO_PREFAULT= ; hugectl --heap ./heap
+
+Fixes 4a705fef9862 ("hugetlb: fix copy_hugetlb_page_range() to handle
+migration/hwpoisoned entry"), so is applicable to -stable kernels which
+include it.
+
+Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
+Reported-by: Guillaume Morin <guillaume@morinfr.org>
+Suggested-by: Guillaume Morin <guillaume@morinfr.org>
+Acked-by: Hugh Dickins <hughd@google.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/hugetlb.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/mm/hugetlb.c
++++ b/mm/hugetlb.c
+@@ -2461,6 +2461,7 @@ int copy_hugetlb_page_range(struct mm_st
+               } else {
+                       if (cow)
+                               huge_ptep_set_wrprotect(src, addr, src_pte);
++                      entry = huge_ptep_get(src_pte);
+                       ptepage = pte_page(entry);
+                       get_page(ptepage);
+                       page_dup_rmap(ptepage);
index 475e39b1926d3ca06092091b8c8f9357b32953cb..0b3ba094e97506c5aa460584a645226f3cd4ba0b 100644 (file)
@@ -27,3 +27,7 @@ hwmon-smsc47m192-fix-temperature-limit-and-vrm-write-operations.patch
 parport-fix-menu-breakage.patch
 fs-umount-on-symlink-leaks-mnt-count.patch
 x86_32-entry-store-badsys-error-code-in-eax.patch
+drm-radeon-fix-irq-ring-buffer-overflow-handling.patch
+drm-radeon-fix-cut-and-paste-issue-for-hawaii.patch
+mm-hugetlb-fix-copy_hugetlb_page_range.patch
+fix-gcc-4.9.0-miscompilation-of-load_balance-in-scheduler.patch