From: Greg Kroah-Hartman Date: Tue, 25 Feb 2014 16:19:21 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.10.33~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f2c92fde4473edf28551e5e7613e63023b189c05;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: 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 --- diff --git a/queue-3.4/arm-7953-1-mm-ensure-tlb-invalidation-is-complete-before-enabling-mmu.patch b/queue-3.4/arm-7953-1-mm-ensure-tlb-invalidation-is-complete-before-enabling-mmu.patch new file mode 100644 index 00000000000..6ef03305266 --- /dev/null +++ b/queue-3.4/arm-7953-1-mm-ensure-tlb-invalidation-is-complete-before-enabling-mmu.patch @@ -0,0 +1,66 @@ +From bae0ca2bc550d1ec6a118fb8f2696f18c4da3d8e Mon Sep 17 00:00:00 2001 +From: Will Deacon +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 + +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 +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + 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 diff --git a/queue-3.4/arm-7957-1-add-dsb-after-icache-flush-in-__flush_icache_all.patch b/queue-3.4/arm-7957-1-add-dsb-after-icache-flush-in-__flush_icache_all.patch new file mode 100644 index 00000000000..014598a22d8 --- /dev/null +++ b/queue-3.4/arm-7957-1-add-dsb-after-icache-flush-in-__flush_icache_all.patch @@ -0,0 +1,30 @@ +From 39544ac9df20f73e49fc6b9ac19ff533388c82c0 Mon Sep 17 00:00:00 2001 +From: Vinayak Kale +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 + +commit 39544ac9df20f73e49fc6b9ac19ff533388c82c0 upstream. + +Add DSB after icache flush to complete the cache maintenance operation. + +Signed-off-by: Vinayak Kale +Acked-by: Catalin Marinas +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + 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() diff --git a/queue-3.4/avr32-fix-missing-module.h-causing-build-failure-in-mimc200-fram.c.patch b/queue-3.4/avr32-fix-missing-module.h-causing-build-failure-in-mimc200-fram.c.patch new file mode 100644 index 00000000000..c45df4ae75b --- /dev/null +++ b/queue-3.4/avr32-fix-missing-module.h-causing-build-failure-in-mimc200-fram.c.patch @@ -0,0 +1,38 @@ +From 5745d6a41a4f4aec29e2ccd591c6fb09ed73a955 Mon Sep 17 00:00:00 2001 +From: Paul Gortmaker +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 + +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 +Cc: Haavard Skinnemoen +Cc: Hans-Christian Egtvedt +Signed-off-by: Paul Gortmaker +Signed-off-by: Sergei Trofimovich +Acked-by: Hans-Christian Egtvedt +Signed-off-by: Greg Kroah-Hartman + +--- + 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 ++#include + #include + #include + #include diff --git a/queue-3.4/avr32-makefile-add-d__linux__-flag-for-gcc-4.4.7-use.patch b/queue-3.4/avr32-makefile-add-d__linux__-flag-for-gcc-4.4.7-use.patch new file mode 100644 index 00000000000..ec721bdcc8f --- /dev/null +++ b/queue-3.4/avr32-makefile-add-d__linux__-flag-for-gcc-4.4.7-use.patch @@ -0,0 +1,48 @@ +From 8d80390cfc9434d5aa4fb9e5f9768a66b30cb8a6 Mon Sep 17 00:00:00 2001 +From: Chen Gang +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 + +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 +Acked-by: Hans-Christian Egtvedt +Signed-off-by: Greg Kroah-Hartman + +--- + 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 diff --git a/queue-3.4/series b/queue-3.4/series index fd99263ed81..dcd9d8ac0cb 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -1,3 +1,7 @@ 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