--- /dev/null
+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))
--- /dev/null
+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 */
--- /dev/null
+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
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
--- /dev/null
+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);
--- /dev/null
+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();
--- /dev/null
+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();