From: Greg Kroah-Hartman Date: Wed, 9 Apr 2014 23:13:42 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.10.37~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a6701e549e52ac835b23b26f6953102ae4fa2a8;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: arm-7628-1-head.s-map-one-extra-section-for-the-atag-dtb-area.patch arm-7742-1-topology-export-cpu_topology.patch arm-7743-1-compressed-head.s-work-around-new-binutils-warning.patch arm-7791-1-a.out-remove-partial-a.out-support.patch arm-dts-imx51-babbage-fix-esdhc-cd-wp-properties.patch arm-footbridge-fix-vga-initialisation.patch arm-orion-set-eth-packet-size-csum-offload-limit.patch arm-pxa-prevent-pxa270-occasional-reboot-freezes.patch arm-u300-fix-ages-old-copy-paste-bug.patch arm-w90x900-fix-legacy-assembly-syntax.patch --- diff --git a/queue-3.4/arm-7628-1-head.s-map-one-extra-section-for-the-atag-dtb-area.patch b/queue-3.4/arm-7628-1-head.s-map-one-extra-section-for-the-atag-dtb-area.patch new file mode 100644 index 00000000000..b5f2e928f0a --- /dev/null +++ b/queue-3.4/arm-7628-1-head.s-map-one-extra-section-for-the-atag-dtb-area.patch @@ -0,0 +1,52 @@ +From 6f16f4998f98e42e3f2dedf663cfb691ff0324af Mon Sep 17 00:00:00 2001 +From: Nicolas Pitre +Date: Tue, 15 Jan 2013 18:51:32 +0100 +Subject: ARM: 7628/1: head.S: map one extra section for the ATAG/DTB area + +From: Nicolas Pitre + +commit 6f16f4998f98e42e3f2dedf663cfb691ff0324af upstream. + +We currently use a temporary 1MB section aligned to a 1MB boundary for +mapping the provided device tree until the final page table is created. +However, if the device tree happens to cross that 1MB boundary, the end +of it remains unmapped and the kernel crashes when it attempts to access +it. Given no restriction on the location of that DTB, it could end up +with only a few bytes mapped at the end of a section. + +Solve this issue by mapping two consecutive sections. + +Signed-off-by: Nicolas Pitre +Tested-by: Sascha Hauer +Tested-by: Tomasz Figa +Signed-off-by: Russell King +[bwh: Backported to 3.2: + - Adjust context + - The mapping is not conditional; drop the 'ne' suffixes] +Signed-off-by: Ben Hutchings +[yangyl: Backported to 3.4: Adjust context] +Signed-off-by: Yang Yingliang +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/kernel/head.S | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/arm/kernel/head.S ++++ b/arch/arm/kernel/head.S +@@ -254,6 +254,7 @@ __create_page_tables: + /* + * Then map boot params address in r2 or the first 1MB (2MB with LPAE) + * of ram if boot params address is not specified. ++ * We map 2 sections in case the ATAGs/DTB crosses a section boundary. + */ + mov r0, r2, lsr #SECTION_SHIFT + movs r0, r0, lsl #SECTION_SHIFT +@@ -262,6 +263,8 @@ __create_page_tables: + add r3, r3, #PAGE_OFFSET + add r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER) + orr r6, r7, r0 ++ str r6, [r3], #1 << PMD_ORDER ++ add r6, r6, #1 << SECTION_SHIFT + str r6, [r3] + + #ifdef CONFIG_DEBUG_LL diff --git a/queue-3.4/arm-7742-1-topology-export-cpu_topology.patch b/queue-3.4/arm-7742-1-topology-export-cpu_topology.patch new file mode 100644 index 00000000000..75651dacc3e --- /dev/null +++ b/queue-3.4/arm-7742-1-topology-export-cpu_topology.patch @@ -0,0 +1,49 @@ +From 17db9f4f88581b83762735eba9c64f06a85ac069 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 31 May 2013 22:49:22 +0100 +Subject: ARM: 7742/1: topology: export cpu_topology + +From: Arnd Bergmann + +commit 92bdd3f5eba299b33c2f4407977d6fa2e2a6a0da upstream. + +The cpu_topology symbol is required by any driver using the topology +interfaces, which leads to a couple of build errors: + +ERROR: "cpu_topology" [drivers/net/ethernet/sfc/sfc.ko] undefined! +ERROR: "cpu_topology" [drivers/cpufreq/arm_big_little.ko] undefined! +ERROR: "cpu_topology" [drivers/block/mtip32xx/mtip32xx.ko] undefined! + +The obvious solution is to export this symbol. + +Signed-off-by: Arnd Bergmann +Acked-by: Will Deacon +Cc: Nicolas Pitre +Cc: Vincent Guittot +Signed-off-by: Russell King +Signed-off-by: Ben Hutchings +Cc: Yang Yingliang +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/topology.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm/kernel/topology.c ++++ b/arch/arm/kernel/topology.c +@@ -13,6 +13,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -42,6 +43,7 @@ + #define MPIDR_LEVEL2_SHIFT 16 + + struct cputopo_arm cpu_topology[NR_CPUS]; ++EXPORT_SYMBOL_GPL(cpu_topology); + + const struct cpumask *cpu_coregroup_mask(int cpu) + { diff --git a/queue-3.4/arm-7743-1-compressed-head.s-work-around-new-binutils-warning.patch b/queue-3.4/arm-7743-1-compressed-head.s-work-around-new-binutils-warning.patch new file mode 100644 index 00000000000..1b9288e173e --- /dev/null +++ b/queue-3.4/arm-7743-1-compressed-head.s-work-around-new-binutils-warning.patch @@ -0,0 +1,105 @@ +From 5b9ca6b68cfa7fffcf9db83dbca90bbcad57d040 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 31 May 2013 22:50:47 +0100 +Subject: ARM: 7743/1: compressed/head.S: work around new binutils warning + +From: Arnd Bergmann + +commit da94a829305f1c217cfdf6771cb1faca0917e3b9 upstream. + +In August 2012, Matthew Gretton-Dann checked a change into binutils +labelled "Error on obsolete & warn on deprecated registers", apparently as +part of ARMv8 support. Apparently, this was supposed to emit the message +"Warning: This coprocessor register access is deprecated in ARMv8" when +using certain mcr/mrc instructions and building for ARMv8. Unfortunately, +the message that is actually emitted appears to be '(null)', which is +less helpful in comparison. + +Even more unfortunately, this is biting us on every single kernel +build with a new gas, because arch/arm/boot/compressed/head.S and some +other files in that directory are built with -march=all since kernel +commit 80cec14a8 "[ARM] Add -march=all to assembly file build in +arch/arm/boot/compressed" back in v2.6.28. + +This patch reverts Russell's nice solution and instead marks the head.S +file to be built for armv7-a, which fortunately lets us build all +instructions in that file without warnings even on the broken binutils. + +Without this patch, building anything results in: + +arch/arm/boot/compressed/head.S: Assembler messages: +arch/arm/boot/compressed/head.S:565: Warning: (null) +arch/arm/boot/compressed/head.S:676: Warning: (null) +arch/arm/boot/compressed/head.S:698: Warning: (null) +arch/arm/boot/compressed/head.S:722: Warning: (null) +arch/arm/boot/compressed/head.S:726: Warning: (null) +arch/arm/boot/compressed/head.S:957: Warning: (null) +arch/arm/boot/compressed/head.S:996: Warning: (null) +arch/arm/boot/compressed/head.S:997: Warning: (null) +arch/arm/boot/compressed/head.S:1027: Warning: (null) +arch/arm/boot/compressed/head.S:1035: Warning: (null) +arch/arm/boot/compressed/head.S:1046: Warning: (null) +arch/arm/boot/compressed/head.S:1060: Warning: (null) +arch/arm/boot/compressed/head.S:1092: Warning: (null) +arch/arm/boot/compressed/head.S:1094: Warning: (null) +arch/arm/boot/compressed/head.S:1095: Warning: (null) +arch/arm/boot/compressed/head.S:1102: Warning: (null) +arch/arm/boot/compressed/head.S:1134: Warning: (null) + +Signed-off-by: Arnd Bergmann +Cc: Matthew Gretton-Dann +Signed-off-by: Russell King +[bwh: Backported to 3.2: + - Adjust context + - Remove definition of asflags-y as it is now empty] +Signed-off-by: Ben Hutchings +Cc: Yang Yingliang +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/compressed/Makefile | 1 - + arch/arm/boot/compressed/head-sa1100.S | 1 + + arch/arm/boot/compressed/head-shark.S | 1 + + arch/arm/boot/compressed/head.S | 1 + + 4 files changed, 3 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/compressed/Makefile ++++ b/arch/arm/boot/compressed/Makefile +@@ -126,7 +126,6 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CF + endif + + ccflags-y := -fpic -fno-builtin -I$(obj) +-asflags-y := -Wa,-march=all + + # Supply kernel BSS size to the decompressor via a linker symbol. + KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \ +--- a/arch/arm/boot/compressed/head-sa1100.S ++++ b/arch/arm/boot/compressed/head-sa1100.S +@@ -11,6 +11,7 @@ + #include + + .section ".start", "ax" ++ .arch armv4 + + __SA1100_start: + +--- a/arch/arm/boot/compressed/head-shark.S ++++ b/arch/arm/boot/compressed/head-shark.S +@@ -18,6 +18,7 @@ + + .section ".start", "ax" + ++ .arch armv4 + b __beginning + + __ofw_data: .long 0 @ the number of memory blocks +--- a/arch/arm/boot/compressed/head.S ++++ b/arch/arm/boot/compressed/head.S +@@ -10,6 +10,7 @@ + */ + #include + ++ .arch armv7-a + /* + * Debugging stuff + * diff --git a/queue-3.4/arm-7791-1-a.out-remove-partial-a.out-support.patch b/queue-3.4/arm-7791-1-a.out-remove-partial-a.out-support.patch new file mode 100644 index 00000000000..5e96d0cc418 --- /dev/null +++ b/queue-3.4/arm-7791-1-a.out-remove-partial-a.out-support.patch @@ -0,0 +1,173 @@ +From acfdd4b1f7590d02e9bae3b73bdbbc4a31b05d38 Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Thu, 25 Jul 2013 11:44:48 +0100 +Subject: ARM: 7791/1: a.out: remove partial a.out support + +From: Will Deacon + +commit acfdd4b1f7590d02e9bae3b73bdbbc4a31b05d38 upstream. + +a.out support on ARM requires that argc, argv and envp are passed in +r0-r2 respectively, which requires hacking load_aout_binary to +prevent argc being clobbered by the return code. Whilst mainline kernels +do set the registers up in start_thread, the aout loader has never +carried the hack in mainline. + +Initialising the registers in this way actually goes against the libc +expectations for ELF binaries, where argc, argv and envp are passed on +the stack, with r0 being used to hold a pointer to an exit function for +cleaning up after the dynamic linker if required. If the pointer is +NULL, then it is ignored. When execing an ELF binary, Linux currently +zeroes r0, then sets it to argc and then finally clobbers it with the +return value of the execve syscall, so we actually end up with: + + r0 = 0 + stack[0] = argc + r1 = stack[1] = argv + r2 = stack[2] = envp + +libc treats r1 and r2 as undefined. The clobbering of r0 by sys_execve +works for user-spawned threads, but when executing an ELF binary from a +kernel thread (via call_usermodehelper), the execve is performed on the +ret_from_fork path, which restores r0 from the saved pt_regs, resulting +in argc being presented to the C library. This has horrible consequences +when the application exits, since we have an exit function registered +using argc, resulting in a jump to hyperspace. + +This patch solves the problem by removing the partial a.out support from +arch/arm/ altogether. + +Cc: Ashish Sangwan +Signed-off-by: Will Deacon +Signed-off-by: Russell King +[bwh: Backported to 3.2: + - Adjust context + - Adjust uapi filename] +Signed-off-by: Ben Hutchings +[yangyl: Backported to 3.4: Adjust context] +Signed-off-by: Yang Yingliang +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/Kconfig | 1 + arch/arm/include/asm/a.out-core.h | 45 -------------------------------------- + arch/arm/include/asm/a.out.h | 34 ---------------------------- + arch/arm/include/asm/processor.h | 4 --- + 4 files changed, 84 deletions(-) + delete mode 100644 arch/arm/include/asm/a.out-core.h + delete mode 100644 arch/arm/include/asm/a.out.h + +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1,7 +1,6 @@ + config ARM + bool + default y +- select HAVE_AOUT + select HAVE_DMA_API_DEBUG + select HAVE_IDE if PCI || ISA || PCMCIA + select HAVE_MEMBLOCK +--- a/arch/arm/include/asm/a.out-core.h ++++ /dev/null +@@ -1,45 +0,0 @@ +-/* a.out coredump register dumper +- * +- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. +- * Written by David Howells (dhowells@redhat.com) +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public Licence +- * as published by the Free Software Foundation; either version +- * 2 of the Licence, or (at your option) any later version. +- */ +- +-#ifndef _ASM_A_OUT_CORE_H +-#define _ASM_A_OUT_CORE_H +- +-#ifdef __KERNEL__ +- +-#include +-#include +- +-/* +- * fill in the user structure for an a.out core dump +- */ +-static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) +-{ +- struct task_struct *tsk = current; +- +- dump->magic = CMAGIC; +- dump->start_code = tsk->mm->start_code; +- dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1); +- +- dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT; +- dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT; +- dump->u_ssize = 0; +- +- memset(dump->u_debugreg, 0, sizeof(dump->u_debugreg)); +- +- if (dump->start_stack < 0x04000000) +- dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT; +- +- dump->regs = *regs; +- dump->u_fpvalid = dump_fpu (regs, &dump->u_fp); +-} +- +-#endif /* __KERNEL__ */ +-#endif /* _ASM_A_OUT_CORE_H */ +--- a/arch/arm/include/asm/a.out.h ++++ /dev/null +@@ -1,34 +0,0 @@ +-#ifndef __ARM_A_OUT_H__ +-#define __ARM_A_OUT_H__ +- +-#include +-#include +- +-struct exec +-{ +- __u32 a_info; /* Use macros N_MAGIC, etc for access */ +- __u32 a_text; /* length of text, in bytes */ +- __u32 a_data; /* length of data, in bytes */ +- __u32 a_bss; /* length of uninitialized data area for file, in bytes */ +- __u32 a_syms; /* length of symbol table data in file, in bytes */ +- __u32 a_entry; /* start address */ +- __u32 a_trsize; /* length of relocation info for text, in bytes */ +- __u32 a_drsize; /* length of relocation info for data, in bytes */ +-}; +- +-/* +- * This is always the same +- */ +-#define N_TXTADDR(a) (0x00008000) +- +-#define N_TRSIZE(a) ((a).a_trsize) +-#define N_DRSIZE(a) ((a).a_drsize) +-#define N_SYMSIZE(a) ((a).a_syms) +- +-#define M_ARM 103 +- +-#ifndef LIBRARY_START_TEXT +-#define LIBRARY_START_TEXT (0x00c00000) +-#endif +- +-#endif /* __A_OUT_GNU_H__ */ +--- a/arch/arm/include/asm/processor.h ++++ b/arch/arm/include/asm/processor.h +@@ -54,7 +54,6 @@ struct thread_struct { + + #define start_thread(regs,pc,sp) \ + ({ \ +- unsigned long *stack = (unsigned long *)sp; \ + memset(regs->uregs, 0, sizeof(regs->uregs)); \ + if (current->personality & ADDR_LIMIT_32BIT) \ + regs->ARM_cpsr = USR_MODE; \ +@@ -65,9 +64,6 @@ struct thread_struct { + regs->ARM_cpsr |= PSR_ENDSTATE; \ + regs->ARM_pc = pc & ~1; /* pc */ \ + regs->ARM_sp = sp; /* sp */ \ +- regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ +- regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ +- regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ + nommu_start_thread(regs); \ + }) + diff --git a/queue-3.4/arm-dts-imx51-babbage-fix-esdhc-cd-wp-properties.patch b/queue-3.4/arm-dts-imx51-babbage-fix-esdhc-cd-wp-properties.patch new file mode 100644 index 00000000000..2220ed74f71 --- /dev/null +++ b/queue-3.4/arm-dts-imx51-babbage-fix-esdhc-cd-wp-properties.patch @@ -0,0 +1,62 @@ +From a3aaee9f1070ccec4bf551af5b47b6037a939e1c Mon Sep 17 00:00:00 2001 +From: Shawn Guo +Date: Wed, 22 Aug 2012 21:46:39 +0800 +Subject: ARM: dts: imx51-babbage: fix esdhc cd/wp properties + +From: Shawn Guo + +commit a46d2619d7180bda12bad2bf15bbd0731dfc2dcf upstream. + +The binding doc and dts use properties "fsl,{cd,wp}-internal" while +esdhc driver uses "fsl,{cd,wp}-controller". Fix binding doc and dts +to get them match driver code. + +Reported-by: Chris Ball +Signed-off-by: Shawn Guo +Acked-by: Chris Ball +Signed-off-by: Ben Hutchings +Cc: Yang Yingliang +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 8 ++++---- + arch/arm/boot/dts/imx51-babbage.dts | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt ++++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt +@@ -10,8 +10,8 @@ Required properties: + + Optional properties: + - fsl,card-wired : Indicate the card is wired to host permanently +-- fsl,cd-internal : Indicate to use controller internal card detection +-- fsl,wp-internal : Indicate to use controller internal write protection ++- fsl,cd-controller : Indicate to use controller internal card detection ++- fsl,wp-controller : Indicate to use controller internal write protection + - cd-gpios : Specify GPIOs for card detection + - wp-gpios : Specify GPIOs for write protection + +@@ -21,8 +21,8 @@ esdhc@70004000 { + compatible = "fsl,imx51-esdhc"; + reg = <0x70004000 0x4000>; + interrupts = <1>; +- fsl,cd-internal; +- fsl,wp-internal; ++ fsl,cd-controller; ++ fsl,wp-controller; + }; + + esdhc@70008000 { +--- a/arch/arm/boot/dts/imx51-babbage.dts ++++ b/arch/arm/boot/dts/imx51-babbage.dts +@@ -29,8 +29,8 @@ + aips@70000000 { /* aips-1 */ + spba@70000000 { + esdhc@70004000 { /* ESDHC1 */ +- fsl,cd-internal; +- fsl,wp-internal; ++ fsl,cd-controller; ++ fsl,wp-controller; + status = "okay"; + }; + diff --git a/queue-3.4/arm-footbridge-fix-vga-initialisation.patch b/queue-3.4/arm-footbridge-fix-vga-initialisation.patch new file mode 100644 index 00000000000..b390ed5d316 --- /dev/null +++ b/queue-3.4/arm-footbridge-fix-vga-initialisation.patch @@ -0,0 +1,80 @@ +From cb80debe9515e8b7385ed1d3d602a08465b9fa3e Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Thu, 28 Nov 2013 21:55:41 +0000 +Subject: ARM: footbridge: fix VGA initialisation + +From: Russell King + +commit 43659222e7a0113912ed02f6b2231550b3e471ac upstream. + +It's no good setting vga_base after the VGA console has been +initialised, because if we do that we get this: + +Unable to handle kernel paging request at virtual address 000b8000 +pgd = c0004000 +[000b8000] *pgd=07ffc831, *pte=00000000, *ppte=00000000 +0Internal error: Oops: 5017 [#1] ARM +Modules linked in: +CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.0+ #49 +task: c03e2974 ti: c03d8000 task.ti: c03d8000 +PC is at vgacon_startup+0x258/0x39c +LR is at request_resource+0x10/0x1c +pc : [] lr : [] psr: 60000053 +sp : c03d9f68 ip : 000b8000 fp : c03d9f8c +r10: 000055aa r9 : 4401a103 r8 : ffffaa55 +r7 : c03e357c r6 : c051b460 r5 : 000000ff r4 : 000c0000 +r3 : 000b8000 r2 : c03e0514 r1 : 00000000 r0 : c0304971 +Flags: nZCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment kernel + +which is an access to the 0xb8000 without the PCI offset required to +make it work. + +Fixes: cc22b4c18540 ("ARM: set vga memory base at run-time") +Signed-off-by: Russell King +[bwh: Backported to 3.2: adjust context] +Signed-off-by: Ben Hutchings +Cc: Yang Yingliang +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-footbridge/common.c | 3 +++ + arch/arm/mach-footbridge/dc21285.c | 2 -- + 2 files changed, 3 insertions(+), 2 deletions(-) + +--- a/arch/arm/mach-footbridge/common.c ++++ b/arch/arm/mach-footbridge/common.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include