--- /dev/null
+From fa2ec3ea10bd377f9d55772b1dab65178425a1a2 Mon Sep 17 00:00:00 2001
+From: Colin Cross <ccross@android.com>
+Date: Wed, 18 Jun 2014 21:10:09 +0100
+Subject: arm64: implement TASK_SIZE_OF
+
+From: Colin Cross <ccross@android.com>
+
+commit fa2ec3ea10bd377f9d55772b1dab65178425a1a2 upstream.
+
+include/linux/sched.h implements TASK_SIZE_OF as TASK_SIZE if it
+is not set by the architecture headers. TASK_SIZE uses the
+current task to determine the size of the virtual address space.
+On a 64-bit kernel this will cause reading /proc/pid/pagemap of a
+64-bit process from a 32-bit process to return EOF when it reads
+past 0xffffffff.
+
+Implement TASK_SIZE_OF exactly the same as TASK_SIZE with
+test_tsk_thread_flag instead of test_thread_flag.
+
+Signed-off-by: Colin Cross <ccross@android.com>
+Acked-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/include/asm/memory.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm64/include/asm/memory.h
++++ b/arch/arm64/include/asm/memory.h
+@@ -51,6 +51,8 @@
+ #define TASK_SIZE_32 UL(0x100000000)
+ #define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \
+ TASK_SIZE_32 : TASK_SIZE_64)
++#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \
++ TASK_SIZE_32 : TASK_SIZE_64)
+ #else
+ #define TASK_SIZE TASK_SIZE_64
+ #endif /* CONFIG_COMPAT */
--- /dev/null
+From 15ebb05248d025534773c9ef64915bd888f04e4b Mon Sep 17 00:00:00 2001
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Thu, 19 Jun 2014 21:52:23 +0000
+Subject: clk: spear3xx: Use proper control register offset
+
+From: Thomas Gleixner <tglx@linutronix.de>
+
+commit 15ebb05248d025534773c9ef64915bd888f04e4b upstream.
+
+The control register is at offset 0x10, not 0x0. This is wreckaged
+since commit 5df33a62c (SPEAr: Switch to common clock framework).
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Mike Turquette <mturquette@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clk/spear/spear3xx_clock.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/clk/spear/spear3xx_clock.c
++++ b/drivers/clk/spear/spear3xx_clock.c
+@@ -211,7 +211,7 @@ static inline void spear310_clk_init(voi
+ /* array of all spear 320 clock lookups */
+ #ifdef CONFIG_MACH_SPEAR320
+
+-#define SPEAR320_CONTROL_REG (soc_config_base + 0x0000)
++#define SPEAR320_CONTROL_REG (soc_config_base + 0x0010)
+ #define SPEAR320_EXT_CTRL_REG (soc_config_base + 0x0018)
+
+ #define SPEAR320_UARTX_PCLK_MASK 0x1
--- /dev/null
+From 5a90af67c2126fe1d04ebccc1f8177e6ca70d3a9 Mon Sep 17 00:00:00 2001
+From: Prabhakar Lad <prabhakar.csengg@gmail.com>
+Date: Tue, 8 Jul 2014 16:25:38 +0100
+Subject: cpufreq: Makefile: fix compilation for davinci platform
+
+From: Prabhakar Lad <prabhakar.csengg@gmail.com>
+
+commit 5a90af67c2126fe1d04ebccc1f8177e6ca70d3a9 upstream.
+
+Since commtit 8a7b1227e303 (cpufreq: davinci: move cpufreq driver to
+drivers/cpufreq) this added dependancy only for CONFIG_ARCH_DAVINCI_DA850
+where as davinci_cpufreq_init() call is used by all davinci platform.
+
+This patch fixes following build error:
+
+arch/arm/mach-davinci/built-in.o: In function `davinci_init_late':
+:(.init.text+0x928): undefined reference to `davinci_cpufreq_init'
+make: *** [vmlinux] Error 1
+
+Fixes: 8a7b1227e303 (cpufreq: davinci: move cpufreq driver to drivers/cpufreq)
+Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
+Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/cpufreq/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/cpufreq/Makefile
++++ b/drivers/cpufreq/Makefile
+@@ -50,7 +50,7 @@ obj-$(CONFIG_ARM_BIG_LITTLE_CPUFREQ) +=
+ # LITTLE drivers, so that it is probed last.
+ obj-$(CONFIG_ARM_DT_BL_CPUFREQ) += arm_big_little_dt.o
+
+-obj-$(CONFIG_ARCH_DAVINCI_DA850) += davinci-cpufreq.o
++obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o
+ obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o
+ obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += exynos-cpufreq.o
+ obj-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o
--- /dev/null
+From cfe82d4f45c7cc39332a2be7c4c1d3bf279bbd3d Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Date: Mon, 23 Jun 2014 19:41:05 +0300
+Subject: crypto: sha512_ssse3 - fix byte count to bit count conversion
+
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+
+commit cfe82d4f45c7cc39332a2be7c4c1d3bf279bbd3d upstream.
+
+Byte-to-bit-count computation is only partly converted to big-endian and is
+mixing in CPU-endian values. Problem was noticed by sparce with warning:
+
+ CHECK arch/x86/crypto/sha512_ssse3_glue.c
+arch/x86/crypto/sha512_ssse3_glue.c:144:19: warning: restricted __be64 degrades to integer
+arch/x86/crypto/sha512_ssse3_glue.c:144:17: warning: incorrect type in assignment (different base types)
+arch/x86/crypto/sha512_ssse3_glue.c:144:17: expected restricted __be64 <noident>
+arch/x86/crypto/sha512_ssse3_glue.c:144:17: got unsigned long long
+
+Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Acked-by: Tim Chen <tim.c.chen@linux.intel.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/crypto/sha512_ssse3_glue.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/crypto/sha512_ssse3_glue.c
++++ b/arch/x86/crypto/sha512_ssse3_glue.c
+@@ -141,7 +141,7 @@ static int sha512_ssse3_final(struct sha
+
+ /* save number of bits */
+ bits[1] = cpu_to_be64(sctx->count[0] << 3);
+- bits[0] = cpu_to_be64(sctx->count[1] << 3) | sctx->count[0] >> 61;
++ bits[0] = cpu_to_be64(sctx->count[1] << 3 | sctx->count[0] >> 61);
+
+ /* Pad out to 112 mod 128 and append length */
+ index = sctx->count[0] & 0x7f;
--- /dev/null
+From 10f1d5d111e8aed46a0f1179faf9a3cf422f689e Mon Sep 17 00:00:00 2001
+From: Joe Thornber <thornber@redhat.com>
+Date: Fri, 27 Jun 2014 15:29:04 -0400
+Subject: dm io: fix a race condition in the wake up code for sync_io
+
+From: Joe Thornber <thornber@redhat.com>
+
+commit 10f1d5d111e8aed46a0f1179faf9a3cf422f689e upstream.
+
+There's a race condition between the atomic_dec_and_test(&io->count)
+in dec_count() and the waking of the sync_io() thread. If the thread
+is spuriously woken immediately after the decrement it may exit,
+making the on stack io struct invalid, yet the dec_count could still
+be using it.
+
+Fix this race by using a completion in sync_io() and dec_count().
+
+Reported-by: Minfei Huang <huangminfei@ucloud.cn>
+Signed-off-by: Joe Thornber <thornber@redhat.com>
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Acked-by: Mikulas Patocka <mpatocka@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-io.c | 22 ++++++++--------------
+ 1 file changed, 8 insertions(+), 14 deletions(-)
+
+--- a/drivers/md/dm-io.c
++++ b/drivers/md/dm-io.c
+@@ -10,6 +10,7 @@
+ #include <linux/device-mapper.h>
+
+ #include <linux/bio.h>
++#include <linux/completion.h>
+ #include <linux/mempool.h>
+ #include <linux/module.h>
+ #include <linux/sched.h>
+@@ -34,7 +35,7 @@ struct dm_io_client {
+ struct io {
+ unsigned long error_bits;
+ atomic_t count;
+- struct task_struct *sleeper;
++ struct completion *wait;
+ struct dm_io_client *client;
+ io_notify_fn callback;
+ void *context;
+@@ -122,8 +123,8 @@ static void dec_count(struct io *io, uns
+ invalidate_kernel_vmap_range(io->vma_invalidate_address,
+ io->vma_invalidate_size);
+
+- if (io->sleeper)
+- wake_up_process(io->sleeper);
++ if (io->wait)
++ complete(io->wait);
+
+ else {
+ unsigned long r = io->error_bits;
+@@ -386,6 +387,7 @@ static int sync_io(struct dm_io_client *
+ */
+ volatile char io_[sizeof(struct io) + __alignof__(struct io) - 1];
+ struct io *io = (struct io *)PTR_ALIGN(&io_, __alignof__(struct io));
++ DECLARE_COMPLETION_ONSTACK(wait);
+
+ if (num_regions > 1 && (rw & RW_MASK) != WRITE) {
+ WARN_ON(1);
+@@ -394,7 +396,7 @@ static int sync_io(struct dm_io_client *
+
+ io->error_bits = 0;
+ atomic_set(&io->count, 1); /* see dispatch_io() */
+- io->sleeper = current;
++ io->wait = &wait;
+ io->client = client;
+
+ io->vma_invalidate_address = dp->vma_invalidate_address;
+@@ -402,15 +404,7 @@ static int sync_io(struct dm_io_client *
+
+ dispatch_io(rw, num_regions, where, dp, io, 1);
+
+- while (1) {
+- set_current_state(TASK_UNINTERRUPTIBLE);
+-
+- if (!atomic_read(&io->count))
+- break;
+-
+- io_schedule();
+- }
+- set_current_state(TASK_RUNNING);
++ wait_for_completion_io(&wait);
+
+ if (error_bits)
+ *error_bits = io->error_bits;
+@@ -433,7 +427,7 @@ static int async_io(struct dm_io_client
+ io = mempool_alloc(client->pool, GFP_NOIO);
+ io->error_bits = 0;
+ atomic_set(&io->count, 1); /* see dispatch_io() */
+- io->sleeper = NULL;
++ io->wait = NULL;
+ io->client = client;
+ io->callback = fn;
+ io->context = context;
--- /dev/null
+From affb1aff300ddee54df307812b38f166e8a865ef Mon Sep 17 00:00:00 2001
+From: "K. Y. Srinivasan" <kys@microsoft.com>
+Date: Mon, 7 Jul 2014 16:34:24 -0700
+Subject: Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
+
+From: "K. Y. Srinivasan" <kys@microsoft.com>
+
+commit affb1aff300ddee54df307812b38f166e8a865ef upstream.
+
+Starting with Win8, we have implemented several optimizations to improve the
+scalability and performance of the VMBUS transport between the Host and the
+Guest. Some of the non-performance critical services cannot leverage these
+optimization since they only read and process one message at a time.
+Make adjustments to the callback dispatch code to account for the way
+non-performance critical drivers handle reading of the channel.
+
+Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hv/connection.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/hv/connection.c
++++ b/drivers/hv/connection.c
+@@ -304,9 +304,13 @@ static void process_chn_event(u32 relid)
+ */
+
+ do {
+- hv_begin_read(&channel->inbound);
++ if (read_state)
++ hv_begin_read(&channel->inbound);
+ channel->onchannel_callback(arg);
+- bytes_to_read = hv_end_read(&channel->inbound);
++ if (read_state)
++ bytes_to_read = hv_end_read(&channel->inbound);
++ else
++ bytes_to_read = 0;
+ } while (read_state && (bytes_to_read != 0));
+ } else {
+ pr_err("no channel callback for relid - %u\n", relid);
acpi-resources-only-reject-zero-length-resources-based-at-address-zero.patch
powerpc-perf-never-program-book3s-pmcs-with-values-0x80000000.patch
powerpc-perf-clear-mmcr2-when-enabling-pmu.patch
+cpufreq-makefile-fix-compilation-for-davinci-platform.patch
+crypto-sha512_ssse3-fix-byte-count-to-bit-count-conversion.patch
+arm64-implement-task_size_of.patch
+clk-spear3xx-use-proper-control-register-offset.patch
+drivers-hv-vmbus-fix-a-bug-in-the-channel-callback-dispatch-code.patch
+dm-io-fix-a-race-condition-in-the-wake-up-code-for-sync_io.patch