Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GIT bdd4c30bd51d9037bf66f22af3fb3e0ec7a69c51 commit 4985c32ee4241d1aba1beeac72294faa46aaff10 Author: Lan Tianyu <tianyu.lan@intel.com> Date: Wed Apr 30 15:46:33 2014 +0800 ACPI / processor: Fix failure of loading acpi-cpufreq driver According commit d640113fe (ACPI: processor: fix acpi_get_cpuid for UP processor), BIOS may not provide _MAT or MADT tables and acpi_get_apicid() always returns -1. For these cases, original code will pass apic_id with vaule of -1 to acpi_map_cpuid() and it will check the acpi_id. If acpi_id is equal to zero, ignores apic_id and return zero for CPU0. Commit b981513 (ACPI / scan: bail out early if failed to parse APIC ID for CPU) changed the behavior. Return ENODEV when find apic_id is less than zero after calling acpi_get_apicid(). This causes acpi-cpufreq driver fails to be loaded on some machines. This patch is to fix it. Fixes: b981513f806d (ACPI / scan: bail out early if failed to parse APIC ID for CPU) References: https://bugzilla.kernel.org/show_bug.cgi?id=73781 Cc: 3.14+ <stable@vger.kernel.org> # 3.14+ Reported-and-tested-by: KATO Hiroshi <katoh@mikage.ne.jp> Reported-and-tested-by: Stuart Foster <smf.linux@ntlworld.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> commit f2cc34cbaee306d8ea6ece0dcbbaf4c19444faf5 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 30 13:13:18 2014 +0200 MIPS: math-emu: Don't needlessly pass a struct around. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 5ffb0e1858aa21ae1f5ded65430cd5e248463890 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 30 11:09:44 2014 +0200 MIPS: math-emu: Reduce mipsMIPS bloat. Move microMIPS32_to_MIPS32() to a separate file which only gets built for mipsMIPS configurations; for other configurations the optimizer eleminates calls to microMIPS32_to_MIPS32(). Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit da217aaa16d053ee3f99ee81fbe8a90a29de8a9f Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 30 11:21:55 2014 +0200 MIPS: math-emu: Switch to using the MIPS rounding modes. Previously math-emu was using the IEEE-754 constants internally. These were differing by having the constants for rounding to +/- infinity switched, so a conversion was necessary. This would be entirely avoidable if the MIPS constants were used throughout, so get rid of the bloat. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 90e839aa32328adce70ecf7f8aecc8e329b18d45 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 30 01:17:19 2014 +0200 MIPS: math-emu: Nuke alternative names for IEEE-754 rounding modes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 4c6b4072da43920309df8dc4372bb61967b3e741 Author: Ralf Baechle <ralf@linux-mips.org> Date: Tue Apr 29 15:21:24 2014 +0200 MIPS: Sort out mm_isBranchInstr. mm_isBranchInstr() did reside in the math emu code even though it logically is separate and also is used outside the math emu code. In addition GCC 4.9.0 leaves the following unnnecessarily bloated function body for a non-microMIPS configuration: <mm_isBranchInstr>: 105c: afa50004 sw a1,4(sp) 1060: afa60008 sw a2,8(sp) 1064: afa7000c sw a3,12(sp) 1068: 03e00008 jr ra 106c: 00001021 move v0,zero which stores arguments that are never going to be used on the stack frame. Move mm_isBranchInstr() from cp1emu.c to branch.c, then split mm_isBranchInstr() into a __mm_isBranchInstr() core and a mm_isBranchInstr() wrapper inline function which only invokes __mm_isBranchInstr() on microMIPS configurations. This shaves off 112 bytes off the kernel and improves code flow a bit. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 1972ff35bcb83355e9829a54226451bd3419de5b Author: Ralf Baechle <ralf@linux-mips.org> Date: Tue Apr 29 01:49:24 2014 +0200 MIPS: Diable MIPS16/microMIPS crap for platforms not supporting these ASEs. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit be2ad4ab594139a09c7a71972752a53bdd5a9541 Author: Ralf Baechle <ralf@linux-mips.org> Date: Mon Apr 28 22:34:01 2014 +0200 MIPS: math-emu: Inline fpu_emulator_init_fpu() Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 205eed26395b15621ee27f535b142d4a30b5e2af Author: Ralf Baechle <ralf@linux-mips.org> Date: Sat Apr 26 01:49:14 2014 +0200 MIPS: math-emu: Cleanup coding style. o Only define variables in the outermost block o One empty line at most o Format comments as per CodingStyle o Update FSF address in licensing term comment o Spell FPU and MIPS in all capitals. o Remove ####-type of lines in comments. o Try to make things a bit most consistent between sp_*.c / dp_*.c files. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 716ead6c3d519e012e66b069a3ad70c4bfe5545f Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Apr 25 15:48:40 2014 +0200 MIPS: math-emu: Cleanup definition of structs describe sp/dp floats. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit d9d29fb7b97c41233036ea3f748e179b87765066 Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Apr 25 10:54:06 2014 +0200 MIPS: math-emu: Rename get_rounding() functions. There are two version of get_rounding(), one for single precision, one for double precision. Add a ieee754sp_ rsp. ieee754dp_ prefix for clarity. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit d8a30e453168fbf27366a0501561fab10a14483a Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Apr 25 03:19:57 2014 +0200 MIPS: math-emu: Get rid of the useless parts of exception handling. All it really did was throw a printk for no obvious reason. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 00102ccacf0b4ddedf920fd90936efc3bc28fdf8 Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Apr 25 01:52:46 2014 +0200 MIPS: math-emu: Move various objects into an ar library. ieee754d.o contains only debug code and dp_sqrt.o and sp_sqrt.o contain code which for MIPS I/II/III systems we don't want to link. Again the savings can be considerable for some systems: $ mips-linux-size --totals ieee754d.o dp_sqrt.o sp_sqrt.o text data bss dec hex filename 1624 0 0 1624 658 ieee754d.o 2016 0 0 2016 7e0 dp_sqrt.o 736 0 0 736 2e0 sp_sqrt.o 4376 0 0 4376 1118 (TOTALS) Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit ba72c2bff9799daf98b9e41474830b14ae4f0235 Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Apr 25 00:40:42 2014 +0200 MIPS: math-emu: Inline ieee754sp_issnan and ieee754dp_issnan. Shaves another 16 bytes off but more importantly avoids function calls. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 901615320d62a23f8fbf6066ea111bb919ae6d77 Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Apr 25 00:29:50 2014 +0200 MIPS: math-emu: Remove unused code. Shrinks the FPU emulator by 4528 bytes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 686c7831f0c9884682197f4963262251d0e59b72 Author: Ralf Baechle <ralf@linux-mips.org> Date: Tue Apr 22 17:11:01 2014 +0200 MIPS: math-emu: Remove unused ieee754sp_bestnan() and ieee754dp_bestnan(). Both are unused since lmo commit fdffbafbb38723618626c70ffdc6ff9175cdffa2 [Lots of FPU bug fixes from Kjeld Borch Egevang.] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit e9e6315f4c9e51dfba1d6d04a39a4d4203a18bd8 Author: Ralf Baechle <ralf@linux-mips.org> Date: Tue Apr 22 16:52:01 2014 +0200 MIPS: math-emu: Inline ieee754dp_finite and ieee754dp_finite(). Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 0efd4e5319ca8063c00d1c4abfe6af3976942006 Author: Ralf Baechle <ralf@linux-mips.org> Date: Tue Apr 22 16:33:07 2014 +0200 MIPS: math-emu: Eleminate duplicate definitions of identical macros. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit ebce471716566929d7741d3749465e662b8b7eb6 Author: Ralf Baechle <ralf@linux-mips.org> Date: Tue Apr 22 16:02:03 2014 +0200 MIPS: math-emu: Use SPSIGN() rather than DPSIGN() in ieee754sp_sub(). Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 4736f6c82064c48d8e8fda544fdb755dd2d6e3a2 Author: Ralf Baechle <ralf@linux-mips.org> Date: Tue Apr 22 15:51:55 2014 +0200 MIPS: math-emu: Replace DP_MBITS with DP_FBITS and SP_MBITS with SP_FBITS. Both were defined as 23 rsp. 52 though the mentissa is actually a bit more than the fraction. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit dd562af3b03c3ff4129c0b4ab962643935a5762c Author: Ralf Baechle <ralf@linux-mips.org> Date: Tue Apr 22 13:31:24 2014 +0200 MIPS: math-emu: Call ieee754di_xcpt, not ieee754si_xcpt in ieee754dp_cmp. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 28c80109e8ddd31a640786f119fd737fcc21d673 Author: Ralf Baechle <ralf@linux-mips.org> Date: Sun Apr 20 01:20:08 2014 +0200 MIPS: math-emu: Cleanup stdarg usage including apparently bogus comment. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit ed51751f2a8c5070050e567e26471a1851af0f6a Author: Ralf Baechle <ralf@linux-mips.org> Date: Sat Apr 19 23:01:34 2014 +0200 MIPS: math-emu: Remove #if 1 and dead code from its #else branch. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 7d377570c86ec27db24e118b6db7e23c0c7dee30 Author: Ralf Baechle <ralf@linux-mips.org> Date: Sat Apr 19 14:20:54 2014 +0200 MIPS: math-emu: Cleanup ieee754si_indef() / ieee754di_indef(). LONG_LONG_MAX is a symbol defined in <limits.h> which may not be available so better rely on something provided by a kernel header. While at it, turn these function-like macros into inline functions. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 47afdfb05fc1ada6dab0dce0b56318c46191237e Author: Ralf Baechle <ralf@linux-mips.org> Date: Sat Apr 19 14:03:37 2014 +0200 MIPS: math-emu: Convert debug printks to pr_debug getting. And another bunch of #ifdefs bite the dust. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 14806c44887eba0e08a82571a248bfa10d3d5ce0 Author: Ralf Baechle <ralf@linux-mips.org> Date: Sat Apr 19 13:18:08 2014 +0200 MIPS: math-emu: Get rid of unuable extended precision support. No usable functionality and nothig does ever define IEEE854_XP anyway. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit cd4f463270109c1af32de2f252500832de3f542a Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Apr 25 15:52:18 2014 +0200 MIPS: IP22: This platform may come with either MIPS III or MIPS IV CPUs. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit f5d9f0d858c453177b65bf5c1fc4dc2bac60ec78 Author: Ralf Baechle <ralf@linux-mips.org> Date: Sat Apr 19 13:11:37 2014 +0200 MIPS: math-emu: Remove most ifdefery. Most of these tests should be runtime tests. This also finally means that on a MIPS III systems MIPS IV opcodes are going to result in an exception as they're supposed to. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 77780b5f2b07ea492b116d4b6869763bb40691dc Author: Ralf Baechle <ralf@linux-mips.org> Date: Sat Apr 19 00:36:32 2014 +0200 MIPS: math-emu: Turn macros into functions where possible. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 9285476701712dd9c10fd5b0ac6b149d87a576cc Author: Ralf Baechle <ralf@linux-mips.org> Date: Sat Apr 19 00:15:40 2014 +0200 MIPS: math-emu: Harden ieee754int.h against multiple inclusion. The header file had no include guards; this only happened to work because the file only contains macro definitions and protypes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 25c5450fa5de273285c3ffece87e962432984b3f Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 11:00:12 2014 +0200 MIPS: math-emu: Reformat code according to coding style. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit ef3b11ea239ba6b5cc8ffc6abea54d9af27d4565 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 02:46:11 2014 +0200 MIPS: math-emu: Move all debug fs code to a separate file. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit c387da86eb331e1b60c97023d8d01c8a9adeb816 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 02:24:08 2014 +0200 MIPS: math-emu: Remove fine example of cargo cult programming. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 245d8273576c9abc0d8114eb8fe6899ea4f90674 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 02:09:53 2014 +0200 MIPS: math-emu: Header file weeding. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 06d38d9c0764cc47cdbee808f657726d90a66ea9 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 02:09:04 2014 +0200 MIPS: branch: Make inclusion of <asm/branch.h> safe. It was relying on other headers having been included before. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit b1bd59690e8a31303ae68f00ef88d25b27a3a18e Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 01:59:03 2014 +0200 MIPS: math-emu: Use helpers to manipulate CAUSEF_BD flag. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 9266256b4b17a59937171516e8e0990df74a4e96 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 01:52:32 2014 +0200 MIPS: branch: New helpers to modify branch delay slot flag in struct pt_regs Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit a7375a04fdd80fad105fc4394e2df1400f9547c2 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 01:31:11 2014 +0200 MIPS: math-emu: Get rid of typedefs. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit a43bbf810e9d5d07902b958085b3bb9da938f836 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 01:16:02 2014 +0200 MIPS: math-emu: Use English spelling of `constant' rather than Danish. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 4bed0701d3f817c5727a7f7c693e50cbd4f85854 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 00:47:59 2014 +0200 MIPS: math-emu: Mark exception handling functions as __cold. Optimizes the code flow and shaves of half a percent of the math-emu code size. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 2055b05e09d9afb04a1b0a65e2e092a53b52b14a Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 00:40:02 2014 +0200 MIPS: math-emu: Use __BITFIELD_FIELD to eleminate redundant definitions. Union _ieee754sp was even duplicated even though there are no endian dependencies in it all. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 3a8e0f1b5c26ec41dded7e3b870e6f079f130ee6 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 00:39:02 2014 +0200 MIPS: Move definition of __BITFIELD_FIELD to sharable header. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 96bc2c97ecf70f51b70fe201b27caff3f2543f11 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 00:31:51 2014 +0200 MIPS: inst.h: Rename BITFIELD_FIELD to __BITFIELD_FIELD. <uapi/asm/inst.h> is exported to userland so the macro name BITFIELD_FIELD pollutes the namespace. Prefix the name with __ fixes this. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 2c9b25c59796e9e5f01193d15dde501e9af59714 Author: Christian Engelmayer <cengelma@gmx.at> Date: Sat Feb 8 20:02:21 2014 +0100 drm: qxl: Remove unused device pointer Remove occurrences of unused struct qxl_device pointer in functions qxl_ttm_fault() and qxl_init_mem_type(). Detected by Coverity: CID 1019128, CID 1019129. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3723aaa123147dc777bf86d7104b8fc4b3b56ff3 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Apr 16 00:31:51 2014 +0200 MIPS: inst.h: Rename BITFIELD_FIELD to __BITFIELD_FIELD. <uapi/asm/inst.h> is exported to userland so the macro name BITFIELD_FIELD pollutes the namespace. Prefix the name with __ fixes this. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit d7f369636745788e64ac217f610dad381fb5431c Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Apr 11 18:28:00 2014 +0200 MIPS: Remove file missed when removing rm9k support a while ago. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit a68ce6507a4545f1fc83c035603234d7898a0dc3 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Thu Apr 3 22:24:01 2014 +0300 MIPS/loongson2_cpufreq: Fix CPU clock rate setting Loongson2 has been using (incorrectly) kHz for cpu_clk rate. This has been unnoticed, as loongson2_cpufreq was the only place where the rate was set/get. After commit 652ed95d5fa6074b3c4ea245deb0691f1acb6656 (cpufreq: introduce cpufreq_generic_get() routine) things however broke, and now loops_per_jiffy adjustments are incorrect (1000 times too long). The patch fixes this by changing cpu_clk rate to Hz. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: stable@vger.kernel.org Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: cpufreq@vger.kernel.org Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Patchwork: https://patchwork.linux-mips.org/patch/6678/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit d3b8acbdaaaebe2dd85d96f4c49b63bf6cc35896 Author: Paul Bolle <pebolle@tiscali.nl> Date: Thu Apr 3 11:10:20 2014 +0200 MIPS: Loongson: No need to select GENERIC_HARDIRQS_NO__DO_IRQ Commit 0e476d91244e ("MIPS: Loongson: Add Loongson-3 Kconfig options") added "select GENERIC_HARDIRQS_NO__DO_IRQ". But the Kconfig symbol GENERIC_HARDIRQS_NO__DO_IRQ was already removed in v2.6.38, so that select is a nop. Drop it. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/6677/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit fa3357d9e109352f42c231fc3833e10951845185 Author: Maciej W. Rozycki <macro@linux-mips.org> Date: Fri Apr 4 03:32:54 2014 +0100 MIPS: csum_partial.S CPU_DADDI_WORKAROUNDS bug fix This change reverts most of commit 60724ca59eda766a30be57aec6b49bc3e2bead91 [MIPS: IP checksums: Remove unncessary .set pseudos] that introduced warnings with the CPU_DADDI_WORKAROUNDS option set: arch/mips/lib/csum_partial.S: Assembler messages: arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" [...] arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3" [and so on, and so on...] The warnings are benign and good code is produced regardless because no macros that'd use the assembler's temporary register are involved, however the `.set noat' directives removed by the commit referred are crucial to guarantee this is still going to be the case after any changes in the future. Therefore they need to be brought back to place which this change does. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6686/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 8faecff616e986f26651fe7d762d3a7ef52a659c Author: Maciej W. Rozycki <macro@linux-mips.org> Date: Fri Apr 4 03:32:29 2014 +0100 MIPS: __strncpy_from_user_asm CPU_DADDI_WORKAROUNDS bug fix This corrects assembler warnings and broken code generated in __strncpy_from_user_asm: arch/mips/lib/strncpy_user.S: Assembler messages: arch/mips/lib/strncpy_user.S:52: Warning: Macro instruction expanded into multiple instructions in a branch delay slot with the CPU_DADDI_WORKAROUNDS option set. The function schedules delay slots manually where there is really no need to as GAS is happy to do it all itself, so undo it all and remove `.set noreorder'. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6685/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 32da28eff6b732b64d4ab4c3d511e7fe718ff3d9 Author: Maciej W. Rozycki <macro@linux-mips.org> Date: Tue Apr 1 00:57:28 2014 +0100 MIPS: __delay CPU_DADDI_WORKAROUNDS bug fix With CPU_DADDI_WORKAROUNDS enabled __delay assembles with a macro in a branch delay slot: {standard input}: Assembler messages: {standard input}:18: Warning: Macro instruction expanded into multiple instructions in a branch delay slot and broken code results: 0000000000000000 <__delay>: 0: 1480ffff bnez a0,0 <__delay> 4: 24010001 li at,1 8: 0081202f dsubu a0,a0,at c: 03e00008 jr ra 10: 00000000 nop 14: 00000000 nop Consequently the function loops indefinitely, showing up prominently as a hang in the delay loop calibration at bootstrap. This change corrects the problem by forcing the immediate 1 into a register while keeping code produced identical where CPU_DADDI_WORKAROUNDS is disabled. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6669/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 5da3e85530328543c66313d4dbbb3b426f838eb5 Author: Maciej W. Rozycki <macro@linux-mips.org> Date: Tue Apr 1 00:14:41 2014 +0100 MIPS: DEC/SNI: O32 wrapper stack switching fixes Commit 231a35d37293ab88d325a9cb94e5474c156282c0 [[MIPS] RM: Collected changes] broke DECstation support by introducing an incompatible copy of arch/mips/dec/prom/call_o32.S in arch/mips/fw/lib/, built unconditionally. The copy happens to land earlier of the two among the modules used in the link and is therefore chosen for the DECstation rather than the intended original. As a result random kernel data is corrupted because a pointer to the "%s" formatted output template is used as a temporary stack pointer rather than being passed down to prom_printf. This also explains why prom_printf still works, up to a point -- the next argument is the actual string to output so it works just fine as the output template until enough kernel data has been corrupted to cause a crash. This change adjusts the modified wrapper in arch/mips/fw/lib/call_o32.S to let callers request no stack switching by passing a null temporary stack pointer in $a1, reworks the DECstation callers to work with the updated interface and removes the old copy from arch/mips/dec/prom/call_o32.S. A few minor readability adjustments are included as well, most importantly O32_SZREG is now used throughout where applicable rather than hardcoded multiplies of 4 and $fp is used to access the argument save area as a more usual register to operate the stack with rather than $s0. Finally an update is made to the temporary stack space used by the SNI platform to guarantee 8-byte alignment as per o32 requirements. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6668/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit 54777d14e2ab5703c212ef0a9913db76d03f158d Author: Maciej W. Rozycki <macro@linux-mips.org> Date: Mon Mar 31 23:51:30 2014 +0100 MIPS: DEC: Bus error handler <asm/cpu-type.h> fixes Commit 69f24d1784b631b81a54eb57c49bf46536dd2382 [MIPS: Optimize current_cpu_type() for better code.] missed an update for two DECstation bus error support files that now do not build, this is a fix. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6667/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> commit c5a8cf7a7ad5ab022660015597380b554f4358e5 Author: Ralf Baechle <ralf@linux-mips.org> Date: Thu Apr 3 13:29:06 2014 +0200 MAINTAINERS: TURBOchannel: Update entry Add mailing list and patchwork URL so patches now have a defined path. Also add myself as a TURBOchannel maintainer. However Maciej is going to the the resident TURBOchannel guru. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: "Maciej W. Rozycki" <macro@linux-mips.org> commit 8c6dbb589be1fe83bd0d8db8681a37e9d2f17bd9 Author: Ralf Baechle <ralf@linux-mips.org> Date: Thu Apr 3 13:14:05 2014 +0200 Revert "MIPS: MT: proc: Add support for printing VPE and TC ids" Reverts commit 795038a6910937fa167d47f6f6183db0eb8fb706 because d6d3c9afaab47418ab2d7f874fb8aeac1f067104 provides the same functionality in a more generic way. Both patches applied however means that the VPE and TC IDs get printed twice currently. commit b87577b7c768683736eea28f70779e8c75b4df62 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 1 09:26:53 2014 +1000 drm: try harder to avoid regression when merging mode bits For QXL hw we really want the bits to be replaced as we change the preferred mode on the fly, and the same goes for virgl when I get to it, however the original fix for this seems to have caused a wierd regression on Intel G33 that in a stunning display of failure at opposition to his normal self, Daniel failed to diagnose. So we are left doing this, ugly ugly ugly ugly, Daniel you fixed that G33 yet?, ugly, ugly. Tested-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 28c015a9daabe4ed3aeb0ccf669a3f1c2b8b81d5 Author: Murali Karicheri <m-karicheri2@ti.com> Date: Thu Mar 20 22:08:32 2014 +0200 mtd: davinci-nand: disable subpage write for keystone-nand Sub page write doesn't work because of hw issue in controller found on Keystone SOCs. AEMIF controller is also used on DaVinci SOCs which don't seems to have any issue. So add "ti,keysone-nand" compatible to nand driver in order to set NAND_NO_SUBPAGE_WRITE option. Cc: Warner Losh <imp@bsdimp.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> commit 5a4e58bc693f04aa650219784e5e339e0db6b902 Author: Liu Ping Fan <kernelfans@gmail.com> Date: Thu Nov 21 10:17:54 2013 +0800 powerpc/mm: use macro PGTABLE_EADDR_SIZE instead of digital In case of extending the eaddr in future, use this macro PGTABLE_EADDR_SIZE to ease the maintenance of the code. Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> commit d5b35cffe3d3c2bc297b7c1fb997a6139de02e12 Author: Alistair Popple <alistair@popple.id.au> Date: Mon Feb 24 18:00:56 2014 +1100 ppc476: Enable a linker work around for IBM errata #46 This patch adds an option to enable a work around for an icache bug on 476 that can cause execution of stale instructions when falling through pages (IBM errata #46). It requires a recent version of binutils which supports the --ppc476-workaround option. The work around enables the appropriate linker options and ensures that all module output sections are aligned to 4K page boundaries. The work around is only required when building modules. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> commit e2c37d908336dc27c8b405f063c2a163124947fa Author: Alistair Popple <alistair@popple.id.au> Date: Thu Mar 6 14:52:28 2014 +1100 powerpc: Added PCI MSI support using the HSTA module The PPC476GTR SoC supports message signalled interrupts (MSI) by writing to special addresses within the High Speed Transfer Assist (HSTA) module. This patch adds support for PCI MSI with a new system device. The DMA window is also updated to allow access to the entire 42-bit address range to allow PCI devices write access to the HSTA module. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> commit 2a2c74b2efcb1a0ca3fdcb5fbb96ad8de6a29177 Author: Alistair Popple <alistair@popple.id.au> Date: Thu Mar 6 14:52:27 2014 +1100 IBM Akebono: Add the Akebono platform This patch adds support for the IBM Akebono board. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> commit 6b11930f726c1d8a7c054f7a293621bce4c684c5 Author: Alistair Popple <alistair@popple.id.au> Date: Thu Mar 6 14:52:26 2014 +1100 IBM Currituck: Clean up board specific code before adding Akebono code The IBM Akebono code uses the same initialisation functions as the earlier Currituck board. Rather than create a copy of this code for Akebono we will instead integrate support for it into the same file as the Currituck code. This patch just renames the board support file and updates the Makefile. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> commit 983d8a6dda1d477f3ffa23a04cc2fa4d66fd93d1 Author: Tony Breeds <tony@bakeyournoodle.com> Date: Wed Mar 12 19:17:07 2014 +1100 powerpc/le: Show the endianess of the LPAR under PowerVM. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> commit 9048e648bc22d7b59093f8ca1978c5767893aaa5 Author: Alexander Graf <agraf@suse.de> Date: Tue Apr 1 15:46:05 2014 +0200 powerpc: Use 64k io pages when we never see an HEA When we never get around to seeing an HEA ethernet adapter, there's no point in restricting ourselves to 4k IO page size. This speeds up IO maps when CONFIG_IBMEBUS is disabled. [ Updated the test to also lift the restriction on arch 2.07 (Power 8) which cannot have an HEA -- BenH ] Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> foo commit 605ee08ffa84e385e11ca85346d4fa7892aebc76 Author: Helge Deller <deller@gmx.de> Date: Wed Apr 30 23:26:02 2014 +0200 parisc,metag: Do not hardcode maximum userspace stack size This patch affects only architectures where the stack grows upwards (currently parisc and metag only). On those do not hardcode the maximum initial stack size to 1GB, but make it configurable via a config option. The main problem with the hardcoded stack size is, that we have two memory regions which grow upwards: stack and heap. To keep most of the memory available for heap in a flexmap memoy layout, it makes no sense to hard allocate up to 1GB of the memory for stack which can't be used as heap then. This patch makes the stack size configurable and uses 80MB as default value which has been in use during the last few years on parisc and which didn't showed any problems yet. Signed-off-by: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org Cc: linux-metag@vger.kernel.org Cc: John David Anglin <dave.anglin@bell.net> commit a8d22396302b7e4e5f0a594c1c1594388c29edaf Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed Apr 30 22:36:33 2014 +0200 PNP / ACPI: Do not return errors if _DIS or _SRS are not present The ACPI PNP subsystem returns errors from pnpacpi_set_resources() and pnpacpi_disable_resources() if the _SRS or _DIS methods are not present, respectively, but it should not do that, because those methods are optional. For this reason, modify pnpacpi_set_resources() and pnpacpi_disable_resources(), respectively, to ignore missing _SRS or _DIS. This problem has been uncovered by commit 202317a573b2 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace) and manifested itself by causing serial port suspend to fail on some systems. Fixes: 202317a573b2 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace) References: https://bugzilla.kernel.org/show_bug.cgi?id=74371 Reported-by: wxg4net <wxg4net@gmail.com> Reported-and-tested-by: <nonproffessional@gmail.com> Cc: 3.14+ <stable@vger.kernel.org> # 3.14+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> commit 22041fb05b66387b2854f789d1e1f55c7d07b4f4 Author: KY Srinivasan <kys@microsoft.com> Date: Wed Apr 30 11:58:25 2014 -0700 hyperv: Properly handle checksum offload Do checksum offload only if the client of the driver wants checksum to be offloaded. In V1 version of this patch, I addressed comments from Stephen Hemminger <stephen@networkplumber.org> and Eric Dumazet <eric.dumazet@gmail.com>. In this version of the patch I have addressed comments from David Miller. This patch fixes a bug that is exposed in gateway scenarios. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 6ce29b0e2a04ea85617cd21099af67449a76f589 Author: Claudiu Manoil <claudiu.manoil@freescale.com> Date: Wed Apr 30 14:27:21 2014 +0300 gianfar: Avoid unnecessary reg accesses in adjust_link() For phy devices that don't issue interrupts upon link state changes, phylib polls the link state resulting in repeated calls to adjust_link(), even if the link state didn't change. As a result, some mac registers are repeatedly read and written with the same values, which is not ok. To fix this, adjust_link() has been refactored to check first whether the link state has changed and to take action only if needed, updating mac registers and local state variables. The 'new_state' local flag, set if one of the link params changed (link, speed or duplex), has been rendered useless and removed by this refactoring. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 0cda345d1b2201dd15591b163e3c92bad5191745 Author: Liu Yu <allanyuliu@tencent.com> Date: Wed Apr 30 17:34:09 2014 +0800 tcp_cubic: fix the range of delayed_ack commit b9f47a3aaeab (tcp_cubic: limit delayed_ack ratio to prevent divide error) try to prevent divide error, but there is still a little chance that delayed_ack can reach zero. In case the param cnt get negative value, then ratio+cnt would overflow and may happen to be zero. As a result, min(ratio, ACK_RATIO_LIMIT) will calculate to be zero. In some old kernels, such as 2.6.32, there is a bug that would pass negative param, which then ultimately leads to this divide error. commit 5b35e1e6e9c (tcp: fix tcp_trim_head() to adjust segment count with skb MSS) fixed the negative param issue. However, it's safe that we fix the range of delayed_ack as well, to make sure we do not hit a divide by zero. CC: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Liu Yu <allanyuliu@tencent.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit e5744fe9d262d11131916d04ea79ea539fe296c0 Author: Brendan Hickey <bhickey@google.com> Date: Wed Apr 30 10:24:38 2014 +0200 bpf_dbg: fix wrong register usage The AND instruction is erroneously using the X register instead of the K register. Signed-off-by: Brendan Hickey <bhickey@google.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit f114890cdf84d753f6b41cd0cc44ba51d16313da Author: Vlad Yasevich <vyasevic@redhat.com> Date: Tue Apr 29 10:09:51 2014 -0400 Revert "macvlan : fix checksums error when we are in bridge mode" This reverts commit 12a2856b604476c27d85a5f9a57ae1661fc46019. The commit above doesn't appear to be necessary any more as the checksums appear to be correctly computed/validated. Additionally the above commit breaks kvm configurations where one VM is using a device that support checksum offload (virtio) and the other VM does not. In this case, packets leaving virtio device will have CHECKSUM_PARTIAL set. The packets is forwarded to a macvtap that has offload features turned off. Since we use CHECKSUM_UNNECESSARY, the host does does not update the checksum and thus a bad checksum is passed up to the guest. CC: Daniel Lezcano <daniel.lezcano@free.fr> CC: Patrick McHardy <kaber@trash.net> CC: Andrian Nord <nightnord@gmail.com> CC: Eric Dumazet <eric.dumazet@gmail.com> CC: Michael S. Tsirkin <mst@redhat.com> CC: Jason Wang <jasowang@redhat.com> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit cbdb04279ccaefcc702c8757757eea8ed76e50cf Author: Vlad Yasevich <vyasevic@redhat.com> Date: Tue Apr 29 10:09:50 2014 -0400 mactap: Fix checksum errors for non-gso packets in bridge mode The following is a problematic configuration: VM1: virtio-net device connected to macvtap0@eth0 VM2: e1000 device connect to macvtap1@eth0 The problem is is that virtio-net supports checksum offloading and thus sends the packets to the host with CHECKSUM_PARTIAL set. On the other hand, e1000 does not support any acceleration. For small TCP packets (and this includes the 3-way handshake), e1000 ends up receiving packets that only have a partial checksum set. This causes TCP to fail checksum validation and to drop packets. As a result tcp connections can not be established. Commit 3e4f8b787370978733ca6cae452720a4f0c296b8 macvtap: Perform GSO on forwarding path. fixes this issue for large packets wthat will end up undergoing GSO. This commit adds a check for the non-GSO case and attempts to compute the checksum for partially checksummed packets in the non-GSO case. CC: Daniel Lezcano <daniel.lezcano@free.fr> CC: Patrick McHardy <kaber@trash.net> CC: Andrian Nord <nightnord@gmail.com> CC: Eric Dumazet <eric.dumazet@gmail.com> CC: Michael S. Tsirkin <mst@redhat.com> CC: Jason Wang <jasowang@redhat.com> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit fc9f35010641ea85dd19d144b86cdd93156f1a1e Author: Eric Dumazet <edumazet@google.com> Date: Mon Apr 28 22:00:29 2014 -0700 tcp: increment retransmit counters in tlp and fast open Both TLP and Fast Open call __tcp_retransmit_skb() instead of tcp_retransmit_skb() to avoid changing tp->retrans_out. This has the side effect of missing SNMP counters increments as well as tcp_info tcpi_total_retrans updates. Fix this by moving the stats increments of into __tcp_retransmit_skb() Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Nandita Dukkipati <nanditad@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 3dc638d13aced7baad40517a3d70b3b43bf6b90f Author: Byungho An <bh74.an@samsung.com> Date: Tue Apr 29 13:15:27 2014 +0900 net: sxgbe: Added set function for interrupt on complete This patch adds set_rx_int_on_com function for interrupt when dma is completed. Signed-off-by: Byungho An <bh74.an@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 325b94f7e63080f3e371e35f063a8be138c1873b Author: Byungho An <bh74.an@samsung.com> Date: Tue Apr 29 13:15:17 2014 +0900 net: sxgbe: Added rxqueue enable function This patch adds rxqueue enable function according to number of rxqueue and adds rxqueue disable function for removing. Signed-off-by: Byungho An <bh74.an@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 0a0347b1e65d0757024d9db0ffdeafb41a9d14f4 Author: Byungho An <bh74.an@samsung.com> Date: Tue Apr 29 13:15:15 2014 +0900 net: sxgbe: sw reset moved to probe function This patch moves sw reset to probe function because sw reset is needed early stage before open function. Signed-off-by: Byungho An <bh74.an@samsung.net> Signed-off-by: David S. Miller <davem@davemloft.net> commit d2e752db6d05374a35dddb2e17864fe310fbcf69 Author: Roland Dreier <roland@purestorage.com> Date: Mon Apr 28 17:36:20 2014 -0700 cxgb4: Decode PCIe Gen3 link speed Add handling for " 8 GT/s" in print_port_info(). Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 652f99ead8319941216c64d7f92c8dcdc9b95970 Author: Tobias Klauser <tobias.klauser@gmail.com> Date: Mon Apr 28 23:23:13 2014 +0200 Altera TSE: Add missing include to silence sparse warnings This fixes the following sparse warnings: drivers/net/ethernet/altera/altera_msgdma.c:23:5: warning: symbol 'msgdma_initialize' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:28:6: warning: symbol 'msgdma_uninitialize' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:32:6: warning: symbol 'msgdma_reset' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:77:6: warning: symbol 'msgdma_disable_rxirq' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:83:6: warning: symbol 'msgdma_enable_rxirq' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:89:6: warning: symbol 'msgdma_disable_txirq' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:95:6: warning: symbol 'msgdma_enable_txirq' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:101:6: warning: symbol 'msgdma_clear_rxirq' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:107:6: warning: symbol 'msgdma_clear_txirq' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:114:5: warning: symbol 'msgdma_tx_buffer' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:129:5: warning: symbol 'msgdma_tx_completions' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:154:5: warning: symbol 'msgdma_add_rx_desc' was not declared. Should it be static? drivers/net/ethernet/altera/altera_msgdma.c:181:5: warning: symbol 'msgdma_rx_status' was not declared. Should it be static? Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Vince Bridgers <vbridgers2013@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 1b4448815ee746f878ca4c6b8fffa23441f6d16c Author: Tobias Klauser <tobias.klauser@gmail.com> Date: Mon Apr 28 23:23:01 2014 +0200 Altera TSE: Fix DMA secriptor length initialization sgdma_descrip is a function name as well as the name of a struct. In sgdma_initialize(), we should initialize the descriptor length field with the actual length of a descriptor not with the size of the function. In order to prevent such things from happening in the future, rename the function to sgdma_setup_descrip(). Found by sparse which yields the following warning: drivers/net/ethernet/altera/altera_sgdma.c:74:30: warning: expression using sizeof on a function Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net> commit ec4a340789be16831ae96be5f7552238a7a6e903 Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:35 2014 +0200 drbd: use list_first_entry_or_null in first_peer_device/first_connection If there are no peer_devices or connections, I'd rather have NULL than some "arbitrary" address pretending to point to a struct. Helps to avoid hard to debug symptoms, in case we ever try to use and dereference a drbd_connection or drbd_peer_device where we in fact don't have any connection at all. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit babea49ebe010d0a533b5db20fa63c327402a71c Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:34 2014 +0200 drbd: Allow attaching of a newly created device to any backing device A newly created device was never exposed before, i.e. has a exposed_data_uuid of 0. Then it is valid to attach to any current_uuid of a backing device (of course also to a newly created one (4)) Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 02df6fe145715f1d3858c0c65aed991f148b70b4 Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:33 2014 +0200 drbd: Test cstate while holding req_lock In case a connection transitions into C_TIMEOUT within the timer function (request_timer_fn()) we need to make sure that the receiver thread (potentially running on a different CPU) sees the updated cstate later on. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit c1b3156f121fd301191e0b4c5fa2fec42cd17871 Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:32 2014 +0200 drbd: use blk_set_stacking_limits() ...instead directly assigning to q->limits.discard_zeroes_data Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 08535466bce6bd91320990b9a614d52a3dc0f21d Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:31 2014 +0200 drbd: evaluate disk and network timeout on different requests Just because it is the oldest not yet completed request does not make it the oldest request waiting for disk. Or waiting for the peer. And we completely missed already completed requests that would still hold references to activity log extents, waiting only for the barrier ack. Find two oldest not yet completely processed requests, one that is still waiting for local completion, and one that is still waiting for some response from the peer. These may or may not be the same request object. Then separately apply the network and disk timeouts, respectively. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 67cca286caa6e33f3134bd36834d2484538f4f78 Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:30 2014 +0200 drbd: Fix a hole in the challange-response connection authentication In the implementation as it was, the two peers sent each other a challenge, and expects the challenge hashed with the shared secret back. A attacker could simply wait for the challenge of the peer, and send the same challenge back. Then it waits for the response, and sends the same response back. Prevent this by not accepting a challenge from the peer that is the same as the challenge sent to the peer. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit f9c78128f833ae3057884ca219259c8ae5db8898 Author: Lars Ellenberg <lars@linbit.com> Date: Mon Apr 28 18:43:29 2014 +0200 drbd: always implicitly close last epoch when idle Once our sender thread needs to wait_for_work(), and actually needs to schedule(), just before we do that, we already check if it is useful to implicitly close the last epoch. The condition was too strict: only implicitly close the epoch, if there have been no new (write) requests at all. The assumption was that if there were new requests, they would always be communicated one way or another, and would send necessary epoch separating barriers explicitly. This is not always true, e.g. when becoming diskless, or while explicitly starting a full resync. The last communicated epoch could stay open for a long time, locking down corresponding activity log extents. It is safe to always implicitly send that last barrier, as soon as we determin that there cannot be more requests in the last communicated epoch, even if there have been (uncommunicated) new requests in new epochs meanwhile. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit e4d7d6f4d36daff6aad84f96e48debde8e6ed09e Author: Lars Ellenberg <lars@linbit.com> Date: Mon Apr 28 18:43:28 2014 +0200 drbd: add back some fairness to AL transactions When batching more updates to the activity log into single transactions, we lost the ability for new requests to force themselves into the active set: all preparation steps became non-blocking, and if all currently hot extents keep busy, they could starve out new incoming requests to cold extents for quite a while. This can only happen if your IO backend accepts more IO operations per average DRBD replication round trip time than you have al-extents configured. If we have incoming requests to cold extents, at least do one blocking update per transaction. In an artificial worst-case workload on SSD with an asynchronous 600 ms replication link, with al-extents = 7 (the minimum we allow), and concurrent full resynch, without this patch, some write requests have been observed to be starved for 40 seconds. With this patch, application observed a worst case latency of twice the replication round trip time. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit fa090e708a72f0ea9cbe067fba28cfb2b8b787af Author: Lars Ellenberg <lars@linbit.com> Date: Mon Apr 28 18:43:27 2014 +0200 drbd: keep max-bio size during detach/attach on disconnected primary We want to store in persistent meta data what the peer DRBD can handle, which, due to spreading requests to multiple bios, may be more than its backing device can handle. Otherwise, if a disconnected Primary temporarily loses access to its local data as well, we may accidentally shrink the max-bio setting, portentially causing already assembled, but not yet processed, application bios to be spuriously failed due to device limits. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 074f4afeb2277bd5ecb9fa7f91eaffa55e262126 Author: Lars Ellenberg <lars@linbit.com> Date: Mon Apr 28 18:43:26 2014 +0200 drbd: fix a race between start_resync and send_and_submit In the drbd make request function, specifically in drbd_send_and_submit(), we decide whether we want to send the actual write request, or only a "set this block out of sync" information. We do so based on the current connection state, while holding the req_lock. The connection state is not supposed to change while holding the req_lock. But in drbd_start_resync, we did change that state anyways, while only holding the global_state_lock, which is enough to change sync-after dependencies (paused vs active resync), but not good enough to change the connection state. Fix: in drbd_start_resync, first grab the req_lock to serialize with drbd_send_and_submit(), before grabbing the global_state_lock to be able to evaluate the sync-after dependencies. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 20c68fdea1646ed746abf19122d7699493927005 Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:25 2014 +0200 drbd: Enable QUEUE_FLAG_DISCARD only if the peer can recieve P_TRIM Allow the user of REQ_DISCARD. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 2f632aeb5302da93f760d965e970600b35907026 Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:24 2014 +0200 drbd: prepare sending side for REQ_DISCARD Note that I do NOT call __drbd_chk_io_error for failed REQ_DISCARD. That may be wrong, though, or needs to differ between EOPNOTSUPP and other errors... Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit a0fb3c47a1aae5d38a88ea858f14d6d088d05e07 Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:23 2014 +0200 drbd: prepare receiving side for REQ_DISCARD If the receiver needs to serve a discard request on a queue that does not announce to be discard cabable, it falls back to do synchronous blkdev_issue_zeroout(). We expect only "reasonably" large (up to one activity log extent?) discard requests. We do this to not to not block the receiver for too long in this fallback code path, and to not set/clear too many bits inside one spinlock_irq_save() in drbd_set_in_sync/drbd_set_out_of_sync, Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 9e276872fe1665ea158f0c6f40df13008fed2908 Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:22 2014 +0200 drbd: allow parallel promote/demote actions We plan to use genl_family->parallel_ops = true in the future, but need to review all possible interactions first. For now, only selectively drop genl_lock() in drbd_set_role(), instead serializing on our own internal resource->conf_update mutex. We now can be promoted/demoted on many resources in parallel, which may significantly improve cluster failover times when fencing is required. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit a910b12352f5ddee712c3423c31fbb8b312dde88 Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:21 2014 +0200 drbd: perpare for genetlink parallel_ops Because all administrative requests via genetlink have been globally serialized via genl_lock(), we used to have one static struct drbd_config_context "admin context". Move this on-stack to the respective callback functions. This will allow us to selectively drop the genl_lock() (or use genl_family->parallel_ops) in the future. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 88ea685d33c75932fe90ed0b5d2cf68845462876 Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:20 2014 +0200 drbd: Do not BUG() when connection breaks in a special way When a 'cluster wide' disconnect executes, the result comes back from the peer, and immediately after that the connection breaks then _conn_rq_cond() reported back SS_CW_SUCCESS. Therefore _conn_request_state() calls conn_set_state(), which has a BUG() in it. The BUG() is hit because conn_is_valid_transition() does not like the transaction. Which goes back to is_valid_soft_transition() returning SS_OUTDATE_WO_CONN. This fix is to consider an error reported by is_valid_soft_transition() even when the peer agreed to the transaction. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit e82998743385ca861b9ec919eb2ba8177ce72180 Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:19 2014 +0200 drbd: don't let application IO pre-empt resync too often Before, application IO could pre-empt resync activity for up to hardcoded 20 seconds per resync request. A very busy server could throttle the effective resync bandwidth down to one request per 20 seconds. Now, we only let application IO pre-empt resync traffic while the current resync rate estimate is above c-min-rate. If you disable the c-min-rate throttle feature (set c-min-rate = 0), application IO will no longer pre-empt resync traffic at all. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 0e49d7b014c5d591a053d08888a455bd74a88646 Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:18 2014 +0200 drbd: fix potential distributed deadlock during verify or resync If max-buffers and socket buffer sizes are "too small" for the chosen resync rate, this could lead potentially lead to a distributed deadlock, which may or may not resolve itself via the "ko-count" and request timeout mechanism, or could be resolved by forced disconnect. One option to deal with this is proper configuration: use larger max-buffer and socket buffers settings, or reduce the resync rate. But even with bad configuration we should not deadlock, but "gracefully" recover. The issue is avoided by using only up to max-buffers/2 for resync requests, and by using max-buffers not as a hard limit for data buffer allocations, but as a throttle threshold only. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 6377b9235056452cd5d592c3739baa379a8735fe Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:17 2014 +0200 drbd: resync: fix too large bursts for very slow rates While merging adjacent dirty blocks into resync requests, the resync rate throttle was disregarded. For very low resync rates, the effective rate may have exceeded the intended rate by a larger margin. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 9ae472605ad333d4db07da95cc42c68063d2cc0d Author: Lars Ellenberg <lars.ellenberg@linbit.com> Date: Mon Apr 28 18:43:16 2014 +0200 drbd: fix stalled resync detection in /proc/drbd If we don't make resync or verify progress for "too long", we want to flag it as "stalled". Since 2010, "use rolling marks for resync speed calculation" this "too long" was wrong by a factor of HZ. With HZ 250, it would have been flagged as stalled after 100 minutes. Hardcode 3 minutes instead. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit cdc6af8df42313d632cb9ed79dd455daecbd8478 Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:15 2014 +0200 drbd: Allow online layout change of AL while peer is not connected If a user forces the operation he takes the blame in case the peer does not have enough space. No reason to dey this... Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit d40e567149c7ac250344d1537261c87b2c3e852c Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:14 2014 +0200 drbd: Remove drbd_wrappers.h Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit d7fe69c6a1940c3f9c5bed08634b6dd868612cdf Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:13 2014 +0200 drbd: Leave IO suspended if the fence handler find the peer primary Actually we are clearing the susp_fen flag if we are not going to call a fencing handler. For setting the susp_fen flag needs to be edge-triggerd, and not level triggered. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com> commit 31007745a5f328b8d70d865c4a6118be01421b8c Author: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon Apr 28 18:43:12 2014 +0200 drbd: Break a deadlock while concurrent fencing and establishing a connection When we need to outdate the peer while being promoted to primary, and the connection gets established at the same time, we deadlock in drbd_try_outdate_peer() when trying to clear the susp_fen bit. Fix this by setting the STATE_SENT bit while holding the mutex. Using drbd_change_state(.. , CS_HARD, ..) which does not block until STATE_SENT is cleared, is only for clearness. It does not contribute anything to the fix. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: …
- Loading branch information