]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 May 2014 03:15:16 +0000 (12:15 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 May 2014 03:15:16 +0000 (12:15 +0900)
added patches:
parisc-change-value-of-shmlba-from-0x00400000-to-page_size.patch
parisc-fix-epoll_pwait-syscall-on-compat-kernel.patch
parisc-remove-_stk_lim_max-override.patch
tick-common-fix-wrong-check-in-tick_check_replacement.patch
tick-sched-check-tick_nohz_enabled-in-tick_nohz_switch_to_nohz.patch
tick-sched-don-t-call-update_wall_time-when-delta-is-lesser-than-tick_period.patch

queue-3.14/parisc-change-value-of-shmlba-from-0x00400000-to-page_size.patch [new file with mode: 0644]
queue-3.14/parisc-fix-epoll_pwait-syscall-on-compat-kernel.patch [new file with mode: 0644]
queue-3.14/parisc-remove-_stk_lim_max-override.patch [new file with mode: 0644]
queue-3.14/series
queue-3.14/tick-common-fix-wrong-check-in-tick_check_replacement.patch [new file with mode: 0644]
queue-3.14/tick-sched-check-tick_nohz_enabled-in-tick_nohz_switch_to_nohz.patch [new file with mode: 0644]
queue-3.14/tick-sched-don-t-call-update_wall_time-when-delta-is-lesser-than-tick_period.patch [new file with mode: 0644]

diff --git a/queue-3.14/parisc-change-value-of-shmlba-from-0x00400000-to-page_size.patch b/queue-3.14/parisc-change-value-of-shmlba-from-0x00400000-to-page_size.patch
new file mode 100644 (file)
index 0000000..29682ca
--- /dev/null
@@ -0,0 +1,110 @@
+From 0ef36bd2b37815719e31a72d2beecc28ca8ecd26 Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Wed, 9 Apr 2014 19:49:28 +0200
+Subject: parisc: change value of SHMLBA from 0x00400000 to PAGE_SIZE
+
+From: Helge Deller <deller@gmx.de>
+
+commit 0ef36bd2b37815719e31a72d2beecc28ca8ecd26 upstream.
+
+On parisc, SHMLBA was defined to 0x00400000 (4MB) to reflect that we need to
+take care of our caches for shared mappings. But actually, we can map a file at
+any multiple address of PAGE_SIZE, so let us correct that now with a value of
+PAGE_SIZE for SHMLBA.  Instead we now take care of this cache colouring via the
+constant SHM_COLOUR while we map shared pages.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+CC: Jeroen Roovers <jer@gentoo.org>
+CC: John David Anglin <dave.anglin@bell.net>
+CC: Carlos O'Donell <carlos@systemhalted.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/parisc/include/asm/shmparam.h |    5 ++---
+ arch/parisc/kernel/cache.c         |    3 ++-
+ arch/parisc/kernel/sys_parisc.c    |   14 +++++++-------
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+--- a/arch/parisc/include/asm/shmparam.h
++++ b/arch/parisc/include/asm/shmparam.h
+@@ -1,8 +1,7 @@
+ #ifndef _ASMPARISC_SHMPARAM_H
+ #define _ASMPARISC_SHMPARAM_H
+-#define __ARCH_FORCE_SHMLBA   1
+-
+-#define SHMLBA 0x00400000   /* attach addr needs to be 4 Mb aligned */
++#define SHMLBA           PAGE_SIZE    /* attach addr a multiple of this */
++#define SHM_COLOUR 0x00400000 /* shared mappings colouring */
+ #endif /* _ASMPARISC_SHMPARAM_H */
+--- a/arch/parisc/kernel/cache.c
++++ b/arch/parisc/kernel/cache.c
+@@ -323,7 +323,8 @@ void flush_dcache_page(struct page *page
+                * specifically accesses it, of course) */
+               flush_tlb_page(mpnt, addr);
+-              if (old_addr == 0 || (old_addr & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) {
++              if (old_addr == 0 || (old_addr & (SHM_COLOUR - 1))
++                                    != (addr & (SHM_COLOUR - 1))) {
+                       __flush_cache_page(mpnt, addr, page_to_phys(page));
+                       if (old_addr)
+                               printk(KERN_ERR "INEQUIVALENT ALIASES 0x%lx and 0x%lx in file %s\n", old_addr, addr, mpnt->vm_file ? (char *)mpnt->vm_file->f_path.dentry->d_name.name : "(null)");
+--- a/arch/parisc/kernel/sys_parisc.c
++++ b/arch/parisc/kernel/sys_parisc.c
+@@ -45,7 +45,7 @@
+ static int get_offset(unsigned int last_mmap)
+ {
+-      return (last_mmap & (SHMLBA-1)) >> PAGE_SHIFT;
++      return (last_mmap & (SHM_COLOUR-1)) >> PAGE_SHIFT;
+ }
+ static unsigned long shared_align_offset(unsigned int last_mmap,
+@@ -57,8 +57,8 @@ static unsigned long shared_align_offset
+ static inline unsigned long COLOR_ALIGN(unsigned long addr,
+                        unsigned int last_mmap, unsigned long pgoff)
+ {
+-      unsigned long base = (addr+SHMLBA-1) & ~(SHMLBA-1);
+-      unsigned long off  = (SHMLBA-1) &
++      unsigned long base = (addr+SHM_COLOUR-1) & ~(SHM_COLOUR-1);
++      unsigned long off  = (SHM_COLOUR-1) &
+               (shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT);
+       return base + off;
+@@ -101,7 +101,7 @@ unsigned long arch_get_unmapped_area(str
+       if (flags & MAP_FIXED) {
+               if ((flags & MAP_SHARED) && last_mmap &&
+                   (addr - shared_align_offset(last_mmap, pgoff))
+-                              & (SHMLBA - 1))
++                              & (SHM_COLOUR - 1))
+                       return -EINVAL;
+               goto found_addr;
+       }
+@@ -122,7 +122,7 @@ unsigned long arch_get_unmapped_area(str
+       info.length = len;
+       info.low_limit = mm->mmap_legacy_base;
+       info.high_limit = mmap_upper_limit();
+-      info.align_mask = last_mmap ? (PAGE_MASK & (SHMLBA - 1)) : 0;
++      info.align_mask = last_mmap ? (PAGE_MASK & (SHM_COLOUR - 1)) : 0;
+       info.align_offset = shared_align_offset(last_mmap, pgoff);
+       addr = vm_unmapped_area(&info);
+@@ -161,7 +161,7 @@ arch_get_unmapped_area_topdown(struct fi
+       if (flags & MAP_FIXED) {
+               if ((flags & MAP_SHARED) && last_mmap &&
+                   (addr - shared_align_offset(last_mmap, pgoff))
+-                      & (SHMLBA - 1))
++                      & (SHM_COLOUR - 1))
+                       return -EINVAL;
+               goto found_addr;
+       }
+@@ -182,7 +182,7 @@ arch_get_unmapped_area_topdown(struct fi
+       info.length = len;
+       info.low_limit = PAGE_SIZE;
+       info.high_limit = mm->mmap_base;
+-      info.align_mask = last_mmap ? (PAGE_MASK & (SHMLBA - 1)) : 0;
++      info.align_mask = last_mmap ? (PAGE_MASK & (SHM_COLOUR - 1)) : 0;
+       info.align_offset = shared_align_offset(last_mmap, pgoff);
+       addr = vm_unmapped_area(&info);
+       if (!(addr & ~PAGE_MASK))
diff --git a/queue-3.14/parisc-fix-epoll_pwait-syscall-on-compat-kernel.patch b/queue-3.14/parisc-fix-epoll_pwait-syscall-on-compat-kernel.patch
new file mode 100644 (file)
index 0000000..50251cb
--- /dev/null
@@ -0,0 +1,30 @@
+From ab3e55b119c9653b19ea4edffb86f04db867ac98 Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Sun, 13 Apr 2014 00:03:55 +0200
+Subject: parisc: fix epoll_pwait syscall on compat kernel
+
+From: Helge Deller <deller@gmx.de>
+
+commit ab3e55b119c9653b19ea4edffb86f04db867ac98 upstream.
+
+This bug was detected with the libio-epoll-perl debian package where the
+test case IO-Ppoll-compat.t failed.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/parisc/kernel/syscall_table.S |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/parisc/kernel/syscall_table.S
++++ b/arch/parisc/kernel/syscall_table.S
+@@ -392,7 +392,7 @@
+       ENTRY_COMP(vmsplice)
+       ENTRY_COMP(move_pages)          /* 295 */
+       ENTRY_SAME(getcpu)
+-      ENTRY_SAME(epoll_pwait)
++      ENTRY_COMP(epoll_pwait)
+       ENTRY_COMP(statfs64)
+       ENTRY_COMP(fstatfs64)
+       ENTRY_COMP(kexec_load)          /* 300 */
diff --git a/queue-3.14/parisc-remove-_stk_lim_max-override.patch b/queue-3.14/parisc-remove-_stk_lim_max-override.patch
new file mode 100644 (file)
index 0000000..b06d794
--- /dev/null
@@ -0,0 +1,40 @@
+From e0d8898d76a785453bfaf6cd08b830a7d5189f78 Mon Sep 17 00:00:00 2001
+From: John David Anglin <dave.anglin@bell.net>
+Date: Sun, 27 Apr 2014 16:20:47 -0400
+Subject: parisc: remove _STK_LIM_MAX override
+
+From: John David Anglin <dave.anglin@bell.net>
+
+commit e0d8898d76a785453bfaf6cd08b830a7d5189f78 upstream.
+
+There are only a couple of architectures that override _STK_LIM_MAX to
+a non-infinity value. This changes the stack allocation semantics in
+subtle ways. For example, GNU make changes its stack allocation to the
+hard maximum defined by _STK_LIM_MAX. As a results, threads executed
+by processes running under make are allocated a stack size of
+_STK_LIM_MAX rather than a sensible default value. This causes various
+thread stress tests to fail when they can't muster more than about 50
+threads.
+
+The attached change implements the default behavior used by the
+majority of architectures.
+
+Signed-off-by: John David Anglin <dave.anglin@bell.net>
+Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/parisc/include/uapi/asm/resource.h |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/arch/parisc/include/uapi/asm/resource.h
++++ b/arch/parisc/include/uapi/asm/resource.h
+@@ -1,7 +1,6 @@
+ #ifndef _ASM_PARISC_RESOURCE_H
+ #define _ASM_PARISC_RESOURCE_H
+-#define _STK_LIM_MAX  10 * _STK_LIM
+ #include <asm-generic/resource.h>
+ #endif
index 28944993b456136f237a4af62a3448cabdfae9dc..b56bd69697f001b7536b712128b352cf713d2e27 100644 (file)
@@ -14,3 +14,9 @@ x86-preempt-fix-preemption-for-i386.patch
 tracepoint-do-not-waste-memory-on-mods-with-no-tracepoints.patch
 rbd-fix-error-paths-in-rbd_img_request_fill.patch
 drm-i915-restore-quirk_no_pch_pwm_enable.patch
+tick-common-fix-wrong-check-in-tick_check_replacement.patch
+tick-sched-don-t-call-update_wall_time-when-delta-is-lesser-than-tick_period.patch
+tick-sched-check-tick_nohz_enabled-in-tick_nohz_switch_to_nohz.patch
+parisc-change-value-of-shmlba-from-0x00400000-to-page_size.patch
+parisc-fix-epoll_pwait-syscall-on-compat-kernel.patch
+parisc-remove-_stk_lim_max-override.patch
diff --git a/queue-3.14/tick-common-fix-wrong-check-in-tick_check_replacement.patch b/queue-3.14/tick-common-fix-wrong-check-in-tick_check_replacement.patch
new file mode 100644 (file)
index 0000000..e92445e
--- /dev/null
@@ -0,0 +1,44 @@
+From 521c42990e9d561ed5ed9f501f07639d0512b3c9 Mon Sep 17 00:00:00 2001
+From: Viresh Kumar <viresh.kumar@linaro.org>
+Date: Tue, 15 Apr 2014 10:54:37 +0530
+Subject: tick-common: Fix wrong check in tick_check_replacement()
+
+From: Viresh Kumar <viresh.kumar@linaro.org>
+
+commit 521c42990e9d561ed5ed9f501f07639d0512b3c9 upstream.
+
+tick_check_replacement() returns if a replacement of clock_event_device is
+possible or not. It does this as the first check:
+
+       if (tick_check_percpu(curdev, newdev, smp_processor_id()))
+               return false;
+
+Thats wrong. tick_check_percpu() returns true when the device is
+useable. Check for false instead.
+
+[ tglx: Massaged changelog ]
+
+Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
+Cc: linaro-kernel@lists.linaro.org
+Cc: fweisbec@gmail.com
+Cc: Arvind.Chauhan@arm.com
+Cc: linaro-networking@linaro.org
+Link: http://lkml.kernel.org/r/486a02efe0246635aaba786e24b42d316438bf3b.1397537987.git.viresh.kumar@linaro.org
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/time/tick-common.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/time/tick-common.c
++++ b/kernel/time/tick-common.c
+@@ -276,7 +276,7 @@ static bool tick_check_preferred(struct
+ bool tick_check_replacement(struct clock_event_device *curdev,
+                           struct clock_event_device *newdev)
+ {
+-      if (tick_check_percpu(curdev, newdev, smp_processor_id()))
++      if (!tick_check_percpu(curdev, newdev, smp_processor_id()))
+               return false;
+       return tick_check_preferred(curdev, newdev);
diff --git a/queue-3.14/tick-sched-check-tick_nohz_enabled-in-tick_nohz_switch_to_nohz.patch b/queue-3.14/tick-sched-check-tick_nohz_enabled-in-tick_nohz_switch_to_nohz.patch
new file mode 100644 (file)
index 0000000..40797bf
--- /dev/null
@@ -0,0 +1,40 @@
+From 27630532ef5ead28b98cfe28d8f95222ef91c2b7 Mon Sep 17 00:00:00 2001
+From: Viresh Kumar <viresh.kumar@linaro.org>
+Date: Tue, 15 Apr 2014 10:54:41 +0530
+Subject: tick-sched: Check tick_nohz_enabled in tick_nohz_switch_to_nohz()
+
+From: Viresh Kumar <viresh.kumar@linaro.org>
+
+commit 27630532ef5ead28b98cfe28d8f95222ef91c2b7 upstream.
+
+Since commit d689fe222 (NOHZ: Check for nohz active instead of nohz
+enabled) the tick_nohz_switch_to_nohz() function returns because it
+checks for the tick_nohz_active flag. This can't be set, because the
+function itself sets it.
+
+Undo the change in tick_nohz_switch_to_nohz().
+
+Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
+Cc: linaro-kernel@lists.linaro.org
+Cc: fweisbec@gmail.com
+Cc: Arvind.Chauhan@arm.com
+Cc: linaro-networking@linaro.org
+Link: http://lkml.kernel.org/r/40939c05f2d65d781b92b20302b02243d0654224.1397537987.git.viresh.kumar@linaro.org
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/time/tick-sched.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/time/tick-sched.c
++++ b/kernel/time/tick-sched.c
+@@ -970,7 +970,7 @@ static void tick_nohz_switch_to_nohz(voi
+       struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
+       ktime_t next;
+-      if (!tick_nohz_active)
++      if (!tick_nohz_enabled)
+               return;
+       local_irq_disable();
diff --git a/queue-3.14/tick-sched-don-t-call-update_wall_time-when-delta-is-lesser-than-tick_period.patch b/queue-3.14/tick-sched-don-t-call-update_wall_time-when-delta-is-lesser-than-tick_period.patch
new file mode 100644 (file)
index 0000000..bfd377a
--- /dev/null
@@ -0,0 +1,48 @@
+From 03e6bdc5c4d0fc166bfd5d3cf749a5a0c1b5b1bd Mon Sep 17 00:00:00 2001
+From: Viresh Kumar <viresh.kumar@linaro.org>
+Date: Tue, 15 Apr 2014 10:54:40 +0530
+Subject: tick-sched: Don't call update_wall_time() when delta is lesser than tick_period
+
+From: Viresh Kumar <viresh.kumar@linaro.org>
+
+commit 03e6bdc5c4d0fc166bfd5d3cf749a5a0c1b5b1bd upstream.
+
+In tick_do_update_jiffies64() we are processing ticks only if delta is
+greater than tick_period. This is what we are supposed to do here and
+it broke a bit with this patch:
+
+commit 47a1b796 (tick/timekeeping: Call update_wall_time outside the
+jiffies lock)
+
+With above patch, we might end up calling update_wall_time() even if
+delta is found to be smaller that tick_period. Fix this by returning
+when the delta is less than tick period.
+
+[ tglx: Made it a 3 liner and massaged changelog ]
+
+Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
+Cc: linaro-kernel@lists.linaro.org
+Cc: fweisbec@gmail.com
+Cc: Arvind.Chauhan@arm.com
+Cc: linaro-networking@linaro.org
+Cc: John Stultz <john.stultz@linaro.org>
+Link: http://lkml.kernel.org/r/80afb18a494b0bd9710975bcc4de134ae323c74f.1397537987.git.viresh.kumar@linaro.org
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/time/tick-sched.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/kernel/time/tick-sched.c
++++ b/kernel/time/tick-sched.c
+@@ -84,6 +84,9 @@ static void tick_do_update_jiffies64(kti
+               /* Keep the tick_next_period variable up to date */
+               tick_next_period = ktime_add(last_jiffies_update, tick_period);
++      } else {
++              write_sequnlock(&jiffies_lock);
++              return;
+       }
+       write_sequnlock(&jiffies_lock);
+       update_wall_time();