--- /dev/null
+From ac01810c9d2814238f08a227062e66a35a0e1ea2 Mon Sep 17 00:00:00 2001
+From: Laxman Dewangan <ldewangan@nvidia.com>
+Date: Mon, 25 Nov 2013 19:39:47 +0530
+Subject: irq: Enable all irqs unconditionally in irq_resume
+
+From: Laxman Dewangan <ldewangan@nvidia.com>
+
+commit ac01810c9d2814238f08a227062e66a35a0e1ea2 upstream.
+
+When the system enters suspend, it disables all interrupts in
+suspend_device_irqs(), including the interrupts marked EARLY_RESUME.
+
+On the resume side things are different. The EARLY_RESUME interrupts
+are reenabled in sys_core_ops->resume and the non EARLY_RESUME
+interrupts are reenabled in the normal system resume path.
+
+When suspend_noirq() failed or suspend is aborted for any other
+reason, we might omit the resume side call to sys_core_ops->resume()
+and therefor the interrupts marked EARLY_RESUME are not reenabled and
+stay disabled forever.
+
+To solve this, enable all irqs unconditionally in irq_resume()
+regardless whether interrupts marked EARLY_RESUMEhave been already
+enabled or not.
+
+This might try to reenable already enabled interrupts in the non
+failure case, but the only affected platform is XEN and it has been
+confirmed that it does not cause any side effects.
+
+[ tglx: Massaged changelog. ]
+
+Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
+Acked-by-and-tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Acked-by: Heiko Stuebner <heiko@sntech.de>
+Reviewed-by: Pavel Machek <pavel@ucw.cz>
+Cc: <ian.campbell@citrix.com>
+Cc: <rjw@rjwysocki.net>
+Cc: <len.brown@intel.com>
+Cc: <gregkh@linuxfoundation.org>
+Link: http://lkml.kernel.org/r/1385388587-16442-1-git-send-email-ldewangan@nvidia.com
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/irq/pm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/irq/pm.c
++++ b/kernel/irq/pm.c
+@@ -50,7 +50,7 @@ static void resume_irqs(bool want_early)
+ bool is_early = desc->action &&
+ desc->action->flags & IRQF_EARLY_RESUME;
+
+- if (is_early != want_early)
++ if (!is_early && want_early)
+ continue;
+
+ raw_spin_lock_irqsave(&desc->lock, flags);
--- /dev/null
+From d3f7d56a7a4671d395e8af87071068a195257bf6 Mon Sep 17 00:00:00 2001
+From: Shawn Landden <shawn@churchofgit.com>
+Date: Sun, 24 Nov 2013 22:36:28 -0800
+Subject: net: update consumers of MSG_MORE to recognize MSG_SENDPAGE_NOTLAST
+
+From: Shawn Landden <shawn@churchofgit.com>
+
+commit d3f7d56a7a4671d395e8af87071068a195257bf6 upstream.
+
+Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once)
+added an internal flag MSG_SENDPAGE_NOTLAST, similar to
+MSG_MORE.
+
+algif_hash, algif_skcipher, and udp used MSG_MORE from tcp_sendpages()
+and need to see the new flag as identical to MSG_MORE.
+
+This fixes sendfile() on AF_ALG.
+
+v3: also fix udp
+
+Cc: Tom Herbert <therbert@google.com>
+Cc: Eric Dumazet <eric.dumazet@gmail.com>
+Cc: David S. Miller <davem@davemloft.net>
+Reported-and-tested-by: Shawn Landden <shawnlandden@gmail.com>
+Original-patch: Richard Weinberger <richard@nod.at>
+Signed-off-by: Shawn Landden <shawn@churchofgit.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ crypto/algif_hash.c | 3 +++
+ crypto/algif_skcipher.c | 3 +++
+ net/ipv4/udp.c | 3 +++
+ 3 files changed, 9 insertions(+)
+
+--- a/crypto/algif_hash.c
++++ b/crypto/algif_hash.c
+@@ -117,6 +117,9 @@ static ssize_t hash_sendpage(struct sock
+ if (flags & MSG_SENDPAGE_NOTLAST)
+ flags |= MSG_MORE;
+
++ if (flags & MSG_SENDPAGE_NOTLAST)
++ flags |= MSG_MORE;
++
+ lock_sock(sk);
+ sg_init_table(ctx->sgl.sg, 1);
+ sg_set_page(ctx->sgl.sg, page, size, offset);
+--- a/crypto/algif_skcipher.c
++++ b/crypto/algif_skcipher.c
+@@ -381,6 +381,9 @@ static ssize_t skcipher_sendpage(struct
+ if (flags & MSG_SENDPAGE_NOTLAST)
+ flags |= MSG_MORE;
+
++ if (flags & MSG_SENDPAGE_NOTLAST)
++ flags |= MSG_MORE;
++
+ lock_sock(sk);
+ if (!ctx->more && ctx->used)
+ goto unlock;
+--- a/net/ipv4/udp.c
++++ b/net/ipv4/udp.c
+@@ -1073,6 +1073,9 @@ int udp_sendpage(struct sock *sk, struct
+ if (flags & MSG_SENDPAGE_NOTLAST)
+ flags |= MSG_MORE;
+
++ if (flags & MSG_SENDPAGE_NOTLAST)
++ flags |= MSG_MORE;
++
+ if (!up->pending) {
+ struct msghdr msg = { .msg_flags = flags|MSG_MORE };
+
--- /dev/null
+From c97cf606e43b85a6cf158b810375dd77312024db Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+Date: Tue, 19 Nov 2013 16:34:14 -0500
+Subject: NFSv4: Update list of irrecoverable errors on DELEGRETURN
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+commit c97cf606e43b85a6cf158b810375dd77312024db upstream.
+
+If the DELEGRETURN errors out with something like NFS4ERR_BAD_STATEID
+then there is no recovery possible. Just quit without returning an error.
+
+Also, note that the client must not assume that the NFSv4 lease has been
+renewed when it sees an error on DELEGRETURN.
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/nfs4proc.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -4401,11 +4401,17 @@ static void nfs4_delegreturn_done(struct
+ return;
+
+ switch (task->tk_status) {
+- case -NFS4ERR_STALE_STATEID:
+- case -NFS4ERR_EXPIRED:
+ case 0:
+ renew_lease(data->res.server, data->timestamp);
+ break;
++ case -NFS4ERR_ADMIN_REVOKED:
++ case -NFS4ERR_DELEG_REVOKED:
++ case -NFS4ERR_BAD_STATEID:
++ case -NFS4ERR_OLD_STATEID:
++ case -NFS4ERR_STALE_STATEID:
++ case -NFS4ERR_EXPIRED:
++ task->tk_status = 0;
++ break;
+ default:
+ if (nfs4_async_handle_error(task, data->res.server, NULL) ==
+ -EAGAIN) {
--- /dev/null
+From 0576da2c08e3d332f1b0653030d28ab804585ab6 Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Wed, 20 Nov 2013 23:07:42 +0100
+Subject: parisc: fix mmap(MAP_FIXED|MAP_SHARED) to already mmapped address
+
+From: Helge Deller <deller@gmx.de>
+
+commit 0576da2c08e3d332f1b0653030d28ab804585ab6 upstream.
+
+locale-gen on Debian showed a strange problem on parisc:
+mmap2(NULL, 536870912, PROT_NONE, MAP_SHARED, 3, 0) = 0x42a54000
+mmap2(0x42a54000, 103860, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 3, 0) = -1 EINVAL (Invalid argument)
+
+Basically it was just trying to re-mmap() a file at the same address
+which it was given by a previous mmap() call. But this remapping failed
+with EINVAL.
+
+The problem is, that when MAP_FIXED and MAP_SHARED flags were used, we didn't
+included the mapping-based offset when we verified the alignment of the given
+fixed address against the offset which we calculated it in the previous call.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/parisc/kernel/sys_parisc.c | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+--- a/arch/parisc/kernel/sys_parisc.c
++++ b/arch/parisc/kernel/sys_parisc.c
+@@ -61,8 +61,15 @@ static int get_offset(struct address_spa
+ return (unsigned long) mapping >> 8;
+ }
+
+-static unsigned long get_shared_area(struct address_space *mapping,
+- unsigned long addr, unsigned long len, unsigned long pgoff)
++static unsigned long shared_align_offset(struct file *filp, unsigned long pgoff)
++{
++ struct address_space *mapping = filp ? filp->f_mapping : NULL;
++
++ return (get_offset(mapping) + pgoff) << PAGE_SHIFT;
++}
++
++static unsigned long get_shared_area(struct file *filp, unsigned long addr,
++ unsigned long len, unsigned long pgoff)
+ {
+ struct vm_unmapped_area_info info;
+
+@@ -71,7 +78,7 @@ static unsigned long get_shared_area(str
+ info.low_limit = PAGE_ALIGN(addr);
+ info.high_limit = TASK_SIZE;
+ info.align_mask = PAGE_MASK & (SHMLBA - 1);
+- info.align_offset = (get_offset(mapping) + pgoff) << PAGE_SHIFT;
++ info.align_offset = shared_align_offset(filp, pgoff);
+ return vm_unmapped_area(&info);
+ }
+
+@@ -82,20 +89,18 @@ unsigned long arch_get_unmapped_area(str
+ return -ENOMEM;
+ if (flags & MAP_FIXED) {
+ if ((flags & MAP_SHARED) &&
+- (addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))
++ (addr - shared_align_offset(filp, pgoff)) & (SHMLBA - 1))
+ return -EINVAL;
+ return addr;
+ }
+ if (!addr)
+ addr = TASK_UNMAPPED_BASE;
+
+- if (filp) {
+- addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
+- } else if(flags & MAP_SHARED) {
+- addr = get_shared_area(NULL, addr, len, pgoff);
+- } else {
++ if (filp || (flags & MAP_SHARED))
++ addr = get_shared_area(filp, addr, len, pgoff);
++ else
+ addr = get_unshared_area(addr, len);
+- }
++
+ return addr;
+ }
+
--- /dev/null
+From 1aeef303b5d9e243c41d5b80f8bb059366514a10 Mon Sep 17 00:00:00 2001
+From: Liu Gang <Gang.Liu@freescale.com>
+Date: Fri, 22 Nov 2013 16:12:40 +0800
+Subject: powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536
+
+From: Liu Gang <Gang.Liu@freescale.com>
+
+commit 1aeef303b5d9e243c41d5b80f8bb059366514a10 upstream.
+
+For MPC8572/MPC8536, the status of GPIOs defined as output
+cannot be determined by reading GPDAT register, so the code
+use shadow data register instead. But the code may give the
+wrong status of GPIOs defined as input under some scenarios:
+
+1. If some pins were configured as inputs and were asserted
+high before booting the kernel, the shadow data has been
+initialized with those pin values.
+2. Some pins have been configured as output first and have
+been set to the high value, then reconfigured as input.
+
+The above cases will make the shadow data for those input
+pins to be set to high. Then reading the pin status will
+always return high even if the actual pin status is low.
+
+The code should eliminate the effects of the shadow data to
+the input pins, and the status of those pins should be
+read directly from GPDAT.
+
+Acked-by: Scott Wood <scottwood@freescale.com>
+Acked-by: Anatolij Gustschin <agust@denx.de>
+Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpio/gpio-mpc8xxx.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpio/gpio-mpc8xxx.c
++++ b/drivers/gpio/gpio-mpc8xxx.c
+@@ -69,10 +69,14 @@ static int mpc8572_gpio_get(struct gpio_
+ u32 val;
+ struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
+ struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
++ u32 out_mask, out_shadow;
+
+- val = in_be32(mm->regs + GPIO_DAT) & ~in_be32(mm->regs + GPIO_DIR);
++ out_mask = in_be32(mm->regs + GPIO_DIR);
+
+- return (val | mpc8xxx_gc->data) & mpc8xxx_gpio2mask(gpio);
++ val = in_be32(mm->regs + GPIO_DAT) & ~out_mask;
++ out_shadow = mpc8xxx_gc->data & out_mask;
++
++ return (val | out_shadow) & mpc8xxx_gpio2mask(gpio);
+ }
+
+ static int mpc8xxx_gpio_get(struct gpio_chip *gc, unsigned int gpio)
scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch
scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch
net-smc91-fix-crash-regression-on-the-versatile.patch
+nfsv4-update-list-of-irrecoverable-errors-on-delegreturn.patch
+time-fix-1ns-tick-drift-w-generic_time_vsyscall_old.patch
+powerpc-gpio-fix-the-wrong-gpio-input-data-on-mpc8572-mpc8536.patch
+parisc-fix-mmap-map_fixed-map_shared-to-already-mmapped-address.patch
+xen-gnttab-leave-lazy-mmu-mode-in-the-case-of-a-m2p-override-failure.patch
+update-of-blkg_stat-and-blkg_rwstat-may-happen-in-bh-context.patch
+irq-enable-all-irqs-unconditionally-in-irq_resume.patch
+net-update-consumers-of-msg_more-to-recognize-msg_sendpage_notlast.patch
--- /dev/null
+From 4be77398ac9d948773116b6be4a3c91b3d6ea18c Mon Sep 17 00:00:00 2001
+From: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Date: Fri, 22 Nov 2013 11:44:51 -0800
+Subject: time: Fix 1ns/tick drift w/ GENERIC_TIME_VSYSCALL_OLD
+
+From: Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+commit 4be77398ac9d948773116b6be4a3c91b3d6ea18c upstream.
+
+Since commit 1e75fa8be9f (time: Condense timekeeper.xtime
+into xtime_sec - merged in v3.6), there has been an problem
+with the error accounting in the timekeeping code, such that
+when truncating to nanoseconds, we round up to the next nsec,
+but the balancing adjustment to the ntp_error value was dropped.
+
+This causes 1ns per tick drift forward of the clock.
+
+In 3.7, this logic was isolated to only GENERIC_TIME_VSYSCALL_OLD
+architectures (s390, ia64, powerpc).
+
+The fix is simply to balance the accounting and to subtract the
+added nanosecond from ntp_error. This allows the internal long-term
+clock steering to keep the clock accurate.
+
+While this fix removes the regression added in 1e75fa8be9f, the
+ideal solution is to move away from GENERIC_TIME_VSYSCALL_OLD
+and use the new VSYSCALL method, which avoids entirely the
+nanosecond granular rounding, and the resulting short-term clock
+adjustment oscillation needed to keep long term accurate time.
+
+[ jstultz: Many thanks to Martin for his efforts identifying this
+ subtle bug, and providing the fix. ]
+
+Originally-from: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Cc: Tony Luck <tony.luck@intel.com>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Andy Lutomirski <luto@amacapital.net>
+Cc: Paul Turner <pjt@google.com>
+Cc: Steven Rostedt <rostedt@goodmis.org>
+Cc: Richard Cochran <richardcochran@gmail.com>
+Cc: Prarit Bhargava <prarit@redhat.com>
+Cc: Fenghua Yu <fenghua.yu@intel.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/1385149491-20307-1-git-send-email-john.stultz@linaro.org
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/time/timekeeping.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/time/timekeeping.c
++++ b/kernel/time/timekeeping.c
+@@ -1328,7 +1328,7 @@ static inline void old_vsyscall_fixup(st
+ tk->xtime_nsec -= remainder;
+ tk->xtime_nsec += 1ULL << tk->shift;
+ tk->ntp_error += remainder << tk->ntp_error_shift;
+-
++ tk->ntp_error -= (1ULL << tk->shift) << tk->ntp_error_shift;
+ }
+ #else
+ #define old_vsyscall_fixup(tk)
--- /dev/null
+From 2c575026fae6e63771bd2a4c1d407214a8096a89 Mon Sep 17 00:00:00 2001
+From: Hong Zhiguo <zhiguohong@tencent.com>
+Date: Wed, 20 Nov 2013 10:35:05 -0700
+Subject: Update of blkg_stat and blkg_rwstat may happen in bh context.
+ While u64_stats_fetch_retry is only preempt_disable on 32bit UP system. This
+ is not enough to avoid preemption by bh and may read strange 64 bit value.
+
+From: Hong Zhiguo <zhiguohong@tencent.com>
+
+commit 2c575026fae6e63771bd2a4c1d407214a8096a89 upstream.
+
+Signed-off-by: Hong Zhiguo <zhiguohong@tencent.com>
+Acked-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ block/blk-cgroup.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/block/blk-cgroup.h
++++ b/block/blk-cgroup.h
+@@ -399,9 +399,9 @@ static inline uint64_t blkg_stat_read(st
+ uint64_t v;
+
+ do {
+- start = u64_stats_fetch_begin(&stat->syncp);
++ start = u64_stats_fetch_begin_bh(&stat->syncp);
+ v = stat->cnt;
+- } while (u64_stats_fetch_retry(&stat->syncp, start));
++ } while (u64_stats_fetch_retry_bh(&stat->syncp, start));
+
+ return v;
+ }
+@@ -467,9 +467,9 @@ static inline struct blkg_rwstat blkg_rw
+ struct blkg_rwstat tmp;
+
+ do {
+- start = u64_stats_fetch_begin(&rwstat->syncp);
++ start = u64_stats_fetch_begin_bh(&rwstat->syncp);
+ tmp = *rwstat;
+- } while (u64_stats_fetch_retry(&rwstat->syncp, start));
++ } while (u64_stats_fetch_retry_bh(&rwstat->syncp, start));
+
+ return tmp;
+ }
--- /dev/null
+From 14883a75ec76b44759385fb12629f4a0f1aef4e3 Mon Sep 17 00:00:00 2001
+From: Matt Wilson <msw@amazon.com>
+Date: Wed, 20 Nov 2013 12:11:35 -0800
+Subject: xen/gnttab: leave lazy MMU mode in the case of a m2p override failure
+
+From: Matt Wilson <msw@amazon.com>
+
+commit 14883a75ec76b44759385fb12629f4a0f1aef4e3 upstream.
+
+Commit f62805f1 introduced a bug where lazy MMU mode isn't exited if a
+m2p_add/remove_override call fails.
+
+Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Reviewed-by: David Vrabel <david.vrabel@citrix.com>
+Reviewed-by: Anthony Liguori <aliguori@amazon.com>
+Signed-off-by: Matt Wilson <msw@amazon.com>
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/xen/grant-table.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/xen/grant-table.c
++++ b/drivers/xen/grant-table.c
+@@ -920,9 +920,10 @@ int gnttab_map_refs(struct gnttab_map_gr
+ ret = m2p_add_override(mfn, pages[i], kmap_ops ?
+ &kmap_ops[i] : NULL);
+ if (ret)
+- return ret;
++ goto out;
+ }
+
++ out:
+ if (lazy)
+ arch_leave_lazy_mmu_mode();
+
+@@ -953,9 +954,10 @@ int gnttab_unmap_refs(struct gnttab_unma
+ ret = m2p_remove_override(pages[i], kmap_ops ?
+ &kmap_ops[i] : NULL);
+ if (ret)
+- return ret;
++ goto out;
+ }
+
++ out:
+ if (lazy)
+ arch_leave_lazy_mmu_mode();
+