--- /dev/null
+From bae0ca2bc550d1ec6a118fb8f2696f18c4da3d8e Mon Sep 17 00:00:00 2001
+From: Will Deacon <will.deacon@arm.com>
+Date: Fri, 7 Feb 2014 19:12:20 +0100
+Subject: ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU
+
+From: Will Deacon <will.deacon@arm.com>
+
+commit bae0ca2bc550d1ec6a118fb8f2696f18c4da3d8e upstream.
+
+During __v{6,7}_setup, we invalidate the TLBs since we are about to
+enable the MMU on return to head.S. Unfortunately, without a subsequent
+dsb instruction, the invalidation is not guaranteed to have completed by
+the time we write to the sctlr, potentially exposing us to junk/stale
+translations cached in the TLB.
+
+This patch reworks the init functions so that the dsb used to ensure
+completion of cache/predictor maintenance is also used to ensure
+completion of the TLB invalidation.
+
+Reported-by: Albin Tonnerre <Albin.Tonnerre@arm.com>
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mm/proc-v6.S | 3 ++-
+ arch/arm/mm/proc-v7.S | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/mm/proc-v6.S
++++ b/arch/arm/mm/proc-v6.S
+@@ -202,7 +202,6 @@ __v6_setup:
+ mcr p15, 0, r0, c7, c14, 0 @ clean+invalidate D cache
+ mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
+ mcr p15, 0, r0, c7, c15, 0 @ clean+invalidate cache
+- mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
+ #ifdef CONFIG_MMU
+ mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs
+ mcr p15, 0, r0, c2, c0, 2 @ TTB control register
+@@ -212,6 +211,8 @@ __v6_setup:
+ ALT_UP(orr r8, r8, #TTB_FLAGS_UP)
+ mcr p15, 0, r8, c2, c0, 1 @ load TTB1
+ #endif /* CONFIG_MMU */
++ mcr p15, 0, r0, c7, c10, 4 @ drain write buffer and
++ @ complete invalidations
+ adr r5, v6_crval
+ ldmia r5, {r5, r6}
+ #ifdef CONFIG_CPU_ENDIAN_BE8
+--- a/arch/arm/mm/proc-v7.S
++++ b/arch/arm/mm/proc-v7.S
+@@ -246,7 +246,6 @@ __v7_setup:
+
+ 3: mov r10, #0
+ mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate
+- dsb
+ #ifdef CONFIG_MMU
+ mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs
+ v7_ttb_setup r10, r4, r8, r5 @ TTBCR, TTBRx setup
+@@ -255,6 +254,7 @@ __v7_setup:
+ mcr p15, 0, r5, c10, c2, 0 @ write PRRR
+ mcr p15, 0, r6, c10, c2, 1 @ write NMRR
+ #endif
++ dsb @ Complete invalidations
+ #ifndef CONFIG_ARM_THUMBEE
+ mrc p15, 0, r0, c0, c1, 0 @ read ID_PFR0 for ThumbEE
+ and r0, r0, #(0xf << 12) @ ThumbEE enabled field
--- /dev/null
+From 39544ac9df20f73e49fc6b9ac19ff533388c82c0 Mon Sep 17 00:00:00 2001
+From: Vinayak Kale <vkale@apm.com>
+Date: Wed, 12 Feb 2014 07:30:01 +0100
+Subject: ARM: 7957/1: add DSB after icache flush in __flush_icache_all()
+
+From: Vinayak Kale <vkale@apm.com>
+
+commit 39544ac9df20f73e49fc6b9ac19ff533388c82c0 upstream.
+
+Add DSB after icache flush to complete the cache maintenance operation.
+
+Signed-off-by: Vinayak Kale <vkale@apm.com>
+Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/include/asm/cacheflush.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/include/asm/cacheflush.h
++++ b/arch/arm/include/asm/cacheflush.h
+@@ -202,6 +202,7 @@ extern void copy_to_user_page(struct vm_
+ static inline void __flush_icache_all(void)
+ {
+ __flush_icache_preferred();
++ dsb();
+ }
+
+ #define flush_cache_all() __cpuc_flush_kern_all()
--- /dev/null
+From 5745d6a41a4f4aec29e2ccd591c6fb09ed73a955 Mon Sep 17 00:00:00 2001
+From: Paul Gortmaker <paul.gortmaker@windriver.com>
+Date: Fri, 10 Jan 2014 09:29:39 -0500
+Subject: avr32: fix missing module.h causing build failure in mimc200/fram.c
+
+From: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+commit 5745d6a41a4f4aec29e2ccd591c6fb09ed73a955 upstream.
+
+Causing this:
+
+In file included from arch/avr32/boards/mimc200/fram.c:13:
+include/linux/miscdevice.h:51: error: field 'list' has incomplete type
+include/linux/miscdevice.h:55: error: expected specifier-qualifier-list before 'mode_t'
+arch/avr32/boards/mimc200/fram.c:42: error: 'THIS_MODULE' undeclared here (not in a function)
+
+Reported-by: Fengguang Wu <fengguang.wu@intel.com>
+Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
+Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/avr32/boards/mimc200/fram.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/avr32/boards/mimc200/fram.c
++++ b/arch/avr32/boards/mimc200/fram.c
+@@ -11,6 +11,7 @@
+ #define FRAM_VERSION "1.0"
+
+ #include <linux/miscdevice.h>
++#include <linux/module.h>
+ #include <linux/proc_fs.h>
+ #include <linux/mm.h>
+ #include <linux/io.h>
--- /dev/null
+From 8d80390cfc9434d5aa4fb9e5f9768a66b30cb8a6 Mon Sep 17 00:00:00 2001
+From: Chen Gang <gang.chen.5i5j@gmail.com>
+Date: Sat, 1 Feb 2014 20:35:54 +0800
+Subject: avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use
+
+From: Chen Gang <gang.chen.5i5j@gmail.com>
+
+commit 8d80390cfc9434d5aa4fb9e5f9768a66b30cb8a6 upstream.
+
+For avr32 cross compiler, do not define '__linux__' internally, so it
+will cause issue with allmodconfig.
+
+The related error:
+
+ CC [M] fs/coda/psdev.o
+ In file included from include/linux/coda.h:64,
+ from fs/coda/psdev.c:45:
+ include/uapi/linux/coda.h:221: error: expected specifier-qualifier-list before 'u_quad_t'
+
+The related toolchain version (which only download, not re-compile):
+
+ [root@gchen linux-next]# /upstream/toolchain/download/avr32-gnu-toolchain-linux_x86/bin/avr32-gcc -v
+ Using built-in specs.
+ Target: avr32
+ Configured with: /data2/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/src/gcc/configure --target=avr32 --host=i686-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-languages=c,c++ --disable-nls --disable-libssp --disable-libstdcxx-pch --with-dwarf2 --enable-version-specific-runtime-libs --disable-shared --enable-doc --with-mpfr-lib=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/lib --with-mpfr-include=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/include --with-gmp=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --with-mpc=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-__cxa_atexit --disable-shared --with-newlib --with-pkgversion=AVR_32_bit_GNU_Toolchain_3.4.2_435 --with-bugurl=http://www
+.atmel.com/avr
+ Thread model: single
+ gcc version 4.4.7 (AVR_32_bit_GNU_Toolchain_3.4.2_435)
+
+Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
+Acked-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/avr32/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/avr32/Makefile
++++ b/arch/avr32/Makefile
+@@ -11,7 +11,7 @@ all: uImage vmlinux.elf
+
+ KBUILD_DEFCONFIG := atstk1002_defconfig
+
+-KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
++KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic -D__linux__
+ KBUILD_AFLAGS += -mrelax -mno-pic
+ KBUILD_CFLAGS_MODULE += -mno-relax
+ LDFLAGS_vmlinux += --relax
ext4-don-t-try-to-modify-s_flags-if-the-the-file-system-is-read-only.patch
ext4-fix-online-resize-with-a-non-standard-blocks-per-group-setting.patch
ext4-don-t-leave-i_crtime.tv_sec-uninitialized.patch
+arm-7953-1-mm-ensure-tlb-invalidation-is-complete-before-enabling-mmu.patch
+arm-7957-1-add-dsb-after-icache-flush-in-__flush_icache_all.patch
+avr32-fix-missing-module.h-causing-build-failure-in-mimc200-fram.c.patch
+avr32-makefile-add-d__linux__-flag-for-gcc-4.4.7-use.patch