commit b562e44f507e863c6792946e4e1b1449fbbac85d Author: Linus Torvalds Date: Sun Mar 13 21:28:54 2016 -0700 Linux 4.5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a26555498849489fb87139a15abe2eeb8a366ae7 Merge: f414ca6 d825c06 Author: Linus Torvalds Date: Sun Mar 13 13:04:46 2016 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "Another round of MIPS fixes for 4.5: - Fix JZ4780 build with DEBUG_ZBOOT and MACH_JZ4780 - Fix build with DEBUG_ZBOOT and MACH_JZ4780 - Fix issue with uninitialised temp_foreign_map - Fix awk regex compile failure with certain versions of awk. At this time, the sole user, ld-ifversion, is only used on MIPS" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: smp.c: Fix uninitialised temp_foreign_map MIPS: Fix build error when SMP is used without GIC ld-version: Fix awk regex compile failure MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4780 commit d825c06bfe8b885b797f917ad47365d0e9c21fbb Author: James Hogan Date: Fri Mar 4 10:10:51 2016 +0000 MIPS: smp.c: Fix uninitialised temp_foreign_map When calculate_cpu_foreign_map() recalculates the cpu_foreign_map cpumask it uses the local variable temp_foreign_map without initialising it to zero. Since the calculation only ever sets bits in this cpumask any existing bits at that memory location will remain set and find their way into cpu_foreign_map too. This could potentially lead to cache operations suboptimally doing smp calls to multiple VPEs in the same core, even though the VPEs share primary caches. Therefore initialise temp_foreign_map using cpumask_clear() before use. Fixes: cccf34e9411c ("MIPS: c-r4k: Fix cache flushing for MT cores") Signed-off-by: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12759/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) commit 7a50e4688dabb8005df39b2b992d76629b8af8aa Author: Hauke Mehrtens Date: Sun Mar 6 22:28:56 2016 +0100 MIPS: Fix build error when SMP is used without GIC The MIPS_GIC_IPI should only be selected when MIPS_GIC is also selected, otherwise it results in a compile error. smp-gic.c uses some functions from include/linux/irqchip/mips-gic.h like plat_ipi_call_int_xlate() which are only added to the header file when MIPS_GIC is set. The Lantiq SoC does not use the GIC, but supports SMP. The calls top the functions from smp-gic.c are already protected by some #ifdefs The first part of this was introduced in commit 72e20142b2bf ("MIPS: Move GIC IPI functions out of smp-cmp.c") Signed-off-by: Hauke Mehrtens Cc: Paul Burton Cc: stable@vger.kernel.org # v3.15+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12774/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4b7b1ef2c2f83d702272555e8adb839a50ba0f8e Author: James Hogan Date: Tue Mar 8 16:47:53 2016 +0000 ld-version: Fix awk regex compile failure The ld-version.sh script fails on some versions of awk with the following error, resulting in build failures for MIPS: awk: scripts/ld-version.sh: line 4: regular expression compile failed (missing '(') This is due to the regular expression ".*)", meant to strip off the beginning of the ld version string up to the close bracket, however brackets have a meaning in regular expressions, so lets escape it so that awk doesn't expect a corresponding open bracket. Fixes: ccbef1674a15 ("Kbuild, lto: add ld-version and ld-ifversion ...") Reported-by: Geert Uytterhoeven Signed-off-by: James Hogan Tested-by: Michael S. Tsirkin Acked-by: Michael S. Tsirkin Tested-by: Sudip Mukherjee Cc: Michal Marek Cc: Andi Kleen Cc: Geert Uytterhoeven Cc: linux-mips@linux-mips.org Cc: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/12838/ Signed-off-by: Ralf Baechle scripts/ld-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba9e72c2290fcdeeff5f0105590a03e0f341b059 Author: Aaro Koskinen Date: Tue Mar 8 00:06:36 2016 +0200 MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4780 Ingenic SoC declares ZBOOT support, but debug definitions are missing for MACH_JZ4780 resulting in a build failure when DEBUG_ZBOOT is set. The UART addresses are same as with JZ4740, so fix by covering JZ4780 with those as well. Signed-off-by: Aaro Koskinen Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12830/ Signed-off-by: Ralf Baechle arch/mips/boot/compressed/uart-16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f414ca64be4b36c30deb5b5fa25c5a8ff42ea56b Merge: 2f51c82 90d0f0f Author: Linus Torvalds Date: Sat Mar 12 20:18:54 2016 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block merge fix from Jens Axboe. This fixes the block segment counting bug and resulting sg overrun reported by Kent Overstreet, introduced with the last block pull. * 'for-linus' of git://git.kernel.dk/linux-block: block: don't optimize for non-cloned bio in bio_get_last_bvec() commit 2f51c8204ab3ea211ac92f3b7b88a38595ed6412 Merge: fda604a 452308d Author: Linus Torvalds Date: Sat Mar 12 20:09:25 2016 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "This fixes 3 FPU handling related bugs, an EFI boot crash and a runtime warning. The EFI fix arrived late but I didn't want to delay it to after v4.5 because the effects are pretty bad for the systems that are affected by it" [ Actually, I don't think the EFI fix really matters yet, because we haven't switched to the separate EFI page tables in mainline yet ] * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Fix boot crash by always mapping boot service regions into new EFI page tables x86/fpu: Fix eager-FPU handling on legacy FPU machines x86/delay: Avoid preemptible context checks in delay_mwaitx() x86/fpu: Revert ("x86/fpu: Disable AVX when eagerfpu is off") x86/fpu: Fix 'no387' regression commit fda604a4daa19ead458ce5471892fa1d4b382d82 Merge: 03c668a 7f54ab5 Author: Linus Torvalds Date: Sat Mar 12 17:14:07 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target bug fix from Nicholas Bellinger: "Here is an outstanding target-core bug-fix for v4.5 code." This patch addresses a recent Task Management (TMR) regression related to larger set of multi-port LUN_RESET bug-fixes in v4.5-rc5. It drops a left-over target_put_sess_cmd() of se_cmd->cmd_kref within ABORT_TASK failure path, once a se_cmd descriptor has already completed posting response to fabric driver logic, and must be skipped during normal ABORT_TASK se_cmd->tag lookup" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: Drop incorrect ABORT_TASK put for completed commands commit 90d0f0f11588ec692c12f9009089b398be395184 Author: Ming Lei Date: Sat Mar 12 22:56:19 2016 +0800 block: don't optimize for non-cloned bio in bio_get_last_bvec() For !BIO_CLONED bio, we can use .bi_vcnt safely, but it doesn't mean we can just simply return .bi_io_vec[.bi_vcnt - 1] because the start postion may have been moved in the middle of the bvec, such as splitting in the middle of bvec. Fixes: 7bcd79ac50d9(block: bio: introduce helpers to get the 1st and last bvec) Cc: stable@vger.kernel.org Reported-by: Kent Overstreet Signed-off-by: Ming Lei Signed-off-by: Jens Axboe include/linux/bio.h | 5 ----- 1 file changed, 5 deletions(-) commit 452308de61056a539352a9306c46716d7af8a1f1 Author: Matt Fleming Date: Fri Mar 11 11:19:23 2016 +0000 x86/efi: Fix boot crash by always mapping boot service regions into new EFI page tables Some machines have EFI regions in page zero (physical address 0x00000000) and historically that region has been added to the e820 map via trim_bios_range(), and ultimately mapped into the kernel page tables. It was not mapped via efi_map_regions() as one would expect. Alexis reports that with the new separate EFI page tables some boot services regions, such as page zero, are not mapped. This triggers an oops during the SetVirtualAddressMap() runtime call. For the EFI boot services quirk on x86 we need to memblock_reserve() boot services regions until after SetVirtualAddressMap(). Doing that while respecting the ownership of regions that may have already been reserved by the kernel was the motivation behind this commit: 7d68dc3f1003 ("x86, efi: Do not reserve boot services regions within reserved areas") That patch was merged at a time when the EFI runtime virtual mappings were inserted into the kernel page tables as described above, and the trick of setting ->numpages (and hence the region size) to zero to track regions that should not be freed in efi_free_boot_services() meant that we never mapped those regions in efi_map_regions(). Instead we were relying solely on the existing kernel mappings. Now that we have separate page tables we need to make sure the EFI boot services regions are mapped correctly, even if someone else has already called memblock_reserve(). Instead of stashing a tag in ->numpages, set the EFI_MEMORY_RUNTIME bit of ->attribute. Since it generally makes no sense to mark a boot services region as required at runtime, it's pretty much guaranteed the firmware will not have already set this bit. For the record, the specific circumstances under which Alexis triggered this bug was that an EFI runtime driver on his machine was responding to the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event during SetVirtualAddressMap(). The event handler for this driver looks like this, sub rsp,0x28 lea rdx,[rip+0x2445] # 0xaa948720 mov ecx,0x4 call func_aa9447c0 ; call to ConvertPointer(4, & 0xaa948720) mov r11,QWORD PTR [rip+0x2434] # 0xaa948720 xor eax,eax mov BYTE PTR [r11+0x1],0x1 add rsp,0x28 ret Which is pretty typical code for an EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE handler. The "mov r11, QWORD PTR [rip+0x2424]" was the faulting instruction because ConvertPointer() was being called to convert the address 0x0000000000000000, which when converted is left unchanged and remains 0x0000000000000000. The output of the oops trace gave the impression of a standard NULL pointer dereference bug, but because we're accessing physical addresses during ConvertPointer(), it wasn't. EFI boot services code is stored at that address on Alexis' machine. Reported-by: Alexis Murzeau Signed-off-by: Matt Fleming Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ben Hutchings Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Maarten Lankhorst Cc: Matthew Garrett Cc: Peter Zijlstra Cc: Raphael Hertzog Cc: Roger Shimizu Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1457695163-29632-2-git-send-email-matt@codeblueprint.co.uk Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815125 Signed-off-by: Ingo Molnar arch/x86/platform/efi/quirks.c | 79 +++++++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 17 deletions(-) commit 6e6867093de35141f0a76b66ac13f9f2e2c8e77a Author: Borislav Petkov Date: Fri Mar 11 12:32:06 2016 +0100 x86/fpu: Fix eager-FPU handling on legacy FPU machines i486 derived cores like Intel Quark support only the very old, legacy x87 FPU (FSAVE/FRSTOR, CPUID bit FXSR is not set), and our FPU code wasn't handling the saving and restoring there properly in the 'eagerfpu' case. So after we made eagerfpu the default for all CPU types: 58122bf1d856 x86/fpu: Default eagerfpu=on on all CPUs these old FPU designs broke. First, Andy Shevchenko reported a splat: WARNING: CPU: 0 PID: 823 at arch/x86/include/asm/fpu/internal.h:163 fpu__clear+0x8c/0x160 which was us trying to execute FXRSTOR on those machines even though they don't support it. After taking care of that, Bryan O'Donoghue reported that a simple FPU test still failed because we weren't initializing the FPU state properly on those machines. Take care of all that. Reported-and-tested-by: Bryan O'Donoghue Reported-by: Andy Shevchenko Signed-off-by: Borislav Petkov Acked-by: Linus Torvalds Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Thomas Gleixner Cc: Yu-cheng Link: http://lkml.kernel.org/r/20160311113206.GD4312@pd.tnic Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/core.c | 4 +++- arch/x86/kernel/fpu/init.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit 03c668a93187fe7fba9464f96fbe7c22eebd9897 Merge: 3ab0a0f 9df4f91 Author: Linus Torvalds Date: Fri Mar 11 16:34:18 2016 -0800 Merge tag 'for-linus-20160311' of git://git.infradead.org/linux-mtd Pull MTD fixes from Brian Norris: "Late MTD fix for v4.5: - A simple error code handling fix for the NAND ECC test; this was a regression in v4.5-rc1 - A MAINTAINERS update, which might as well go in ASAP" * tag 'for-linus-20160311' of git://git.infradead.org/linux-mtd: MAINTAINERS: add a maintainer for the NAND subsystem mtd: nand: tests: fix regression introduced in mtd_nandectest commit 3ab0a0f91cca6a9988ef1544176cd7f2106ec722 Merge: 7640131 0bbca27 Author: Linus Torvalds Date: Fri Mar 11 16:19:23 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm/i915 fixes from Dave Airlie: "Just two i915 regression fixes, that should be it from me" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/i915: Actually retry with bit-banging after GMBUS timeout drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW commit 7640131032db9118a78af715ac77ba2debeeb17c Author: Matthew Dawson Date: Fri Mar 11 13:08:07 2016 -0800 mm/mempool: avoid KASAN marking mempool poison checks as use-after-free When removing an element from the mempool, mark it as unpoisoned in KASAN before verifying its contents for SLUB/SLAB debugging. Otherwise KASAN will flag the reads checking the element use-after-free writes as use-after-free reads. Signed-off-by: Matthew Dawson Acked-by: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a4fb270daa9c1f1d1b86a53d66ed86cc64ad232 Merge: 95f41fb d7d5a43 Author: Linus Torvalds Date: Fri Mar 11 12:35:54 2016 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "Two more fixes for 4.5: - One is a fix for OMAP that is urgently needed to avoid DRA7xx chips from premature aging, by always keeping the Ethernet clock enabled. - The other solves a I/O memory layout issue on Armada, where SROM and PCI memory windows were conflicting in some configurations" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: mvebu: fix overlap of Crypto SRAM with PCIe memory window ARM: dts: dra7: do not gate cpsw clock due to errata i877 ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property commit 95f41fb203b0780b4fb97de64f83cc932abfd33d Merge: 20698c9 b2cd274 Author: Linus Torvalds Date: Fri Mar 11 12:32:02 2016 -0800 Merge tag 'media/v4.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fix from Mauro Carvalho Chehab: "One last time fix: It adds a code that prevents some media tools like media-ctl to hide some entities that have their IDs out of the range expected by those apps" * tag 'media/v4.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] media-device: map new functions into old types for legacy API commit d7d5a43c0d16760f25d892bf9329848167a8b8a4 Author: Thomas Petazzoni Date: Tue Mar 8 16:59:57 2016 +0100 ARM: mvebu: fix overlap of Crypto SRAM with PCIe memory window When the Crypto SRAM mappings were added to the Device Tree files describing the Armada XP boards in commit c466d997bb16 ("ARM: mvebu: define crypto SRAM ranges for all armada-xp boards"), the fact that those mappings were overlaping with the PCIe memory aperture was overlooked. Due to this, we currently have for all Armada XP platforms a situation that looks like this: Memory mapping on Armada XP boards with internal registers at 0xf1000000: - 0x00000000 -> 0xf0000000 3.75G RAM - 0xf0000000 -> 0xf1000000 16M NOR flashes (AXP GP / AXP DB) - 0xf1000000 -> 0xf1100000 1M internal registers - 0xf8000000 -> 0xffe0000 126M PCIe memory aperture - 0xf8100000 -> 0xf8110000 64KB Crypto SRAM #0 => OVERLAPS WITH PCIE ! - 0xf8110000 -> 0xf8120000 64KB Crypto SRAM #1 => OVERLAPS WITH PCIE ! - 0xffe00000 -> 0xfff00000 1M PCIe I/O aperture - 0xfff0000 -> 0xffffffff 1M BootROM The overlap means that when PCIe devices are added, depending on their memory window needs, they might or might not be mapped into the physical address space. Indeed, they will not be mapped if the area allocated in the PCIe memory aperture by the PCI core overlaps with one of the Crypto SRAM. Typically, a Intel IGB PCIe NIC that needs 8MB of PCIe memory will see its PCIe memory window allocated from 0xf80000000 for 8MB, which overlaps with the Crypto SRAM windows. Due to this, the PCIe window is not created, and any attempt to access the PCIe window makes the kernel explode: [ 3.302213] igb: Copyright (c) 2007-2014 Intel Corporation. [ 3.307841] pci 0000:00:09.0: enabling device (0140 -> 0143) [ 3.313539] mvebu_mbus: cannot add window '4:f8', conflicts with another window [ 3.320870] mvebu-pcie soc:pcie-controller: Could not create MBus window at [mem 0xf8000000-0xf87fffff]: -22 [ 3.330811] Unhandled fault: external abort on non-linefetch (0x1008) at 0xf08c0018 This problem does not occur on Armada 370 boards, because we use the following memory mapping (for boards that have internal registers at 0xf1000000): - 0x00000000 -> 0xf0000000 3.75G RAM - 0xf0000000 -> 0xf1000000 16M NOR flashes (AXP GP / AXP DB) - 0xf1000000 -> 0xf1100000 1M internal registers - 0xf1100000 -> 0xf1110000 64KB Crypto SRAM #0 => OK ! - 0xf8000000 -> 0xffe0000 126M PCIe memory - 0xffe00000 -> 0xfff00000 1M PCIe I/O - 0xfff0000 -> 0xffffffff 1M BootROM Obviously, the solution is to align the location of the Crypto SRAM mappings of Armada XP to be similar with the ones on Armada 370, i.e have them between the "internal registers" area and the beginning of the PCIe aperture. However, we have a special case with the OpenBlocks AX3-4 platform, which has a 128 MB NOR flash. Currently, this NOR flash is mapped from 0xf0000000 to 0xf8000000. This is possible because on OpenBlocks AX3-4, the internal registers are not at 0xf1000000. And this explains why the Crypto SRAM mappings were not configured at the same place on Armada XP. Hence, the solution is two-fold: (1) Move the NOR flash mapping on Armada XP OpenBlocks AX3-4 from 0xe8000000 to 0xf0000000. This frees the 0xf0000000 -> 0xf80000000 space. (2) Move the Crypto SRAM mappings on Armada XP to be similar to Armada 370 (except of course that Armada XP has two Crypto SRAM and not one). After this patch, the memory mapping on Armada XP boards with registers at 0xf1 is: - 0x00000000 -> 0xf0000000 3.75G RAM - 0xf0000000 -> 0xf1000000 16M NOR flashes (AXP GP / AXP DB) - 0xf1000000 -> 0xf1100000 1M internal registers - 0xf1100000 -> 0xf1110000 64KB Crypto SRAM #0 - 0xf1110000 -> 0xf1120000 64KB Crypto SRAM #1 - 0xf8000000 -> 0xffe0000 126M PCIe memory - 0xffe00000 -> 0xfff00000 1M PCIe I/O - 0xfff0000 -> 0xffffffff 1M BootROM And the memory mapping for the special case of the OpenBlocks AX3-4 (internal registers at 0xd0000000, NOR of 128 MB): - 0x00000000 -> 0xc0000000 3G RAM - 0xd0000000 -> 0xd1000000 1M internal registers - 0xe800000 -> 0xf0000000 128M NOR flash - 0xf1100000 -> 0xf1110000 64KB Crypto SRAM #0 - 0xf1110000 -> 0xf1120000 64KB Crypto SRAM #1 - 0xf8000000 -> 0xffe0000 126M PCIe memory - 0xffe00000 -> 0xfff00000 1M PCIe I/O - 0xfff0000 -> 0xffffffff 1M BootROM Fixes: c466d997bb16 ("ARM: mvebu: define crypto SRAM ranges for all armada-xp boards") Reported-by: Phil Sutter Cc: Phil Sutter Cc: Signed-off-by: Thomas Petazzoni Acked-by: Gregory CLEMENT Signed-off-by: Olof Johansson arch/arm/boot/dts/armada-xp-axpwifiap.dts | 4 ++-- arch/arm/boot/dts/armada-xp-db.dts | 4 ++-- arch/arm/boot/dts/armada-xp-gp.dts | 4 ++-- arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 4 ++-- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 4 ++-- arch/arm/boot/dts/armada-xp-matrix.dts | 4 ++-- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 4 ++-- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 6 +++--- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 4 ++-- 9 files changed, 19 insertions(+), 19 deletions(-) commit 20698c922f81047c4d45c7793b7ddce8ff58d10e Merge: 7ae9c76 25c5e96 Author: Linus Torvalds Date: Fri Mar 11 10:57:18 2016 -0800 Merge tag 'dmaengine-fix-4.5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Two fixes showed up in last few days, and they should be included in 4.5. Summary: Two more late fixes to drivers, nothing major here: - A memory leak fix in fsdma unmap the dma descriptors on freeup - A fix in xdmac driver for residue calculation of dma descriptor" * tag 'dmaengine-fix-4.5' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: at_xdmac: fix residue computation dmaengine: fsldma: fix memory leak commit 7ae9c768e19ec8ce1b397a5c4abf88f9ee053e09 Merge: 2a62ec0 5b3e7e05 Author: Linus Torvalds Date: Fri Mar 11 10:45:03 2016 -0800 Merge tag 'pm+acpi-4.5-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: "Two more fixes for issues introduced recently, one in the generic device properties framework and one in ACPICA. Specifics: - Revert a recent ACPICA commit that has been reverted upstream, because it caused problems to happen on user systems and the problem it attempted to address will not be relevant any more after upcoming ACPI specification changes (Bob Moore). - Fix crash in the generic device properties framework introduced by a recent change that forgot to check pointers against error values in addition to checking them against NULL (Heikki Krogerus)" * tag 'pm+acpi-4.5-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: fwnode->secondary may contain ERR_PTR(-ENODEV) ACPICA: Revert "Parser: Fix for SuperName method invocation" commit 2a62ec0af2ed3758dd4535eb58527f63ba6549ad Merge: 63cf207 7f6aff3 Author: Linus Torvalds Date: Fri Mar 11 10:21:32 2016 -0800 Merge tag 'xfs-for-linus-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull xfs fixes from Dave Chinner: "This is a fix for a regression introduced in 4.5-rc1 by the new torn log write detection code. The regression only affects people moving a clean filesystem between machines/kernels of different architecture (such as changing between 32 bit and 64 bit kernels), but this is the recommended (and only!) safe way to migrate a filesystem between architectures so we really need to ensure it works. The changes are larger than I'd prefer right at the end of the release cycle, but the majority of the change is just factoring code to enable the detection of a clean log at the correct time to avoid this issue. Changes: - Only perform torn log write detection on dirty logs. This prevents failures being detected due to a clean filesystem being moved between machines or kernels of different architectures (e.g. 32 -> 64 bit, BE -> LE, etc). This fixes a regression introduced by the torn log write detection in 4.5-rc1" * tag 'xfs-for-linus-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: only run torn log write detection on dirty logs xfs: refactor in-core log state update to helper xfs: refactor unmount record detection into helper xfs: separate log head record discovery from verification commit 63cf207e931894b93fe5471131e41fda567611e2 Merge: f2c1242 f938128 Author: Linus Torvalds Date: Fri Mar 11 10:13:49 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "A couple of fixes: Fix for my dumb braino in ncpfs and a long-standing breakage on recovery from failed rename() in jffs2" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: jffs2: reduce the breakage on recovery from halfway failed rename() ncpfs: fix a braino in OOM handling in ncp_fill_cache() commit 5b3e7e0536bd6326798ab57d14a49b15ad7e3e3f Merge: f6cede5 7781203 0dda885 Author: Rafael J. Wysocki Date: Fri Mar 11 14:22:54 2016 +0100 Merge branches 'device-properties-fixes' and 'acpica-fixes' * device-properties-fixes: device property: fwnode->secondary may contain ERR_PTR(-ENODEV) * acpica-fixes: ACPICA: Revert "Parser: Fix for SuperName method invocation" commit 0bbca274a31c2366414d8d3f95e03d1c4674d93f Author: Ville Syrjälä Date: Mon Mar 7 17:56:57 2016 +0200 drm/i915: Actually retry with bit-banging after GMBUS timeout After the GMBUS transfer times out, we set force_bit=1 and return -EAGAIN expecting the i2c core to call the .master_xfer hook again so that we will retry the same transfer via bit-banging. This is in case the gmbus hardware is somehow faulty. Unfortunately we left adapter->retries to 0, meaning the i2c core didn't actually do the retry. Let's tell the core we want one retry when we return -EAGAIN. Note that i2c-algo-bit also uses this retry count for some internal retries, so we'll end up increasing those a bit as well. Cc: Jani Nikula Cc: drm-intel-fixes@lists.freedesktop.org Fixes: bffce907d640 ("drm/i915: abstract i2c bit banging fallback in gmbus xfer") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1457366220-29409-2-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit 8b1f165a4a8f64c28cf42d10e1f4d3b451dedc51) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_i2c.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9df4f913eb39046fa57c4217bb3429a63e164000 Author: Boris BREZILLON Date: Wed Mar 9 21:57:24 2016 +0100 MAINTAINERS: add a maintainer for the NAND subsystem Add myself as the maintainer of the NAND subsystem. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger Acked-by: Brian Norris Acked-by: Artem Bityutskiy Signed-off-by: Brian Norris MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f2c1242194c7af9b26f53359ab2b23df36d3a643 Merge: c32c2cb 5f0b819 Author: Linus Torvalds Date: Thu Mar 10 10:42:15 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "A few simple fixes for ARM, x86, PPC and generic code. The x86 MMU fix is a bit larger because the surrounding code needed a cleanup, but nothing worrisome" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: MMU: fix reserved bit check for ept=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 KVM: MMU: fix ept=0/pte.u=1/pte.w=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 combo kvm: cap halt polling at exactly halt_poll_ns KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS KVM: VMX: disable PEBS before a guest entry KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit commit c32c2cb27268f0adad0b6afbebe860ac5250c388 Merge: 2da33f9 ff79258 Author: Linus Torvalds Date: Thu Mar 10 10:39:04 2016 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "I thought we were done for 4.5, but then the 64k-page chaps came crawling out of the woodwork. *sigh* The vmemmap fix I sent for -rc7 caused a regression with 64k pages and sparsemem and at some point during the release cycle the new hugetlb code using contiguous ptes started failing the libhugetlbfs tests with 64k pages enabled. So here are a couple of patches that fix the vmemmap alignment and disable the new hugetlb page sizes whilst a proper fix is being developed: - Temporarily disable huge pages built using contiguous ptes - Ensure vmemmap region is sufficiently aligned for sparsemem sections" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: hugetlb: partial revert of 66b3923a1a0f arm64: account for sparsemem section alignment when choosing vmemmap offset commit 2da33f9f96dabd62d6c7780cbce15818c2a6ce24 Merge: 8e0f93c 3446c13 Author: Linus Torvalds Date: Thu Mar 10 10:36:07 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Three bug fixes: - The fix for the page table corruption (CVE-2016-2143) - The diagnose statistics introduced a regression for the dasd diag driver - Boot crash on systems without the set-program-parameters facility" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/mm: four page table levels vs. fork s390/cpumf: Fix lpp detection s390/dasd: fix diag 0x250 inline assembly commit b2cd27448b33de9069d580d8f229efef434b64e6 Author: Mauro Carvalho Chehab Date: Sat Mar 5 07:13:39 2016 -0300 [media] media-device: map new functions into old types for legacy API The legacy media controller userspace API exposes entity types that carry both type and function information. The new API replaces the type with a function. It preserves backward compatibility by defining legacy functions for the existing types and using them in drivers. This works fine, as long as newer entity functions won't be added. Unfortunately, some tools, like media-ctl with --print-dot argument rely on the now legacy MEDIA_ENT_T_V4L2_SUBDEV and MEDIA_ENT_T_DEVNODE numeric ranges to identify what entities will be shown. Also, if the entity doesn't match those ranges, it will ignore the major/minor information on devnodes, and won't be getting the devnode name via udev or sysfs. As we're now adding devices outside the old range, the legacy ioctl needs to map the new entity functions into a type at the old range, or otherwise we'll have a regression. Detected on all released media-ctl versions (e. g. versions <= 1.10). Fix this by deriving the type from the function to emulate the legacy API if the function isn't in the legacy functions range. Reported-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 23 +++++++++++++++++++++++ include/uapi/linux/media.h | 6 +++++- 2 files changed, 28 insertions(+), 1 deletion(-) commit 25c5e9626ca4d40928dc9c44f009ce2ed0a739e7 Author: Ludovic Desroches Date: Thu Mar 10 10:17:55 2016 +0100 dmaengine: at_xdmac: fix residue computation When computing the residue we need two pieces of information: the current descriptor and the remaining data of the current descriptor. To get that information, we need to read consecutively two registers but we can't do it in an atomic way. For that reason, we have to check manually that current descriptor has not changed. Signed-off-by: Ludovic Desroches Suggested-by: Cyrille Pitchen Reported-by: David Engraf Tested-by: David Engraf Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Cc: stable@vger.kernel.org #4.1 and later Signed-off-by: Vinod Koul drivers/dma/at_xdmac.c | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) commit 84477336ec03f8061ffd6908da341e063e5d6d1f Author: Borislav Petkov Date: Wed Mar 9 21:56:22 2016 +0100 x86/delay: Avoid preemptible context checks in delay_mwaitx() We do use this_cpu_ptr(&cpu_tss) as a cacheline-aligned, seldomly accessed per-cpu var as the MONITORX target in delay_mwaitx(). However, when called in preemptible context, this_cpu_ptr -> smp_processor_id() -> debug_smp_processor_id() fires: BUG: using smp_processor_id() in preemptible [00000000] code: udevd/312 caller is delay_mwaitx+0x40/0xa0 But we don't care about that check - we only need cpu_tss as a MONITORX target and it doesn't really matter which CPU's var we're touching as we're going idle anyway. Fix that. Suggested-by: Andy Lutomirski Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Huang Rui Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: spg_linux_kernel@amd.com Link: http://lkml.kernel.org/r/20160309205622.GG6564@pd.tnic Signed-off-by: Ingo Molnar arch/x86/lib/delay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f0b819995e172f48fdcd91335a2126ba7d9deae Author: Paolo Bonzini Date: Wed Mar 9 14:28:02 2016 +0100 KVM: MMU: fix reserved bit check for ept=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 KVM has special logic to handle pages with pte.u=1 and pte.w=0 when CR0.WP=1. These pages' SPTEs flip continuously between two states: U=1/W=0 (user and supervisor reads allowed, supervisor writes not allowed) and U=0/W=1 (supervisor reads and writes allowed, user writes not allowed). When SMEP is in effect, however, U=0 will enable kernel execution of this page. To avoid this, KVM also sets NX=1 in the shadow PTE together with U=0, making the two states U=1/W=0/NX=gpte.NX and U=0/W=1/NX=1. When guest EFER has the NX bit cleared, the reserved bit check thinks that the latter state is invalid; teach it that the smep_andnot_wp case will also use the NX bit of SPTEs. Cc: stable@vger.kernel.org Reviewed-by: Xiao Guangrong Fixes: c258b62b264fdc469b6d3610a907708068145e3b Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 844a5fe219cf472060315971e15cbf97674a3324 Author: Paolo Bonzini Date: Tue Mar 8 12:13:39 2016 +0100 KVM: MMU: fix ept=0/pte.u=1/pte.w=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 combo Yes, all of these are needed. :) This is admittedly a bit odd, but kvm-unit-tests access.flat tests this if you run it with "-cpu host" and of course ept=0. KVM runs the guest with CR0.WP=1, so it must handle supervisor writes specially when pte.u=1/pte.w=0/CR0.WP=0. Such writes cause a fault when U=1 and W=0 in the SPTE, but they must succeed because CR0.WP=0. When KVM gets the fault, it sets U=0 and W=1 in the shadow PTE and restarts execution. This will still cause a user write to fault, while supervisor writes will succeed. User reads will fault spuriously now, and KVM will then flip U and W again in the SPTE (U=1, W=0). User reads will be enabled and supervisor writes disabled, going back to the originary situation where supervisor writes fault spuriously. When SMEP is in effect, however, U=0 will enable kernel execution of this page. To avoid this, KVM also sets NX=1 in the shadow PTE together with U=0. If the guest has not enabled NX, the result is a continuous stream of page faults due to the NX bit being reserved. The fix is to force EFER.NX=1 even if the CPU is taking care of the EFER switch. (All machines with SMEP have the CPU_LOAD_IA32_EFER vm-entry control, so they do not use user-return notifiers for EFER---if they did, EFER.NX would be forced to the same value as the host). There is another bug in the reserved bit check, which I've split to a separate patch for easier application to stable kernels. Cc: stable@vger.kernel.org Cc: Andy Lutomirski Reviewed-by: Xiao Guangrong Fixes: f6577a5fa15d82217ca73c74cd2dcbc0f6c781dd Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/mmu.txt | 3 ++- arch/x86/kvm/vmx.c | 36 +++++++++++++++++++++++------------- 2 files changed, 25 insertions(+), 14 deletions(-) commit a65050c6f17e52442716138d48d0a47301a8344b Author: Yu-cheng Yu Date: Wed Mar 9 16:28:54 2016 -0800 x86/fpu: Revert ("x86/fpu: Disable AVX when eagerfpu is off") Leonid Shatz noticed that the SDM interpretation of the following recent commit: 394db20ca240741 ("x86/fpu: Disable AVX when eagerfpu is off") ... is incorrect and that the original behavior of the FPU code was correct. Because AVX is not stated in CR0 TS bit description, it was mistakenly believed to be not supported for lazy context switch. This turns out to be false: Intel Software Developer's Manual Vol. 3A, Sec. 2.5 Control Registers: 'TS Task Switched bit (bit 3 of CR0) -- Allows the saving of the x87 FPU/ MMX/SSE/SSE2/SSE3/SSSE3/SSE4 context on a task switch to be delayed until an x87 FPU/MMX/SSE/SSE2/SSE3/SSSE3/SSE4 instruction is actually executed by the new task.' Intel Software Developer's Manual Vol. 2A, Sec. 2.4 Instruction Exception Specification: 'AVX instructions refer to exceptions by classes that include #NM "Device Not Available" exception for lazy context switch.' So revert the commit. Reported-by: Leonid Shatz Signed-off-by: Yu-cheng Yu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1457569734-3785-1-git-send-email-yu-cheng.yu@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 9 ++++----- arch/x86/kernel/fpu/init.c | 6 ------ 2 files changed, 4 insertions(+), 11 deletions(-) commit 3446c13b268af86391d06611327006b059b8bab1 Author: Martin Schwidefsky Date: Mon Feb 15 14:46:49 2016 +0100 s390/mm: four page table levels vs. fork The fork of a process with four page table levels is broken since git commit 6252d702c5311ce9 "[S390] dynamic page tables." All new mm contexts are created with three page table levels and an asce limit of 4TB. If the parent has four levels dup_mmap will add vmas to the new context which are outside of the asce limit. The subsequent call to copy_page_range will walk the three level page table structure of the new process with non-zero pgd and pud indexes. This leads to memory clobbers as the pgd_index *and* the pud_index is added to the mm->pgd pointer without a pgd_deref in between. The init_new_context() function is selecting the number of page table levels for a new context. The function is used by mm_init() which in turn is called by dup_mm() and mm_alloc(). These two are used by fork() and exec(). The init_new_context() function can distinguish the two cases by looking at mm->context.asce_limit, for fork() the mm struct has been copied and the number of page table levels may not change. For exec() the mm_alloc() function set the new mm structure to zero, in this case a three-level page table is created as the temporary stack space is located at STACK_TOP_MAX = 4TB. This fixes CVE-2016-2143. Reported-by: Marcin Kościelnicki Reviewed-by: Heiko Carstens Cc: stable@vger.kernel.org Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu_context.h | 16 +++++++++++----- arch/s390/include/asm/pgalloc.h | 24 +++++++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) commit 8e0f93cda48ed054e1216bab5c60017e1a5fc1e8 Merge: 718e47a 3ee20ab Author: Linus Torvalds Date: Wed Mar 9 20:24:23 2016 -0800 Merge tag 'spi-fix-v4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few driver specific fixes for the Rockchip and i.MX SPI controllers, especially for the i.MX they're annoying bugs if you run into them" * tag 'spi-fix-v4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: imx: fix spi resource leak with dma transfer spi: imx: allow only WML aligned transfers to use DMA spi: rockchip: add missing spi_master_put spi: rockchip: disable runtime pm when in err case commit 3ee20abb063acc57a45ccb2fdab2eb3ce29e85fa Merge: c23663a 844c9f4 Author: Mark Brown Date: Thu Mar 10 10:42:24 2016 +0700 Merge remote-tracking branch 'spi/fix/rockchip' into spi-linus commit c23663ace8adda3bca15e7ad6a99663f6119612d Merge: f6cede5 ba4a355 Author: Mark Brown Date: Thu Mar 10 10:42:22 2016 +0700 Merge remote-tracking branch 'spi/fix/imx' into spi-linus commit 718e47a573a43dba9a1673e0fc29fb36d3ef9769 Merge: a6e434e 6ffe77b Author: Linus Torvalds Date: Wed Mar 9 19:33:05 2016 -0800 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fix from Ted Ts'o: "This fixes a regression which crept in v4.5-rc5" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: iterate over buffer heads correctly in move_extent_per_page() commit a6e434e9550807164c5ab7bffde59e9e7a4e717b Merge: 8205ff1 848819c54 Author: Linus Torvalds Date: Wed Mar 9 19:12:37 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A few imx fixes I missed from a couple of weeks ago, they still aren't that big and fix some regression and a fail to boot problem. Other than that, a couple of regression fixes for radeon/amdgpu, one regression fix for vmwgfx and one regression fix for tda998x" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: Revert "drm/radeon/pm: adjust display configuration after powerstate" drm/amdgpu/dp: add back special handling for NUTMEG drm/radeon/dp: add back special handling for NUTMEG drm/i2c: tda998x: Choose between atomic or non atomic dpms helper drm/vmwgfx: Add back ->detect() and ->fill_modes() drm/radeon: Fix error handling in radeon_flip_work_func. drm/amdgpu: Fix error handling in amdgpu_flip_work_func. drm/imx: Add missing DRM_FORMAT_RGB565 to ipu_plane_formats drm/imx: notify DRM core about CRTC vblank state gpu: ipu-v3: Reset IPU before activating IRQ gpu: ipu-v3: Do not bail out on missing optional port nodes commit 8205ff1dc84e0298cd4bc15aa7aeccc35634582c Merge: 380173f dc17147 Author: Linus Torvalds Date: Wed Mar 9 19:01:58 2016 -0800 Merge tag 'trace-fixes-v4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "I previously sent a fix that prevents all trace events from being called if the current cpu is offline. But I forgot that in 3.18, we added lockdep checks to test RCU usage even when the event is disabled. Although there cannot be any bug when a cpu is going offline, we now get false warnings triggered by the added checks of the event being disabled. I removed the check from the tracepoint code itself, and added it to the condition section (which is "1" for 'no condition'). This way the online cpu check will get checked in all the right locations" * tag 'trace-fixes-v4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix check for cpu online when event is disabled commit 6ffe77bad545f4a7c8edd2a4ee797ccfcd894ab4 Author: Eryu Guan Date: Sun Feb 21 18:38:44 2016 -0500 ext4: iterate over buffer heads correctly in move_extent_per_page() In commit bcff24887d00 ("ext4: don't read blocks from disk after extents being swapped") bh is not updated correctly in the for loop and wrong data has been written to disk. generic/324 catches this on sub-page block size ext4. Fixes: bcff24887d00 ("ext4: don't read blocks from disk after extentsbeing swapped") Signed-off-by: Eryu Guan Signed-off-by: Theodore Ts'o fs/ext4/move_extent.c | 1 + 1 file changed, 1 insertion(+) commit 380173ff56c7faea02d1278e8d9783093fc776f6 Merge: 2f0d94e d6b7eae Author: Linus Torvalds Date: Wed Mar 9 18:27:52 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "13 fixes" * emailed patches from Andrew Morton : dma-mapping: avoid oops when parameter cpu_addr is null mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers memremap: check pfn validity before passing to pfn_to_page() mm, thp: fix migration of PTE-mapped transparent huge pages dax: check return value of dax_radix_entry() ocfs2: fix return value from ocfs2_page_mkwrite() arm64: kasan: clear stale stack poison sched/kasan: remove stale KASAN poison after hotplug kasan: add functions to clear stack poison mm: fix mixed zone detection in devm_memremap_pages list: kill list_force_poison() mm: __delete_from_page_cache show Bad page if mapped mm/hugetlb: hugetlb_no_page: rate-limit warning message commit d6b7eaeb03421139e32800324ef04ab50bba886d Author: Zhen Lei Date: Wed Mar 9 14:08:38 2016 -0800 dma-mapping: avoid oops when parameter cpu_addr is null To keep consistent with kfree, which tolerate ptr is NULL. We do this because sometimes we may use goto statement, so that success and failure case can share parts of the code. But unfortunately, dma_free_coherent called with parameter cpu_addr is null will cause oops, such as showed below: Unable to handle kernel paging request at virtual address ffffffc020d3b2b8 pgd = ffffffc083a61000 [ffffffc020d3b2b8] *pgd=0000000000000000, *pud=0000000000000000 CPU: 4 PID: 1489 Comm: malloc_dma_1 Tainted: G O 4.1.12 #1 Hardware name: ARM64 (DT) PC is at __dma_free_coherent.isra.10+0x74/0xc8 LR is at __dma_free+0x9c/0xb0 Process malloc_dma_1 (pid: 1489, stack limit = 0xffffffc0837fc020) [...] Call trace: __dma_free_coherent.isra.10+0x74/0xc8 __dma_free+0x9c/0xb0 malloc_dma+0x104/0x158 [dma_alloc_coherent_mtmalloc] kthread+0xec/0xfc Signed-off-by: Zhen Lei Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86613628b3d367743f71b945c203774c522404f4 Author: Jan Stancek Date: Wed Mar 9 14:08:35 2016 -0800 mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers Replace ENOTSUPP with EOPNOTSUPP. If hugepages are not supported, this value is propagated to userspace. EOPNOTSUPP is part of uapi and is widely supported by libc libraries. It gives nicer message to user, rather than: # cat /proc/sys/vm/nr_hugepages cat: /proc/sys/vm/nr_hugepages: Unknown error 524 And also LTP's proc01 test was failing because this ret code (524) was unexpected: proc01 1 TFAIL : proc01.c:396: read failed: /proc/sys/vm/nr_hugepages: errno=???(524): Unknown error 524 proc01 2 TFAIL : proc01.c:396: read failed: /proc/sys/vm/nr_hugepages_mempolicy: errno=???(524): Unknown error 524 proc01 3 TFAIL : proc01.c:396: read failed: /proc/sys/vm/nr_overcommit_hugepages: errno=???(524): Unknown error 524 Signed-off-by: Jan Stancek Acked-by: Naoya Horiguchi Acked-by: Kirill A. Shutemov Acked-by: David Rientjes Acked-by: Hillf Danton Cc: Mike Kravetz Cc: Dave Hansen Cc: Paul Gortmaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac343e882a8377caef5fa75d9093cb77e9d4bf6d Author: Ard Biesheuvel Date: Wed Mar 9 14:08:32 2016 -0800 memremap: check pfn validity before passing to pfn_to_page() In memremap's helper function try_ram_remap(), we dereference a struct page pointer that was derived from a PFN that is known to be covered by a 'System RAM' iomem region, and is thus assumed to be a 'valid' PFN, i.e., a PFN that has a struct page associated with it and is covered by the kernel direct mapping. However, the assumption that there is a 1:1 relation between the System RAM iomem region and the kernel direct mapping is not universally valid on all architectures, and on ARM and arm64, 'System RAM' may include regions for which pfn_valid() returns false. Generally speaking, both __va() and pfn_to_page() should only ever be called on PFNs/physical addresses for which pfn_valid() returns true, so add that check to try_ram_remap(). Signed-off-by: Ard Biesheuvel Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a2e280b6d8ea4afef07c749070705d6af403b7f Author: Kirill A. Shutemov Date: Wed Mar 9 14:08:30 2016 -0800 mm, thp: fix migration of PTE-mapped transparent huge pages We don't have native support of THP migration, so we have to split huge page into small pages in order to migrate it to different node. This includes PTE-mapped huge pages. I made mistake in refcounting patchset: we don't actually split PTE-mapped huge page in queue_pages_pte_range(), if we step on head page. The result is that the head page is queued for migration, but none of tail pages: putting head page on queue takes pin on the page and any subsequent attempts of split_huge_pages() would fail and we skip queuing tail pages. unmap_and_move_huge_page() will eventually split the huge pages, but only one of 512 pages would get migrated. Let's fix the situation. Fixes: 248db92da13f2507 ("migrate_pages: try to split pages on queuing") Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30f471fd88e0304bee2c17ef1a4651e705870817 Author: Ross Zwisler Date: Wed Mar 9 14:08:27 2016 -0800 dax: check return value of dax_radix_entry() dax_pfn_mkwrite() previously wasn't checking the return value of the call to dax_radix_entry(), which was a mistake. Instead, capture this return value and return the appropriate VM_FAULT_ value. Signed-off-by: Ross Zwisler Cc: Dan Williams Cc: Matthew Wilcox Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 566e8dfd88d9e0d12873ca69c26e82c0af8479d8 Author: Jan Kara Date: Wed Mar 9 14:08:24 2016 -0800 ocfs2: fix return value from ocfs2_page_mkwrite() ocfs2_page_mkwrite() could mistakenly return error code instead of mkwrite status value. Fix it. Signed-off-by: Jan Kara Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/mmap.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0d97e6d8024c71cc838b292c01d5bd951e080eba Author: Mark Rutland Date: Wed Mar 9 14:08:21 2016 -0800 arm64: kasan: clear stale stack poison Functions which the compiler has instrumented for KASAN place poison on the stack shadow upon entry and remove this poison prior to returning. In the case of cpuidle, CPUs exit the kernel a number of levels deep in C code. Any instrumented functions on this critical path will leave portions of the stack shadow poisoned. If CPUs lose context and return to the kernel via a cold path, we restore a prior context saved in __cpu_suspend_enter are forgotten, and we never remove the poison they placed in the stack shadow area by functions calls between this and the actual exit of the kernel. Thus, (depending on stackframe layout) subsequent calls to instrumented functions may hit this stale poison, resulting in (spurious) KASAN splats to the console. To avoid this, clear any stale poison from the idle thread for a CPU prior to bringing a CPU online. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Reviewed-by: Andrey Ryabinin Reviewed-by: Lorenzo Pieralisi Cc: Alexander Potapenko Cc: Catalin Marinas Cc: Will Deacon Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/kernel/sleep.S | 4 ++++ 1 file changed, 4 insertions(+) commit e1b77c92981a522223bd1ac118fdcade6b7ad086 Author: Mark Rutland Date: Wed Mar 9 14:08:18 2016 -0800 sched/kasan: remove stale KASAN poison after hotplug Functions which the compiler has instrumented for KASAN place poison on the stack shadow upon entry and remove this poision prior to returning. In the case of CPU hotplug, CPUs exit the kernel a number of levels deep in C code. Any instrumented functions on this critical path will leave portions of the stack shadow poisoned. When a CPU is subsequently brought back into the kernel via a different path, depending on stackframe, layout calls to instrumented functions may hit this stale poison, resulting in (spurious) KASAN splats to the console. To avoid this, clear any stale poison from the idle thread for a CPU prior to bringing a CPU online. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Reviewed-by: Andrey Ryabinin Reviewed-by: Ingo Molnar Cc: Alexander Potapenko Cc: Lorenzo Pieralisi Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) commit e3ae116339f9a0c77523abc95e338fa405946e07 Author: Mark Rutland Date: Wed Mar 9 14:08:15 2016 -0800 kasan: add functions to clear stack poison Functions which the compiler has instrumented for ASAN place poison on the stack shadow upon entry and remove this poison prior to returning. In some cases (e.g. hotplug and idle), CPUs may exit the kernel a number of levels deep in C code. If there are any instrumented functions on this critical path, these will leave portions of the idle thread stack shadow poisoned. If a CPU returns to the kernel via a different path (e.g. a cold entry), then depending on stack frame layout subsequent calls to instrumented functions may use regions of the stack with stale poison, resulting in (spurious) KASAN splats to the console. Contemporary GCCs always add stack shadow poisoning when ASAN is enabled, even when asked to not instrument a function [1], so we can't simply annotate functions on the critical path to avoid poisoning. Instead, this series explicitly removes any stale poison before it can be hit. In the common hotplug case we clear the entire stack shadow in common code, before a CPU is brought online. On architectures which perform a cold return as part of cpu idle may retain an architecture-specific amount of stack contents. To retain the poison for this retained context, the arch code must call the core KASAN code, passing a "watermark" stack pointer value beyond which shadow will be cleared. Architectures which don't perform a cold return as part of idle do not need any additional code. This patch (of 3): Functions which the compiler has instrumented for KASAN place poison on the stack shadow upon entry and remove this poision prior to returning. In some cases (e.g. hotplug and idle), CPUs may exit the kernel a number of levels deep in C code. If there are any instrumented functions on this critical path, these will leave portions of the stack shadow poisoned. If a CPU returns to the kernel via a different path (e.g. a cold entry), then depending on stack frame layout subsequent calls to instrumented functions may use regions of the stack with stale poison, resulting in (spurious) KASAN splats to the console. To avoid this, we must clear stale poison from the stack prior to instrumented functions being called. This patch adds functions to the KASAN core for removing poison from (portions of) a task's stack. These will be used by subsequent patches to avoid problems with hotplug and idle. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Lorenzo Pieralisi Cc: Will Deacon Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan.h | 6 +++++- mm/kasan/kasan.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) commit 5f29a77cd95771edebbf41e5800fdd557c69302a Author: Dan Williams Date: Wed Mar 9 14:08:13 2016 -0800 mm: fix mixed zone detection in devm_memremap_pages The check for whether we overlap "System RAM" needs to be done at section granularity. For example a system with the following mapping: 100000000-37bffffff : System RAM 37c000000-837ffffff : Persistent Memory ...is unable to use devm_memremap_pages() as it would result in two zones colliding within a given section. Signed-off-by: Dan Williams Cc: Ross Zwisler Reviewed-by: Toshi Kani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d77a117e6871ff78a06def46583d23752593de60 Author: Dan Williams Date: Wed Mar 9 14:08:10 2016 -0800 list: kill list_force_poison() Given we have uninitialized list_heads being passed to list_add() it will always be the case that those uninitialized values randomly trigger the poison value. Especially since a list_add() operation will seed the stack with the poison value for later stack allocations to trip over. For example, see these two false positive reports: list_add attempted on force-poisoned entry WARNING: at lib/list_debug.c:34 [..] NIP [c00000000043c390] __list_add+0xb0/0x150 LR [c00000000043c38c] __list_add+0xac/0x150 Call Trace: __list_add+0xac/0x150 (unreliable) __down+0x4c/0xf8 down+0x68/0x70 xfs_buf_lock+0x4c/0x150 [xfs] list_add attempted on force-poisoned entry(0000000000000500), new->next == d0000000059ecdb0, new->prev == 0000000000000500 WARNING: at lib/list_debug.c:33 [..] NIP [c00000000042db78] __list_add+0xa8/0x140 LR [c00000000042db74] __list_add+0xa4/0x140 Call Trace: __list_add+0xa4/0x140 (unreliable) rwsem_down_read_failed+0x6c/0x1a0 down_read+0x58/0x60 xfs_log_commit_cil+0x7c/0x600 [xfs] Fixes: commit 5c2c2587b132 ("mm, dax, pmem: introduce {get|put}_dev_pagemap() for dax-gup") Signed-off-by: Dan Williams Reported-by: Eryu Guan Tested-by: Eryu Guan Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/list.h | 11 ----------- kernel/memremap.c | 9 +++++++-- lib/list_debug.c | 9 --------- 3 files changed, 7 insertions(+), 22 deletions(-) commit 06b241f32c711d7ca868a0351dd97fe91fd8817b Author: Hugh Dickins Date: Wed Mar 9 14:08:07 2016 -0800 mm: __delete_from_page_cache show Bad page if mapped Commit e1534ae95004 ("mm: differentiate page_mapped() from page_mapcount() for compound pages") changed the famous BUG_ON(page_mapped(page)) in __delete_from_page_cache() to VM_BUG_ON_PAGE(page_mapped(page)): which gives us more info when CONFIG_DEBUG_VM=y, but nothing at all when not. Although it has not usually been very helpul, being hit long after the error in question, we do need to know if it actually happens on users' systems; but reinstating a crash there is likely to be opposed :) In the non-debug case, pr_alert("BUG: Bad page cache") plus dump_page(), dump_stack(), add_taint() - I don't really believe LOCKDEP_NOW_UNRELIABLE, but that seems to be the standard procedure now. Move that, or the VM_BUG_ON_PAGE(), up before the deletion from tree: so that the unNULLified page->mapping gives a little more information. If the inode is being evicted (rather than truncated), it won't have any vmas left, so it's safe(ish) to assume that the raised mapcount is erroneous, and we can discount it from page_count to avoid leaking the page (I'm less worried by leaking the occasional 4kB, than losing a potential 2MB page with each 4kB page leaked). Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Joonsoo Kim Cc: Sasha Levin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 910154d520c97cd0095a889e6b878041c91111a6 Author: Geoffrey Thomas Date: Wed Mar 9 14:08:04 2016 -0800 mm/hugetlb: hugetlb_no_page: rate-limit warning message The warning message "killed due to inadequate hugepage pool" simply indicates that SIGBUS was sent, not that the process was forcibly killed. If the process has a signal handler installed does not fix the problem, this message can rapidly spam the kernel log. On my amd64 dev machine that does not have hugepages configured, I can reproduce the repeated warnings easily by setting vm.nr_hugepages=2 (i.e., 4 megabytes of huge pages) and running something that sets a signal handler and forks, like #include #include #include #include sig_atomic_t counter = 10; void handler(int signal) { if (counter-- == 0) exit(0); } int main(void) { int status; char *addr = mmap(NULL, 4 * 1048576, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0); if (addr == MAP_FAILED) {perror("mmap"); return 1;} *addr = 'x'; switch (fork()) { case -1: perror("fork"); return 1; case 0: signal(SIGBUS, handler); *addr = 'x'; break; default: *addr = 'x'; wait(&status); if (WIFSIGNALED(status)) { psignal(WTERMSIG(status), "child"); } break; } } Signed-off-by: Geoffrey Thomas Cc: Naoya Horiguchi Cc: Hillf Danton Cc: "Kirill A. Shutemov" Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dea581f86f51563d5bf468abc36c74bc88f8aac Merge: f3c87e9 0f514e6 Author: Olof Johansson Date: Wed Mar 9 14:15:31 2016 -0800 Merge tag 'for-v4.5-rc/omap-critical-fixes-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into fixes ARM: OMAP2+: critical DRA7xx fix for v4.5-rc Force the DRA7xx Ethernet internal clock source to stay enabled per TI erratum i877: http://www.ti.com/lit/er/sprz429h/sprz429h.pdf Otherwise, if the Ethernet internal clock source is disabled, the chip will age prematurely, and the RGMII I/O timing will soon fail to meet the delay time and skew specifications for 1000Mbps Ethernet. This fix should go in as soon as possible. Basic build, boot, and PM test results are available here: http://www.pwsan.com/omap/testlogs/omap-critical-fixes-for-v4.5-rc/20160307014209/ * tag 'for-v4.5-rc/omap-critical-fixes-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending: ARM: dts: dra7: do not gate cpsw clock due to errata i877 ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property Signed-off-by: Olof Johansson commit 2f0d94ea413a0d56629435e4b9f43b52035a3e79 Merge: 7f02bf6 54c6e2d Author: Linus Torvalds Date: Wed Mar 9 13:28:27 2016 -0800 Merge tag 'pci-v4.5-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Here's another fix for v4.5. It fixes an ARM regression in v4.0 that causes many boxes to crash on boot, including cns3xxx, dove, footbridge, iopl13xx, ip32x, iop33x, ixp4xx, ks8695, mv78xx0, orion5x, pxa, sa1100, etc. The change is in code that's only built for ARM and ARM64. Summary: Enumeration: Allow generic PCI domains without bridge "parent" pointer (Krzysztof Hałasa)" * tag 'pci-v4.5-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Allow a NULL "parent" pointer in pci_bus_assign_domain_nr() commit dc17147de328a74bbdee67c1bf37d2f1992de756 Author: Steven Rostedt (Red Hat) Date: Wed Mar 9 11:58:41 2016 -0500 tracing: Fix check for cpu online when event is disabled Commit f37755490fe9b ("tracepoints: Do not trace when cpu is offline") added a check to make sure that tracepoints only get called when the cpu is online, as it uses rcu_read_lock_sched() for protection. Commit 3a630178fd5f3 ("tracing: generate RCU warnings even when tracepoints are disabled") added lockdep checks (including rcu checks) for events that are not enabled to catch possible RCU issues that would only be triggered if a trace event was enabled. Commit f37755490fe9b only stopped the warnings when the trace event was enabled but did not prevent warnings if the trace event was called when disabled. To fix this, the cpu online check is moved to where the condition is added to the trace event. This will place the cpu online check in all places that it may be used now and in the future. Cc: stable@vger.kernel.org # v3.18+ Fixes: f37755490fe9b ("tracepoints: Do not trace when cpu is offline") Fixes: 3a630178fd5f3 ("tracing: generate RCU warnings even when tracepoints are disabled") Reported-by: Sudeep Holla Tested-by: Sudeep Holla Signed-off-by: Steven Rostedt include/linux/tracepoint.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ff7925848b50050732ac0401e0acf27e8b241d7b Author: Will Deacon Date: Wed Mar 9 15:22:55 2016 +0000 arm64: hugetlb: partial revert of 66b3923a1a0f Commit 66b3923a1a0f ("arm64: hugetlb: add support for PTE contiguous bit") introduced support for huge pages using the contiguous bit in the PTE as opposed to block mappings, which may be slightly unwieldy (512M) in 64k page configurations. Unfortunately, this support has resulted in some late regressions when running the libhugetlbfs test suite with 64k pages and CONFIG_DEBUG_VM as a result of a BUG: | readback (2M: 64): ------------[ cut here ]------------ | kernel BUG at fs/hugetlbfs/inode.c:446! | Internal error: Oops - BUG: 0 [#1] SMP | Modules linked in: | CPU: 7 PID: 1448 Comm: readback Not tainted 4.5.0-rc7 #148 | Hardware name: linux,dummy-virt (DT) | task: fffffe0040964b00 ti: fffffe00c2668000 task.ti: fffffe00c2668000 | PC is at remove_inode_hugepages+0x44c/0x480 | LR is at remove_inode_hugepages+0x264/0x480 Rather than revert the entire patch, simply avoid advertising the contiguous huge page sizes for now while people are actively working on a fix. This patch can then be reverted once things have been sorted out. Cc: David Woods Reported-by: Steve Capper Signed-off-by: Will Deacon arch/arm64/mm/hugetlbpage.c | 14 -------------- 1 file changed, 14 deletions(-) commit 36e5cd6b897e17d03008f81e075625d8e43e52d0 Author: Ard Biesheuvel Date: Tue Mar 8 21:09:29 2016 +0700 arm64: account for sparsemem section alignment when choosing vmemmap offset Commit dfd55ad85e4a ("arm64: vmemmap: use virtual projection of linear region") fixed an issue where the struct page array would overflow into the adjacent virtual memory region if system RAM was placed so high up in physical memory that its addresses were not representable in the build time configured virtual address size. However, the fix failed to take into account that the vmemmap region needs to be relatively aligned with respect to the sparsemem section size, so that a sequence of page structs corresponding with a sparsemem section in the linear region appears naturally aligned in the vmemmap region. So round up vmemmap to sparsemem section size. Since this essentially moves the projection of the linear region up in memory, also revert the reduction of the size of the vmemmap region. Cc: Fixes: dfd55ad85e4a ("arm64: vmemmap: use virtual projection of linear region") Tested-by: Mark Langsdorf Tested-by: David Daney Tested-by: Robert Richter Acked-by: Catalin Marinas Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f363938c70a04e6bc99023a5e0c44ef7879b903f Author: Andy Lutomirski Date: Thu Jan 21 15:24:31 2016 -0800 x86/fpu: Fix 'no387' regression After fixing FPU option parsing, we now parse the 'no387' boot option too early: no387 clears X86_FEATURE_FPU before it's even probed, so the boot CPU promptly re-enables it. I suspect it gets even more confused on SMP. Fix the probing code to leave X86_FEATURE_FPU off if it's been disabled by setup_clear_cpu_cap(). Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Cc: yu-cheng yu Fixes: 4f81cbafcce2 ("x86/fpu: Fix early FPU command-line parsing") Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/init.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 313f636d5c490c9741d3f750dc8da33029edbc6b Author: David Matlack Date: Tue Mar 8 16:19:44 2016 -0800 kvm: cap halt polling at exactly halt_poll_ns When growing halt-polling, there is no check that the poll time exceeds the limit. It's possible for vcpu->halt_poll_ns grow once past halt_poll_ns, and stay there until a halt which takes longer than vcpu->halt_poll_ns. For example, booting a Linux guest with halt_poll_ns=11000: ... kvm:kvm_halt_poll_ns: vcpu 0: halt_poll_ns 0 (shrink 10000) ... kvm:kvm_halt_poll_ns: vcpu 0: halt_poll_ns 10000 (grow 0) ... kvm:kvm_halt_poll_ns: vcpu 0: halt_poll_ns 20000 (grow 10000) Signed-off-by: David Matlack Fixes: aca6ff29c4063a8d467cdee241e6b3bf7dc4a171 Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 3 +++ 1 file changed, 3 insertions(+) commit a9af316c83e3d81e26985193ffafdf143b327c07 Author: Xuelin Shi Date: Tue Mar 8 14:02:01 2016 +0800 dmaengine: fsldma: fix memory leak adding unmap of sources and destinations while doing dequeue. Signed-off-by: Xuelin Shi Signed-off-by: Vinod Koul drivers/dma/fsldma.c | 2 ++ 1 file changed, 2 insertions(+) commit 848819c5447eb318a787467e8435a07c733e16c9 Merge: 9138301 33bee52 Author: Dave Airlie Date: Wed Mar 9 14:21:12 2016 +1000 Merge tag 'imx-drm-fixes-2016-02-19' of git://git.pengutronix.de/git/pza/linux into drm-fixes ipu-v3 probe and imx-drm crtc and plane fixes - Fix ipu probe if optional port nodes are not present in the device tree - Reset the ipu before initializing interrupts, not thereafter - Notify DRM core about the state of vblank interrupts - Add missing RGB565 format to the list of plate formats * tag 'imx-drm-fixes-2016-02-19' of git://git.pengutronix.de/git/pza/linux: drm/imx: Add missing DRM_FORMAT_RGB565 to ipu_plane_formats drm/imx: notify DRM core about CRTC vblank state gpu: ipu-v3: Reset IPU before activating IRQ gpu: ipu-v3: Do not bail out on missing optional port nodes commit 913830147ace0a31ac0128726b29153d570c9985 Merge: dad82ea d74e766 Author: Dave Airlie Date: Wed Mar 9 14:19:14 2016 +1000 Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-fixes radeon and amdgpu fixes for 4.5. Three regression fixes and some fixups for the error handling in the vblank regression fixes from earlier. * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: Revert "drm/radeon/pm: adjust display configuration after powerstate" drm/amdgpu/dp: add back special handling for NUTMEG drm/radeon/dp: add back special handling for NUTMEG drm/radeon: Fix error handling in radeon_flip_work_func. drm/amdgpu: Fix error handling in amdgpu_flip_work_func. commit 7781203416ffc4e731619f8a8b93a37599a8f502 Author: Heikki Krogerus Date: Tue Mar 8 15:44:36 2016 +0200 device property: fwnode->secondary may contain ERR_PTR(-ENODEV) This fixes BUG triggered when fwnode->secondary is not NULL, but has ERR_PTR(-ENODEV) instead. BUG: unable to handle kernel paging request at ffffffffffffffed IP: [] __fwnode_property_read_string+0x26/0x160 PGD 200e067 PUD 2010067 PMD 0 Oops: 0000 [#1] SMP KASAN Modules linked in: dwc3_pci(+) dwc3 CPU: 0 PID: 1138 Comm: modprobe Not tainted 4.5.0-rc5+ #61 task: ffff88015aaf5b00 ti: ffff88007b958000 task.ti: ffff88007b958000 RIP: 0010:[] [] __fwnode_property_read_string+0x26/0x160 RSP: 0018:ffff88007b95eff8 EFLAGS: 00010246 RAX: fffffbfffffffffd RBX: ffffffffffffffed RCX: ffff88015999cd37 RDX: dffffc0000000000 RSI: ffffffff81e11bc0 RDI: ffffffffffffffed RBP: ffff88007b95f020 R08: 0000000000000000 R09: 0000000000000000 R10: ffff88007b90f7cf R11: 0000000000000000 R12: ffff88007b95f0a0 R13: 00000000fffffffa R14: ffffffff81e11bc0 R15: ffff880159ea37a0 FS: 00007ff35f46c700(0000) GS:ffff88015b800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: ffffffffffffffed CR3: 000000007b8be000 CR4: 00000000001006f0 Stack: ffff88015999cd20 ffffffff81e11bc0 ffff88007b95f0a0 ffff88007b383dd8 ffff880159ea37a0 ffff88007b95f048 ffffffff81677d03 ffff88007b952460 ffffffff81e11bc0 ffff88007b95f0a0 ffff88007b95f070 ffffffff81677d40 Call Trace: [] fwnode_property_read_string+0x43/0x50 [] device_property_read_string+0x30/0x40 ... Fixes: 362c0b30249e (device property: Fallback to secondary fwnode if primary misses the property) Signed-off-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0dda8851a88d6c9d6389f1caf69627154c39aceb Author: Bob Moore Date: Fri Feb 19 14:17:36 2016 +0800 ACPICA: Revert "Parser: Fix for SuperName method invocation" ACPICA commit eade8f78f2aa21e8eabc3380a5728db47273bcf1 Revert commit ae90fbf562d7 (ACPICA: Parser: Fix for SuperName method invocation). Support for method invocations as part of super_name will be removed from the ACPI specification, since no AML interpreter supports it. Fixes: ae90fbf562d7 (ACPICA: Parser: Fix for SuperName method invocation) Link: https://github.com/acpica/acpica/commit/eade8f78 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/psargs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit d74e766e1916d0e09b86e4b5b9d0f819628fd546 Author: Alex Deucher Date: Tue Mar 8 11:31:00 2016 -0500 Revert "drm/radeon/pm: adjust display configuration after powerstate" This reverts commit 39d4275058baf53e89203407bf3841ff2c74fa32. This caused a regression on some older hardware. bug: https://bugzilla.kernel.org/show_bug.cgi?id=113891 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_pm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7f02bf6b5f5de90b7a331759b5364e41c0f39bf9 Merge: 1e2a4c7 ad09ef2 Author: Linus Torvalds Date: Tue Mar 8 09:41:20 2016 -0800 Merge tag 'sound-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "It's always an ambivalent feeling to send a large pull request at the late stage like this, especially when most of patches came from me. Anyway, this is a collection of lots of small fixes that slipped from the previous pull request. All fixes are about ASoC, and the majority of changes are corrections of the wrong access types in ALSA ctl enum items. They are mostly harmless on 32bit architectures, but actually buggy on 64bit. So we addressed all these now in a shot. The rest are various small ASoC driver fixes. Among them, only two changes have been done to ASoC core, and both of them are trivial. The rest are all device-specific. So overall, they should be safe to apply" * tag 'sound-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (33 commits) ASoC: wm_adsp: Fix enum ctl accesses in a wrong type ASoC: wm9081: Fix enum ctl accesses in a wrong type ASoC: wm8996: Fix enum ctl accesses in a wrong type ASoC: wm8994: Fix enum ctl accesses in a wrong type ASoC: wm8985: Fix enum ctl accesses in a wrong type ASoC: wm8983: Fix enum ctl accesses in a wrong type ASoC: wm8958: Fix enum ctl accesses in a wrong type ASoC: wm8904: Fix enum ctl accesses in a wrong type ASoC: wm8753: Fix enum ctl accesses in a wrong type ASoC: wl1273: Fix enum ctl accesses in a wrong type ASoC: tlv320dac33: Fix enum ctl accesses in a wrong type ASoC: max98095: Fix enum ctl accesses in a wrong type ASoC: max98088: Fix enum ctl accesses in a wrong type ASoC: ab8500: Fix enum ctl accesses in a wrong type ASoC: da732x: Fix enum ctl accesses in a wrong type ASoC: cs42l51: Fix enum ctl accesses in a wrong type ASoC: intel: mfld: Fix enum ctl accesses in a wrong type ASoC: omap: rx51: Fix enum ctl accesses in a wrong type ASoC: omap: n810: Fix enum ctl accesses in a wrong type ASoC: pxa: tosa: Fix enum ctl accesses in a wrong type ... commit 1e2a4c7a3f916f1caa5e68a9f2f7e6a04a0efa7e Merge: e2857b8 83bdaad Author: Linus Torvalds Date: Tue Mar 8 09:29:00 2016 -0800 Merge tag 'edac_fix_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC fix from Borislav Petkov: "Last minute fix for sb_edac which fixes DIMM detection on certain Xeon Phi configurations: A single fix to the Xeon Phi section of sb_edac. The issue was introduced during this merge window" * tag 'edac_fix_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, sb_edac: Fix logic when computing DIMM sizes on Xeon Phi commit 02d27234759dc4fe14a880ec1e1dee108cb0b503 Author: Alex Deucher Date: Thu Mar 3 19:34:28 2016 -0500 drm/amdgpu/dp: add back special handling for NUTMEG When I fixed the dp rate selection in: 3b73b168cffd9c392584d3f665021fa2190f8612 drm/amdgpu: fix dp link rate selection (v2) I accidently dropped the special handling for NUTMEG DP bridge chips. They require a fixed link rate. Reviewed-by: Christian König Reviewed-by: Ken Wang Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit c8213a638f65bf487c10593c216525952cca3690 Author: Alex Deucher Date: Thu Mar 3 19:26:24 2016 -0500 drm/radeon/dp: add back special handling for NUTMEG When I fixed the dp rate selection in: 092c96a8ab9d1bd60ada2ed385cc364ce084180e drm/radeon: fix dp link rate selection (v2) I accidently dropped the special handling for NUTMEG DP bridge chips. They require a fixed link rate. Reviewed-by: Christian König Reviewed-by: Ken Wang Reviewed-by: Harry Wentland Tested-by: Ken Moffat Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/atombios_dp.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 9522b37f5a8c7bfabe46eecadf2e130f1103f337 Author: David Hildenbrand Date: Tue Mar 8 12:24:30 2016 +0100 KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS With MACHINE_HAS_VX, we convert the floating point registers from the vector registeres when storing the status. For other VCPUs, these are stored to vcpu->run->s.regs.vrs, but we are using current->thread.fpu.vxrs, which resolves to the currently loaded VCPU. So kvm_s390_store_status_unloaded() currently writes the wrong floating point registers (converted from the vector registers) when called from another VCPU on a z13. This is only the case for old user space not handling SIGP STORE STATUS and SIGP STOP AND STORE STATUS, but relying on the kernel implementation. All other calls come from the loaded VCPU via kvm_s390_store_status(). Fixes: 9abc2a08a7d6 (KVM: s390: fix memory overwrites when vx is disabled) Reviewed-by: Christian Borntraeger Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger Signed-off-by: Paolo Bonzini arch/s390/kvm/kvm-s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bb9b9ccff5b7ce5084b5111244a92fd1d0daf16 Merge: 7099e2e ccec445 Author: Paolo Bonzini Date: Tue Mar 8 12:46:50 2016 +0100 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD commit 7099e2e1f4d9051f31bbfa5803adf954bb5d76ef Author: Radim Krčmář Date: Fri Mar 4 15:08:42 2016 +0100 KVM: VMX: disable PEBS before a guest entry Linux guests on Haswell (and also SandyBridge and Broadwell, at least) would crash if you decided to run a host command that uses PEBS, like perf record -e 'cpu/mem-stores/pp' -a This happens because KVM is using VMX MSR switching to disable PEBS, but SDM [2015-12] 18.4.4.4 Re-configuring PEBS Facilities explains why it isn't safe: When software needs to reconfigure PEBS facilities, it should allow a quiescent period between stopping the prior event counting and setting up a new PEBS event. The quiescent period is to allow any latent residual PEBS records to complete its capture at their previously specified buffer address (provided by IA32_DS_AREA). There might not be a quiescent period after the MSR switch, so a CPU ends up using host's MSR_IA32_DS_AREA to access an area in guest's memory. (Or MSR switching is just buggy on some models.) The guest can learn something about the host this way: If the guest doesn't map address pointed by MSR_IA32_DS_AREA, it results in #PF where we leak host's MSR_IA32_DS_AREA through CR2. After that, a malicious guest can map and configure memory where MSR_IA32_DS_AREA is pointing and can therefore get an output from host's tracing. This is not a critical leak as the host must initiate with PEBS tracing and I have not been able to get a record from more than one instruction before vmentry in vmx_vcpu_run() (that place has most registers already overwritten with guest's). We could disable PEBS just few instructions before vmentry, but disabling it earlier shouldn't affect host tracing too much. We also don't need to switch MSR_IA32_PEBS_ENABLE on VMENTRY, but that optimization isn't worth its code, IMO. (If you are implementing PEBS for guests, be sure to handle the case where both host and guest enable PEBS, because this patch doesn't.) Fixes: 26a4f3c08de4 ("perf/x86: disable PEBS on a guest entry.") Cc: Reported-by: Jiří Olša Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7a76aa95f6f6682db5629449d763251d1c9f8c4e Author: Christian Borntraeger Date: Mon Feb 29 15:59:18 2016 +0100 s390/cpumf: Fix lpp detection we have to check bit 40 of the facility list before issuing LPP and not bit 48. Otherwise a guest running on a system with "The decimal-floating-point zoned-conversion facility" and without the "The set-program-parameters facility" might crash on an lpp instruction. Signed-off-by: Christian Borntraeger Cc: stable@vger.kernel.org # v4.4+ Fixes: e22cf8ca6f75 ("s390/cpumf: rework program parameter setting to detect guest samples") Signed-off-by: Martin Schwidefsky arch/s390/kernel/head64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f93812846f31381d35c04c6c577d724254355e7f Author: Al Viro Date: Mon Mar 7 23:07:10 2016 -0500 jffs2: reduce the breakage on recovery from halfway failed rename() d_instantiate(new_dentry, old_inode) is absolutely wrong thing to do - it will oops if new_dentry used to be positive, for starters. What we need is d_invalidate() the target and be done with that. Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Al Viro fs/jffs2/dir.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 803c00123a8012b3a283c0530910653973ef6d8f Author: Al Viro Date: Mon Mar 7 22:17:07 2016 -0500 ncpfs: fix a braino in OOM handling in ncp_fill_cache() Failing to allocate an inode for child means that cache for *parent* is incompletely populated. So it's parent directory inode ('dir') that needs NCPI_DIR_CACHE flag removed, *not* the child inode ('inode', which is what we'd failed to allocate in the first place). Fucked-up-in: commit 5e993e25 ("ncpfs: get rid of d_validate() nonsense") Fucked-up-by: Al Viro Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro fs/ncpfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccec44563b18a0ce90e2d4f332784b3cb25c8e9c Author: Paul Mackerras Date: Sat Mar 5 19:34:39 2016 +1100 KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit Thomas Huth discovered that a guest could cause a hard hang of a host CPU by setting the Instruction Authority Mask Register (IAMR) to a suitable value. It turns out that this is because when the code was added to context-switch the new special-purpose registers (SPRs) that were added in POWER8, we forgot to add code to ensure that they were restored to a sane value on guest exit. This adds code to set those registers where a bad value could compromise the execution of the host kernel to a suitable neutral value on guest exit. Cc: stable@vger.kernel.org # v3.14+ Fixes: b005255e12a3 Reported-by: Thomas Huth Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit dad82ea3ef4b9dc97ca5ec718abc6b0986f1aaaf Author: Jyri Sarha Date: Sat Jan 16 22:17:54 2016 +0200 drm/i2c: tda998x: Choose between atomic or non atomic dpms helper Choose between atomic or non atomic connector dpms helper. If tda998x is connected to a drm driver that does not support atomic modeset calling drm_atomic_helper_connector_dpms() causes a crash when the connectors atomic state is not initialized. The patch implements a driver specific connector dpms helper that calls drm_atomic_helper_connector_dpms() if driver supports DRIVER_ATOMIC and otherwise it calls the legacy drm_helper_connector_dpms(). Fixes commit 9736e988d328 ("drm/i2c: tda998x: Add support for atomic modesetting"). Signed-off-by: Jyri Sarha Signed-off-by: Dave Airlie drivers/gpu/drm/i2c/tda998x_drv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit d17e67de6e81394624685f16f174453bd561d48b Author: Thierry Reding Date: Mon Mar 7 18:06:01 2016 +0100 drm/vmwgfx: Add back ->detect() and ->fill_modes() This partially reverts commit d56f57ac969c ("drm/gma500: Move to private save/restore hooks") which removed these lines by mistake. Reported-by: Sebastian Herbszt Acked-by: Daniel Vetter Signed-off-by: Thierry Reding Tested-by: Thomas Hellstrom Tested-by: Sebastian Herbszt Signed-off-by: Dave Airlie drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 ++ 1 file changed, 2 insertions(+) commit e2857b8f11a289ed2b61d18d0665e05c1053c446 Merge: 01ffa3d 6faac63 Author: Linus Torvalds Date: Mon Mar 7 15:41:10 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix ordering of WEXT netlink messages so we don't see a newlink after a dellink, from Johannes Berg. 2) Out of bounds access in minstrel_ht_set_best_prob_rage, from Konstantin Khlebnikov. 3) Paging buffer memory leak in iwlwifi, from Matti Gottlieb. 4) Wrong units used to set initial TCP rto from cached metrics, also from Konstantin Khlebnikov. 5) Fix stale IP options data in the SKB control block from leaking through layers of encapsulation, from Bernie Harris. 6) Zero padding len miscalculated in bnxt_en, from Michael Chan. 7) Only CHECKSUM_PARTIAL packets should be passed down through GSO, fix from Hannes Frederic Sowa. 8) Fix suspend/resume with JME networking devices, from Diego Violat and Guo-Fu Tseng. 9) Checksums not validated properly in bridge multicast support due to the placement of the SKB header pointers at the time of the check, fix from Álvaro Fernández Rojas. 10) Fix hang/tiemout with r8169 if a stats fetch is done while the device is runtime suspended. From Chun-Hao Lin. 11) The forwarding database netlink dump facilities don't track the state of the dump properly, resulting in skipped/missed entries. From Minoura Makoto. 12) Fix regression from a recent 3c59x bug fix, from Neil Horman. 13) Fix list corruption in bna driver, from Ivan Vecera. 14) Big endian machines crash on vlan add in bnx2x, fix from Michal Schmidt. 15) Ethtool RSS configuration not propagated properly in mlx5 driver, from Tariq Toukan. 16) Fix regression in PHY probing in stmmac driver, from Gabriel Fernandez. 17) Fix SKB tailroom calculation in igmp/mld code, from Benjamin Poirier. 18) A past change to skip empty routing headers in ipv6 extention header parsing accidently caused fragment headers to not be matched any longer. Fix from Florian Westphal. 19) eTSEC-106 erratum needs to be applied to more gianfar chips, from Atsushi Nemoto. 20) Fix netdev reference after free via workqueues in usb networking drivers, from Oliver Neukum and Bjørn Mork. 21) mdio->irq is now an array rather than a pointer to dynamic memory, but several drivers were still trying to free it :-/ Fixes from Colin Ian King. 22) act_ipt iptables action forgets to set the family field, thus LOG netfilter targets don't work with it. Fix from Phil Sutter. 23) SKB leak in ibmveth when skb_linearize() fails, from Thomas Falcon. 24) pskb_may_pull() cannot be called with interrupts disabled, fix code that tries to do this in vmxnet3 driver, from Neil Horman. 25) be2net driver leaks iomap'd memory on removal, fix from Douglas Miller. 26) Forgotton RTNL mutex unlock in ppp_create_interface() error paths, from Guillaume Nault. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (97 commits) ppp: release rtnl mutex when interface creation fails cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind tcp: fix tcpi_segs_in after connection establishment net: hns: fix the bug about loopback jme: Fix device PM wakeup API usage jme: Do not enable NIC WoL functions on S0 udp6: fix UDP/IPv6 encap resubmit path be2net: Don't leak iomapped memory on removal. vmxnet3: avoid calling pskb_may_pull with interrupts disabled net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM ibmveth: check return of skb_linearize in ibmveth_start_xmit cdc_ncm: toggle altsetting to force reset before setup usbnet: cleanup after bind() in probe() mlxsw: pci: Correctly determine if descriptor queue is full mlxsw: spectrum: Always decrement bridge's ref count tipc: fix nullptr crash during subscription cancel net: eth: altera: do not free array priv->mdio->irq net/ethoc: do not free array priv->mdio->irq net: sched: fix act_ipt for LOG target asix: do not free array priv->mdio->irq ... commit 01ffa3df223c061435dfaab8daba7c0109a3c6d5 Merge: 256faed b81de06 Author: Linus Torvalds Date: Mon Mar 7 15:23:25 2016 -0800 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Overlayfs bug fixes. All marked as -stable material" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: copy new uid/gid into overlayfs runtime inode ovl: ignore lower entries when checking purity of non-directory entries ovl: fix getcwd() failure after unsuccessful rmdir ovl: fix working on distributed fs as lower layer commit 256faedcfd646161477d47a1a78c32a562d2e845 Author: Linus Torvalds Date: Mon Mar 7 13:15:09 2016 -0800 Revert "drm/radeon: call hpd_irq_event on resume" This reverts commit dbb17a21c131eca94eb31136eee9a7fe5aff00d9. It turns out that commit can cause problems for systems with multiple GPUs, and causes X to hang on at least a HP Pavilion dv7 with hybrid graphics. This got noticed originally in 4.4.4, where this patch had already gotten back-ported, but 4.5-rc7 was verified to have the same problem. Alexander Deucher says: "It looks like you have a muxed system so I suspect what's happening is that one of the display is being reported as connected for both the IGP and the dGPU and then the desktop environment gets confused or there some sort problem in the detect functions since the mux is not switched to the dGPU. I don't see an easy fix unless Dave has any ideas. I'd say just revert for now" Reported-by: Jörg-Volker Peetz Acked-by: Alexander Deucher Cc: Dave Airlie Cc: stable@kernel.org # wherever dbb17a21c131 got back-ported Signed-off-by: Linus Torvalds drivers/gpu/drm/radeon/radeon_device.c | 1 - 1 file changed, 1 deletion(-) commit 6faac63a6986f29ef39827f460edd3a5ba64ad5c Author: Guillaume Nault Date: Mon Mar 7 19:36:44 2016 +0100 ppp: release rtnl mutex when interface creation fails Add missing rtnl_unlock() in the error path of ppp_create_interface(). Fixes: 58a89ecaca53 ("ppp: fix lockdep splat in ppp_dev_uninit()") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 1 + 1 file changed, 1 insertion(+) commit 4d06dd537f95683aba3651098ae288b7cbff8274 Author: Bjørn Mork Date: Mon Mar 7 21:15:36 2016 +0100 cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind usbnet_link_change will call schedule_work and should be avoided if bind is failing. Otherwise we will end up with scheduled work referring to a netdev which has gone away. Instead of making the call conditional, we can just defer it to usbnet_probe, using the driver_info flag made for this purpose. Fixes: 8a34b0ae8778 ("usbnet: cdc_ncm: apply usbnet_link_change") Reported-by: Andrey Konovalov Suggested-by: Linus Torvalds Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit a9d99ce28ed359d68cf6f3c1a69038aefedf6d6a Author: Eric Dumazet Date: Sun Mar 6 09:29:21 2016 -0800 tcp: fix tcpi_segs_in after connection establishment If final packet (ACK) of 3WHS is lost, it appears we do not properly account the following incoming segment into tcpi_segs_in While we are at it, starts segs_in with one, to count the SYN packet. We do not yet count number of SYN we received for a request sock, we might add this someday. packetdrill script showing proper behavior after fix : // Tests tcpi_segs_in when 3rd packet (ACK) of 3WHS is lost 0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0 +0 < S 0:0(0) win 32792 +0 > S. 0:0(0) ack 1 +.020 < P. 1:1001(1000) ack 1 win 32792 +0 accept(3, ..., ...) = 4 +.000 %{ assert tcpi_segs_in == 2, 'tcpi_segs_in=%d' % tcpi_segs_in }% Fixes: 2efd055c53c06 ("tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_minisocks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 68c222a6bc90e4bf03df7ae36a9b196fa869928e Author: yankejian Date: Sat Mar 5 14:10:42 2016 +0800 net: hns: fix the bug about loopback It will always be passed if the soc is tested the loopback cases. This patch will fix this bug. Signed-off-by: Kejian Yan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 8 +++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 37 ++++++++++++++++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 1 + drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 5 +++ drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 15 ++++++++- 5 files changed, 65 insertions(+), 1 deletion(-) commit 81422e672f8181d7ad1ee6c60c723aac649f538f Author: Guo-Fu Tseng Date: Sat Mar 5 08:11:56 2016 +0800 jme: Fix device PM wakeup API usage According to Documentation/power/devices.txt The driver should not use device_set_wakeup_enable() which is the policy for user to decide. Using device_init_wakeup() to initialize dev->power.should_wakeup and dev->power.can_wakeup on driver initialization. And use device_may_wakeup() on suspend to decide if WoL function should be enabled on NIC. Reported-by: Diego Viola Signed-off-by: Guo-Fu Tseng Signed-off-by: David S. Miller drivers/net/ethernet/jme.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0772a99b818079e628a1da122ac7ee023faed83e Author: Guo-Fu Tseng Date: Sat Mar 5 08:11:55 2016 +0800 jme: Do not enable NIC WoL functions on S0 Otherwise it might be back on resume right after going to suspend in some hardware. Reported-by: Diego Viola Signed-off-by: Guo-Fu Tseng Signed-off-by: David S. Miller drivers/net/ethernet/jme.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 54c6e2dd00c313d0add58e5befe62fe6f286d03b Author: Krzysztof =?utf-8?Q?Ha=C5=82asa?= Date: Tue Mar 1 07:07:18 2016 +0100 PCI: Allow a NULL "parent" pointer in pci_bus_assign_domain_nr() pci_create_root_bus() passes a "parent" pointer to pci_bus_assign_domain_nr(). When CONFIG_PCI_DOMAINS_GENERIC is defined, pci_bus_assign_domain_nr() dereferences that pointer. Many callers of pci_create_root_bus() supply a NULL "parent" pointer, which leads to a NULL pointer dereference error. 7c674700098c ("PCI: Move domain assignment from arm64 to generic code") moved the "parent" dereference from arm64 to generic code. Only arm64 used that code (because only arm64 defined CONFIG_PCI_DOMAINS_GENERIC), and it always supplied a valid "parent" pointer. Other arches supplied NULL "parent" pointers but didn't defined CONFIG_PCI_DOMAINS_GENERIC, so they used a no-op version of pci_bus_assign_domain_nr(). 8c7d14746abc ("ARM/PCI: Move to generic PCI domains") defined CONFIG_PCI_DOMAINS_GENERIC on ARM, and many ARM platforms use pci_common_init(), which supplies a NULL "parent" pointer. These platforms (cns3xxx, dove, footbridge, iop13xx, etc.) crash with a NULL pointer dereference like this while probing PCI: Unable to handle kernel NULL pointer dereference at virtual address 000000a4 PC is at pci_bus_assign_domain_nr+0x10/0x84 LR is at pci_create_root_bus+0x48/0x2e4 Kernel panic - not syncing: Attempted to kill init! [bhelgaas: changelog, add "Reported:" and "Fixes:" tags] Reported: http://forum.doozan.com/read.php?2,17868,22070,quote=1 Fixes: 8c7d14746abc ("ARM/PCI: Move to generic PCI domains") Fixes: 7c674700098c ("PCI: Move domain assignment from arm64 to generic code") Signed-off-by: Krzysztof Hałasa Signed-off-by: Bjorn Helgaas Acked-by: Lorenzo Pieralisi CC: stable@vger.kernel.org # v4.0+ drivers/pci/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 59dca1d8a6725a121dae6c452de0b2611d5865dc Author: Bill Sommerfeld Date: Fri Mar 4 14:47:21 2016 -0800 udp6: fix UDP/IPv6 encap resubmit path IPv4 interprets a negative return value from a protocol handler as a request to redispatch to a new protocol. In contrast, IPv6 interprets a negative value as an error, and interprets a positive value as a request for redispatch. UDP for IPv6 was unaware of this difference. Change __udp6_lib_rcv() to return a positive value for redispatch. Note that the socket's encap_rcv hook still needs to return a negative value to request dispatch, and in the case of IPv6 packets, adjust IP6CB(skb)->nhoff to identify the byte containing the next protocol. Signed-off-by: Bill Sommerfeld Signed-off-by: David S. Miller net/ipv6/udp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a69bf3c5b49ef488970c74e26ba0ec12f08491c2 Author: Douglas Miller Date: Fri Mar 4 15:36:56 2016 -0600 be2net: Don't leak iomapped memory on removal. The adapter->pcicfg resource is either mapped via pci_iomap() or derived from adapter->db. During be_remove() this resource was ignored and so could remain mapped after remove. Add a flag to track whether adapter->pcicfg was mapped or not, then use that flag in be_unmap_pci_bars() to unmap if required. Fixes: 25848c901 ("use PCI MMIO read instead of config read for errors") Signed-off-by: Douglas Miller Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 1 + drivers/net/ethernet/emulex/benet/be_main.c | 4 ++++ 2 files changed, 5 insertions(+) commit cec05562fb1dcdf09ef7b46e1e3eade98e488893 Author: Neil Horman Date: Fri Mar 4 13:40:48 2016 -0500 vmxnet3: avoid calling pskb_may_pull with interrupts disabled vmxnet3 has a function vmxnet3_parse_and_copy_hdr which, among other operations, uses pskb_may_pull to linearize the header portion of an skb. That operation eventually uses local_bh_disable/enable to ensure that it doesn't race with the drivers bottom half handler. Unfortunately, vmxnet3 preforms this parse_and_copy operation with a spinlock held and interrupts disabled. This causes us to run afoul of the WARN_ON_ONCE(irqs_disabled()) warning in local_bh_enable, resulting in this: WARNING: at kernel/softirq.c:159 local_bh_enable+0x59/0x90() (Not tainted) Hardware name: VMware Virtual Platform Modules linked in: ipv6 ppdev parport_pc parport microcode e1000 vmware_balloon vmxnet3 i2c_piix4 sg ext4 jbd2 mbcache sd_mod crc_t10dif sr_mod cdrom mptspi mptscsih mptbase scsi_transport_spi pata_acpi ata_generic ata_piix vmwgfx ttm drm_kms_helper drm i2c_core dm_mirror dm_region_hash dm_log dm_mod [last unloaded: mperf] Pid: 6229, comm: sshd Not tainted 2.6.32-616.el6.i686 #1 Call Trace: [] ? warn_slowpath_common+0x89/0xe0 [] ? local_bh_enable+0x59/0x90 [] ? warn_slowpath_null+0x1b/0x20 [] ? local_bh_enable+0x59/0x90 [] ? skb_copy_bits+0x126/0x210 [] ? ext4_ext_find_extent+0x24e/0x2d0 [ext4] [] ? __pskb_pull_tail+0x6e/0x2b0 [] ? vmxnet3_xmit_frame+0xba4/0xef0 [vmxnet3] [] ? selinux_ip_postroute+0x56/0x320 [] ? cfq_add_rq_rb+0x98/0x110 [] ? packet_rcv+0x48/0x350 [] ? dev_queue_xmit_nit+0xc9/0x140 ... Fix it by splitting vmxnet3_parse_and_copy_hdr into two functions: vmxnet3_parse_hdr, which sets up the internal/on stack ctx datastructure, and pulls the skb (both of which can be done without holding the spinlock with irqs disabled and vmxnet3_copy_header, which just copies the skb to the tx ring under the lock safely. tested and shown to correct the described problem. Applies cleanly to the head of the net tree Signed-off-by: Neil Horman CC: Shrikrishna Khare CC: "VMware, Inc." CC: "David S. Miller" Acked-by: Shrikrishna Khare Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 73 ++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 27 deletions(-) commit 7024b68ef1310a9dd3b2b40b082588a9826f05f5 Merge: 979d804 10da848 Author: David S. Miller Date: Mon Mar 7 14:58:11 2016 -0500 Merge tag 'wireless-drivers-for-davem-2016-03-04' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.5 iwlwifi * free firmware paging memory when the module is unloaded or device removed * fix pending frames counter to fix an issue when removing stations ssb * fix a build problem related to ssb_fill_sprom_with_fallback() ==================== Signed-off-by: David S. Miller commit 979d804e5bc926f8f3133715736f26456c910a97 Author: Krzysztof Kozlowski Date: Fri Mar 4 10:04:52 2016 +0900 net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2c42bf4b43170ee83354bb68a12f8fc84c2e27a9 Author: Thomas Falcon Date: Thu Mar 3 15:22:36 2016 -0600 ibmveth: check return of skb_linearize in ibmveth_start_xmit If skb_linearize fails, the driver should drop the packet instead of trying to copy it into the bounce buffer. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmveth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 48906f62c96cc2cd35753e59310cb70eb08cc6a5 Author: Bjørn Mork Date: Thu Mar 3 22:20:53 2016 +0100 cdc_ncm: toggle altsetting to force reset before setup Some devices will silently fail setup unless they are reset first. This is necessary even if the data interface is already in altsetting 0, which it will be when the device is probed for the first time. Briefly toggling the altsetting forces a function reset regardless of the initial state. This fixes a setup problem observed on a number of Huawei devices, appearing to operate in NTB-32 mode even if we explicitly set them to NTB-16 mode. Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 83bdaad4d919722744ef1b726a9913ec36c6a430 Author: Hubert Chrzaniuk Date: Mon Mar 7 15:30:45 2016 +0100 EDAC, sb_edac: Fix logic when computing DIMM sizes on Xeon Phi Correct a typo introduced by d0cdf9003140 ("EDAC, sb_edac: Add Knights Landing (Xeon Phi gen 2) support") As a result under some configurations DIMMs were not correctly recognized. Problem affects only Xeon Phi architecture. Signed-off-by: Hubert Chrzaniuk Acked-by: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: linux-edac Cc: lukasz.anaczkowski@intel.com Link: http://lkml.kernel.org/r/1457361045-26221-1-git-send-email-hubert.chrzaniuk@intel.com Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f791908a70e95768596f5bb9e6de4f441d7bf13 Author: Takashi Iwai Date: Wed Feb 24 15:35:22 2016 +0100 drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW The recent commit [0bdf5a05647a: drm/i915: Add reverse mapping between port and intel_encoder] introduced a reverse mapping to retrieve intel_dig_port object from the port number. The code assumed that the port vs intel_dig_port are 1:1 mapping. But in reality, this was a too naive assumption. As Martin reported about the missing HDMI audio on his SNB machine, pre-HSW chips may have multiple intel_dig_port objects corresponding to the same port. Since we assign the mapping statically at the init time and the multiple objects override the map, it may not match with the actually enabled output. This patch tries to address the regression above. The reverse mapping is provided basically only for the audio callbacks, so now we set / clear the mapping dynamically at enabling and disabling HDMI/DP audio, so that we can always track the latest and correct object corresponding to the given port. Fixes: 0bdf5a05647a ('drm/i915: Add reverse mapping between port and intel_encoder') Reported-and-tested-by: Martin Kepplinger Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Takashi Iwai Reviewed-by: Ville Syrjälä Tested-by: Martin Kepplinger Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1456324522-21591-1-git-send-email-tiwai@suse.de (cherry picked from commit 9dfbffcf4ac0707097af9e6c1372192b9d03a357) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_audio.c | 3 +++ drivers/gpu/drm/i915/intel_ddi.c | 1 - drivers/gpu/drm/i915/intel_dp.c | 1 - drivers/gpu/drm/i915/intel_hdmi.c | 2 -- 4 files changed, 3 insertions(+), 4 deletions(-) commit 1666984c8625b3db19a9abc298931d35ab7bc64b Author: Oliver Neukum Date: Mon Mar 7 11:31:10 2016 +0100 usbnet: cleanup after bind() in probe() In case bind() works, but a later error forces bailing in probe() in error cases work and a timer may be scheduled. They must be killed. This fixes an error case related to the double free reported in http://www.spinics.net/lists/netdev/msg367669.html and needs to go on top of Linus' fix to cdc-ncm. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a383b7f0e0ba9f8610bdf88a58591a9cca96c38e Merge: 4de13d7e 5091730 Author: David S. Miller Date: Mon Mar 7 11:39:16 2016 -0500 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: couple of fixes Couple of fixes from Ido. ==================== Signed-off-by: David S. Miller commit 5091730d7795ccb21eb880699b5194730641c70b Author: Ido Schimmel Date: Mon Mar 7 15:15:30 2016 +0100 mlxsw: pci: Correctly determine if descriptor queue is full The descriptor queues for sending (SDQs) and receiving (RDQs) packets are managed by two counters - producer and consumer - which are both 16-bit in size. A queue is considered full when the difference between the two equals the queue's maximum number of descriptors. However, if the producer counter overflows, then it's possible for the full queue check to fail, as it doesn't take the overflow into account. In such a case, descriptors already passed to the device - but for which a completion has yet to be posted - will be overwritten, thereby causing undefined behavior. The above can be achieved under heavy load (~30 netperf instances). Fix that by casting the subtraction result to u16, preventing it from being treated as a signed integer. Fixes: eda6500a987a ("mlxsw: Add PCI bus implementation") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 912b1c89c5043e163f8cfa568512a131976121b2 Author: Ido Schimmel Date: Mon Mar 7 15:15:29 2016 +0100 mlxsw: spectrum: Always decrement bridge's ref count Since we only support one VLAN filtering bridge we need to associate a reference count with it, so that when the last port netdev leaves it, we would know that a different bridge can be offloaded to hardware. When a LAG device is memeber in a bridge and port netdevs are leaving the LAG, we should always decrement the bridge's reference count, as it's incremented for any port in the LAG. Fixes: 4dc236c31733 ("mlxsw: spectrum: Handle port leaving LAG while bridged") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ad09ef2cce91e3a98a32e3bb0a5982a6e8920aa1 Merge: 790b415 02db17f Author: Takashi Iwai Date: Mon Mar 7 11:06:46 2016 +0100 Merge tag 'asoc-fix-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.5 This is far too big a set of fixes for this late in the release cycle but the overwhelming bulk is essentially the same simple fix from Takashi for a cut'n'pasted 64 bit cleanliness issue in the userspace interface where drivers were accessing things using the wrong element in a union which worked OK on 32 bit platforms as the correct element happened to be aligned the same way but with 64 bit platforms ABIs are different and the two members of the union are laid out in different places. They aren't all tagged to stable since some of these chips have vanishingly little chance of being used in 64 bit systems. The other changes are: - A fix for Qualcomm devices to work on big endian systems. The original change is actually correct but triggered a bug in regmap which is too invasive to fix for this cycle and can be worked around by just letting regmap pick the default. - A fix for the Samsung I2S driver locking which wasn't using IRQ safe spinlocks when it needed to. - A fix for the new Intel Sky Lake driver forgetting that C pointer arithmetic takes the type of the pointer into consideration. - A revert of a change to the FSL SSI driver that broke some systems. - A fix for the cleanup path of the wm9713 driver. - A fix for some incorrect register definitions in the ADAU17x1 driver that caused misclocking in some configurations. - A fix for the tracepoints for jack detection to avoid using an internal field of the core jack structure which is no longer present in all configurations. - A fix for another of the new Intel drivers which tried to write to a string literal. commit 0f514e690740e54815441a87708c3326f8aa8709 Author: Mugunthan V N Date: Mon Mar 7 01:41:22 2016 -0700 ARM: dts: dra7: do not gate cpsw clock due to errata i877 Errata id: i877 Description: ------------ The RGMII 1000 Mbps Transmit timing is based on the output clock (rgmiin_txc) being driven relative to the rising edge of an internal clock and the output control/data (rgmiin_txctl/txd) being driven relative to the falling edge of an internal clock source. If the internal clock source is allowed to be static low (i.e., disabled) for an extended period of time then when the clock is actually enabled the timing delta between the rising edge and falling edge can change over the lifetime of the device. This can result in the device switching characteristics degrading over time, and eventually failing to meet the Data Manual Delay Time/Skew specs. To maintain RGMII 1000 Mbps IO Timings, SW should minimize the duration that the Ethernet internal clock source is disabled. Note that the device reset state for the Ethernet clock is "disabled". Other RGMII modes (10 Mbps, 100Mbps) are not affected Workaround: ----------- If the SoC Ethernet interface(s) are used in RGMII mode at 1000 Mbps, SW should minimize the time the Ethernet internal clock source is disabled to a maximum of 200 hours in a device life cycle. This is done by enabling the clock as early as possible in IPL (QNX) or SPL/u-boot (Linux/Android) by setting the register CM_GMAC_CLKSTCTRL[1:0]CLKTRCTRL = 0x2:SW_WKUP. So, do not allow to gate the cpsw clocks using ti,no-idle property in cpsw node assuming 1000 Mbps is being used all the time. If someone does not need 1000 Mbps and wants to gate clocks to cpsw, this property needs to be deleted in their respective board files. Signed-off-by: Mugunthan V N Signed-off-by: Grygorii Strashko Signed-off-by: Lokesh Vutla Cc: Signed-off-by: Paul Walmsley arch/arm/boot/dts/dra7.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2e18f5a1bc18e8af7031b3b26efde25307014837 Author: Lokesh Vutla Date: Mon Mar 7 01:41:21 2016 -0700 ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property Introduce a dt property, ti,no-idle, that prevents an IP to idle at any point. This is to handle Errata i877, which tells that GMAC clocks cannot be disabled. Acked-by: Roger Quadros Tested-by: Mugunthan V N Signed-off-by: Lokesh Vutla Signed-off-by: Sekhar Nori Signed-off-by: Dave Gerlach Acked-by: Rob Herring Cc: Signed-off-by: Paul Walmsley Documentation/devicetree/bindings/arm/omap/omap.txt | 1 + arch/arm/mach-omap2/omap_hwmod.c | 9 ++++++++- arch/arm/mach-omap2/omap_hwmod.h | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) commit 4de13d7ed6ffdcbb34317acaa9236f121176f5f8 Author: Parthasarathy Bhuvaragan Date: Thu Mar 3 17:54:54 2016 +0100 tipc: fix nullptr crash during subscription cancel commit 4d5cfcba2f6e ('tipc: fix connection abort during subscription cancel'), removes the check for a valid subscription before calling tipc_nametbl_subscribe(). This will lead to a nullptr exception when we process a subscription cancel request. For a cancel request, a null subscription is passed to tipc_nametbl_subscribe() resulting in exception. In this commit, we call tipc_nametbl_subscribe() only for a valid subscription. Fixes: 4d5cfcba2f6e ('tipc: fix connection abort during subscription cancel') Reported-by: Anders Widell Signed-off-by: Parthasarathy Bhuvaragan Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/subscr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 11f7f79b40ebfbac6a1bcdbc61d5d13d365e744b Author: Colin Ian King Date: Thu Mar 3 13:47:18 2016 +0000 net: eth: altera: do not free array priv->mdio->irq priv->mdio->irq used to be allocated and required freeing, but it is now a fixed sized array and should no longer be free'd. Issue detected using static analysis with CoverityScan Fixes: e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/altera/altera_tse_main.c | 1 - 1 file changed, 1 deletion(-) commit 57a0f3675489181c31636d204fa5c5daf5fa3c83 Author: Colin Ian King Date: Thu Mar 3 13:43:34 2016 +0000 net/ethoc: do not free array priv->mdio->irq priv->mdio->irq used to be allocated and required freeing, but it is now a fixed sized array and should no longer be free'd. Issue detected using static analysis with CoverityScan Fixes: e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") Signed-off-by: Colin Ian King Reviewed-by: Tobias Klauser Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/ethoc.c | 1 - 1 file changed, 1 deletion(-) commit 44ef548f4f8bbc739070583f9844ff0cd8fcc6b4 Author: Phil Sutter Date: Thu Mar 3 14:34:14 2016 +0100 net: sched: fix act_ipt for LOG target Before calling the destroy() or target() callbacks, the family parameter field has to be initialized. Otherwise at least the LOG target will refuse to work and upon removal oops the kernel. Cc: Jamal Hadi Salim Signed-off-by: Phil Sutter Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_ipt.c | 2 ++ 1 file changed, 2 insertions(+) commit eb1f420214adf81fd98d9e8df6b60318ef883102 Author: Colin Ian King Date: Thu Mar 3 13:27:56 2016 +0000 asix: do not free array priv->mdio->irq Used to be allocated and required freeing, but now priv->mdio->irq is now a fixed sized array and should no longer be free'd. Issue detected using static analysis with CoverityScan Fixes: e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/usb/ax88172a.c | 1 - 1 file changed, 1 deletion(-) commit 7bfc60822d1cd44069f4fdb16f81a66f716bf787 Author: Atsushi Nemoto Date: Thu Mar 3 09:07:51 2016 +0900 gianfar: Enable eTSEC-106 erratum w/a for MPC8548E Rev2 Enable workaround for MPC8548E erratum eTSEC 106, "Excess delays when transmitting TOE=1 large frames". (see commit 53fad77375ce "gianfar: Enable eTSEC-20 erratum w/a for P2020 Rev1") This erratum was fixed in Rev 3.1.x. Signed-off-by: Atsushi Nemoto Acked-by: Claudiu Manoil Signed-off-by: David S. Miller drivers/net/ethernet/freescale/gianfar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f6cede5b49e822ebc41a099fe41ab4989f64e2cb Author: Linus Torvalds Date: Sun Mar 6 14:48:03 2016 -0800 Linux 4.5-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d55e08c8448def74ae4236cd6e1c3714d78f5abd Merge: dd273a8 f3c87e9 Author: Linus Torvalds Date: Sun Mar 6 14:14:54 2016 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fix from Olof Johansson: "Tiny fixes branch this week, in fact only one patch. Turns out the USB support for a Renesas board was developed on a pre-release board that ended up being changed before shipping. To avoid breakage on those boards, and avoid confusion, it's a reasonable idea to patch now instead of later. There are no known users of the pre-release variant any more" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: porter: remove enable prop from HS-USB device node commit dd273a8071124c2235c45d2ca756acc90ca31ed3 Merge: 21b27a7 f474c8c Author: Linus Torvalds Date: Sun Mar 6 13:51:27 2016 -0800 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Just two ARM fixes this time: one to fix the hyp-stub for older ARM CPUs, and another to fix the set_memory_xx() permission functions to deal with zero sizes correctly" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8544/1: set_memory_xx fixes ARM: 8534/1: virt: fix hyp-stub build for pre-ARMv7 CPUs commit 7f6aff3a29b08fc4234c8136eb1ac31b4897522c Author: Brian Foster Date: Mon Mar 7 08:22:22 2016 +1100 xfs: only run torn log write detection on dirty logs XFS uses CRC verification over a sub-range of the head of the log to detect and handle torn writes. This torn log write detection currently runs unconditionally at mount time, regardless of whether the log is dirty or clean. This is problematic in cases where a filesystem might end up being moved across different, incompatible (i.e., opposite byte-endianness) architectures. The problem lies in the fact that log data is not necessarily written in an architecture independent format. For example, certain bits of data are written in native endian format. Further, the size of certain log data structures differs (i.e., struct xlog_rec_header) depending on the word size of the cpu. This leads to false positive crc verification errors and ultimately failed mounts when a cleanly unmounted filesystem is mounted on a system with an incompatible architecture from data that was written near the head of the log. Update the log head/tail discovery code to run torn write detection only when the log is not clean. This means something other than an unmount record resides at the head of the log and log recovery is imminent. It is a requirement to run log recovery on the same type of host that had written the content of the dirty log and therefore CRC failures are legitimate corruptions in that scenario. Reported-by: Jan Beulich Tested-by: Jan Beulich Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) commit 717bc0ebca0bce9cb3edfc31b49b384a1d55db1c Author: Brian Foster Date: Mon Mar 7 08:22:22 2016 +1100 xfs: refactor in-core log state update to helper Once the record at the head of the log is identified and verified, the in-core log state is updated based on the record. This includes information such as the current head block and cycle, the start block of the last record written to the log, the tail lsn, etc. Once torn write detection is conditional, this logic will need to be reused. Factor the code to update the in-core log data structures into a new helper function. This patch does not change behavior. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 52 ++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 19 deletions(-) commit 65b99a08b350876e8835fc0e7173598165f64dee Author: Brian Foster Date: Mon Mar 7 08:22:22 2016 +1100 xfs: refactor unmount record detection into helper Once the mount sequence has identified the head and tail blocks of the physical log, the record at the head of the log is located and examined for an unmount record to determine if the log is clean. This currently occurs after torn write verification of the head region of the log. This must ultimately be separated from torn write verification and may need to be called again if the log head is walked back due to a torn write (to determine whether the new head record is an unmount record). Separate this logic into a new helper function. This patch does not change behavior. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 153 ++++++++++++++++++++++++++++------------------- 1 file changed, 93 insertions(+), 60 deletions(-) commit 82ff6cc26e98f9bba8e2a10f727e335fa241cc47 Author: Brian Foster Date: Mon Mar 7 08:22:22 2016 +1100 xfs: separate log head record discovery from verification The code that locates the log record at the head of the log is buried in the log head verification function. This is fine when torn write verification occurs unconditionally, but this behavior is problematic for filesystems that might be moved across systems with different architectures. In preparation for separating examination of the log head for unmount records from torn write detection, lift the record location logic out of the log verification function and into the caller. This patch does not change behavior. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 21b27a74ec0f4e52e001912c89570a49494705a2 Merge: a58b9ad 5ea5c5e Author: Linus Torvalds Date: Sun Mar 6 11:31:13 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull ceph fix from Sage Weil: "This is a final commit we missed to align the protocol compatibility with the feature bits. It decodes a few extra fields in two different messages and reports EIO when they are used (not yet supported)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: ceph: initial CEPH_FEATURE_FS_FILE_LAYOUT_V2 support commit a58b9adaf9f0913af2e5bf69565266335033b4fd Merge: 1306b04 e4f6daa Author: Linus Torvalds Date: Sun Mar 6 11:24:05 2016 -0800 Merge tag 'upstream-4.5-rc7' of git://git.infradead.org/linux-ubifs Pull UBI fix from Richard Weinberger: "This contains a single bug fix for UBI" * tag 'upstream-4.5-rc7' of git://git.infradead.org/linux-ubifs: ubi: Fix out of bounds write in volume update code commit 1306b0471ff11409e4f18f3cde00215d367e007a Merge: 76d9c6c ad32a1f Author: Linus Torvalds Date: Sun Mar 6 11:19:28 2016 -0800 Merge branch 'for-linus-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML fixes from Richard Weinberger: "This contains three bug/build fixes" * 'for-linus-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: use %lx format specifiers for unsigned longs um: Export pm_power_off Revert "um: Fix get_signal() usage" commit 76d9c6c1c6eb115c2c686d5cbf10a68857511853 Merge: b8155fe e723e3f Author: Linus Torvalds Date: Sun Mar 6 11:14:16 2016 -0800 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "Another round of fixes for 4.5: - Fix the use of an undocumented syntactial variant of the .type pseudo op which is not supported by the LLVM assembler. - Fix invalid initialization on S-cache-less systems. - Fix possible information leak from the kernel stack for SIGFPE. - Fix handling of copy_{from,to}_user() return value in KVM - Fix the last instance of irq_to_gpio() which now was causing build errors" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: traps: Fix SIGFPE information leak from `do_ov' and `do_trap_or_bp' MIPS: kvm: Fix ioctl error handling. MIPS: scache: Fix scache init with invalid line size. MIPS: Avoid variant of .type unsupported by LLVM Assembler MIPS: jz4740: Fix surviving instance of irq_to_gpio() commit b8155fe1b2963ab2c53140929eb2362afcb9ccfe Merge: 7addb7f 37c5e94 Author: Linus Torvalds Date: Sun Mar 6 11:08:06 2016 -0800 Merge tag 'powerpc-4.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - cxl: Fix PSL timebase synchronization detection from Frederic Barrat - Fix oops when destroying hw_breakpoint event from Ravi Bangoria - Avoid lbarx on e5500 from Scott Wood * tag 'powerpc-4.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/fsl-book3e: Avoid lbarx on e5500 powerpc/hw_breakpoint: Fix oops when destroying hw_breakpoint event cxl: Fix PSL timebase synchronization detection commit 7addb7fa1085e29398c2aef43f0b98c3c4b7e749 Merge: 3e09b7e 7314d22 Author: Linus Torvalds Date: Sun Mar 6 11:03:34 2016 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "One I2C bugfix ensuring correct memory allocation in a driver" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: brcmstb: allocate correct amount of memory for regmap commit 3e09b7e93dae6cd9fcabc5dd36fc6973d3049c30 Merge: 6794402 861c384 Author: Linus Torvalds Date: Sun Mar 6 10:50:00 2016 -0800 Merge tag 'usb-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB driver ids for 4.5-rc7, and the removal of a driver we merged in 4.5-rc1 but it turns out it's not needed as the hardware is the same as a driver we already have in the tree. This was only figured out after doing a lot of cleanup on it, gotta love vendor-provided drivers... The new device ids for the devices for this driver will be added later on when testing is completed, but for now, we will remove the driver to keep people from accidentally cleaning it up. All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: qcserial: add Sierra Wireless EM74xx device ID Revert "USB: serial: add Moxa UPORT 11x0 driver" USB: serial: option: add support for Quectel UC20 USB: serial: option: add support for Telit LE922 PID 0x1045 USB: cp210x: Add ID for Parrot NMEA GPS Flight Recorder USB: qcserial: add Dell Wireless 5809e Gobi 4G HSPA+ (rev3) usb: chipidea: otg: change workqueue ci_otg as freezable commit 7f54ab5ff52fb0b91569bc69c4a6bc5cac1b768d Author: Nicholas Bellinger Date: Sat Mar 5 20:00:12 2016 -0800 target: Drop incorrect ABORT_TASK put for completed commands This patch fixes a recent ABORT_TASK regression associated with commit febe562c, where a left-over target_put_sess_cmd() would still be called when __target_check_io_state() detected a command has already been completed, and explicit ABORT must be avoided. Note commit febe562c dropped the local kref_get_unless_zero() check in core_tmr_abort_task(), but did not drop this extra corresponding target_put_sess_cmd() in the failure path. So go ahead and drop this now bogus target_put_sess_cmd(), and avoid this potential use-after-free. Reported-by: Dan Lane Cc: Quinn Tran Cc: Himanshu Madhani Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Cc: stable@vger.kernel.org # 3.14+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 1 - 1 file changed, 1 deletion(-) commit ad32a1f3c36b046b2e7b0361b88c18e3af61419e Author: Colin Ian King Date: Sat Jan 23 19:17:59 2016 +0000 um: use %lx format specifiers for unsigned longs static analysis from cppcheck detected %x being used for unsigned longs: [arch/x86/um/os-Linux/task_size.c:112]: (warning) %x in format string (no. 1) requires 'unsigned int' but the argument type is 'unsigned long'. Use %lx instead of %x Signed-off-by: Colin Ian King Signed-off-by: Richard Weinberger arch/x86/um/os-Linux/task_size.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0834f9cc9f1c5a104e87000378b9cda290c4f406 Author: Richard Weinberger Date: Mon Jan 25 23:24:21 2016 +0100 um: Export pm_power_off ...modules are using this symbol. Export it like all other archs to. Signed-off-by: Richard Weinberger arch/um/kernel/reboot.c | 1 + 1 file changed, 1 insertion(+) commit 322740efbb7ca26df845161e61cc41484b7e328e Author: Richard Weinberger Date: Mon Jan 25 23:33:30 2016 +0100 Revert "um: Fix get_signal() usage" Commit db2f24dc240856fb1d78005307f1523b7b3c121b was plain wrong. I did not realize the we are allowed to loop here. In fact we have to loop and must not return to userspace before all SIGSEGVs have been delivered. Other archs do this directly in their entry code, UML does it here. Reported-by: Al Viro Signed-off-by: Richard Weinberger arch/um/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4f6daac20332448529b11f09388f1d55ef2084c Author: Richard Weinberger Date: Sun Feb 21 10:53:03 2016 +0100 ubi: Fix out of bounds write in volume update code ubi_start_leb_change() allocates too few bytes. ubi_more_leb_change_data() will write up to req->upd_bytes + ubi->min_io_size bytes. Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger Reviewed-by: Boris Brezillon drivers/mtd/ubi/upd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67944024c1cdd897e49a09b0d6af3ea38d1388ca Merge: 40fea2e 790b415 Author: Linus Torvalds Date: Sat Mar 5 12:35:48 2016 -0800 Merge tag 'sound-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "It's our tradition to get a high volume of fixes late at rc7: this time, X32 ABI breakage was found and this resulted in a high number LOCs. The necessary changes to ALSA core codes were fairly straightforward, and more importantly, they are specific to X32, thus should be safe to apply. Other than that, rather a collection of small fixes: - Removal of the code that blocks too long at closing the OSS sequencer client (which was spotted by syzkaller, unsurprisingly) - Fixes races at HD-audio HDMI i915 audio binding - a few HDSP/HDPM zero-division fixes - Quirks for HD-audio and USB-audio as usual" * tag 'sound-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - hdmi defer to register acomp eld notifier ALSA: hda - hdmi add wmb barrier for audio component ALSA: hda - Fix mic issues on Acer Aspire E1-472 ALSA: seq: oss: Don't drain at closing a client ALSA: usb-audio: Add a quirk for Plantronics DA45 ALSA: hdsp: Fix wrong boolean ctl value accesses ALSA: hdspm: Fix zero-division ALSA: hdspm: Fix wrong boolean ctl value accesses ALSA: timer: Fix ioctls for X32 ABI ALSA: timer: Fix broken compat timer user status ioctl ALSA: rawmidi: Fix ioctls X32 ABI ALSA: rawmidi: Use comapt_put_timespec() ALSA: pcm: Fix ioctls for X32 ABI ALSA: ctl: Fix ioctls for X32 ABI commit 40fea2ed0bcedcab6a7c318f4be2df2bcab4f2eb Merge: ee8f395 f169212 Author: Linus Torvalds Date: Sat Mar 5 12:34:29 2016 -0800 Merge tag 'dmaengine-fix-4.5-rc7' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fix from Vinod Koul: "One minor fix on pxa driver to fix the cyclic dma tranfers" * tag 'dmaengine-fix-4.5-rc7' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: pxa_dma: fix cyclic transfers commit ee8f3955c0ef4c7a90a5f707c37c4cb3711ff626 Merge: a7c9b60 fbe093a Author: Linus Torvalds Date: Sat Mar 5 12:32:34 2016 -0800 Merge tag 'media/v4.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - some last time changes before we stablize the new entity function integer numbers at uAPI - probe: fix erroneous return value on i2c/adp1653 driver - fix tx 5v detect regression on adv7604 driver - fix missing unlock on error in vpfe_prepare_pipeline() on davinci_vpfe driver * tag 'media/v4.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] media: Sanitise the reserved fields of the G_TOPOLOGY IOCTL arguments [media] media.h: postpone connectors entities [media] media.h: use hex values for range offsets, move connectors base up. [media] adv7604: fix tx 5v detect regression [media] media.h: get rid of MEDIA_ENT_F_CONN_TEST [media] [for,v4.5] media.h: increase the spacing between function ranges [media] media: i2c/adp1653: probe: fix erroneous return value [media] media: davinci_vpfe: fix missing unlock on error in vpfe_prepare_pipeline() commit 1e1490a38504419e349caa1b7d55d5c141a9bccb Author: Mario Kleiner Date: Tue Mar 1 21:31:17 2016 +0100 drm/radeon: Fix error handling in radeon_flip_work_func. This is a port of the patch "drm/amdgpu: Fix error handling in amdgpu_flip_work_func." to fix the following problem for radeon as well which was reported against amdgpu: The patch e1d09dc0ccc6: "drm/amdgpu: Don't hang in amdgpu_flip_work_func on disabled crtc." from Feb 19, 2016, leads to the following static checker warning, as reported by Dan Carpenter in https://lists.freedesktop.org/archives/dri-devel/2016-February/101987.html drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:127 amdgpu_flip_work_func() warn: should this be 'repcnt == -1' drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:136 amdgpu_flip_work_func() error: double unlock 'spin_lock:&crtc->dev->event_lock' drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:136 amdgpu_flip_work_func() error: double unlock 'irqsave:flags' This patch fixes both reported problems: Change post-decrement of repcnt to pre-decrement, so it can't underflow anymore, but still performs up to three repetitions - three is the maximum one could expect in practice. Move the spin_unlock_irqrestore to where it actually belongs. Reviewed-by: Michel Dänzer Reported-by: Dan Carpenter Signed-off-by: Mario Kleiner Cc: # 4.4+ Cc: Michel Dänzer Cc: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90e94b160c7f647ddffda707f5e3c0c66c170df8 Author: Mario Kleiner Date: Tue Mar 1 21:31:16 2016 +0100 drm/amdgpu: Fix error handling in amdgpu_flip_work_func. The patch e1d09dc0ccc6: "drm/amdgpu: Don't hang in amdgpu_flip_work_func on disabled crtc." from Feb 19, 2016, leads to the following static checker warning, as reported by Dan Carpenter in https://lists.freedesktop.org/archives/dri-devel/2016-February/101987.html drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:127 amdgpu_flip_work_func() warn: should this be 'repcnt == -1' drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:136 amdgpu_flip_work_func() error: double unlock 'spin_lock:&crtc->dev->event_lock' drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:136 amdgpu_flip_work_func() error: double unlock 'irqsave:flags' This patch fixes both reported problems: Change post-decrement of repcnt to pre-decrement, so it can't underflow anymore, but still performs up to three repetitions - three is the maximum one could expect in practice. Move the spin_unlock_irqrestore to where it actually belongs. Reviewed-by: Michel Dänzer Reported-by: Dan Carpenter Signed-off-by: Mario Kleiner Cc: # 4.4+ Cc: Michel Dänzer Cc: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02db17ff376893f65f45974b0897e70e6695034e Merge: b23229e 251d604 8019c0b 8293004 39a79fe da9b930 Author: Mark Brown Date: Sat Mar 5 21:27:13 2016 +0900 Merge remote-tracking branches 'asoc/fix/wm8985', 'asoc/fix/wm8994', 'asoc/fix/wm8996', 'asoc/fix/wm9081' and 'asoc/fix/wm9713' into asoc-linus commit b23229e4d5d883652160b061c52743482de8f82c Merge: 3b22371 316fa9e 8733f99 154a0fd 0cad105 c41a024 d078482 b5ab265 Author: Mark Brown Date: Sat Mar 5 21:26:58 2016 +0900 Merge remote-tracking branches 'asoc/fix/samsung', 'asoc/fix/tlv320dac33', 'asoc/fix/wl1273', 'asoc/fix/wm8753', 'asoc/fix/wm8904', 'asoc/fix/wm8958' and 'asoc/fix/wm8983' into asoc-linus commit 3b22371e202d2c2f48bb4192879cf611e91a97be Merge: 92e9f77 f4833a5 9af3904 58c0213 f4d438e 419396d a947b72 Author: Mark Brown Date: Sat Mar 5 21:26:45 2016 +0900 Merge remote-tracking branches 'asoc/fix/jack', 'asoc/fix/max98088', 'asoc/fix/max98095', 'asoc/fix/omap', 'asoc/fix/pxa' and 'asoc/fix/qcom-be' into asoc-linus commit 92e9f77306e3dddb707ae744333ea204c9727bac Merge: 6374fda 4b60631 7c139db 15c6657 89300b4 fe9aba1 56e5fd8 Author: Mark Brown Date: Sat Mar 5 21:26:33 2016 +0900 Merge remote-tracking branches 'asoc/fix/ab8500', 'asoc/fix/adau17x1', 'asoc/fix/adsp', 'asoc/fix/cs42l51', 'asoc/fix/da732x' and 'asoc/fix/fsl-ssi' into asoc-linus commit 6374fda1472524deaa492da1ce0adca600343996 Merge: 1c750eb 508ddfb Author: Mark Brown Date: Sat Mar 5 21:26:30 2016 +0900 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 1c750eb580d332f740af456748de4b206e442c3b Merge: fc77dbd 741338f Author: Mark Brown Date: Sat Mar 5 21:26:28 2016 +0900 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus commit a7c9b603cf2371edacb054abc35597e810c1e5fd Merge: c12f83c 6e2452d Author: Linus Torvalds Date: Fri Mar 4 18:47:18 2016 -0800 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvcimm fix from Dan Williams: "One straggling fix for NVDIMM support. The KVM/QEMU enabling for NVDIMMs has recently reached the point where it is able to accept some ACPI _DSM requests from a guest VM. However they immediately found that the 4.5-rc kernel is unusable because the kernel's 'nfit' driver fails to load upon seeing a valid "not supported" response from the virtual BIOS for an address range scrub command. It is not mandatory that a platform implement address range scrubbing, so this fix from Vishal properly treats the 'not supported' response as 'skip scrubbing and continue loading the driver'" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nfit: Continue init even if ARS commands are unimplemented commit c12f83c3099c4dd73fe721409d2ce18ca79a753d Merge: fab3e94 21b8171 Author: Linus Torvalds Date: Fri Mar 4 18:41:40 2016 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two fairly simple fixes. One is a regression with ipr firmware loading caused by one of the trivial patches in the last merge window which failed to strip the \n from the file name string, so now the firmware loader no longer works leading to a lot of unhappy ipr users; fix by stripping the \n. The second is a memory leak within SCSI: the BLK_PREP_INVALID state was introduced a recent fix but we forgot to account for it correctly when freeing state, resulting in memory leakage. Add the correct state freeing in scsi_prep_return()" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: ipr: Fix regression when loading firmware SCSI: Free resources when we return BLKPREP_INVALID commit fab3e94a624f6ac6c4d8b8dc027bb03818a6cf1b Merge: e5322c5 dc8b4af Author: Linus Torvalds Date: Fri Mar 4 18:31:36 2016 -0800 Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Assorted fixes for libata drivers. - Turns out HDIO_GET_32BIT ioctl was subtly broken all along. - Recent update to ahci external port handling was incorrectly marking hotpluggable ports as external making userland handle devices connected to those ports incorrectly. - ahci_xgene needs its own irq handler to work around a hardware erratum. libahci updated to allow irq handler override. - Misc driver specific updates" * 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ata: ahci: don't mark HotPlugCapable Ports as external/removable ahci: Workaround for ThunderX Errata#22536 libata: Align ata_device's id on a cacheline Adding Intel Lewisburg device IDs for SATA pata-rb532-cf: get rid of the irq_to_gpio() call libata: fix HDIO_GET_32BIT ioctl ahci_xgene: Implement the workaround to fix the missing of the edge interrupt for the HOST_IRQ_STAT. ata: Remove the AHCI_HFLAG_EDGE_IRQ support from libahci. libahci: Implement the capability to override the generic ahci interrupt handler. commit e5322c54068162846fdbac0f0891cd95f37d4c4e Merge: bdf9d29 4d6af73 Author: Linus Torvalds Date: Fri Mar 4 18:17:17 2016 -0800 Merge branch 'for-linus2' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Round 2 of this. I cut back to the bare necessities, the patch is still larger than it usually would be at this time, due to the number of NVMe fixes in there. This pull request contains: - The 4 core fixes from Ming, that fix both problems with exceeding the virtual boundary limit in case of merging, and the gap checking for cloned bio's. - NVMe fixes from Keith and Christoph: - Regression on larger user commands, causing problems with reading log pages (for instance). This touches both NVMe, and the block core since that is now generally utilized also for these types of commands. - Hot removal fixes. - User exploitable issue with passthrough IO commands, if !length is given, causing us to fault on writing to the zero page. - Fix for a hang under error conditions - And finally, the current series regression for umount with cgroup writeback, where the final flush would happen async and hence open up window after umount where the device wasn't consistent. fsck right after umount would show this. From Tejun" * 'for-linus2' of git://git.kernel.dk/linux-block: block: support large requests in blk_rq_map_user_iov block: fix blk_rq_get_max_sectors for driver private requests nvme: fix max_segments integer truncation nvme: set queue limits for the admin queue writeback: flush inode cgroup wb switches instead of pinning super_block NVMe: Fix 0-length integrity payload NVMe: Don't allow unsupported flags NVMe: Move error handling to failed reset handler NVMe: Simplify device reset failure NVMe: Fix namespace removal deadlock NVMe: Use IDA for namespace disk naming NVMe: Don't unmap controller registers on reset block: merge: get the 1st and last bvec via helpers block: get the 1st and last bvec via helpers block: check virt boundary in bio_will_gap() block: bio: introduce helpers to get the 1st and last bvec commit bdf9d29799296fd787a9d2b99cb8feff77e2b9db Merge: 638c201 11d8d64 Author: Linus Torvalds Date: Fri Mar 4 18:06:49 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "Additional 4.5-rc6 fixes. I have four patches today. I had previously thought I had submitted two of them last week, but they were accidentally skipped :-(. - One fix to an error path in the core - One fix for RoCE in the core - Two related fixes for the core/mlx5" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/core: Use GRH when the path hop-limit > 0 IB/{core, mlx5}: Fix input len in vendor part of create_qp/srq IB/mlx5: Avoid using user-index for SRQs IB/core: Fix missed clean call in registration path commit 638c201e3fffd2699e58305030d58730355ece12 Merge: b80e8e2 26bae5e Author: Linus Torvalds Date: Fri Mar 4 17:56:48 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This contains one i915 patch twice, as I merged it locally for testing, and then pulled some stuff in on top, and then Jani sent to me, I didn't think it was worth redoing all the merges of what I had tested. Summary: - amdgpu/radeon fixes for some more power management and VM races. - Two i915 fixes, one for the a recent regression, one another power management fix for skylake. - Two tegra dma mask fixes for a regression. - One ast fix for a typo I made transcribing the userspace driver, that I'd like to get into stable so I don't forget about it" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: gpu: host1x: Set DMA ops on device creation gpu: host1x: Set DMA mask drm/amdgpu: return from atombios_dp_get_dpcd only when error drm/amdgpu/cz: remove commented out call to enable vce pg drm/amdgpu/powerplay/cz: enable/disable vce dpm independent of vce pg drm/amdgpu/cz: enable/disable vce dpm even if vce pg is disabled drm/amdgpu/gfx8: specify which engine to wait before vm flush drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well drm/amd/powerplay: send event to notify powerplay all modules are initialized. drm/amd/powerplay: export AMD_PP_EVENT_COMPLETE_INIT task to amdgpu. drm/radeon/pm: update current crtc info after setting the powerstate drm/amdgpu/pm: update current crtc info after setting the powerstate drm/i915: Balance assert_rpm_wakelock_held() for !IS_ENABLED(CONFIG_PM) drm/i915/skl: Fix power domain suspend sequence drm/ast: Fix incorrect register check for DRAM width drm/i915: Balance assert_rpm_wakelock_held() for !IS_ENABLED(CONFIG_PM) commit b80e8e2811ecb2ace7ff851d887fe8b6db4425bf Merge: ed385c7 bfc6b97 Author: Linus Torvalds Date: Fri Mar 4 17:51:16 2016 -0800 Merge tag 'pm+acpi-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: "Two build fixes for cpufreq drivers (including one for breakage introduced recently) and a fix for a graph tracer crash when used over suspend-to-RAM on x86. Specifics: - Prevent the graph tracer from crashing when used over suspend-to- RAM on x86 by pausing it before invoking do_suspend_lowlevel() and un-pausing it when that function has returned (Todd Brandt). - Fix build issues in the qoriq and mediatek cpufreq drivers related to broken dependencies on THERMAL (Arnd Bergmann)" * tag 'pm+acpi-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / sleep / x86: Fix crash on graph trace through x86 suspend cpufreq: mediatek: allow building as a module cpufreq: qoriq: allow building as module with THERMAL=m commit ed385c7a1752e6a87622e5a2a80808cfb8917305 Merge: c51797d dfd55ad Author: Linus Torvalds Date: Fri Mar 4 17:43:40 2016 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Will Deacon: "Arm64 fix for -rc7. Without it, our struct page array can overflow the vmemmap region on systems with a large PHYS_OFFSET. Nothing else on the radar at the moment, so hopefully that's it for 4.5 from us. Summary: Ensure struct page array fits within vmemmap area" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: vmemmap: use virtual projection of linear region commit c51797d25d84833804e9e6950c8c1abbe6c73808 Merge: 2cdcb2b 44248af Author: Linus Torvalds Date: Fri Mar 4 17:36:46 2016 -0800 Merge tag 'for-linus-20160304' of git://git.infradead.org/linux-mtd Pull jffs2 fixes from David Woodhouse: "This contains two important JFFS2 fixes marked for stable: - a lock ordering problem between the page lock and the internal f->sem mutex, which was causing occasional deadlocks in garbage collection - a scan failure causing moved directories to sometimes end up appearing to have hard links. There are also a couple of trivial MAINTAINERS file updates" * tag 'for-linus-20160304' of git://git.infradead.org/linux-mtd: MAINTAINERS: add maintainer entry for FREESCALE GPMI NAND driver Fix directory hardlinks from deleted directories jffs2: Fix page lock / f->sem deadlock Revert "jffs2: Fix lock acquisition order bug in jffs2_write_begin" MAINTAINERS: update Han's email commit 2cdcb2b5b5d6d7c1bdefbc1a63187d47fd809408 Merge: 78baab7 909c3a2 Author: Linus Torvalds Date: Fri Mar 4 17:31:32 2016 -0800 Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fix from Chris Mason: "Filipe nailed down a problem where tree log replay would do some work that orphan code wasn't expecting to be done yet, leading to BUG_ON" * 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix loading of orphan roots leading to BUG_ON commit c57753d4541d5104284abbdceb841e690394e55f Author: Jorge Ramirez-Ortiz Date: Tue Mar 1 16:04:00 2016 -0500 mtd: nand: tests: fix regression introduced in mtd_nandectest Offending Commit: 6e94119 "mtd: nand: return consistent error codes in ecc.correct() implementations" The new error code was not being handled properly in double bit error detection. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Boris Brezillon Tested-by: Franklin S Cooper Jr Signed-off-by: Brian Norris drivers/mtd/tests/mtd_nandecctest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78baab7aa843ef01644195d341bee118cbe4bf19 Merge: e3c2ef4 e57cbaf Author: Linus Torvalds Date: Fri Mar 4 16:57:04 2016 -0800 Merge tag 'trace-fixes-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "A feature was added in 4.3 that allowed users to filter trace points on a tasks "comm" field. But this prevented filtering on a comm field that is within a trace event (like sched_migrate_task). When trying to filter on when a program migrated, this change prevented the filtering of the sched_migrate_task. To fix this, the event fields are examined first, and then the extra fields like "comm" and "cpu" are examined. Also, instead of testing to assign the comm filter function based on the field's name, the generic comm field is given a new filter type (FILTER_COMM). When this field is used to filter the type is checked. The same is done for the cpu filter field. Two new special filter types are added: "COMM" and "CPU". This allows users to still filter the tasks comm for events that have "comm" as one of their fields, in cases that users would like to filter sched_migrate_task on the comm of the task that called the event, and not the comm of the task that is being migrated" * tag 'trace-fixes-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Do not have 'comm' filter override event 'comm' field commit 6e2452dff4441e3dc24d415c8b2cda8a3ba52116 Author: Vishal Verma Date: Thu Mar 3 15:39:41 2016 -0700 nfit: Continue init even if ARS commands are unimplemented If firmware doesn't implement any of the ARS commands, take that to mean that ARS is unsupported, and continue to initialize regions without bad block lists. We cannot make the assumption that ARS commands will be unconditionally supported on all NVDIMMs. Reported-by: Haozhong Zhang Signed-off-by: Vishal Verma Acked-by: Xiao Guangrong Tested-by: Haozhong Zhang Signed-off-by: Dan Williams drivers/acpi/nfit.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit f474c8c857d996f34c39f66bbed23faaa739fad6 Author: Mika Penttilä Date: Mon Feb 22 17:56:52 2016 +0100 ARM: 8544/1: set_memory_xx fixes Allow zero size updates. This makes set_memory_xx() consistent with x86, s390 and arm64 and makes apply_to_page_range() not to BUG() when loading modules. Signed-off-by: Mika Penttilä mika.penttila@nextfour.com Signed-off-by: Russell King arch/arm/mm/pageattr.c | 3 +++ 1 file changed, 3 insertions(+) commit 26bae5e04c3570728787f809b13546a8169fdf95 Merge: 0dff973 c95469a Author: Dave Airlie Date: Sat Mar 5 07:53:25 2016 +1000 Merge tag 'drm/tegra/for-4.5-rc7' of git://anongit.freedesktop.org/tegra/linux into drm-fixes drm/tegra: Fixes for v4.5-rc7 Two small fixes that restore PRIME support. * tag 'drm/tegra/for-4.5-rc7' of git://anongit.freedesktop.org/tegra/linux: gpu: host1x: Set DMA ops on device creation gpu: host1x: Set DMA mask commit e723e3f7f9591b79e8c56b3d7c5a204a9c571b55 Author: Maciej W. Rozycki Date: Fri Mar 4 01:42:49 2016 +0000 MIPS: traps: Fix SIGFPE information leak from `do_ov' and `do_trap_or_bp' Avoid sending a partially initialised `siginfo_t' structure along SIGFPE signals issued from `do_ov' and `do_trap_or_bp', leading to information leaking from the kernel stack. Signed-off-by: Maciej W. Rozycki Cc: stable@vger.kernel.org Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bfc6b97d528def357adcbdadf71b21c8e5f7dbc4 Merge: fc77dbd 3c2002a 92f9e17 Author: Rafael J. Wysocki Date: Fri Mar 4 22:41:05 2016 +0100 Merge branches 'pm-cpufreq-fixes' and 'pm-sleep-fixes' * pm-cpufreq-fixes: cpufreq: mediatek: allow building as a module cpufreq: qoriq: allow building as module with THERMAL=m * pm-sleep-fixes: PM / sleep / x86: Fix crash on graph trace through x86 suspend commit 5ea5c5e0a7f70b256417d3b6e36bd9851504babd Author: Yan, Zheng Date: Sun Feb 14 18:06:41 2016 +0800 ceph: initial CEPH_FEATURE_FS_FILE_LAYOUT_V2 support Add support for the format change of MClientReply/MclientCaps. Also add code that denies access to inodes with pool_ns layouts. Signed-off-by: Yan, Zheng Reviewed-by: Sage Weil fs/ceph/addr.c | 4 ++++ fs/ceph/caps.c | 27 ++++++++++++++++++++++++--- fs/ceph/inode.c | 2 ++ fs/ceph/mds_client.c | 16 ++++++++++++++++ fs/ceph/mds_client.h | 1 + fs/ceph/super.h | 1 + include/linux/ceph/ceph_features.h | 1 + 7 files changed, 49 insertions(+), 3 deletions(-) commit 390fd4fa9f1053e282e871af42eb32ba0ea76f88 Merge: c1bb0a5 d694b06 Author: David S. Miller Date: Fri Mar 4 14:32:47 2016 -0500 Merge tag 'linux-can-fixes-for-4.5-20160304' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-03-04 this is a pull request for net/master. There is one patch from Ed Spiridonov, which increases the performance of the mcp251x SPI CAN driver, by avoiding to write to error flag register if it's unnecessary. ==================== Signed-off-by: David S. Miller commit c95469aa5a188384ccf8ac520ece931c66caf8aa Author: Alexandre Courbot Date: Fri Feb 26 18:06:53 2016 +0900 gpu: host1x: Set DMA ops on device creation Currently host1x-instanciated devices have their dma_ops left to NULL, which makes any DMA operation (like buffer import) on ARM64 fallback to the dummy_dma_ops and fail with an error. This patch calls of_dma_configure() with the host1x node when creating such a device, so the proper DMA operations are set. Suggested-by: Thierry Reding Signed-off-by: Alexandre Courbot Signed-off-by: Thierry Reding drivers/gpu/host1x/bus.c | 2 ++ 1 file changed, 2 insertions(+) commit 097452e61366a939a4772332181cea7cdcc74760 Author: Alexandre Courbot Date: Fri Feb 26 18:06:52 2016 +0900 gpu: host1x: Set DMA mask The default DMA mask covers a 32 bits address range, but host1x devices can address a larger range on TK1 and TX1. Set the DMA mask to the range addressable when we use the IOMMU to prevent the use of bounce buffers. Signed-off-by: Alexandre Courbot Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 7 +++++++ drivers/gpu/host1x/dev.h | 1 + 2 files changed, 8 insertions(+) commit e57cbaf0eb006eaa207395f3bfd7ce52c1b5539c Author: Steven Rostedt (Red Hat) Date: Thu Mar 3 17:18:20 2016 -0500 tracing: Do not have 'comm' filter override event 'comm' field Commit 9f61668073a8d "tracing: Allow triggers to filter for CPU ids and process names" added a 'comm' filter that will filter events based on the current tasks struct 'comm'. But this now hides the ability to filter events that have a 'comm' field too. For example, sched_migrate_task trace event. That has a 'comm' field of the task to be migrated. echo 'comm == "bash"' > events/sched_migrate_task/filter will now filter all sched_migrate_task events for tasks named "bash" that migrates other tasks (in interrupt context), instead of seeing when "bash" itself gets migrated. This fix requires a couple of changes. 1) Change the look up order for filter predicates to look at the events fields before looking at the generic filters. 2) Instead of basing the filter function off of the "comm" name, have the generic "comm" filter have its own filter_type (FILTER_COMM). Test against the type instead of the name to assign the filter function. 3) Add a new "COMM" filter that works just like "comm" but will filter based on the current task, even if the trace event contains a "comm" field. Do the same for "cpu" field, adding a FILTER_CPU and a filter "CPU". Cc: stable@vger.kernel.org # v4.3+ Fixes: 9f61668073a8d "tracing: Allow triggers to filter for CPU ids and process names" Reported-by: Matt Fleming Signed-off-by: Steven Rostedt include/linux/trace_events.h | 2 ++ kernel/trace/trace_events.c | 14 ++++++++------ kernel/trace/trace_events_filter.c | 13 +++++++------ 3 files changed, 17 insertions(+), 12 deletions(-) commit d694b06c42a56c9610861ee0474b4d441af8ada6 Author: Ed Spiridonov Date: Fri Mar 4 09:07:27 2016 +0300 can: mcp251x: avoid write to error flag register if it's unnecessary Only two bits (RX0OVR and RX1OVR) are writable in EFLG, write is useless if these bits aren't set. Signed-off-by: Ed Spiridonov Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/mcp251x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 790b415c98de62602810b0eedce26f0f9d6ddd78 Author: Libin Yang Date: Fri Mar 4 14:33:43 2016 +0800 ALSA: hda - hdmi defer to register acomp eld notifier Defer to register acomp eld notifier until hdmi audio driver is fully ready. After registering eld notifier, gfx driver can use this callback function to notify audio driver the monitor connection event. However this action may happen when audio driver is adding the pins or doing other initialization. This is not always safe, however. For example, using per_pin->lock before the lock is initialized. Let's register the eld notifier after the initialization is done. Signed-off-by: Libin Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit ec75a940b1037e877efd9a5a9e94eab1e464f73b Author: Libin Yang Date: Fri Mar 4 14:33:06 2016 +0800 ALSA: hda - hdmi add wmb barrier for audio component To make sure audio_ptr is set before intel_audio_codec_enable() or intel_audio_codec_disable() calling pin_eld_notify(), this patch adds wmb barrier to prevent optimizing. Signed-off-by: Libin Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 37c5e942bb2eedd98c1cd1fa1f94d79f6b830c38 Author: Scott Wood Date: Wed Mar 2 22:51:04 2016 -0600 powerpc/fsl-book3e: Avoid lbarx on e5500 lbarx/stbcx. are implemented on e6500, but not on e5500. Likewise, SMT is on e6500, but not on e5500. So, avoid executing an unimplemented instruction by only locking when needed (i.e. in the presence of SMT). Signed-off-by: Scott Wood arch/powerpc/mm/hugetlbpage-book3e.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0dff9738ec6dddf701821a6aa477ced809f17ef0 Merge: f0511e6 eda9089 Author: Dave Airlie Date: Fri Mar 4 13:51:53 2016 +1000 Merge tag 'drm-intel-fixes-2016-03-03' of git://anongit.freedesktop.org/drm-intel into drm-fixes Small conflict as I had the balance in my tree already for testing. * tag 'drm-intel-fixes-2016-03-03' of git://anongit.freedesktop.org/drm-intel: drm/i915: Balance assert_rpm_wakelock_held() for !IS_ENABLED(CONFIG_PM) drm/i915/skl: Fix power domain suspend sequence commit 909c3a22da3b8d2cfd3505ca5658f0176859d400 Author: Filipe Manana Date: Wed Mar 2 15:49:38 2016 +0000 Btrfs: fix loading of orphan roots leading to BUG_ON When looking for orphan roots during mount we can end up hitting a BUG_ON() (at root-item.c:btrfs_find_orphan_roots()) if a log tree is replayed and qgroups are enabled. This is because after a log tree is replayed, a transaction commit is made, which triggers qgroup extent accounting which in turn does backref walking which ends up reading and inserting all roots in the radix tree fs_info->fs_root_radix, including orphan roots (deleted snapshots). So after the log tree is replayed, when finding orphan roots we hit the BUG_ON with the following trace: [118209.182438] ------------[ cut here ]------------ [118209.183279] kernel BUG at fs/btrfs/root-tree.c:314! [118209.184074] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [118209.185123] Modules linked in: btrfs dm_flakey dm_mod crc32c_generic ppdev xor raid6_pq evdev sg parport_pc parport acpi_cpufreq tpm_tis tpm psmouse processor i2c_piix4 serio_raw pcspkr i2c_core button loop autofs4 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring virtio scsi_mod e1000 floppy [last unloaded: btrfs] [118209.186318] CPU: 14 PID: 28428 Comm: mount Tainted: G W 4.5.0-rc5-btrfs-next-24+ #1 [118209.186318] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [118209.186318] task: ffff8801ec131040 ti: ffff8800af34c000 task.ti: ffff8800af34c000 [118209.186318] RIP: 0010:[] [] btrfs_find_orphan_roots+0x1fc/0x244 [btrfs] [118209.186318] RSP: 0018:ffff8800af34faa8 EFLAGS: 00010246 [118209.186318] RAX: 00000000ffffffef RBX: 00000000ffffffef RCX: 0000000000000001 [118209.186318] RDX: 0000000080000000 RSI: 0000000000000001 RDI: 00000000ffffffff [118209.186318] RBP: ffff8800af34fb08 R08: 0000000000000001 R09: 0000000000000000 [118209.186318] R10: ffff8800af34f9f0 R11: 6db6db6db6db6db7 R12: ffff880171b97000 [118209.186318] R13: ffff8801ca9d65e0 R14: ffff8800afa2e000 R15: 0000160000000000 [118209.186318] FS: 00007f5bcb914840(0000) GS:ffff88023edc0000(0000) knlGS:0000000000000000 [118209.186318] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [118209.186318] CR2: 00007f5bcaceb5d9 CR3: 00000000b49b5000 CR4: 00000000000006e0 [118209.186318] Stack: [118209.186318] fffffbffffffffff 010230ffffffffff 0101000000000000 ff84000000000000 [118209.186318] fbffffffffffffff 30ffffffffffffff 0000000000000101 ffff880082348000 [118209.186318] 0000000000000000 ffff8800afa2e000 ffff8800afa2e000 0000000000000000 [118209.186318] Call Trace: [118209.186318] [] open_ctree+0x1e37/0x21b9 [btrfs] [118209.186318] [] btrfs_mount+0x97e/0xaed [btrfs] [118209.186318] [] ? trace_hardirqs_on+0xd/0xf [118209.186318] [] mount_fs+0x67/0x131 [118209.186318] [] vfs_kern_mount+0x6c/0xde [118209.186318] [] btrfs_mount+0x1ac/0xaed [btrfs] [118209.186318] [] ? trace_hardirqs_on+0xd/0xf [118209.186318] [] ? lockdep_init_map+0xb9/0x1b3 [118209.186318] [] mount_fs+0x67/0x131 [118209.186318] [] vfs_kern_mount+0x6c/0xde [118209.186318] [] do_mount+0x8a6/0x9e8 [118209.186318] [] SyS_mount+0x77/0x9f [118209.186318] [] entry_SYSCALL_64_fastpath+0x12/0x6b [118209.186318] Code: 64 00 00 85 c0 89 c3 75 24 f0 41 80 4c 24 20 20 49 8b bc 24 f0 01 00 00 4c 89 e6 e8 e8 65 00 00 85 c0 89 c3 74 11 83 f8 ef 75 02 <0f> 0b 4c 89 e7 e8 da 72 00 00 eb 1c 41 83 bc 24 00 01 00 00 00 [118209.186318] RIP [] btrfs_find_orphan_roots+0x1fc/0x244 [btrfs] [118209.186318] RSP [118209.230735] ---[ end trace 83938f987d85d477 ]--- So fix this by not treating the error -EEXIST, returned when attempting to insert a root already inserted by the backref walking code, as an error. The following test case for xfstests reproduces the bug: seq=`basename $0` seqres=$RESULT_DIR/$seq echo "QA output created by $seq" tmp=/tmp/$$ status=1 # failure is the default! trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { _cleanup_flakey cd / rm -f $tmp.* } # get standard environment, filters and checks . ./common/rc . ./common/filter . ./common/dmflakey # real QA test starts here _supported_fs btrfs _supported_os Linux _require_scratch _require_dm_target flakey _require_metadata_journaling $SCRATCH_DEV rm -f $seqres.full _scratch_mkfs >>$seqres.full 2>&1 _init_flakey _mount_flakey _run_btrfs_util_prog quota enable $SCRATCH_MNT # Create 2 directories with one file in one of them. # We use these just to trigger a transaction commit later, moving the file from # directory a to directory b and doing an fsync against directory a. mkdir $SCRATCH_MNT/a mkdir $SCRATCH_MNT/b touch $SCRATCH_MNT/a/f sync # Create our test file with 2 4K extents. $XFS_IO_PROG -f -s -c "pwrite -S 0xaa 0 8K" $SCRATCH_MNT/foobar | _filter_xfs_io # Create a snapshot and delete it. This doesn't really delete the snapshot # immediately, just makes it inaccessible and invisible to user space, the # snapshot is deleted later by a dedicated kernel thread (cleaner kthread) # which is woke up at the next transaction commit. # A root orphan item is inserted into the tree of tree roots, so that if a # power failure happens before the dedicated kernel thread does the snapshot # deletion, the next time the filesystem is mounted it resumes the snapshot # deletion. _run_btrfs_util_prog subvolume snapshot $SCRATCH_MNT $SCRATCH_MNT/snap _run_btrfs_util_prog subvolume delete $SCRATCH_MNT/snap # Now overwrite half of the extents we wrote before. Because we made a snapshpot # before, which isn't really deleted yet (since no transaction commit happened # after we did the snapshot delete request), the non overwritten extents get # referenced twice, once by the default subvolume and once by the snapshot. $XFS_IO_PROG -c "pwrite -S 0xbb 4K 8K" $SCRATCH_MNT/foobar | _filter_xfs_io # Now move file f from directory a to directory b and fsync directory a. # The fsync on the directory a triggers a transaction commit (because a file # was moved from it to another directory) and the file fsync leaves a log tree # with file extent items to replay. mv $SCRATCH_MNT/a/f $SCRATCH_MNT/a/b $XFS_IO_PROG -c "fsync" $SCRATCH_MNT/a $XFS_IO_PROG -c "fsync" $SCRATCH_MNT/foobar echo "File digest before power failure:" md5sum $SCRATCH_MNT/foobar | _filter_scratch # Now simulate a power failure and mount the filesystem to replay the log tree. # After the log tree was replayed, we used to hit a BUG_ON() when processing # the root orphan item for the deleted snapshot. This is because when processing # an orphan root the code expected to be the first code inserting the root into # the fs_info->fs_root_radix radix tree, while in reallity it was the second # caller attempting to do it - the first caller was the transaction commit that # took place after replaying the log tree, when updating the qgroup counters. _flakey_drop_and_remount echo "File digest before after failure:" # Must match what he got before the power failure. md5sum $SCRATCH_MNT/foobar | _filter_scratch _unmount_flakey status=0 exit Fixes: 2d9e97761087 ("Btrfs: use btrfs_get_fs_root in resolve_indirect_ref") Cc: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Reviewed-by: Qu Wenruo Signed-off-by: Chris Mason fs/btrfs/root-tree.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c1bb0a5588816ec26abc08aa9adcf90e32656781 Author: Venkat Duvvuru Date: Wed Mar 2 06:00:28 2016 -0500 be2net: don't enable multicast flag in be_enable_if_filters() routine When the interface is opened (in be_open()) the routine be_enable_if_filters() must be called to switch on the basic filtering capabilities of an interface that are not changed at run-time. These include the flags UNTAGGED, BROADCAST and PASS_L3L4_ERRORS. Other flags such as MULTICAST and PROMISC must be enabled later by be_set_rx_mode() based on the state in the netdev/adapter struct. be_enable_if_filters() routine is wrongly trying to enable MULTICAST flag without checking the current adapter state. This can cause the RX_FILTER cmds to the FW to fail. This patch fixes this problem by only enabling the basic filtering flags in be_enable_if_filters(). The VF must be able to issue RX_FILTER cmd with any filter flag, as long as the PF allowed those flags (if_cap_flags) in the iface it provisioned for the VF. This rule is applicable even when the VF doesn't have the FILTMGMT privilege. There is a bug in BE3 FW that wrongly fails RX_FILTER multicast programming cmds on VFs that don't have FILTMGMT privilege. This patch also helps in insulating the VF driver from be_open failures due to the FW bug. A fix for the BE3 FW issue will be available in versions >= 11.0.283.0 and 10.6.334.0 Reported-by: Ivan Vecera Signed-off-by: Venkat Duvvuru Signed-off-by: Sathya Perla Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.h | 9 ++++++--- drivers/net/ethernet/emulex/benet/be_main.c | 16 +++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) commit 1d3cd1773fddfdc9ffb0c2dec9a954c7a54bc207 Author: Dan Carpenter Date: Wed Mar 2 13:11:10 2016 +0300 net: moxa: fix an error code We accidentally return IS_ERR(priv->base) which is 1 instead of PTR_ERR(priv->base) which is the error code. Fixes: 6c821bd9edc9 ('net: Add MOXA ART SoCs ethernet driver') Signed-off-by: Dan Carpenter Acked-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/moxa/moxart_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63a0a00b90b5193173bcf76ef24afdda8eb05d3a Author: Nimrod Andy Date: Wed Mar 2 17:24:53 2016 +0800 MAINTAINERS: add maintainer entry for FREESCALE FEC ethernet driver Add a maintainer entry for FREESCALE FEC ethernet driver and add myself as a maintainer. Signed-off-by: Fugang Duan Acked-by: Frank Li Signed-off-by: David S. Miller MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4024fcf70556311521e7b6cf79fa50e16f31013a Author: Daniel Borkmann Date: Wed Mar 2 02:32:08 2016 +0100 vxlan: fix missing options_len update on RX with collect metadata When signalling to metadata consumers that the metadata_dst entry carries additional GBP extension data for vxlan (TUNNEL_VXLAN_OPT), the dst's vxlan_metadata information is populated, but options_len is left to zero. F.e. in ovs, ovs_flow_key_extract() checks for options_len before extracting the data through ip_tunnel_info_opts_get(). Geneve uses ip_tunnel_info_opts_set() helper in receive path, which sets options_len internally, vxlan however uses ip_tunnel_info_opts(), so when filling vxlan_metadata, we do need to update options_len. Fixes: 4c22279848c5 ("ip-tunnel: Use API to access tunnel metadata options.") Signed-off-by: Daniel Borkmann Acked-by: Thomas Graf Signed-off-by: David S. Miller drivers/net/vxlan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4d6af73d9e43f78651a43ee4c5ad221107ac8365 Author: Christoph Hellwig Date: Wed Mar 2 18:07:14 2016 +0100 block: support large requests in blk_rq_map_user_iov This patch adds support for larger requests in blk_rq_map_user_iov by allowing it to build multiple bios for a request. This functionality used to exist for the non-vectored blk_rq_map_user in the past, and this patch reuses the existing functionality for it on the unmap side, which stuck around. Thanks to the iov_iter API supporting multiple bios is fairly trivial, as we can just iterate the iov until we've consumed the whole iov_iter. Signed-off-by: Christoph Hellwig Reported-by: Jeff Lien Tested-by: Jeff Lien Reviewed-by: Keith Busch Signed-off-by: Jens Axboe block/blk-map.c | 91 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 30 deletions(-) commit f21018427cb007a0894c36ad702990ab639cbbb4 Author: Christoph Hellwig Date: Thu Mar 3 14:43:45 2016 -0700 block: fix blk_rq_get_max_sectors for driver private requests Driver private request types should not get the artifical cap for the FS requests. This is important to use the full device capabilities for internal command or NVMe pass through commands. Signed-off-by: Christoph Hellwig Reported-by: Jeff Lien Tested-by: Jeff Lien Reviewed-by: Keith Busch Updated by me to use an explicit check for the one command type that does support extended checking, instead of relying on the ordering of the enum command values - as suggested by Keith. Signed-off-by: Jens Axboe include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45686b6198bd824f083ff5293f191d78db9d708a Author: Christoph Hellwig Date: Wed Mar 2 18:07:12 2016 +0100 nvme: fix max_segments integer truncation The block layer uses an unsigned short for max_segments. The way we calculate the value for NVMe tends to generate very large 32-bit values, which after integer truncation may lead to a zero value instead of the desired outcome. Signed-off-by: Christoph Hellwig Reported-by: Jeff Lien Tested-by: Jeff Lien Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit da35825d9a091a7a1d5824c8468168e2658333ff Author: Christoph Hellwig Date: Wed Mar 2 18:07:11 2016 +0100 nvme: set queue limits for the admin queue Factor out a helper to set all the device specific queue limits and apply them to the admin queue in addition to the I/O queues. Without this the command size on the admin queue is arbitrarily low, and the missing other limitations are just minefields waiting for victims. Signed-off-by: Christoph Hellwig Reported-by: Jeff Lien Tested-by: Jeff Lien Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit a1a0e23e49037c23ea84bc8cc146a03584d13577 Author: Tejun Heo Date: Mon Feb 29 18:28:53 2016 -0500 writeback: flush inode cgroup wb switches instead of pinning super_block If cgroup writeback is in use, inodes can be scheduled for asynchronous wb switching. Before 5ff8eaac1636 ("writeback: keep superblock pinned during cgroup writeback association switches"), this could race with umount leading to super_block being destroyed while inodes are pinned for wb switching. 5ff8eaac1636 fixed it by bumping s_active while wb switches are in flight; however, this allowed in-flight wb switches to make umounts asynchronous when the userland expected synchronosity - e.g. fsck immediately following umount may fail because the device is still busy. This patch removes the problematic super_block pinning and instead makes generic_shutdown_super() flush in-flight wb switches. wb switches are now executed on a dedicated isw_wq so that they can be flushed and isw_nr_in_flight keeps track of the number of in-flight wb switches so that flushing can be avoided in most cases. v2: Move cgroup_writeback_umount() further below and add MS_ACTIVE check in inode_switch_wbs() as Jan an Al suggested. Signed-off-by: Tejun Heo Reported-by: Tahsin Erdogan Cc: Jan Kara Cc: Al Viro Link: http://lkml.kernel.org/g/CAAeU0aNCq7LGODvVGRU-oU_o-6enii5ey0p1c26D1ZzYwkDc5A@mail.gmail.com Fixes: 5ff8eaac1636 ("writeback: keep superblock pinned during cgroup writeback association switches") Cc: stable@vger.kernel.org #v4.5 Reviewed-by: Jan Kara Tested-by: Tahsin Erdogan Signed-off-by: Jens Axboe fs/fs-writeback.c | 54 +++++++++++++++++++++++++++++++++++------------ fs/super.c | 1 + include/linux/writeback.h | 5 +++++ 3 files changed, 47 insertions(+), 13 deletions(-) commit e9fc63d682dbbef17921aeb00d03fd52d6735ffd Author: Keith Busch Date: Wed Feb 24 09:15:58 2016 -0700 NVMe: Fix 0-length integrity payload A user could send a passthrough IO command with a metadata pointer to a namespace without metadata. With metadata length of 0, kmalloc returns ZERO_SIZE_PTR. Since that is not NULL, the driver would have set this as the bio's integrity payload, which causes an access fault on completion. This patch ignores the users metadata buffer if the namespace format does not support separate metadata. Reported-by: Stephen Bates Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63088ec7c8eadfe08b96127a41b385ec9742dace Author: Keith Busch Date: Wed Feb 24 09:15:57 2016 -0700 NVMe: Don't allow unsupported flags The command flags can change the meaning of other fields in the command that the driver is not prepared to handle. Specifically, the user could passthrough an SGL flag, causing the controller to misinterpret the PRP list the driver created, potentially corrupting memory or data. Signed-off-by: Keith Busch Reviewed-by: Jon Derrick Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 69d9a99c258eb1d6478fd9608a2070890797eed7 Author: Keith Busch Date: Wed Feb 24 09:15:56 2016 -0700 NVMe: Move error handling to failed reset handler This moves failed queue handling out of the namespace removal path and into the reset failure path, fixing a hanging condition if the controller fails or link down during del_gendisk. Previously the driver had to see the controller as degraded prior to calling del_gendisk to setup the queues to fail. But, if the controller happened to fail after this, there was no task to end outstanding requests. On failure, all namespace states are set to dead. This has capacity revalidate to 0, and ends all new requests with error status. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 53 ++++++++++++++++++++++++++++++++---------------- drivers/nvme/host/nvme.h | 2 ++ drivers/nvme/host/pci.c | 13 +++++++++++- 3 files changed, 50 insertions(+), 18 deletions(-) commit f58944e265d4ebe47216a5d7488aee3928823d30 Author: Keith Busch Date: Wed Feb 24 09:15:55 2016 -0700 NVMe: Simplify device reset failure A reset failure schedules the device to unbind from the driver through the pci driver's remove. This cleans up all intialization, so there is no need to duplicate the potentially racy cleanup. To help understand why a reset failed, the status is logged with the existing warning message. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit 646017a612e72f19bd9f991fe25287a149c5f627 Author: Keith Busch Date: Wed Feb 24 09:15:54 2016 -0700 NVMe: Fix namespace removal deadlock This patch makes nvme namespace removal lockless. It is up to the caller to ensure no active namespace scanning is occuring. To ensure no scan work occurs, the nvme pci driver adds a removing state to the controller device to avoid queueing scan work during removal. The work is flushed after setting the state, so no new scan work can be queued. The lockless removal allows the driver to cleanup a namespace request_queue if the controller fails during removal. Previously this could deadlock trying to acquire the namespace mutex in order to handle such events. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 12 +++++++----- drivers/nvme/host/nvme.h | 4 ++++ drivers/nvme/host/pci.c | 17 +++++++++++++++-- 3 files changed, 26 insertions(+), 7 deletions(-) commit 075790ebba4a1eb297f9875e581b55c0382b1f3d Author: Keith Busch Date: Wed Feb 24 09:15:53 2016 -0700 NVMe: Use IDA for namespace disk naming A namespace may be detached from a controller, but a user may be holding a reference to it. Attaching a new namespace with the same NSID will create duplicate names when using the NSID to name the disk. This patch uses an IDA that is released only when the last reference is released instead of using the namespace ID. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 15 ++++++++++++--- drivers/nvme/host/nvme.h | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) commit b00a726a9fd82ddd4c10344e46f0d371e1674303 Author: Keith Busch Date: Wed Feb 24 09:15:52 2016 -0700 NVMe: Don't unmap controller registers on reset Unmapping the registers on reset or shutdown is not necessary. Keeping the mapping simplifies reset handling. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 71 +++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 29 deletions(-) commit e827091cb1bcd8e718ac3657845fb809c0b93324 Author: Ming Lei Date: Fri Feb 26 23:40:53 2016 +0800 block: merge: get the 1st and last bvec via helpers This patch applies the two introduced helpers to figure out the 1st and last bvec. Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-merge.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 25e71a99f10e444cd00bb2ebccb11e1c9fb672b1 Author: Ming Lei Date: Fri Feb 26 23:40:52 2016 +0800 block: get the 1st and last bvec via helpers This patch applies the two introduced helpers to figure out the 1st and last bvec, and fixes the original way after bio splitting. Cc: stable@vger.kernel.org Reported-by: Sagi Grimberg Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe include/linux/blkdev.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e0af29171aa8912e1ca95023b75ef336cd70d661 Author: Ming Lei Date: Fri Feb 26 23:40:51 2016 +0800 block: check virt boundary in bio_will_gap() In the following patch, the way for figuring out the last bvec will be changed with a bit cost introduced, so return immediately if the queue doesn't have virt boundary limit. Actually most of devices have not this limit. Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe include/linux/blkdev.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 7bcd79ac50d9d83350a835bdb91c04ac9e098412 Author: Ming Lei Date: Fri Feb 26 23:40:50 2016 +0800 block: bio: introduce helpers to get the 1st and last bvec The bio passed to bio_will_gap() may be fast cloned from upper layer(dm, md, bcache, fs, ...), or from bio splitting in block core. Unfortunately bio_will_gap() just figures out the last bvec via 'bi_io_vec[prev->bi_vcnt - 1]' directly, and this way is obviously wrong. This patch introduces two helpers for getting the first and last bvec of one bio for fixing the issue. Cc: stable@vger.kernel.org Reported-by: Sagi Grimberg Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe include/linux/bio.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 42a67c9b0c0853f6a1159bd54ed0ba50df9f9ad8 Author: Wolfram Sang Date: Tue Mar 1 17:37:59 2016 +0100 net: ethernet: renesas: sh_eth: don't open code of_device_get_match_data() This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit e866863066a4e6c42117434dd5cd35c9842f5b82 Author: Wolfram Sang Date: Tue Mar 1 17:37:58 2016 +0100 net: ethernet: renesas: ravb_main: don't open code of_device_get_match_data() This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit de89e854bcc71ebaf30d415a0c015d1cb6c68856 Author: Thomas Falcon Date: Tue Mar 1 10:20:09 2016 -0600 ibmvnic: Fix ibmvnic_capability struct The ibmvnic_capability struct was defined incorrectly. The last two elements of the struct are in the wrong order. In addition, the number element should be 64-bit. Byteswapping functions are updated as well. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 62 +++++++++++++++++++------------------- drivers/net/ethernet/ibm/ibmvnic.h | 4 +-- 2 files changed, 32 insertions(+), 34 deletions(-) commit 5d150a985520bbe3cb2aa1ceef24a7e32f20c15f Author: Florian Westphal Date: Tue Mar 1 16:15:16 2016 +0100 ipv6: re-enable fragment header matching in ipv6_find_hdr When ipv6_find_hdr is used to find a fragment header (caller specifies target NEXTHDR_FRAGMENT) we erronously return -ENOENT for all fragments with nonzero offset. Before commit 9195bb8e381d, when target was specified, we did not enter the exthdr walk loop as nexthdr == target so this used to work. Now we do (so we can skip empty route headers). When we then stumble upon a frag with nonzero frag_off we must return -ENOENT ("header not found") only if the caller did not specifically request NEXTHDR_FRAGMENT. This allows nfables exthdr expression to match ipv6 fragments, e.g. via nft add rule ip6 filter input frag frag-off gt 0 Fixes: 9195bb8e381d ("ipv6: improve ipv6_find_hdr() to skip empty routing headers") Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv6/exthdrs_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bf13c94ccb33c3182efc92ce4989506a0f541243 Author: Bjørn Mork Date: Tue Mar 1 14:31:02 2016 +0100 qmi_wwan: add Sierra Wireless EM74xx device ID The MC74xx and EM74xx modules use different IDs by default, according to the Lenovo EM7455 driver for Windows. Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f214fc402967e1bc94ad7f39faa03db5813d6849 Author: Parthasarathy Bhuvaragan Date: Tue Mar 1 11:07:09 2016 +0100 tipc: Revert "tipc: use existing sk_write_queue for outgoing packet chain" reverts commit 94153e36e709e ("tipc: use existing sk_write_queue for outgoing packet chain") In Commit 94153e36e709e, we assume that we fill & empty the socket's sk_write_queue within the same lock_sock() session. This is not true if the link is congested. During congestion, the socket lock is released while we wait for the congestion to cease. This implementation causes a nullptr exception, if the user space program has several threads accessing the same socket descriptor. Consider two threads of the same program performing the following: Thread1 Thread2 -------------------- ---------------------- Enter tipc_sendmsg() Enter tipc_sendmsg() lock_sock() lock_sock() Enter tipc_link_xmit(), ret=ELINKCONG spin on socket lock.. sk_wait_event() : release_sock() grab socket lock : Enter tipc_link_xmit(), ret=0 : release_sock() Wakeup after congestion lock_sock() skb = skb_peek(pktchain); !! TIPC_SKB_CB(skb)->wakeup_pending = tsk->link_cong; In this case, the second thread transmits the buffers belonging to both thread1 and thread2 successfully. When the first thread wakeup after the congestion it assumes that the pktchain is intact and operates on the skb's in it, which leads to the following exception: [2102.439969] BUG: unable to handle kernel NULL pointer dereference at 00000000000000d0 [2102.440074] IP: [] __tipc_link_xmit+0x2b0/0x4d0 [tipc] [2102.440074] PGD 3fa3f067 PUD 3fa6b067 PMD 0 [2102.440074] Oops: 0000 [#1] SMP [2102.440074] CPU: 2 PID: 244 Comm: sender Not tainted 3.12.28 #1 [2102.440074] RIP: 0010:[] [] __tipc_link_xmit+0x2b0/0x4d0 [tipc] [...] [2102.440074] Call Trace: [2102.440074] [] ? schedule+0x29/0x70 [2102.440074] [] ? tipc_node_unlock+0x46/0x170 [tipc] [2102.440074] [] tipc_link_xmit+0x51/0xf0 [tipc] [2102.440074] [] tipc_send_stream+0x11e/0x4f0 [tipc] [2102.440074] [] ? __wake_up_sync+0x20/0x20 [2102.440074] [] tipc_send_packet+0x1c/0x20 [tipc] [2102.440074] [] sock_sendmsg+0xa8/0xd0 [2102.440074] [] ? release_sock+0x145/0x170 [2102.440074] [] ___sys_sendmsg+0x3d8/0x3e0 [2102.440074] [] ? _raw_spin_unlock+0xe/0x10 [2102.440074] [] ? handle_mm_fault+0x6ca/0x9d0 [2102.440074] [] ? set_next_entity+0x85/0xa0 [2102.440074] [] ? _raw_spin_unlock_irq+0xe/0x20 [2102.440074] [] ? finish_task_switch+0x5c/0xc0 [2102.440074] [] ? __schedule+0x34c/0x950 [2102.440074] [] __sys_sendmsg+0x42/0x80 [2102.440074] [] SyS_sendmsg+0x12/0x20 [2102.440074] [] system_call_fastpath+0x16/0x1b In this commit, we maintain the skb list always in the stack. Signed-off-by: Parthasarathy Bhuvaragan Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit fbe093ac9f0201939279cdfe8b0fce20ce5ef7a9 Author: Sakari Ailus Date: Thu Mar 3 14:20:14 2016 -0300 [media] media: Sanitise the reserved fields of the G_TOPOLOGY IOCTL arguments The argument structs are used in arrays for G_TOPOLOGY IOCTL. The arguments themselves do not need to be aligned to a power of two, but aligning them up to the largest basic type alignment (u64) on common ABIs is a good thing to do. The patch changes the size of the reserved fields to 5 or 6 u32's and aligns the size of the struct to 8 bytes so we do no longer depend on the compiler to perform the alignment. While at it, add __attribute__ ((packed)) to these structs as well. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e3c2ef41f88e50c8557270868600d3132028af3b Merge: c2687cf 1195c10 Author: Linus Torvalds Date: Thu Mar 3 12:54:39 2016 -0800 Merge tag 'pci-v4.5-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "Freescale Layerscape host bridge driver: Fix MSG TLP drop setting (Minghuan Lian) TI Keystone host bridge driver: Fix MSI code that retrieves struct pcie_port pointer (Murali Karicheri)" * tag 'pci-v4.5-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: layerscape: Fix MSG TLP drop setting PCI: keystone: Fix MSI code that retrieves struct pcie_port pointer commit 1837b2e2bcd23137766555a63867e649c0b637f0 Author: Benjamin Poirier Date: Mon Feb 29 15:03:33 2016 -0800 mld, igmp: Fix reserved tailroom calculation The current reserved_tailroom calculation fails to take hlen and tlen into account. skb: [__hlen__|__data____________|__tlen___|__extra__] ^ ^ head skb_end_offset In this representation, hlen + data + tlen is the size passed to alloc_skb. "extra" is the extra space made available in __alloc_skb because of rounding up by kmalloc. We can reorder the representation like so: [__hlen__|__data____________|__extra__|__tlen___] ^ ^ head skb_end_offset The maximum space available for ip headers and payload without fragmentation is min(mtu, data + extra). Therefore, reserved_tailroom = data + extra + tlen - min(mtu, data + extra) = skb_end_offset - hlen - min(mtu, skb_end_offset - hlen - tlen) = skb_tailroom - min(mtu, skb_tailroom - tlen) ; after skb_reserve(hlen) Compare the second line to the current expression: reserved_tailroom = skb_end_offset - min(mtu, skb_end_offset) and we can see that hlen and tlen are not taken into account. The min() in the third line can be expanded into: if mtu < skb_tailroom - tlen: reserved_tailroom = skb_tailroom - mtu else: reserved_tailroom = tlen Depending on hlen, tlen, mtu and the number of multicast address records, the current code may output skbs that have less tailroom than dev->needed_tailroom or it may output more skbs than needed because not all space available is used. Fixes: 4c672e4b ("ipv6: mld: fix add_grhead skb_over_panic for devs with large MTUs") Signed-off-by: Benjamin Poirier Acked-by: Hannes Frederic Sowa Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/skbuff.h | 24 ++++++++++++++++++++++++ net/ipv4/igmp.c | 3 +-- net/ipv6/mcast.c | 3 +-- 3 files changed, 26 insertions(+), 4 deletions(-) commit 861c3849222b7cadfd0da63f9c7573c2f15ba535 Merge: f4f41c5 04fdbc8 Author: Greg Kroah-Hartman Date: Thu Mar 3 12:37:21 2016 -0800 Merge tag 'usb-serial-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Jonan writes: USB-serial fixes for v4.5-rc7 Here are some new device ids and a patch removing the mxu11x0 driver, which turned out not to be needed. Signed-off-by: Johan Hovold commit 878e3c1be2dc8a759c18bb280a7390f9ed0bd544 Author: Igal Liberman Date: Sun Feb 28 23:59:53 2016 +0200 fsl/fman: Initialize fman->dev earlier Currently, in a case of error, dev_err is using fman->dev before its initialization and "(NULL device *)" is printed. This patch fixes this issue. Signed-off-by: Igal Liberman Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88f8b1bb41c6208f81b6a480244533ded7b59493 Author: Gabriel Fernandez Date: Mon Feb 29 17:18:22 2016 +0100 stmmac: Fix 'eth0: No PHY found' regression This patch manages the case when you have an Ethernet MAC with a "fixed link", and not connected to a normal MDIO-managed PHY device. The test of phy_bus_name was not helpful because it was never affected and replaced by the mdio test node. Signed-off-by: Gabriel Fernandez Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 11 +---------- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 ++++++++- include/linux/stmmac.h | 1 + 3 files changed, 10 insertions(+), 11 deletions(-) commit c2687cf9502a4b69abc0f3a7b1618ffef47a40db Merge: 4237b2e 2680d6d Author: Linus Torvalds Date: Thu Mar 3 11:54:56 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: - ARM/MIPS: Fixes for ioctls when copy_from_user returns nonzero - x86: Small fix for Skylake TSC scaling - x86: Improved fix for last week's missed hardware breakpoint bug * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: x86: Update tsc multiplier on change. mips/kvm: fix ioctl error handling arm/arm64: KVM: Fix ioctl error handling KVM: x86: fix root cause for missed hardware breakpoints commit 4237b2e6c6ca77b72f0b45ffad29e284e776ede3 Merge: 19eab22 b26a719 Author: Linus Torvalds Date: Thu Mar 3 11:39:11 2016 -0800 Merge tag 'gpio-v4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull late GPIO fix from Linus Walleij: "Regressions never arrive when you want them to, so here is a late fix for the Renesas RCAR GPIO driver. It only affects that driver on the very specific Renesas platforms: - Fix a runtime PM suspend/resume bug in the RCAR driver" * tag 'gpio-v4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: rcar: Add Runtime PM handling for interrupts commit 19eab220e7a00bbb36543b4daf5e3c464ec474cb Merge: f4bd982 e6a8c9b Author: Linus Torvalds Date: Thu Mar 3 11:32:13 2016 -0800 Merge tag 'iommu-fixes-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "One fix for Intel VT-d: - Use BUS_NOTIFY_REMOVED_DEVICE notifier to unbind a device from its domain _after_ it has been unbound from its driver. This fixes a BUG_ON being triggered in the PCI hotplug path. And three for AMD IOMMU: - Add a workaround for a hardware issue with ATS in use - Fix ATS enable/disable balance when a device is removed - Fix a boot warning being triggered when the system has IOMMU performance counters and PCI device 00:00.0 is not covered by the IOMMU" * tag 'iommu-fixes-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path iommu/amd: Detach device from domain before removal iommu/amd: Apply workaround for ATS write permission check iommu/amd: Fix boot warning when device 00:00.0 is not iommu covered commit f4bd9822080ece335663245c8520b146d9e1bdad Merge: 52ad129 e1f33be Author: Linus Torvalds Date: Thu Mar 3 11:07:32 2016 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull minor virtio/vhost fixes from Michael Tsirkin: "This fixes two minor bugs: error handling in vhost, and capability processing in virtio" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: fix error path in vhost_init_used() virtio-pci: read the right virtio_pci_notify_cap field commit 52ad12966b0217a6dcf782cc2516061343911c0d Merge: 215b031 8160c4e Author: Linus Torvalds Date: Thu Mar 3 10:56:17 2016 -0800 Merge tag 'vfio-v4.5-rc7' of git://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: "Use -EFAULT for copy_to_user error in ioctl (Michael Tsirkin)" * tag 'vfio-v4.5-rc7' of git://github.com/awilliam/linux-vfio: vfio: fix ioctl error handling commit 215b031b970a6cec729dcfaa94537074256ba2e8 Merge: f983cd3 a1e533e Author: Linus Torvalds Date: Thu Mar 3 10:46:18 2016 -0800 Merge tag 'fbdev-fixes-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev fix from Tomi Valkeinen: "Fix hang caused by fbconsole blink timer" * tag 'fbdev-fixes-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: fbcon: set a default value to blink interval commit 93125094c07d8c9ec25dff5869f191b33eb9dd6e Author: Mauro Carvalho Chehab Date: Thu Mar 3 14:52:51 2016 -0300 [media] media.h: postpone connectors entities The representation of external connections got some heated discussions recently. As we're too close to the merge window, let's not set those entities into a stone. Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit b81de061fa59f17d2730aabb1b84419ef3913810 Author: Konstantin Khlebnikov Date: Sun Jan 31 16:21:29 2016 +0300 ovl: copy new uid/gid into overlayfs runtime inode Overlayfs must update uid/gid after chown, otherwise functions like inode_owner_or_capable() will check user against stale uid. Catched by xfstests generic/087, it chowns file and calls utimes. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Miklos Szeredi Cc: fs/overlayfs/inode.c | 2 ++ 1 file changed, 2 insertions(+) commit 45d11738969633ec07ca35d75d486bf2d8918df6 Author: Konstantin Khlebnikov Date: Sun Jan 31 16:17:53 2016 +0300 ovl: ignore lower entries when checking purity of non-directory entries After rename file dentry still holds reference to lower dentry from previous location. This doesn't matter for data access because data comes from upper dentry. But this stale lower dentry taints dentry at new location and turns it into non-pure upper. Such file leaves visible whiteout entry after remove in directory which shouldn't have whiteouts at all. Overlayfs already tracks pureness of file location in oe->opaque. This patch just uses that for detecting actual path type. Comment from Vivek Goyal's patch: Here are the details of the problem. Do following. $ mkdir upper lower work merged upper/dir/ $ touch lower/test $ sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir= work merged $ mv merged/test merged/dir/ $ rm merged/dir/test $ ls -l merged/dir/ /usr/bin/ls: cannot access merged/dir/test: No such file or directory total 0 c????????? ? ? ? ? ? test Basic problem seems to be that once a file has been unlinked, a whiteout has been left behind which was not needed and hence it becomes visible. Whiteout is visible because parent dir is of not type MERGE, hence od->is_real is set during ovl_dir_open(). And that means ovl_iterate() passes on iterate handling directly to underlying fs. Underlying fs does not know/filter whiteouts so it becomes visible to user. Why did we leave a whiteout to begin with when we should not have. ovl_do_remove() checks for OVL_TYPE_PURE_UPPER() and does not leave whiteout if file is pure upper. In this case file is not found to be pure upper hence whiteout is left. So why file was not PURE_UPPER in this case? I think because dentry is still carrying some leftover state which was valid before rename. For example, od->numlower was set to 1 as it was a lower file. After rename, this state is not valid anymore as there is no such file in lower. Signed-off-by: Konstantin Khlebnikov Reported-by: Viktor Stanchev Suggested-by: Vivek Goyal Link: https://bugzilla.kernel.org/show_bug.cgi?id=109611 Acked-by: Vivek Goyal Signed-off-by: Miklos Szeredi Cc: fs/overlayfs/dir.c | 7 +++++++ fs/overlayfs/super.c | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) commit ce9113bbcbf45a57c082d6603b9a9f342be3ef74 Author: Rui Wang Date: Fri Jan 8 23:09:59 2016 +0800 ovl: fix getcwd() failure after unsuccessful rmdir ovl_remove_upper() should do d_drop() only after it successfully removes the dir, otherwise a subsequent getcwd() system call will fail, breaking userspace programs. This is to fix: https://bugzilla.kernel.org/show_bug.cgi?id=110491 Signed-off-by: Rui Wang Reviewed-by: Konstantin Khlebnikov Signed-off-by: Miklos Szeredi Cc: fs/overlayfs/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b5891cfab08fe3144a616e8e734df7749fb3b7d0 Author: Konstantin Khlebnikov Date: Sun Jan 31 16:22:16 2016 +0300 ovl: fix working on distributed fs as lower layer This adds missing .d_select_inode into alternative dentry_operations. Signed-off-by: Konstantin Khlebnikov Fixes: 7c03b5d45b8e ("ovl: allow distributed fs as lower layer") Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Signed-off-by: Miklos Szeredi Cc: # 4.2+ fs/overlayfs/super.c | 1 + 1 file changed, 1 insertion(+) commit 11d8d645343efba0c975aefe7c2cf3b33c836c75 Author: Or Gerlitz Date: Tue Mar 1 18:52:23 2016 +0200 IB/core: Use GRH when the path hop-limit > 0 According to IBTA spec v1.3 section 12.7.19, QPs should use GRH when the path returned by the SA has hop-limit > 0. Currently, we do that only for the > 1 case, fix that. Fixes: 6d969a471ba1 ('IB/sa: Add ib_init_ah_from_path()') Signed-off-by: Or Gerlitz Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f16921275cc3c2442d0b95225785a601603b990f Author: Robert Jarzmik Date: Tue Feb 16 22:54:02 2016 +0100 dmaengine: pxa_dma: fix cyclic transfers While testing audio with pxa2xx-ac97, underrun were happening while the user application was correctly feeding the music. Debug proved that the cyclic transfer is not cyclic, ie. the last descriptor did not loop on the first. Another issue is that the descriptor length was always set to 8192, because of an trivial operator issue. This was tested on a pxa27x platform. Fixes: a57e16cf0333 ("dmaengine: pxa: add pxa dmaengine driver") Reported-by: Vasily Khoruzhick Tested-by: Vasily Khoruzhick Signed-off-by: Robert Jarzmik Signed-off-by: Vinod Koul drivers/dma/pxa_dma.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3d943c9d1cc5ad1825e46291ef5ce627e1b6b660 Author: Majd Dibbiny Date: Sun Feb 14 18:35:52 2016 +0200 IB/{core, mlx5}: Fix input len in vendor part of create_qp/srq Currently, the inlen field of the vendor's part of the command doesn't match the command buffer. This happens because the inlen accommodates ib_uverbs_cmd_hdr which is deducted from the in buffer. This is problematic since the vendor function could be called either from the legacy verb (where the input length mismatches the actual length) or by the extended verb (where the length matches). The vendor has no idea which function calls it and therefore has no way to know how the length variable should be treated. Fixing this by aligning the inlen to the correct length. All vendor drivers either assumed that inlen >= sizeof(vendor_uhw_cmd) or just failed wrongly (mlx5) and fixed in this patch. Fixes: cfb5e088e26a ('IB/mlx5: Add CQE version 1 support to user QPs and SRQs') Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Reviewed-by: Haggai Eran Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 9 ++++++--- drivers/infiniband/hw/mlx5/srq.c | 11 +++-------- 2 files changed, 9 insertions(+), 11 deletions(-) commit 85d9691ccc96d95629939a877fd6c1f8c4724f56 Author: Majd Dibbiny Date: Sun Feb 14 18:35:51 2016 +0200 IB/mlx5: Avoid using user-index for SRQs Normal SRQs, unlike XRC SRQs, don't have user-index, therefore avoid verifying it and using it. Fixes: cfb5e088e26a ('IB/mlx5: Add CQE version 1 support to user QPs and SRQs') Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/srq.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit fb822e6076d972691c5dd33431c10f82dda94ae9 Author: Ravi Bangoria Date: Wed Mar 2 15:25:17 2016 +0530 powerpc/hw_breakpoint: Fix oops when destroying hw_breakpoint event When destroying a hw_breakpoint event, the kernel oopses as follows: Unable to handle kernel paging request for data at address 0x00000c07 NIP [c0000000000291d0] arch_unregister_hw_breakpoint+0x40/0x60 LR [c00000000020b6b4] release_bp_slot+0x44/0x80 Call chain: hw_breakpoint_event_init() bp->destroy = bp_perf_event_destroy; do_exit() perf_event_exit_task() perf_event_exit_task_context() WRITE_ONCE(child_ctx->task, TASK_TOMBSTONE); perf_event_exit_event() free_event() _free_event() bp_perf_event_destroy() // event->destroy(event); release_bp_slot() arch_unregister_hw_breakpoint() perf_event_exit_task_context() sets child_ctx->task as TASK_TOMBSTONE which is (void *)-1. arch_unregister_hw_breakpoint() tries to fetch 'thread' attribute of 'task' resulting in oops. Peterz points out that the code shouldn't be using bp->ctx anyway, but fixing that will require a decent amount of rework. So for now to fix the oops, check if bp->ctx->task has been set to (void *)-1, before dereferencing it. We don't use TASK_TOMBSTONE, because that would require exporting it and it's supposed to be an internal detail. Fixes: 63b6da39bb38 ("perf: Fix perf_event_exit_task() race") Signed-off-by: Ravi Bangoria Acked-by: Peter Zijlstra (Intel) Signed-off-by: Michael Ellerman arch/powerpc/kernel/hw_breakpoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 02322ac9dee9aff8d8862e8d6660ebe102f492ea Author: Simon South Date: Wed Mar 2 23:10:44 2016 -0500 ALSA: hda - Fix mic issues on Acer Aspire E1-472 This patch applies the microphone-related fix created for the Acer Aspire E1-572 to the E1-472 as well, as it uses the same Realtek ALC282 CODEC and demonstrates the same issues. This patch allows an external, headset microphone to be used and limits the gain on the (quite noisy) internal microphone. Signed-off-by: Simon South Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 58402b6e98f9059420e64b296db6c4cb6f6c1117 Author: Hans Verkuil Date: Mon Feb 29 09:02:47 2016 +0100 [media] media.h: use hex values for range offsets, move connectors base up. Make the base offset hexadecimal to simplify debugging since the base addresses are hex too. The offsets for connectors is also changed to start after the 'reserved' range 0x10000-0x2ffff. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit f0511e66114a6414cfca92d7b94118913a0c11ff Merge: 2d02b8b 0b39c53 Author: Dave Airlie Date: Thu Mar 3 11:37:07 2016 +1000 Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Fixes for radeon and amdgpu: - Fix GPUVM flushing on CI and VI - Misc DPM and Powerplay fixes - VCE DPM fixes for CZ/ST - DP hotplug fix * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: return from atombios_dp_get_dpcd only when error drm/amdgpu/cz: remove commented out call to enable vce pg drm/amdgpu/powerplay/cz: enable/disable vce dpm independent of vce pg drm/amdgpu/cz: enable/disable vce dpm even if vce pg is disabled drm/amdgpu/gfx8: specify which engine to wait before vm flush drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well drm/amd/powerplay: send event to notify powerplay all modules are initialized. drm/amd/powerplay: export AMD_PP_EVENT_COMPLETE_INIT task to amdgpu. drm/radeon/pm: update current crtc info after setting the powerstate drm/amdgpu/pm: update current crtc info after setting the powerstate commit 92f9e179a702a6adbc11e2fedc76ecd6ffc9e3f7 Author: Todd E Brandt Date: Wed Mar 2 16:05:29 2016 -0800 PM / sleep / x86: Fix crash on graph trace through x86 suspend Pause/unpause graph tracing around do_suspend_lowlevel as it has inconsistent call/return info after it jumps to the wakeup vector. The graph trace buffer will otherwise become misaligned and may eventually crash and hang on suspend. To reproduce the issue and test the fix: Run a function_graph trace over suspend/resume and set the graph function to suspend_devices_and_enter. This consistently hangs the system without this fix. Signed-off-by: Todd Brandt Cc: All applicable Signed-off-by: Rafael J. Wysocki arch/x86/kernel/acpi/sleep.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f3c87e99f401a0ff0ef941346ec6e790f0fd526e Merge: fc77dbd 949024d Author: Arnd Bergmann Date: Wed Mar 2 23:24:33 2016 +0100 Merge tag 'renesas-dt-fixes2-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Merge "Second Round of Renesas ARM Based SoC DT Fixes for v4.5" from Simon Horman: * remove enable prop from HS-USB device node on porter board * tag 'renesas-dt-fixes2-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: porter: remove enable prop from HS-USB device node commit ebc9780c93077a1c1129879de783f7fa8551d399 Merge: 11351bf cd5e412 Author: David S. Miller Date: Wed Mar 2 14:57:16 2016 -0500 Merge branch 'dwc_eth_qos' Lars Persson says: ==================== dwc_eth_qos: stability fixes and support for CMA This series has bug fixes for the dwc_eth_qos ethernet driver. Mainly two stability fixes for problems found by Rabin Vincent: - Successive starts and stops of the interface would trigger a DMA reset timeout. - A race condition in the TX DMA handling could trigger a netdev watchdog timeout. The memory allocation was improved to support use of the CMA as DMA allocator backend. ==================== Signed-off-by: David S. Miller commit cd5e41234729966153595fd3c2a7912cc4f95bc2 Author: Lars Persson Date: Mon Feb 29 16:22:34 2016 +0100 dwc_eth_qos: do phy_start before resetting hardware This reverts the changed init order from commit 3647bc35bd42 ("dwc_eth_qos: Reset hardware before PHY start") and makes another fix for the race. It turned out that the reset state machine of the dwceqos hardware requires PHY clocks to be present in order to complete the reset cycle. To plug the race with the phy state machine we defer link speed setting until the hardware init has finished. Signed-off-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 016a91c64de6621e5917b2ddfe2afc0abb0a884c Author: Rabin Vincent Date: Mon Feb 29 16:22:33 2016 +0100 dwc_eth_qos: use DWCEQOS_MSG_DEFAULT Since debug is hardcoded to 3, the defaults in the DWCEQOS_MSG_DEFAULT macro are never used, which does not seem to be the intended behaviour here. Set debug to -1 like other drivers so that DWCEQOS_MSG_DEFAULT is actually used by default. Signed-off-by: Rabin Vincent Signed-off-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8b0c32eae319e287d0329b4148c9a1a51525053 Author: Rabin Vincent Date: Mon Feb 29 16:22:32 2016 +0100 dwc_eth_qos: use GFP_KERNEL in dma_alloc_coherent() Since we are in non-atomic context here we can pass GFP_KERNEL to dma_alloc_coherent(). This enables use of the CMA. Signed-off-by: Rabin Vincent Signed-off-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4dc35f26e1017e2a632339ecae43706cbc06986 Author: Lars Persson Date: Mon Feb 29 16:22:31 2016 +0100 dwc_eth_qos: release descriptors outside netif_tx_lock To prepare for using the CMA, we can not be in atomic context when de-allocating DMA buffers. The tx lock was needed only to protect the hw reset against the xmit handler. Now we briefly grab the tx lock while stopping the queue to make sure no thread is inside or will enter the xmit handler. Signed-off-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 8afb6c474b0dd8f9cf7e122a19c71924566fdb97 Author: Rabin Vincent Date: Mon Feb 29 16:22:30 2016 +0100 dwc_eth_qos: fix race condition in dwceqos_start_xmit The xmit handler and the tx_reclaim tasklet had a race on the tx_free variable which could lead to a tx timeout if tx_free was updated after the tx complete interrupt. Signed-off-by: Rabin Vincent Signed-off-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 11351bf762d27116dd9fb362b198bebdfd427d53 Merge: ebc363f 6e52242 Author: David S. Miller Date: Wed Mar 2 14:42:46 2016 -0500 Merge branch 'mlx4-fixes' Or Gerlitz says: ==================== Mellanox 10/40G mlx4 driver fixes for 4.5-rc6 This series contains two fixes for the SRIOV HW LAG that was introduced in 4.5-rc1 and one fix that allows to revoke the administrative MAC that was assigned to VF through the PF. The VF mac fix needs to go for stable too. ==================== Signed-off-by: David S. Miller commit 6e5224224faa50ec4c8949dcefadf895e565f0d1 Author: Jack Morgenstein Date: Wed Mar 2 17:47:46 2016 +0200 net/mlx4_core: Allow resetting VF admin mac to zero The VF administrative mac addresses (stored in the PF driver) are initialized to zero when the PF driver starts up. These addresses may be modified in the PF driver through ndo calls initiated by iproute2 or libvirt. While we allow the PF/host to change the VF admin mac address from zero to a valid unicast mac, we do not allow restoring the VF admin mac to zero. We currently only allow changing this mac to a different unicast mac. This leads to problems when libvirt scripts are used to deal with VF mac addresses, and libvirt attempts to revoke the mac so this host will not use it anymore. Fix this by allowing resetting a VF administrative MAC back to zero. Fixes: 8f7ba3ca12f6 ('net/mlx4: Add set VF mac address support') Signed-off-by: Jack Morgenstein Reported-by: Moshe Levi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00ada91039fc03100cb4fab41d04f9b30f27340f Author: Moni Shoua Date: Wed Mar 2 17:47:45 2016 +0200 net/mlx4_core: Check the correct limitation on VFs for HA mode The limit of 63 is only for virtual functions while the actual enforcement was for VFs plus physical functions, fix that. Fixes: e57968a10bc1 ('net/mlx4_core: Support the HA mode for SRIOV VFs too') Signed-off-by: Moni Shoua Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 03a79f31ef5fb7a2298258432f3dc0f558f24d48 Author: Jack Morgenstein Date: Wed Mar 2 17:47:44 2016 +0200 net/mlx4_core: Fix lockdep warning in handling of mac/vlan tables In the mac and vlan register/unregister/replace functions, the driver locks the mac table mutex (or vlan table mutex) on both ports. We move to use mutex_lock_nested() to prevent warnings, such as the one below. [ 101.828445] ============================================= [ 101.834820] [ INFO: possible recursive locking detected ] [ 101.841199] 4.5.0-rc2+ #49 Not tainted [ 101.850251] --------------------------------------------- [ 101.856621] modprobe/3054 is trying to acquire lock: [ 101.862514] (&table->mutex#2){+.+.+.}, at: [] __mlx4_register_mac+0x87e/0xa90 [mlx4_core] [ 101.874598] [ 101.874598] but task is already holding lock: [ 101.881703] (&table->mutex#2){+.+.+.}, at: [] __mlx4_register_mac+0x860/0xa90 [mlx4_core] [ 101.893776] [ 101.893776] other info that might help us debug this: [ 101.901658] Possible unsafe locking scenario: [ 101.901658] [ 101.908859] CPU0 [ 101.911923] ---- [ 101.914985] lock(&table->mutex#2); [ 101.919595] lock(&table->mutex#2); [ 101.924199] [ 101.924199] * DEADLOCK * [ 101.924199] [ 101.931643] May be due to missing lock nesting notation Fixes: 5f61385d2ebc ('net/mlx4_core: Keep VLAN/MAC tables mirrored in multifunc HA mode') Signed-off-by: Jack Morgenstein Suggested-by: Doron Tsur Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/port.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit ebc363f577df2d33ce75aaa9d473782b1cfb873f Merge: 607e681 faf4478 Author: David S. Miller Date: Wed Mar 2 14:37:27 2016 -0500 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox 100G mlx5 driver fixes This series has few bug fixes for the mlx5 Ethernet driver. Eran fixed a locking issue with time-stamping that could cause a soft-lockup when time-stamping is enabled. Gal fixed the rx/tx packets/bytes counters returned by the driver to actually went through the network stack. Tariq removed a poll CQ optimization which could lead the driver to stop getting interrupts for some of the rings, and a did also fix to HW LRO which is currently broken. He also provided RSS and RX hash fixes for the case of changing the number of rx rings the RX hash/RSS configuration will be out of sync. The time stamping fix from Eran is not for -stable as the feature was only introduced in 4.5 but all of the others are. Changes fro V0: - Eran addressed the irqsave/restore comments from "Dave" and fixed them. This series is generated against net commit 4c0b6eaf373a 'net: thunderx: Fix for Qset error due to CQ full' ==================== Signed-off-by: David S. Miller commit faf4478bf8b7b5e6c94cb07a52a00e4d1cd647c6 Author: Gal Pressman Date: Mon Feb 29 21:17:15 2016 +0200 net/mlx5e: Provide correct packet/bytes statistics Using the HW VPort counters for traffic (rx/tx packets/bytes) statistics is wrong. This is because frames dropped due to steering or out of buffer will be counted as received. To fix that, we move to use the packet/bytes accounting done by the driver for what the netdev reports out. Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support [...]') Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 25 ++++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit b081da5ee1860d1874381a413a1b71d8f9f67e83 Author: Gal Pressman Date: Mon Feb 29 21:17:14 2016 +0200 net/mlx5e: Add rx/tx bytes software counters Sum up rx/tx bytes in software as we do for rx/tx packets, to be reported in upcoming statistics fix. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 ++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 9 ++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) commit 85082dba0a5059c538cfa786d07f5ec5370d22fe Author: Tariq Toukan Date: Mon Feb 29 21:17:13 2016 +0200 net/mlx5e: Correctly handle RSS indirection table when changing number of channels Upon changing num_channels, reset the RSS indirection table to match the new value. Fixes: 2d75b2bc8a8c ('net/mlx5e: Add ethtool RSS configuration options') Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++++++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) commit bdfc028de1b3cd59490d5413a5c87b0fa50040c2 Author: Tariq Toukan Date: Mon Feb 29 21:17:12 2016 +0200 net/mlx5e: Fix ethtool RX hash func configuration change We should modify TIRs explicitly to apply the new RSS configuration. The light ndo close/open calls do not "refresh" them. Fixes: 2d75b2bc8a8c ('net/mlx5e: Add ethtool RSS configuration options') Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 ++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 34 +++++++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 27 ++++++++++------- include/linux/mlx5/mlx5_ifc.h | 4 ++- 4 files changed, 46 insertions(+), 22 deletions(-) commit 0ad9b20415a461332611666301e7812900a15ad4 Author: Eran Ben Elisha Date: Mon Feb 29 21:17:11 2016 +0200 net/mlx5e: Fix soft lockup when HW Timestamping is enabled Readers/Writers lock for SW timecounter was acquired without disabling interrupts on local CPU. The problematic scenario: * HW timestamping is enabled * Timestamp overflow periodic service task is running on local CPU and holding write_lock for SW timecounter * Completion arrives, triggers interrupt for local CPU. Interrupt routine calls napi_schedule(), which triggers rx/tx skb process. An attempt to read SW timecounter using read_lock is done, which is already locked by a writer on the same CPU and cause soft lockup. Add irqsave/irqrestore for when using the readers/writers lock for writing. Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) commit ab0394fe2c258fdb5086c51a251b28f8ee7ab35c Author: Tariq Toukan Date: Mon Feb 29 21:17:10 2016 +0200 net/mlx5e: Fix LRO modify Ethtool LRO enable/disable is broken, as of today we only modify TCP TIRs in order to apply the requested configuration. Hardware requires that all TIRs pointing to the same RQ should share the same LRO configuration. For that all other TIRs' LRO fields must be modified as well. Fixes: 5c50368f3831 ('net/mlx5e: Light-weight netdev open/stop') Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 59a7c2fd336eaafb030aac9c91ac21d136a99f33 Author: Tariq Toukan Date: Mon Feb 29 21:17:09 2016 +0200 net/mlx5e: Remove wrong poll CQ optimization With the MLX5E_CQ_HAS_CQES optimization flag, the following buggy flow might occur: - Suppose RX is always busy, TX has a single packet every second. - We poll a single TX cqe and clear its flag. - We never arm it again as RX is always busy. - TX CQ flag is never changed, and new TX cqes are not polled. We revert this optimization. Fixes: e586b3b0baee ('net/mlx5: Ethernet Datapath files') Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 ----- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 10 +--------- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 1 - 4 files changed, 1 insertion(+), 22 deletions(-) commit 607e681111800f9bbfcd823a385a45dd0295dfb8 Author: Chunhao Lin Date: Thu Mar 3 00:59:15 2016 +0800 r8169: Enable RX_MULTI_EN for RTL_GIGA_MAC_VER_41~48 For RTL8168G/RTL8168H/RTL8411B/RTL8107E, enable this flag to eliminate message "AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x0002 address=0x0000000000003000 flags=0x0050] in dmesg. Signed-off-by: Chunhao Lin Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 4 ---- 1 file changed, 4 deletions(-) commit 68df7247f43b925f3e091a55318f76569e0f3187 Merge: 768c83a 2af8c4d Author: David S. Miller Date: Wed Mar 2 13:35:31 2016 -0500 Merge tag 'mac80211-for-davem-2016-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Here are a few more fixes for the current cycle: * check GCMP encryption vs. fragmentation properly; we'd found this problem quite a while ago but waited for the 802.11 spec to be updated * fix RTS/CTS logic in minstrel_ht * fix RX of certain public action frames in AP mode * add mac80211_hwsim to MAC80211 in MAINTAINERS, this helps the kbuild robot pick up the right tree for it ==================== Signed-off-by: David S. Miller commit 768c83a4bc2f709f6f05a1fa89dcaf508f353d0f Merge: 735c1e2 7e88009 Author: David S. Miller Date: Wed Mar 2 13:31:58 2016 -0500 Merge branch 'bnx2x-fixes' Michal Schmidt says: ==================== bnx2x: endianness fixes this fixes a VLAN crash and some SRIOV bugs in bnx2x observed on ppc64. ==================== Signed-off-by: David S. Miller commit 7e88009b9b2a22a20064abdb2a6536eeb3bcf432 Author: Michal Schmidt Date: Wed Mar 2 13:47:11 2016 +0100 bnx2x: fix indentation in bnx2x_sp_task() Fix a case of misleading code indentation. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d1c6bcb0f7f6e9f1481bcd3a1c52e75cc1f7fa4 Author: Michal Schmidt Date: Wed Mar 2 13:47:10 2016 +0100 bnx2x: define event data reserved fields as little-endian For consistency with other event data structs and to lessen the chance of a mistake should one of the reserved fields become used in the future, define the reserved fields as little-endian. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit da472731d8d0a50c451f5116477ffd9b3165f309 Author: Michal Schmidt Date: Wed Mar 2 13:47:09 2016 +0100 bnx2x: define fields of struct cfc_del_event_data as little-endian There were no missing endianness conversions in this case, but the fields of struct cfc_del_event_data should be defined as little-endian to get rid of the ugly (__force __le32) casts. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 6 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 3 +-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) commit ca4f2d5036be809b0f82ce38a7663d237efa3986 Author: Michal Schmidt Date: Wed Mar 2 13:47:08 2016 +0100 bnx2x: access cfc_del_event only if the opcode is CFC_DEL It's not really a bug, but it was odd that bnx2x_eq_int() read the message data as if it were a cfc_del_event regardless of the event type. It's cleaner to access only the appropriate member of union event_data after checking the event opcode. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a524ef77d54d7e12045841f4fcc430c1850f71f2 Author: Michal Schmidt Date: Wed Mar 2 13:47:07 2016 +0100 bnx2x: fix receive of VF->PF mailbox messages by the PF on big-endian On ppc64 the PF did not receive messages from VFs correctly. Fields of struct vf_pf_event_data are little-endian. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 6 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit 5cc5c2d2e5a46c7395a0453f9ea1a446ac4c1b97 Author: Michal Schmidt Date: Wed Mar 2 13:47:06 2016 +0100 bnx2x: fix sending VF->PF messages on big-endian When a VF is sending a message to the PF, it needs to trigger the PF to tell it the message is ready. The trigger did not work on ppc64. No interrupt appeared in the PF. The bug is due to confusion about the layout of struct trigger_vf_zone. In bnx2x_send_msg2pf() the trigger is written using writeb(), not writel(), so the attempt to define the struct with a reversed layout on big-endian is counter-productive. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 6 ------ 1 file changed, 6 deletions(-) commit 9cd753a1f449b9af49a4c994ffab8c4f99d91f14 Author: Michal Schmidt Date: Wed Mar 2 13:47:05 2016 +0100 bnx2x: fix crash on big-endian when adding VLAN bnx2x crashes during the initialization of the 8021q module on ppc64. The bug is a missing conversion from le32 in bnx2x_handle_classification_eqe() when obtaining the cid value from struct eth_event_data. The fields in struct eth_event_data should all be declared as little-endian and conversions added where missing. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h | 6 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 13 +++++-------- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 9 ++++----- 3 files changed, 12 insertions(+), 16 deletions(-) commit f983cd32cd5d2ec47ac8868f387bad15e8f11f85 Merge: 12f1d7e b4f09ae Author: Linus Torvalds Date: Wed Mar 2 09:46:19 2016 -0800 Merge branch 'parisc-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "We wire up the copy_file_range syscall, fix two bugs in the parisc ptrace code and have a trivial fix for floppy.h to clarify an expression with parentheses" * 'parisc-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Wire up copy_file_range syscall parisc: Fix ptrace syscall number and return value modification parisc: Use parentheses around expression in floppy.h commit 12f1d7e4932a40100177be5681f1a26f46265217 Merge: 39680f5 9589995 Author: Linus Torvalds Date: Wed Mar 2 09:15:21 2016 -0800 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Various small CIFS/SMB3 fixes for stable: Fixes address oops that can occur when accessing Macs with SMB3, and another problem found to Samba when read responses queued (e.g. with gluster under Samba)" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Fix duplicate line introduced by clone_file_range patch Fix cifs_uniqueid_to_ino_t() function for s390x CIFS: Fix SMB2+ interim response processing for read requests cifs: fix out-of-bounds access in lease parsing commit 39680f50ae54cbbb6e72ac38b8329dd3eb9105f4 Author: Linus Torvalds Date: Tue Mar 1 11:56:22 2016 -0800 userfaultfd: don't block on the last VM updates at exit time The exit path will do some final updates to the VM of an exiting process to inform others of the fact that the process is going away. That happens, for example, for robust futex state cleanup, but also if the parent has asked for a TID update when the process exits (we clear the child tid field in user space). However, at the time we do those final VM accesses, we've already stopped accepting signals, so the usual "stop waiting for userfaults on signal" code in fs/userfaultfd.c no longer works, and the process can become an unkillable zombie waiting for something that will never happen. To solve this, just make handle_userfault() abort any user fault handling if we're already in the exit path past the signal handling state being dead (marked by PF_EXITING). This VM special case is pretty ugly, and it is possible that we should look at finalizing signals later (or move the VM final accesses earlier). But in the meantime this is a fairly minimally intrusive fix. Reported-and-tested-by: Dmitry Vyukov Acked-by: Andrea Arcangeli Signed-off-by: Linus Torvalds fs/userfaultfd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0b39c531cfa12dad54eac238c2e303b994df1ef7 Author: Arindam Nath Date: Wed Mar 2 17:19:01 2016 +0530 drm/amdgpu: return from atombios_dp_get_dpcd only when error In amdgpu_connector_hotplug(), we need to start DP link training only after we have received DPCD. The function amdgpu_atombios_dp_get_dpcd() returns non-zero value only when an error condition is met, otherwise returns zero. So in case the function encounters an error, we need to skip rest of the code and return from amdgpu_connector_hotplug() immediately. Only when we are successfull in reading DPCD pin, we should carry on with turning-on the monitor. Signed-off-by: Arindam Nath Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89913ea615754163ae9a066c9c1b95aa2a2f51b4 Author: Alex Deucher Date: Mon Feb 29 16:11:07 2016 -0500 drm/amdgpu/cz: remove commented out call to enable vce pg This code path is not currently enabled now that we properly respect the vce pg flags, so uncomment the actual pg calls so the code is as it should be we are eventually able to enable vce pg. Reviewed-by: Christian König Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 370afa7ac5dc6c65cebeaee841ae700eb2387a55 Author: Alex Deucher Date: Mon Feb 29 15:29:48 2016 -0500 drm/amdgpu/powerplay/cz: enable/disable vce dpm independent of vce pg If we don't disable it when vce is not in use, we use extra power if vce pg is disabled. Reviewed-by: Christian König Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3dae7828399ef316e3fabf7e82c6415cb03a02e Author: Alex Deucher Date: Thu Feb 25 11:24:52 2016 -0500 drm/amdgpu/cz: enable/disable vce dpm even if vce pg is disabled I missed this when cleaning up the vce pg handling. Reviewed-by: Christian König Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9cac537332f5502c103415b25609548c276a09f8 Author: Chunming Zhou Date: Mon Feb 29 14:12:38 2016 +0800 drm/amdgpu/gfx8: specify which engine to wait before vm flush Select between me and pfp properly. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit feebe91aa9a9d99d9ec157612a614fadb79beb99 Author: Christian König Date: Fri Feb 26 16:18:15 2016 +0100 drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well We never ported that back to CIK, so we could run into VM faults here. Signed-off-by: Christian König Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4ea2efae0d117c5b5f44081bab941542d892e758 Author: Rex Zhu Date: Thu Feb 25 17:32:45 2016 +0800 drm/amd/powerplay: send event to notify powerplay all modules are initialized. with this event, powerplay can adjust current power state if needed. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dc26a2a2b3f037c2727f514b64e8a865721ec74b Author: Rex Zhu Date: Thu Feb 25 17:16:52 2016 +0800 drm/amd/powerplay: export AMD_PP_EVENT_COMPLETE_INIT task to amdgpu. This is needed to init the dynamic states without a display. To be used in the next commit. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 5 ++++- drivers/gpu/drm/amd/powerplay/eventmgr/eventactionchains.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 5e031d9fe8b0741f11d49667dfc3ebf5454121fd Author: Alex Deucher Date: Wed Feb 24 17:38:38 2016 -0500 drm/radeon/pm: update current crtc info after setting the powerstate On CI, we need to see if the number of crtcs changes to determine whether or not we need to upload the mclk table again. In practice we don't currently upload the mclk table again after the initial load. The only reason you would would be to add new states, e.g., for arbitrary mclk setting which is not currently supported. Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit eda1d1cf8d18383f19cd2b752f786120efa4768f Author: Alex Deucher Date: Wed Feb 24 17:18:25 2016 -0500 drm/amdgpu/pm: update current crtc info after setting the powerstate On CI, we need to see if the number of crtcs changes to determine whether or not we need to upload the mclk table again. In practice we don't currently upload the mclk table again after the initial load. The only reason you would would be to add new states, e.g., for arbitrary mclk setting which is not currently supported. Acked-by: Jordan Lazare Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e1f33be9186363da7955bcb5f0b03e6685544c50 Author: Greg Kurz Date: Tue Feb 16 15:54:28 2016 +0100 vhost: fix error path in vhost_init_used() We don't want side effects. If something fails, we rollback vq->is_le to its previous value. Signed-off-by: Greg Kurz Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 4e94ebdd06d5dc72b7a40fc12fc496d601fb7bbc Author: Ladi Prosek Date: Mon Feb 1 19:36:31 2016 +0100 virtio-pci: read the right virtio_pci_notify_cap field Looks like a copy-paste bug. The value is used as an optimization and a wrong value probably isn't causing any serious damage. Found when porting this code to Windows. Signed-off-by: Ladi Prosek Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_pci_modern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2af8c4dc2e9c7038aefe9a822aa1df62e2b106b7 Author: Johannes Berg Date: Fri Feb 26 10:50:34 2016 +0100 mac80211_hwsim: treat as part of mac80211 for MAINTAINERS Since I maintain this driver as part of mac80211, add it to the file list for mac80211; this helps submitters send it to me instead of Kalle and also makes the build robot apply the patches for it on the right tree for build attempts. Acked-by: Kalle Valo Signed-off-by: Johannes Berg MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit ce0c12b633846a47e103842149a5bac2e5d261ec Author: Heiko Carstens Date: Tue Mar 1 12:58:06 2016 +0100 s390/dasd: fix diag 0x250 inline assembly git commit 1ec2772e0c3c ("s390/diag: add a statistic for diagnose calls") added function calls to gather diagnose statistics. In case of the dasd diag driver the function call was added between a register asm statement which initialized register r2 and the inline assembly itself. The function call clobbers the contents of register r2 and therefore the diag 0x250 call behaves in a more or less random way. Fix this by extracting the function call into a separate function like we do everywhere else. Fixes: 1ec2772e0c3c ("s390/diag: add a statistic for diagnose calls") Cc: # 4.4+ Reported-and-tested-by: Stefan Haberland Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_diag.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit eda908967feecf7575a8ab74f1695b0445cf324e Author: Chris Wilson Date: Thu Feb 25 21:10:28 2016 +0000 drm/i915: Balance assert_rpm_wakelock_held() for !IS_ENABLED(CONFIG_PM) commit 09731280028ce03e6a27e1998137f1775a2839f3 Author: Imre Deak Date: Wed Feb 17 14:17:42 2016 +0200 drm/i915: Add helper to get a display power ref if it was already enabled left the rpm wakelock assertions unbalanced if CONFIG_PM was disabled as intel_runtime_pm_get_if_in_use() would return true without incrementing the local bookkeeping required for the assertions. Fixes: 09731280028c ("drm/i915: Add helper to get a display power ref if it was already enabled") Signed-off-by: Chris Wilson CC: Mika Kuoppala CC: Joonas Lahtinen CC: Ville Syrjälä Cc: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1456434628-22574-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Imre Deak (cherry picked from commit 135dc79efbc119ea5fb34475996983159e6ca31c) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_runtime_pm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit bd90123c4973821775d7ffae9891ad36017702a9 Author: Imre Deak Date: Mon Feb 29 22:49:02 2016 +0200 drm/i915/skl: Fix power domain suspend sequence During system suspend we need to first disable power wells then unitialize the display core. In case power well support is disabled we did this in the wrong order, so fix this up. Fixes: d314cd43 ("drm/i915: fix handling of the disable_power_well module option") CC: stable@vger.kernel.org CC: Patrik Jakobsson Signed-off-by: Imre Deak Reviewed-by: Patrik Jakobsson Link: http://patchwork.freedesktop.org/patch/msgid/1456778945-5411-1-git-send-email-imre.deak@intel.com (cherry picked from commit 2622d79bd9d18fd04b650234e6a218c5f95cf308) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_runtime_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2680d6da455b636dd006636780c0f235c6561d70 Author: Owen Hofmann Date: Tue Mar 1 13:36:13 2016 -0800 kvm: x86: Update tsc multiplier on change. vmx.c writes the TSC_MULTIPLIER field in vmx_vcpu_load, but only when a vcpu has migrated physical cpus. Record the last value written and update in vmx_vcpu_load on any change, otherwise a cpu migration must occur for TSC frequency scaling to take effect. Cc: stable@vger.kernel.org Fixes: ff2c3a1803775cc72dc6f624b59554956396b0ee Signed-off-by: Owen Hofmann Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 0178fd7dcc4451fcb90bec5e91226586962478d2 Author: Michael S. Tsirkin Date: Sun Feb 28 17:35:59 2016 +0200 mips/kvm: fix ioctl error handling Returning directly whatever copy_to_user(...) or copy_from_user(...) returns may not do the right thing if there's a pagefault: copy_to_user/copy_from_user return the number of bytes not copied in this case, but ioctls need to return -EFAULT instead. Fix up kvm on mips to do return copy_to_user(...)) ? -EFAULT : 0; and return copy_from_user(...)) ? -EFAULT : 0; everywhere. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin Signed-off-by: Paolo Bonzini arch/mips/kvm/mips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b097e9bc3742d4ffc63fe64b8fd44242d662392 Merge: 70e4da7 4cad67f Author: Paolo Bonzini Date: Wed Mar 2 10:31:30 2016 +0100 Merge tag 'kvm-arm-for-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/ARM fixes for 4.5-rc7 - Fix ioctl error handling on the timer path commit 04fdbc825ffc02fb098964b92de802fff44e73fd Author: Bjørn Mork Date: Tue Mar 1 14:36:32 2016 +0100 USB: qcserial: add Sierra Wireless EM74xx device ID The MC74xx and EM74xx modules use different IDs by default, according to the Lenovo EM7455 driver for Windows. Cc: Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2d02b8bdba322b527c5f5168ce1ca10c2d982a78 Author: Timothy Pearson Date: Fri Feb 26 15:29:32 2016 -0600 drm/ast: Fix incorrect register check for DRAM width During DRAM initialization on certain ASpeed devices, an incorrect bit (bit 10) was checked in the "SDRAM Bus Width Status" register to determine DRAM width. Query bit 6 instead in accordance with the Aspeed AST2050 datasheet v1.05. Signed-off-by: Timothy Pearson Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/ast/ast_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 949024d6702d1da8a266f42226d8402f0df078dc Author: Sergei Shtylyov Date: Sun Feb 14 01:26:34 2016 +0300 ARM: dts: porter: remove enable prop from HS-USB device node In the final versions of the Porter board (called "PORTER_C") Renesas decided to get rid of the Maxim Integrated MAX3355 OTG chip and didn't add any other provision to differ the host/gadget mode, so we'll have to remove no longer valid "renesas,enable-gpio" property from the HS-USB device node. Hopefully, the earlier revisions of the board were never seen in the wild... Fixes: c794f6a09a25 ("ARM: shmobile: porter: add HS-USB DT support") Reported-by: Yoshihiro Shimoda Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-porter.dts | 1 - 1 file changed, 1 deletion(-) commit f4f41c5abcf9acc61939367dc80fd62d19b16edb Merge: fc77dbd d144dfe Author: Greg Kroah-Hartman Date: Tue Mar 1 16:40:10 2016 -0800 Merge tag 'usb-ci-v4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: One bug-fix using ID wakeup, this bug is existed once this driver has written. commit f691b77b1fc491dae601631c8531a0a13e915466 Merge: 7d46af2 a528aca Author: Linus Torvalds Date: Tue Mar 1 15:30:45 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull d_inode/d_flags race fix from Al Viro. I love this fix. Not only does it fix the race in the dentry type handling, it entirely gets rid of the nasty and subtle memory ordering rules for d_type and d_inode, and replaces them with the basic dentry locking rules (sequence numbers under RCU, d_lock elsewhere). * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: use ->d_seq to get coherency between ->d_inode and ->d_flags commit 735c1e2511a5c4e6c451c8b3d29916c4b0fa39ae Author: Sergei Shtylyov Date: Sun Feb 28 22:50:59 2016 +0300 of_mdio: fix kernel-doc for of_phy_connect() The 'flags' parameter of the of_phy_connect() function wasn't described in the kernel-doc comment... Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/of/of_mdio.c | 1 + 1 file changed, 1 insertion(+) commit 3d73e8fac8f84942f15307d6d9cb1dba843d3fb2 Author: Xin Long Date: Sun Feb 28 10:33:11 2016 +0800 sctp: sctp_remaddr_seq_show use the wrong variable to dump transport info Now in sctp_remaddr_seq_show(), we use variable *tsp to get the param *v. but *tsp is also used to traversal transport_addr_list, which will cover the previous value, and make sctp_transport_put work on the wrong transport. So fix it by adding a new variable to get the param *v. Fixes: fba4c330c5b9 ("sctp: hold transport before we access t->asoc in sctp proc") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 40b4f0fd74e46c017814618d67ec9127ff20f157 Author: Xin Long Date: Sun Feb 28 10:03:51 2016 +0800 sctp: lack the check for ports in sctp_v6_cmp_addr As the member .cmp_addr of sctp_af_inet6, sctp_v6_cmp_addr should also check the port of addresses, just like sctp_v4_cmp_addr, cause it's invoked by sctp_cmp_addr_exact(). Now sctp_v6_cmp_addr just check the port when two addresses have different family, and lack the port check for two ipv6 addresses. that will make sctp_hash_cmp() cannot work well. so fix it by adding ports comparison in sctp_v6_cmp_addr(). Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/ipv6.c | 2 ++ 1 file changed, 2 insertions(+) commit b4f09ae6db2a98ff7817c3371aaab39ca22daf80 Author: Helge Deller Date: Tue Mar 1 23:18:43 2016 +0100 parisc: Wire up copy_file_range syscall Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/unistd.h | 3 ++- arch/parisc/kernel/syscall_table.S | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 98e8b6c9ac9d1b1e9d1122dfa6783d5d566bb8f7 Author: Helge Deller Date: Tue Jan 19 16:08:49 2016 +0100 parisc: Fix ptrace syscall number and return value modification Mike Frysinger reported that his ptrace testcase showed strange behaviour on parisc: It was not possible to avoid a syscall and the return value of a syscall couldn't be changed. To modify a syscall number, we were missing to save the new syscall number to gr20 which is then picked up later in assembly again. The effect that the return value couldn't be changed is a side-effect of another bug in the assembly code. When a process is ptraced, userspace expects each syscall to report entrance and exit of a syscall. If a syscall number was given which doesn't exist, we jumped to the normal syscall exit code instead of informing userspace that the (non-existant) syscall exits. This unexpected behaviour confuses userspace and thus the bug was misinterpreted as if we can't change the return value. This patch fixes both problems and was tested on 64bit kernel with 32bit userspace. Signed-off-by: Helge Deller Cc: Mike Frysinger Cc: stable@vger.kernel.org # v4.0+ Tested-by: Mike Frysinger arch/parisc/kernel/ptrace.c | 16 +++++++++++----- arch/parisc/kernel/syscall.S | 5 ++++- 2 files changed, 15 insertions(+), 6 deletions(-) commit f0da74bc8140001c6afd2a176e397c3c3aaca37a Merge: edffc21 99f81af Author: David S. Miller Date: Tue Mar 1 16:52:09 2016 -0500 Merge branch 'phy-micrel-fixes' Alexandre Belloni says: ==================== phy: micrel: fix issues with interrupt on atmel boards Since the phy is not polled anymore, there were issues getting a link on the sama5d* xplained boards. I'm not too sure about were those fixes should go and I'm wondering whether the first one shoud be made generic. For the second one, I found the PHY_HAS_MAGICANEG flag that is not used and I wondering whether this is related to that kind of issue. I had a quick look at the history and could'nt find its use. ==================== Signed-off-by: David S. Miller commit 99f81afc139c6edd14d77a91ee91685a414a1c66 Author: Alexandre Belloni Date: Fri Feb 26 19:18:23 2016 +0100 phy: micrel: Disable auto negotiation on startup Disable auto negotiation on init to properly detect an already plugged cable at boot. At boot, when the phy is started, it is in the PHY_UP state. However, if a cable is plugged at boot, because auto negociation is already enabled at the time we get the first interrupt, the phy is already running. But the state machine then switches from PHY_UP to PHY_AN and calls phy_start_aneg(). phy_start_aneg() will not do anything because aneg is already enabled on the phy. It will then wait for a interrupt before going further. This interrupt will never happen unless the cable is unplugged and then replugged. It was working properly before 321beec5047a (net: phy: Use interrupts when available in NOLINK state) because switching to NOLINK meant starting polling the phy, even if IRQ were enabled. Fixes: 321beec5047a (net: phy: Use interrupts when available in NOLINK state) Signed-off-by: Alexandre Belloni Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f5aba91d7f186cba84af966a741a0346de603cd4 Author: Alexandre Belloni Date: Fri Feb 26 19:18:22 2016 +0100 phy: micrel: Ensure interrupts are reenabled on resume At least on ksz8081, when getting back from power down, interrupts are disabled. ensure they are reenabled if they were previously enabled. This fixes resuming which is failing on the xplained boards from atmel since 321beec5047a (net: phy: Use interrupts when available in NOLINK state) Fixes: 321beec5047a (net: phy: Use interrupts when available in NOLINK state) Signed-off-by: Alexandre Belloni Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 9a334d39daad92e2c46539b0bb3bd32b68df2af2 Author: Helge Deller Date: Wed Feb 3 20:54:56 2016 +0100 parisc: Use parentheses around expression in floppy.h David Binderman reported a style issue in the floppy.h header file: arch/parisc/include/asm/floppy.h:221: (style) Boolean result is used in bitwise operation. Clarify expression with parentheses. Reported-by: David Binderman Cc: David Binderman Signed-off-by: Helge Deller arch/parisc/include/asm/floppy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edffc2178d4ba10a61e150b42ef5e7d797714eb3 Author: Guillaume Nault Date: Fri Feb 26 18:45:34 2016 +0100 ppp: lock ppp->flags in ppp_read() and ppp_poll() ppp_read() and ppp_poll() can be called concurrently with ppp_ioctl(). In this case, ppp_ioctl() might call ppp_ccp_closed(), which may update ppp->flags while ppp_read() or ppp_poll() is reading it. The update done by ppp_ccp_closed() isn't atomic due to the bit mask operation ('ppp->flags &= ~(SC_CCP_OPEN | SC_CCP_UP)'), so concurrent readers might get transient values. Reading incorrect ppp->flags may disturb the 'ppp->flags & SC_LOOP_TRAFFIC' test in ppp_read() and ppp_poll(), which in turn can lead to improper decision on whether the PPP unit file is ready for reading or not. Since ppp_ccp_closed() is protected by the Rx and Tx locks (with ppp_lock()), taking the Rx lock is enough for ppp_read() and ppp_poll() to guarantee that ppp_ccp_closed() won't update ppp->flags concurrently. The same reasoning applies to ppp->n_channels. The 'n_channels' field can also be written to concurrently by ppp_ioctl() (through ppp_connect_channel() or ppp_disconnect_channel()). These writes aren't atomic (simple increment/decrement), but are protected by both the Rx and Tx locks (like in the ppp->flags case). So holding the Rx lock before reading ppp->n_channels also prevents concurrent writes. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit a7f4b98896f6aede26431a3017d32d722fcec5cb Author: Ivan Vecera Date: Fri Feb 26 09:15:50 2016 +0100 bna: fix list corruption Use list_move_tail() to move MAC address entry from list of pending to list of active entries. Simple list_add_tail() leaves the entry also in the first list, this leads to list corruption. Cc: Rasesh Mody Signed-off-by: Ivan Vecera Acked-by: Rasesh Mody Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c44a72a5e8c16751af456cd711720c3aabd40cdd Merge: a6522c0 e9a2d81 Author: David S. Miller Date: Tue Mar 1 15:10:38 2016 -0500 Merge tag 'linux-can-fixes-for-4.5-20160226' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-02-26 this is a pull request of one patch for net. The patch by Maximilain Schneider fixes a kfree() problem during disconnect in the gs_usb driver. ==================== Signed-off-by: David S. Miller commit 197b958c1e76a575d77038cc98b4bebc2134279f Author: Takashi Iwai Date: Tue Mar 1 18:30:18 2016 +0100 ALSA: seq: oss: Don't drain at closing a client The OSS sequencer client tries to drain the pending events at releasing. Unfortunately, as spotted by syzkaller fuzzer, this may lead to an unkillable process state when the event has been queued at the far future. Since the process being released can't be signaled any longer, it remains and waits for the echo-back event in that far future. Back to history, the draining feature was implemented at the time we misinterpreted POSIX definition for blocking file operation. Actually, such a behavior is superfluous at release, and we should just release the device as is instead of keeping it up forever. This patch just removes the draining call that may block the release for too long time unexpectedly. BugLink: http://lkml.kernel.org/r/CACT4Y+Y4kD-aBGj37rf-xBw9bH3GMU6P+MYg4W1e-s-paVD2pg@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/oss/seq_oss.c | 2 -- sound/core/seq/oss/seq_oss_device.h | 1 - sound/core/seq/oss/seq_oss_init.c | 16 ---------------- 3 files changed, 19 deletions(-) commit 7314d22a2f5bd40468d57768be368c3d9b4bd726 Author: Wolfram Sang Date: Sun Feb 21 15:16:48 2016 +0100 i2c: brcmstb: allocate correct amount of memory for regmap We want the size of the struct, not of a pointer to it. To be future proof, just dereference the pointer to get the desired type. Fixes: dd1aa2524bc5 ("i2c: brcmstb: Add Broadcom settop SoC i2c controller driver") Acked-by: Gregory Fong Acked-by: Florian Fainelli Reviewed-by: Kamal Dasu Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-brcmstb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7d46af2084eabe73ce4dbf06072fded34b58b0c7 Merge: fc77dbd 397d153 Author: Linus Torvalds Date: Tue Mar 1 08:57:34 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: 1) System call tracing doesn't handle register contents properly across the trace. From Mike Frysinger. 2) Hook up copy_file_range 3) Build fix for 32-bit with newer tools. 4) New sun4v watchdog driver, from Wim Coekaerts. 5) Set context system call has to allow for servicable faults when we flush the register windows to memory * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix sparc64_set_context stack handling. sparc32: Add -Wa,-Av8 to KBUILD_CFLAGS. Add sun4v_wdt watchdog driver sparc: Fix system call tracing register handling. sparc: Hook up copy_file_range syscall. commit 9589995e46d89c70c6fa4723c5f3e5ec04c3c3e3 Author: Steve French Date: Mon Feb 29 01:02:11 2016 -0600 CIFS: Fix duplicate line introduced by clone_file_range patch Commit 04b38d601239b4 ("vfs: pull btrfs clone API to vfs layer") added a duplicated line (in cifsfs.c) which causes a sparse compile warning. Signed-off-by: Steve French Reviewed-by: Christoph Hellwig fs/cifs/cifsfs.c | 1 - 1 file changed, 1 deletion(-) commit c36dd3eaf1a674a45b58b922258d6eaa8932e292 Author: Felix Fietkau Date: Wed Feb 24 12:07:17 2016 +0100 mac80211: minstrel_ht: fix a logic error in RTS/CTS handling RTS/CTS needs to be enabled if the rate is a fallback rate *or* if it's a dual-stream rate and the sta is in dynamic SMPS mode. Cc: stable@vger.kernel.org Fixes: a3ebb4e1b763 ("mac80211: minstrel_ht: handle peers in dynamic SMPS") Reported-by: Matías Richart Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ec7bae8bec9b72e347e01330c745ab5cdd66f0e Author: Jouni Malinen Date: Tue Mar 1 00:29:00 2016 +0200 mac80211: Fix Public Action frame RX in AP mode Public Action frames use special rules for how the BSSID field (Address 3) is set. A wildcard BSSID is used in cases where the transmitter and recipient are not members of the same BSS. As such, we need to accept Public Action frames with wildcard BSSID. Commit db8e17324553 ("mac80211: ignore frames between TDLS peers when operating as AP") added a rule that drops Action frames to TDLS-peers based on an Action frame having different DA (Address 1) and BSSID (Address 3) values. This is not correct since it misses the possibility of BSSID being a wildcard BSSID in which case the Address 1 would not necessarily match. Fix this by allowing mac80211 to accept wildcard BSSID in an Action frame when in AP mode. Fixes: db8e17324553 ("mac80211: ignore frames between TDLS peers when operating as AP") Cc: stable@vger.kernel.org Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg net/mac80211/rx.c | 1 + 1 file changed, 1 insertion(+) commit 9acc54beb474c81148e2946603d141cf8716b19f Author: Johannes Berg Date: Fri Feb 26 22:13:40 2016 +0100 mac80211: check PN correctly for GCMP-encrypted fragmented MPDUs Just like for CCMP we need to check that for GCMP the fragments have PNs that increment by one; the spec was updated to fix this security issue and now has the following text: The receiver shall discard MSDUs and MMPDUs whose constituent MPDU PN values are not incrementing in steps of 1. Adapt the code for CCMP to work for GCMP as well, luckily the relevant fields already alias each other so no code duplication is needed (just check the aliasing with BUILD_BUG_ON.) Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 +- net/mac80211/rx.c | 36 +++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 10 deletions(-) commit 17e2df4613be57d0fab68df749f6b8114e453152 Author: Dennis Kadioglu Date: Tue Mar 1 14:23:29 2016 +0100 ALSA: usb-audio: Add a quirk for Plantronics DA45 Plantronics DA45 does not support reading the sample rate which leads to many lines of "cannot get freq at ep 0x4" and "cannot get freq at ep 0x84". This patch adds the USB ID of the DA45 to quirks.c and avoids those error messages. Signed-off-by: Dennis Kadioglu Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 537b8a8695ea0fbc857fe68f99cd5294f8fca5e3 Author: Johan Hovold Date: Mon Feb 29 18:56:02 2016 +0100 Revert "USB: serial: add Moxa UPORT 11x0 driver" This reverts commit 0b2b093ad405b56a9e6f4f20a25da77ebfa9549c. Turns out the MOXA vendor driver was basically just a copy of the ti_usb_3410_5052 driver. We don't want two drivers for the same chip even if mxu11x0 had gotten some much needed clean up before merge. So let's remove the mxu11x0 driver, add support for these Moxa devices to the TI driver, and then clean that driver up instead. Signed-off-by: Johan Hovold Acked-by: Greg Kroah-Hartman drivers/usb/serial/Kconfig | 16 - drivers/usb/serial/Makefile | 1 - drivers/usb/serial/mxu11x0.c | 1006 ------------------------------------------ 3 files changed, 1023 deletions(-) commit c0992d0f54847d0d1d85c60fcaa054f175ab1ccd Author: Yegor Yefremov Date: Mon Feb 29 16:39:57 2016 +0100 USB: serial: option: add support for Quectel UC20 Add support for Quectel UC20 and blacklist the QMI interface. Signed-off-by: Yegor Yefremov Cc: stable [johan: amend commit message ] Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit 5deef5551c77e488922cc4bf4bc76df63be650d0 Author: Daniele Palmas Date: Mon Feb 29 15:36:11 2016 +0100 USB: serial: option: add support for Telit LE922 PID 0x1045 This patch adds support for 0x1045 PID of Telit LE922. Signed-off-by: Daniele Palmas Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) commit 397d1533b6cce0ccb5379542e2e6d079f6936c46 Author: David S. Miller Date: Tue Mar 1 00:25:32 2016 -0500 sparc64: Fix sparc64_set_context stack handling. Like a signal return, we should use synchronize_user_stack() rather than flush_user_windows(). Reported-by: Ilya Malakhov Signed-off-by: David S. Miller arch/sparc/kernel/signal_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22be3b105597002ad3499bdb9c0aba49c9ab05f7 Author: David S. Miller Date: Sun Jan 17 11:47:29 2016 -0500 sparc32: Add -Wa,-Av8 to KBUILD_CFLAGS. Binutils used to be (erroneously) extremely permissive about instruction usage. But that got fixed and if you don't properly tell it to accept classes of instructions it will fail. This uncovered a specs bug on sparc in gcc where it wouldn't pass the proper options to binutils options. Deal with this in the kernel build by adding -Wa,-Av8 to KBUILD_CFLAGS. Reported-by: Al Viro Signed-off-by: David S. Miller arch/sparc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) commit 15c665700bf6f4543f003ac0fbb1e9ec692e93f2 Author: Takashi Iwai Date: Mon Feb 29 18:01:18 2016 +0100 ASoC: wm_adsp: Fix enum ctl accesses in a wrong type The firmware ctls like "DSP1 Firmware" in wm_adsp codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/wm_adsp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 39a79fe10482572ce76fd724b7915b3ee4cbd81e Author: Takashi Iwai Date: Mon Feb 29 18:01:17 2016 +0100 ASoC: wm9081: Fix enum ctl accesses in a wrong type "Speaker Mode "ctl in wm9081 codec driver is enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/wm9081.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8293004c81dd33e6e91afe2f9a773fe6796893cc Author: Takashi Iwai Date: Mon Feb 29 18:01:16 2016 +0100 ASoC: wm8996: Fix enum ctl accesses in a wrong type "DSP1 EQ Mode" and "DSP2 EQ Mode" ctls in wm8996 codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/wm8996.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8019c0b37cd5a87107808300a496388b777225bf Author: Takashi Iwai Date: Mon Feb 29 18:01:15 2016 +0100 ASoC: wm8994: Fix enum ctl accesses in a wrong type The DRC Mode like "AIF1DRC1 Mode" and EQ Mode like "AIF1.1 EQ Mode" in wm8994 codec driver are enum ctls, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/wm8994.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 251d604778f1f7bbf29672a79cccc4663a7efd62 Author: Takashi Iwai Date: Mon Feb 29 18:01:14 2016 +0100 ASoC: wm8985: Fix enum ctl accesses in a wrong type "Equalizer Function" ctl in wm8985 codec driver is enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/wm8985.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b5ab265905b3e07ad9dc7d553a074404b25e9200 Author: Takashi Iwai Date: Mon Feb 29 18:01:13 2016 +0100 ASoC: wm8983: Fix enum ctl accesses in a wrong type "Equalizer Function" ctl in wm8983 codec driver is enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/wm8983.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d0784829ae3b0beeb69b476f017d5c8a2eb95198 Author: Takashi Iwai Date: Mon Feb 29 18:01:12 2016 +0100 ASoC: wm8958: Fix enum ctl accesses in a wrong type "MBC Mode", "VSS Mode", "VSS HPF Mode" and "Enhanced EQ Mode" ctls in wm8958 codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/wm8958-dsp2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c41a024c4e770fff999f4164cc4d1696e5f17437 Author: Takashi Iwai Date: Mon Feb 29 18:01:11 2016 +0100 ASoC: wm8904: Fix enum ctl accesses in a wrong type "DRC Mode" and "EQ Mode" ctls in wm8904 codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/wm8904.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0cad10539b281e88335afd765afaf9885dcfc3ef Author: Takashi Iwai Date: Mon Feb 29 18:01:10 2016 +0100 ASoC: wm8753: Fix enum ctl accesses in a wrong type "DAI Mode" ctl in wm8753 codec driver is enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/wm8753.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 154a0fddd4275aa93f4683705579a7d8ec3d177b Author: Takashi Iwai Date: Mon Feb 29 18:08:04 2016 +0100 ASoC: wl1273: Fix enum ctl accesses in a wrong type "Codec Mode" and "Audio Switch" ctls in wl1273 codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/wl1273.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 8733f99c23726532918034f4ae599d9e6d27bd1e Author: Takashi Iwai Date: Mon Feb 29 18:08:03 2016 +0100 ASoC: tlv320dac33: Fix enum ctl accesses in a wrong type "FIFO Mode" ctl in tlv320dac33 codec driver is enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/tlv320dac33.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 58c0213872816bf24d14364989c82dc4acd58103 Author: Takashi Iwai Date: Mon Feb 29 18:08:02 2016 +0100 ASoC: max98095: Fix enum ctl accesses in a wrong type "Biquad1 Mode" and "Biquad2 Mode" ctls in max98095 codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/max98095.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9af39044753d7280fa795528598636fe9c58a54e Author: Takashi Iwai Date: Mon Feb 29 18:08:01 2016 +0100 ASoC: max98088: Fix enum ctl accesses in a wrong type "EQ1 Mode" and "EQ2 Mode" ctls in max98088 codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/max98088.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b606316129571c46381430852c149855ac50477 Author: Takashi Iwai Date: Mon Feb 29 18:08:00 2016 +0100 ASoC: ab8500: Fix enum ctl accesses in a wrong type "Sidetone Status" and "ANC Status" ctls in ab8500 codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/ab8500-codec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fe9aba13108ee8e15ae59009a26db02460dbb04f Author: Takashi Iwai Date: Mon Feb 29 18:04:42 2016 +0100 ASoC: da732x: Fix enum ctl accesses in a wrong type "DAC1 High Pass Filter Mode" & co in da732x codec driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/da732x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 89300b4e5a5b5b5c145318f3b257291239522da6 Author: Takashi Iwai Date: Mon Feb 29 18:02:59 2016 +0100 ASoC: cs42l51: Fix enum ctl accesses in a wrong type "PCM channel mixer" ctl in cs42l51 codec driver is enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cs42l51.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 508ddfba37cad76d774da8f8d8e2387f0eca5fa4 Author: Takashi Iwai Date: Mon Feb 29 17:29:25 2016 +0100 ASoC: intel: mfld: Fix enum ctl accesses in a wrong type "Playback Switch" and "Lineout Mux" ctls in medfld machine driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/intel/boards/mfld_machine.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f4d438eec7fe56d55998195e08dfaa5aa3e08f0c Author: Takashi Iwai Date: Mon Feb 29 17:26:22 2016 +0100 ASoC: omap: rx51: Fix enum ctl accesses in a wrong type "Speaker Function", "Input Select" and "Jack Function" ctls in rx51 driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Acked-by: Jarkko Nikula Signed-off-by: Mark Brown sound/soc/omap/rx51.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit dd90533cd6bbfe075a72ab789b6e9d6f280ba476 Author: Takashi Iwai Date: Mon Feb 29 17:26:21 2016 +0100 ASoC: omap: n810: Fix enum ctl accesses in a wrong type "Jack Function", "Speaker Function" and "Input Select" ctls in n810 driver are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Acked-by: Jarkko Nikula Signed-off-by: Mark Brown sound/soc/omap/n810.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 419396d5a1d12003a18a58785687697800d2f02a Author: Takashi Iwai Date: Mon Feb 29 17:23:53 2016 +0100 ASoC: pxa: tosa: Fix enum ctl accesses in a wrong type "Jack Function" and "Speaker Function" ctls in tosa are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/pxa/tosa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 49a1ba16ab15b9a572c188fe0d9d79017d2fef99 Author: Takashi Iwai Date: Mon Feb 29 17:23:52 2016 +0100 ASoC: pxa: spitz: Fix enum ctl accesses in a wrong type "Jack Function" and "Speaker Function" ctls in spitz are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/pxa/spitz.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7a3f4b488ce366de6ab2cf19d95353da9814bdd9 Author: Takashi Iwai Date: Mon Feb 29 17:23:51 2016 +0100 ASoC: pxa: poodle: Fix enum ctl accesses in a wrong type "Jack Function" and "Speaker Function" ctls in poodle are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/pxa/poodle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 127ee199d5d232f29ad64bace3b441127fce6cd3 Author: Takashi Iwai Date: Mon Feb 29 17:23:50 2016 +0100 ASoC: pxa: magician: Fix enum ctl accesses in a wrong type "Input Select" ctl in magician driver is an enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. (Meanwhile "Headphone Switch" and "Speaker Switch" are boolean, so they should stay to access via value.integer.value[] as is.) Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/pxa/magician.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1457ad0e99dc5b1fe3fe3123d5135c95c00ed74b Author: Takashi Iwai Date: Mon Feb 29 17:23:49 2016 +0100 ASoC: pxa: corgi: Fix enum ctl accesses in a wrong type "Jack Function" and "Speaker Function" ctls in corgi are enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/pxa/corgi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 741338f99f16dc24d2d01ac777b0798ae9d10a90 Author: Takashi Iwai Date: Mon Feb 29 17:20:48 2016 +0100 ASoC: dapm: Fix ctl value accesses in a wrong type snd_soc_dapm_dai_link_get() and _put() access the associated ctl values as value.integer.value[]. However, this is an enum ctl, and it has to be accessed via value.enumerated.item[]. The former is long while the latter is unsigned int, so they don't align. Fixes: c66150824b8a ('ASoC: dapm: add code to configure dai link parameters') Cc: Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ead8f34c701ec7bf3234118b8c746227f30dfd1a Author: Chris Wilson Date: Thu Feb 25 21:10:28 2016 +0000 drm/i915: Balance assert_rpm_wakelock_held() for !IS_ENABLED(CONFIG_PM) commit 09731280028ce03e6a27e1998137f1775a2839f3 Author: Imre Deak Date: Wed Feb 17 14:17:42 2016 +0200 drm/i915: Add helper to get a display power ref if it was already enabled left the rpm wakelock assertions unbalanced if CONFIG_PM was disabled as intel_runtime_pm_get_if_in_use() would return true without incrementing the local bookkeeping required for the assertions. Signed-off-by: Chris Wilson CC: Mika Kuoppala CC: Joonas Lahtinen CC: Ville Syrjälä Reviewed-by: Imre Deak Signed-off-by: Dave Airlie drivers/gpu/drm/i915/intel_runtime_pm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 3c2002aec3ee3a9fc86ff8f8618f1253c94ec919 Author: Arnd Bergmann Date: Mon Feb 29 17:04:21 2016 +0100 cpufreq: mediatek: allow building as a module The MT8173 cpufreq driver can currently only be built-in, but it has a Kconfig dependency on the thermal core. THERMAL can be a loadable module, which in turn makes this driver impossible to build. It is nicer to make the cpufreq driver a module as well, so this patch turns the option in to a 'tristate' and adapts the dependency accordingly. The driver has no module_exit() function, so it will continue to not support unloading, but it can be built as a module and loaded at runtime now. Signed-off-by: Arnd Bergmann Fixes: 5269e7067cd6 (cpufreq: Add ARM_MT8173_CPUFREQ dependency on THERMAL) Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 4 ++-- drivers/cpufreq/mt8173-cpufreq.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit ddd30ef4741c30945e43a2956bfbc3afe74a73b5 Author: Arnd Bergmann Date: Mon Feb 29 17:04:20 2016 +0100 cpufreq: qoriq: allow building as module with THERMAL=m My previous patch to avoid link errors with the qoriq cpufreq driver disallowed all of the broken cases, but also prevented the driver from being built when CONFIG_THERMAL is a module. This changes the dependency to allow the cpufreq driver to also be a module in this case, just not built-in. Signed-off-by: Arnd Bergmann Fixes: 8ae1702a0df5 (cpufreq: qoriq: Register cooling device based on device tree) Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5adebafb75bdfbbe4ec69f14c3613e70f6ed7f6f Author: Leon Romanovsky Date: Sun Feb 21 18:12:26 2016 +0200 IB/core: Fix missed clean call in registration path In case of failure returned from query function in IB device registration, we need to clean IB cache which was missed. This change fixes it. Fixes: 3e153a93a1c1 ('IB/core: Save the device attributes on the device structure') Signed-off-by: Leon Romanovsky Reviewed-by: Ira Weiny Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 1 + 1 file changed, 1 insertion(+) commit 1195c103f6c98d9ff381cac3a8760d4f8a133627 Author: Minghuan Lian Date: Mon Feb 29 17:24:15 2016 -0600 PCI: layerscape: Fix MSG TLP drop setting Some kinds of Layerscape PCIe controllers will forward the received message TLPs to system application address space, which could corrupt system memory or lead to a system hang. Enable MSG_DROP to fix this issue. Signed-off-by: Minghuan Lian Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-layerscape.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 79e3f4a853ed161cd4c06d84b50beebf961a47c6 Author: Murali Karicheri Date: Mon Feb 29 17:18:22 2016 -0600 PCI: keystone: Fix MSI code that retrieves struct pcie_port pointer Commit cbce7900598c ("PCI: designware: Make driver arch-agnostic") changed the host bridge sysdata pointer from the ARM pci_sys_data to the DesignWare pcie_port structure, and changed pcie-designware.c to reflect that. But it did not change the corresponding code in pci-keystone-dw.c, so it caused crashes on Keystone: Unable to handle kernel NULL pointer dereference at virtual address 00000030 pgd = c0003000 [00000030] *pgd=80000800004003, *pmd=00000000 Internal error: Oops: 206 [#1] PREEMPT SMP ARM CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.2-00139-gb74f926 #2 Hardware name: Keystone PC is at ks_dw_pcie_msi_irq_unmask+0x24/0x58 Change pci-keystone-dw.c to expect sysdata to be the struct pcie_port pointer. [bhelgaas: changelog] Fixes: cbce7900598c ("PCI: designware: Make driver arch-agnostic") Signed-off-by: Murali Karicheri Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.4+ CC: Zhou Wang drivers/pci/host/pci-keystone-dw.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit e6a8c9b337eed56eb481e1b4dd2180c25a1e5310 Author: Joerg Roedel Date: Mon Feb 29 23:49:47 2016 +0100 iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path In the PCI hotplug path of the Intel IOMMU driver, replace the usage of the BUS_NOTIFY_DEL_DEVICE notifier, which is executed before the driver is unbound from the device, with BUS_NOTIFY_REMOVED_DEVICE, which runs after that. This fixes a kernel BUG being triggered in the VT-d code when the device driver tries to unmap DMA buffers and the VT-d driver already destroyed all mappings. Reported-by: Stefani Seibold Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 5 +++-- drivers/iommu/intel-iommu.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit a6522c08987daa6f9ac25a9c08870041a43db6b0 Author: Neil Horman Date: Thu Feb 25 13:02:50 2016 -0500 3c59x: mask LAST_FRAG bit from length field in ring Recently, I fixed a bug in 3c59x: commit 6e144419e4da11a9a4977c8d899d7247d94ca338 Author: Neil Horman Date: Wed Jan 13 12:43:54 2016 -0500 3c59x: fix another page map/single unmap imbalance Which correctly rebalanced dma mapping and unmapping types. Unfortunately it introduced a new bug which causes oopses on older systems. When mapping dma regions, the last entry for a packet in the 3c59x tx ring encodes a LAST_FRAG bit, which is encoded as the high order bit of the buffers length field. When it is unmapped the LAST_FRAG bit is cleared prior to being passed to the unmap function. Unfortunately the commit above fails to do that masking. It was missed in testing because the system on which I tested it had an intel iommu, the driver for which ignores the size field, using only the DMA address as the token to identify the mapping to be released. However, on older systems that rely on swiotlb (or other dma drivers that key off that length field), not masking off that LAST_FRAG high order bit results in parsing a huge size to be release, leading to all sorts of odd corruptions and the like. Fix is easy, just mask the length with 0xFFF. It should really be &(LAST_FRAG-1), but 0xFFF is the style of the file, and I'd like to make this fix minimal and correct before making it prettier. Appies to the net tree cleanly. All testing on both iommu and swiommu based systems produce good results Signed-off-by: Neil Horman CC: Steffen Klassert CC: "David S. Miller" Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c59x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc8b4afc4a04fac8ee55a19b59f2356a25e7e778 Author: Manuel Lauss Date: Sat Feb 27 16:10:05 2016 +0100 ata: ahci: don't mark HotPlugCapable Ports as external/removable The HPCP bit is set by bioses for on-board sata ports either because they think sata is hotplug capable in general or to allow Windows to display a "device eject" icon on ports which are routed to an external connector bracket. However in Redhat Bugzilla #1310682, users report that with kernel 4.4, where this bit test first appeared, a lot of partitions on sata drives are now mounted automatically. This patch should fix redhat and a lot of other distros which unconditionally automount all devices which have the "removable" bit set. Signed-off-by: Manuel Lauss Signed-off-by: Tejun Heo Fixes: 8a3e33cf92c7 ("ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior) Link: http://lkml.kernel.org/g/56CF35FA.1070500@redhat.com Cc: stable@vger.kernel.org #v4.4+ drivers/ata/libahci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d243bed32f5042582896237f88fa1798aee55ff9 Author: Tirumalesh Chalamarla Date: Tue Feb 16 12:08:49 2016 -0800 ahci: Workaround for ThunderX Errata#22536 Due to Errata in ThunderX, HOST_IRQ_STAT should be cleared before leaving the interrupt handler. The patch attempts to satisfy the need. Changes from V2: - removed newfile - code is now under CONFIG_ARM64 Changes from V1: - Rebased on top of libata/for-4.6 - Moved ThunderX intr handler to new file tj: Minor adjustments to comments. Signed-off-by: Tirumalesh Chalamarla Signed-off-by: Tejun Heo drivers/ata/ahci.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 3c4c615d70c8cbdc8ba8c79ed702640930652a79 Author: Vittorio Alfieri Date: Sun Feb 28 14:40:24 2016 +0100 USB: cp210x: Add ID for Parrot NMEA GPS Flight Recorder The Parrot NMEA GPS Flight Recorder is a USB composite device consisting of hub, flash storage, and cp210x usb to serial chip. It is an accessory to the mass-produced Parrot AR Drone 2. The device emits standard NMEA messages which make the it compatible with NMEA compatible software. It was tested using gpsd version 3.11-3 as an NMEA interpreter and using the official Parrot Flight Recorder. Signed-off-by: Vittorio Alfieri Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 013dd239d6220a4e0dfdf0d45a82c34f1fd73deb Author: Patrik Halfar Date: Sat Feb 20 18:49:56 2016 +0100 USB: qcserial: add Dell Wireless 5809e Gobi 4G HSPA+ (rev3) New revision of Dell Wireless 5809e Gobi 4G HSPA+ Mobile Broadband Card has new idProduct. Bus 002 Device 006: ID 413c:81b3 Dell Computer Corp. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x413c Dell Computer Corp. idProduct 0x81b3 bcdDevice 0.06 iManufacturer 1 Sierra Wireless, Incorporated iProduct 2 Dell Wireless 5809e Gobi™ 4G HSPA+ Mobile Broadband Card iSerial 3 bNumConfigurations 2 Signed-off-by: Patrik Halfar Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 1 + 1 file changed, 1 insertion(+) commit a528aca7f359f4b0b1d72ae406097e491a5ba9ea Author: Al Viro Date: Mon Feb 29 12:12:46 2016 -0500 use ->d_seq to get coherency between ->d_inode and ->d_flags Games with ordering and barriers are way too brittle. Just bump ->d_seq before and after updating ->d_inode and ->d_flags type bits, so that verifying ->d_seq would guarantee they are coherent. Cc: stable@vger.kernel.org # v3.13+ Signed-off-by: Al Viro fs/dcache.c | 20 +++++--------------- include/linux/dcache.h | 4 +--- 2 files changed, 6 insertions(+), 18 deletions(-) commit eab3c4db193f5fcccf70e884de9a922ca2c63d80 Author: Takashi Iwai Date: Mon Feb 29 14:26:43 2016 +0100 ALSA: hdsp: Fix wrong boolean ctl value accesses snd-hdsp driver accesses enum item values (int) instead of boolean values (long) wrongly for some ctl elements. This patch fixes them. Cc: Signed-off-by: Takashi Iwai sound/pci/rme9652/hdsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c1099c3294c2344110085a38c50e478a5992b368 Author: Takashi Iwai Date: Mon Feb 29 14:32:42 2016 +0100 ALSA: hdspm: Fix zero-division HDSPM driver contains a code issuing zero-division potentially in system sample rate ctl code. This patch fixes it by not processing a zero or invalid rate value as a divisor, as well as excluding the invalid value to be passed via the given ctl element. Cc: Signed-off-by: Takashi Iwai sound/pci/rme9652/hdspm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 537e48136295c5860a92138c5ea3959b9542868b Author: Takashi Iwai Date: Mon Feb 29 14:25:16 2016 +0100 ALSA: hdspm: Fix wrong boolean ctl value accesses snd-hdspm driver accesses enum item values (int) instead of boolean values (long) wrongly for some ctl elements. This patch fixes them. Cc: Signed-off-by: Takashi Iwai sound/pci/rme9652/hdspm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b6809ee573cc2f8de97f7c8f45eacc5db1129060 Author: Joerg Roedel Date: Fri Feb 26 16:48:59 2016 +0100 iommu/amd: Detach device from domain before removal Detach the device that is about to be removed from its domain (if it has one) to clear any related state like DTE entry and device's ATS state. Reported-by: Kelly Zytaruk Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 887349f69f37e71e2a8bfbd743831625a0b2ff51 Author: Michael S. Tsirkin Date: Sun Feb 28 17:35:59 2016 +0200 MIPS: kvm: Fix ioctl error handling. Calling return copy_to_user(...) or return copy_from_user in an ioctl will not do the right thing if there's a pagefault: copy_to_user/copy_from_user return the number of bytes not copied in this case. Fix up kvm on mips to do return copy_to_user(...)) ? -EFAULT : 0; and return copy_from_user(...)) ? -EFAULT : 0; everywhere. Signed-off-by: Michael S. Tsirkin Cc: Paolo Bonzini Cc: James Hogan Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12709/ Signed-off-by: Ralf Baechle arch/mips/kvm/mips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56fa81fc9a5445938f3aa2e63d15ab63dc938ad6 Author: Govindraj Raja Date: Mon Feb 29 11:41:20 2016 +0000 MIPS: scache: Fix scache init with invalid line size. In current scache init cache line_size is determined from cpu config register, however if there there no scache then mips_sc_probe_cm3 function populates a invalid line_size of 2. The invalid line_size can cause a NULL pointer deference during r4k_dma_cache_inv as r4k_blast_scache is populated based on line_size. Scache line_size of 2 is invalid option in r4k_blast_scache_setup. This issue was faced during a MIPS I6400 based virtual platform bring up where scache was not available in virtual platform model. Signed-off-by: Govindraj Raja Fixes: 7d53e9c4cd21("MIPS: CM3: Add support for CM3 L2 cache.") Cc: Paul Burton Cc: James Hogan Cc: Ralf Baechle Cc: James Hartley Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # v4.2+ Patchwork: https://patchwork.linux-mips.org/patch/12710/ Signed-off-by: Ralf Baechle arch/mips/mm/sc-mips.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 923adb1646d5ba739d2a1e63ee20d60574d9da8e Author: Frederic Barrat Date: Wed Feb 24 18:27:51 2016 +0100 cxl: Fix PSL timebase synchronization detection The PSL timebase synchronization is seemingly failing for configuration not including VIRT_CPU_ACCOUNTING_NATIVE. The driver shows the following trace in dmesg: PSL: Timebase sync: giving up! The PSL timebase register is actually syncing correctly, but the cxl driver is not detecting it. Fix is to use the proper timebase-to-time conversion. Signed-off-by: Frederic Barrat Cc: # 4.3+ Acked-by: Michael Neuling Reviewed-by: Matthew R. Ochs Acked-by: Ian Munsie Reviewed-by: Andrew Donnellan Reviewed-by: Vaibhav Jain Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51ff5d7767eae285969da75c209e9425d84b012d Author: Daniel Sanders Date: Tue Feb 23 10:29:20 2016 +0000 MIPS: Avoid variant of .type unsupported by LLVM Assembler The target independent parts of the LLVM Lexer considers 'fault@function' to be a single token representing the 'fault' symbol with a 'function' modifier. However, this is not the case in the .type directive where 'function' refers to STT_FUNC from the ELF standard. Although GAS accepts it, '.type symbol@function' is an undocumented form of this directive. The documentation specifies a comma between the symbol and '@function'. Signed-off-by: Scott Egerton Signed-off-by: Daniel Sanders Reviewed-by: Maciej W. Rozycki Cc: Paul Burton Cc: Leonid Yegoshin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12587/ Signed-off-by: Ralf Baechle arch/mips/kernel/r2300_fpu.S | 2 +- arch/mips/kernel/r4k_fpu.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 71e60073ca7b5f931b16f29add16c68b2e06949a Author: Ralf Baechle Date: Tue Feb 16 12:29:46 2016 +0100 MIPS: jz4740: Fix surviving instance of irq_to_gpio() This is fallout from commit 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h"). Signed-off-by: Ralf Baechle Suggested-by: Lars-Peter Clausen arch/mips/jz4740/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cad67fca3fc952d6f2ed9e799621f07666a560f Author: Michael S. Tsirkin Date: Sun Feb 28 17:32:07 2016 +0200 arm/arm64: KVM: Fix ioctl error handling Calling return copy_to_user(...) in an ioctl will not do the right thing if there's a pagefault: copy_to_user returns the number of bytes not copied in this case. Fix up kvm to do return copy_to_user(...)) ? -EFAULT : 0; everywhere. Cc: stable@vger.kernel.org Acked-by: Christoffer Dall Signed-off-by: Michael S. Tsirkin Signed-off-by: Marc Zyngier arch/arm/kvm/guest.c | 2 +- arch/arm64/kvm/guest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1ee9f4bd1a97026a7b2d7ae9f1f74b45680d0003 Author: Yadan Fan Date: Mon Feb 29 14:44:57 2016 +0800 Fix cifs_uniqueid_to_ino_t() function for s390x This issue is caused by commit 02323db17e3a7 ("cifs: fix cifs_uniqueid_to_ino_t not to ever return 0"), when BITS_PER_LONG is 64 on s390x, the corresponding cifs_uniqueid_to_ino_t() function will cast 64-bit fileid to 32-bit by using (ino_t)fileid, because ino_t (typdefed __kernel_ino_t) is int type. It's defined in arch/s390/include/uapi/asm/posix_types.h #ifndef __s390x__ typedef unsigned long __kernel_ino_t; ... #else /* __s390x__ */ typedef unsigned int __kernel_ino_t; So the #ifdef condition is wrong for s390x, we can just still use one cifs_uniqueid_to_ino_t() function with comparing sizeof(ino_t) and sizeof(u64) to choose the correct execution accordingly. Signed-off-by: Yadan Fan CC: stable Signed-off-by: Steve French fs/cifs/cifsfs.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 6cc3b24235929b54acd5ecc987ef11a425bd209e Author: Pavel Shilovsky Date: Sat Feb 27 11:58:18 2016 +0300 CIFS: Fix SMB2+ interim response processing for read requests For interim responses we only need to parse a header and update a number credits. Now it is done for all SMB2+ command except SMB2_READ which is wrong. Fix this by adding such processing. Signed-off-by: Pavel Shilovsky Tested-by: Shirish Pargaonkar CC: Stable Signed-off-by: Steve French fs/cifs/cifssmb.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit deb7deff2f00bdbbcb3d560dad2a89ef37df837d Author: Justin Maggard Date: Tue Feb 9 15:52:08 2016 -0800 cifs: fix out-of-bounds access in lease parsing When opening a file, SMB2_open() attempts to parse the lease state from the SMB2 CREATE Response. However, the parsing code was not careful to ensure that the create contexts are not empty or invalid, which can lead to out- of-bounds memory access. This can be seen easily by trying to read a file from a OSX 10.11 SMB3 server. Here is sample crash output: BUG: unable to handle kernel paging request at ffff8800a1a77cc6 IP: [] SMB2_open+0x804/0x960 PGD 8f77067 PUD 0 Oops: 0000 [#1] SMP Modules linked in: CPU: 3 PID: 2876 Comm: cp Not tainted 4.5.0-rc3.x86_64.1+ #14 Hardware name: NETGEAR ReadyNAS 314 /ReadyNAS 314 , BIOS 4.6.5 10/11/2012 task: ffff880073cdc080 ti: ffff88005b31c000 task.ti: ffff88005b31c000 RIP: 0010:[] [] SMB2_open+0x804/0x960 RSP: 0018:ffff88005b31fa08 EFLAGS: 00010282 RAX: 0000000000000015 RBX: 0000000000000000 RCX: 0000000000000006 RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffff88007eb8c8b0 RBP: ffff88005b31fad8 R08: 666666203d206363 R09: 6131613030383866 R10: 3030383866666666 R11: 00000000000002b0 R12: ffff8800660fd800 R13: ffff8800a1a77cc2 R14: 00000000424d53fe R15: ffff88005f5a28c0 FS: 00007f7c8a2897c0(0000) GS:ffff88007eb80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: ffff8800a1a77cc6 CR3: 000000005b281000 CR4: 00000000000006e0 Stack: ffff88005b31fa70 ffffffff88278789 00000000000001d3 ffff88005f5a2a80 ffffffff00000003 ffff88005d029d00 ffff88006fde05a0 0000000000000000 ffff88005b31fc78 ffff88006fde0780 ffff88005b31fb2f 0000000100000fe0 Call Trace: [] ? cifsConvertToUTF16+0x159/0x2d0 [] smb2_open_file+0x98/0x210 [] ? __kmalloc+0x1c/0xe0 [] cifs_open+0x2a4/0x720 [] do_dentry_open+0x1ff/0x310 [] ? cifsFileInfo_get+0x30/0x30 [] vfs_open+0x52/0x60 [] path_openat+0x170/0xf70 [] ? remove_wait_queue+0x48/0x50 [] do_filp_open+0x79/0xd0 [] ? __alloc_fd+0x3a/0x170 [] do_sys_open+0x114/0x1e0 [] SyS_open+0x19/0x20 [] entry_SYSCALL_64_fastpath+0x12/0x6a Code: 4d 8d 6c 07 04 31 c0 4c 89 ee e8 47 6f e5 ff 31 c9 41 89 ce 44 89 f1 48 c7 c7 28 b1 bd 88 31 c0 49 01 cd 4c 89 ee e8 2b 6f e5 ff <45> 0f b7 75 04 48 c7 c7 31 b1 bd 88 31 c0 4d 01 ee 4c 89 f6 e8 RIP [] SMB2_open+0x804/0x960 RSP CR2: ffff8800a1a77cc6 ---[ end trace d9f69ba64feee469 ]--- Signed-off-by: Justin Maggard Signed-off-by: Steve French CC: Stable fs/cifs/smb2pdu.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit b24e7ad1fdc22177eb3e51584e1cfcb45d818488 Author: Takashi Iwai Date: Sun Feb 28 11:41:47 2016 +0100 ALSA: timer: Fix ioctls for X32 ABI X32 ABI takes the 64bit timespec, thus the timer user status ioctl becomes incompatible with IA32. This results in NOTTY error when the ioctl is issued. Meanwhile, this struct in X32 is essentially identical with the one in X86-64, so we can just bypassing to the existing code for this specific compat ioctl. Cc: # v3.4+ Signed-off-by: Takashi Iwai sound/core/timer_compat.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3a72494ac2a3bd229db941d51e7efe2f6ccd947b Author: Takashi Iwai Date: Sun Feb 28 11:36:14 2016 +0100 ALSA: timer: Fix broken compat timer user status ioctl The timer user status compat ioctl returned the bogus struct used for 64bit architectures instead of the 32bit one. This patch addresses it to return the proper struct. Cc: Signed-off-by: Takashi Iwai sound/core/timer_compat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2251fbbc1539f05b0b206b37a602d5776be37252 Author: Takashi Iwai Date: Sun Feb 28 11:28:08 2016 +0100 ALSA: rawmidi: Fix ioctls X32 ABI Like the previous fixes for ctl and PCM, we need a fix for incompatible X32 ABI regarding the rawmidi: namely, struct snd_rawmidi_status has the timespec, and the size and the alignment on X32 differ from IA32. This patch fixes the incompatible ioctl for X32. Cc: # v3.4+ Signed-off-by: Takashi Iwai sound/core/rawmidi_compat.c | 53 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit dd7e3f805231cf83317c39bd346d5e4839f5cbb0 Author: Takashi Iwai Date: Sun Feb 28 11:30:53 2016 +0100 ALSA: rawmidi: Use comapt_put_timespec() Instead of open-coding, use the existing helper to copy a 32bit timespec from/to 64bit. Signed-off-by: Takashi Iwai sound/core/rawmidi_compat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 513ace79b657e2022a592e77f24074e088681ecc Author: Takashi Iwai Date: Sun Feb 28 11:23:09 2016 +0100 ALSA: pcm: Fix ioctls for X32 ABI X32 ABI uses the 64bit timespec in addition to 64bit alignment of 64bit values. This leads to incompatibilities in some PCM ioctls involved with snd_pcm_channel_info, snd_pcm_status and snd_pcm_sync_ptr structs. Fix the PCM compat ABI for these ioctls like the previous commit for ctl API. Reported-by: Steven Newbury Cc: # v3.4+ Signed-off-by: Takashi Iwai sound/core/pcm_compat.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 1 deletion(-) commit 6236d8bb2afcfe71b88ecea554e0dc638090a45f Author: Takashi Iwai Date: Sat Feb 27 17:52:42 2016 +0100 ALSA: ctl: Fix ioctls for X32 ABI The X32 ABI takes the same alignment like x86-64, and this may result in the incompatible struct size from ia32. Unfortunately, we hit this in some control ABI: struct snd_ctl_elem_value differs between them due to the position of 64bit variable array. This ends up with the unknown ioctl (ENOTTY) error. The fix is to add the compat entries for the new aligned struct. Reported-and-tested-by: Steven Newbury Cc: # v3.4+ Signed-off-by: Takashi Iwai sound/core/control_compat.c | 90 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 74 insertions(+), 16 deletions(-) commit fc77dbd34c5c99bce46d40a2491937c3bcbd10af Author: Linus Torvalds Date: Sun Feb 28 08:41:20 2016 -0800 Linux 4.5-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b9540ce033ad15802e36ad1cd1c36bdad98eeea Merge: 4b696dc 0da4cf3 Author: Linus Torvalds Date: Sun Feb 28 07:52:00 2016 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A rather largish series of 12 patches addressing a maze of race conditions in the perf core code from Peter Zijlstra" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Robustify task_function_call() perf: Fix scaling vs. perf_install_in_context() perf: Fix scaling vs. perf_event_enable() perf: Fix scaling vs. perf_event_enable_on_exec() perf: Fix ctx time tracking by introducing EVENT_TIME perf: Cure event->pending_disable race perf: Fix race between event install and jump_labels perf: Fix cloning perf: Only update context time when active perf: Allow perf_release() with !event->ctx perf: Do not double free perf: Close install vs. exit race commit 4b696dcb1a55e40648ad0eec4af991c72f945a85 Merge: 76c03f0 9bf148cb Author: Linus Torvalds Date: Sun Feb 28 07:49:23 2016 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "This update contains: - Hopefully the last ASM CLAC fixups - A fix for the Quark family related to the IMR lock which makes kexec work again - A off-by-one fix in the MPX code. Ironic, isn't it? - A fix for X86_PAE which addresses once more an unsigned long vs phys_addr_t hickup" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mpx: Fix off-by-one comparison with nr_registers x86/mm: Fix slow_virt_to_phys() for X86_PAE again x86/entry/compat: Add missing CLAC to entry_INT80_32 x86/entry/32: Add an ASM_CLAC to entry_SYSENTER_32 x86/platform/intel/quark: Change the kernel's IMR lock bit to false commit 76c03f0f5d496be6a6b81df5f6e16551c07b3c0a Merge: f055ae0 c219b7d Author: Linus Torvalds Date: Sun Feb 28 07:48:01 2016 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixlet from Thomas Gleixner: "A trivial printk typo fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/deadline: Fix trivial typo in printk() message commit f055ae04aeb0fd1d4373916c43b08481fcd9e5bc Merge: 8da5143 253baff Author: Linus Torvalds Date: Sun Feb 28 07:45:58 2016 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Four small fixes for irqchip drivers: - Add missing low level irq handler initialization on mxs, so interrupts can acutally be delivered - Add a missing barrier to the GIC driver - Two fixes for the GIC-V3-ITS driver, addressing a double EOI write and a cache flush beyond the actual region" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3: Add missing barrier to 32bit version of gic_read_iar() irqchip/mxs: Add missing set_handle_irq() irqchip/gicv3-its: Avoid cache flush beyond ITS_BASERn memory size irqchip/gic-v3-its: Fix double ICC_EOIR write for LPI in EOImode==1 commit 8da51430ff28d2f2daa570f060b1c9fbba81c81a Merge: 62718e3 7a64cd8 Author: Linus Torvalds Date: Sun Feb 28 07:39:15 2016 -0800 Merge tag 'staging-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/android fix from Greg KH: "Here is one patch, for the android binder driver, to resolve a reported problem. Turns out it has been around for a while (since 3.15), so it is good to finally get it resolved. It has been in linux-next for a while with no reported issues" * tag 'staging-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: drivers: android: correct the size of struct binder_uintptr_t for BC_DEAD_BINDER_DONE commit 62718e304aa603b1fcea9f965c604fc652ac87ba Merge: 12b9fa6 428b315 Author: Linus Torvalds Date: Sun Feb 28 07:37:30 2016 -0800 Merge tag 'usb-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a few USB fixes for 4.5-rc6 They fix a reported bug for some USB 3 devices by reverting the recent patch, a MAINTAINERS change for some drivers, some new device ids, and of course, the usual bunch of USB gadget driver fixes. All have been in linux-next for a while with no reported issues" * tag 'usb-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: MAINTAINERS: drop OMAP USB and MUSB maintainership usb: musb: fix DMA for host mode usb: phy: msm: Trigger USB state detection work in DRD mode usb: gadget: net2280: fix endpoint max packet for super speed connections usb: gadget: gadgetfs: unregister gadget only if it got successfully registered usb: gadget: remove driver from pending list on probe error Revert "usb: hub: do not clear BOS field during reset device" usb: chipidea: fix return value check in ci_hdrc_pci_probe() usb: chipidea: error on overflow for port_test_write USB: option: add "4G LTE usb-modem U901" USB: cp210x: add IDs for GE B650V3 and B850V3 boards USB: option: add support for SIM7100E usb: musb: Fix DMA desired mode for Mentor DMA engine usb: gadget: fsl_qe_udc: fix IS_ERR_VALUE usage usb: dwc2: USB_DWC2 should depend on HAS_DMA usb: dwc2: host: fix the data toggle error in full speed descriptor dma usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc usb: dwc3: Fix assignment of EP transfer resources usb: dwc2: Add extra delay when forcing dr_mode commit 8160c4e455820d5008a1116d2dca35f0363bb062 Author: Michael S. Tsirkin Date: Sun Feb 28 16:31:39 2016 +0200 vfio: fix ioctl error handling Calling return copy_to_user(...) in an ioctl will not do the right thing if there's a pagefault: copy_to_user returns the number of bytes not copied in this case. Fix up vfio to do return copy_to_user(...)) ? -EFAULT : 0; everywhere. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci.c | 9 ++++++--- drivers/vfio/platform/vfio_platform_common.c | 9 ++++++--- drivers/vfio/vfio_iommu_type1.c | 6 ++++-- 3 files changed, 16 insertions(+), 8 deletions(-) commit 12b9fa6a97b3150477ab182e321be512b59fa899 Merge: 340b3a5 5129fa4 Author: Linus Torvalds Date: Sat Feb 27 17:10:32 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: do_last(): ELOOP failure exit should be done after leaving RCU mode should_follow_link(): validate ->d_seq after having decided to follow namei: ->d_inode of a pinned dentry is stable only for positives do_last(): don't let a bogus return value from ->open() et.al. to confuse us fs: return -EOPNOTSUPP if clone is not supported hpfs: don't truncate the file when delete fails commit 340b3a5b35c0919e1535b355a9eafe1f81c4cae3 Merge: 691429e d877a21 Author: Linus Torvalds Date: Sat Feb 27 16:58:32 2016 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "We didn't have a batch last week, so this one is slightly larger. None of them are scary though, a handful of fixes for small DT pieces, replacing properties with newer conventions. Highlights: - N900 fix for setting system revision - onenand init fix to avoid filesystem corruption - Clock fix for audio on Beaglebone-x15 - Fixes on shmobile to deal with CONFIG_DEBUG_RODATA (default y in 4.6) + misc smaller stuff" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: MAINTAINERS: Extend info, add wiki and ml for meson arch MAINTAINERS: alpine: add a new maintainer and update the entry ARM: at91/dt: fix typo in sama5d2 pinmux descriptions ARM: OMAP2+: Fix onenand initialization to avoid filesystem corruption Revert "regulator: tps65217: remove tps65217.dtsi file" ARM: shmobile: Remove shmobile_boot_arg ARM: shmobile: Move shmobile_smp_{mpidr, fn, arg}[] from .text to .bss ARM: shmobile: r8a7779: Remove remainings of removed SCU boot setup code ARM: shmobile: Move shmobile_scu_base from .text to .bss ARM: OMAP2+: Fix omap_device for module reload on PM runtime forbid ARM: OMAP2+: Improve omap_device error for driver writers ARM: DTS: am57xx-beagle-x15: Select SYS_CLK2 for audio clocks ARM: dts: am335x/am57xx: replace gpio-key,wakeup with wakeup-source property ARM: OMAP2+: Set system_rev from ATAGS for n900 ARM: dts: orion5x: fix the missing mtd flash on linkstation lswtgl ARM: dts: kirkwood: use unique machine name for ds112 ARM: dts: imx6: remove bogus interrupt-parent from CAAM node commit 5129fa482b16615fd4464d2f5d23acb1b7056c66 Author: Al Viro Date: Sat Feb 27 19:37:37 2016 -0500 do_last(): ELOOP failure exit should be done after leaving RCU mode ... or we risk seeing a bogus value of d_is_symlink() there. Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Al Viro fs/namei.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a7f775428b8f5808815c0e3004020cedb94cbe3b Author: Al Viro Date: Sat Feb 27 19:31:01 2016 -0500 should_follow_link(): validate ->d_seq after having decided to follow ... otherwise d_is_symlink() above might have nothing to do with the inode value we've got. Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Al Viro fs/namei.c | 5 +++++ 1 file changed, 5 insertions(+) commit d4565649b6d6923369112758212b851adc407f0c Author: Al Viro Date: Sat Feb 27 19:23:16 2016 -0500 namei: ->d_inode of a pinned dentry is stable only for positives both do_last() and walk_component() risk picking a NULL inode out of dentry about to become positive, *then* checking its flags and seeing that it's not negative anymore and using (already stale by then) value they'd fetched earlier. Usually ends up oopsing soon after that... Cc: stable@vger.kernel.org # v3.13+ Signed-off-by: Al Viro fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c80567c82ae4814a41287618e315a60ecf513be6 Author: Al Viro Date: Sat Feb 27 19:17:33 2016 -0500 do_last(): don't let a bogus return value from ->open() et.al. to confuse us ... into returning a positive to path_openat(), which would interpret that as "symlink had been encountered" and proceed to corrupt memory, etc. It can only happen due to a bug in some ->open() instance or in some LSM hook, etc., so we report any such event *and* make sure it doesn't trick us into further unpleasantness. Cc: stable@vger.kernel.org # v3.6+, at least Signed-off-by: Al Viro fs/namei.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0fcbf996d848d03573113d83f4e3fb3bcfa5ab5e Author: Christoph Hellwig Date: Fri Feb 26 18:53:12 2016 +0100 fs: return -EOPNOTSUPP if clone is not supported -EBADF is a rather confusing error if an operations is not supported, and nfsd gets rather upset about it. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/read_write.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b6853f78e763d42c7a158d8de3549c9827c604ab Author: Mikulas Patocka Date: Thu Feb 25 18:17:38 2016 +0100 hpfs: don't truncate the file when delete fails The delete opration can allocate additional space on the HPFS filesystem due to btree split. The HPFS driver checks in advance if there is available space, so that it won't corrupt the btree if we run out of space during splitting. If there is not enough available space, the HPFS driver attempted to truncate the file, but this results in a deadlock since the commit 7dd29d8d865efdb00c0542a5d2c87af8c52ea6c7 ("HPFS: Introduce a global mutex and lock it on every callback from VFS"). This patch removes the code that tries to truncate the file and -ENOSPC is returned instead. If the user hits -ENOSPC on delete, he should try to delete other files (that are stored in a leaf btree node), so that the delete operation will make some space for deleting the file stored in non-leaf btree node. Reported-by: Al Viro Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # 2.6.39+ Signed-off-by: Al Viro fs/hpfs/namei.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) commit 691429e13dfaf5b0994b07cc166db41bd608ee3d Merge: 1c27147 7f6d5b5 Author: Linus Torvalds Date: Sat Feb 27 12:46:16 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton : dax: move writeback calls into the filesystems dax: give DAX clearing code correct bdev ext4: online defrag not supported with DAX ext2, ext4: only set S_DAX for regular inodes block: disable block device DAX by default ocfs2: unlock inode if deleting inode from orphan fails mm: ASLR: use get_random_long() drivers: char: random: add get_random_long() mm: numa: quickly fail allocations for NUMA balancing on full nodes mm: thp: fix SMP race condition between THP page fault and MADV_DONTNEED commit 1c271479b56da4a8caf5f56a88432d4260e120fe Merge: a9f8094a 1e9d180 Author: Linus Torvalds Date: Sat Feb 27 12:40:49 2016 -0800 Merge tag 'tags/ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext2/4 DAX fix from Ted Ts'o: "This fixes a file system corruption bug with DAX" * tag 'tags/ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext2, ext4: fix issue with missing journal entry in ext4_dax_mkwrite() commit a9f8094aaedc7bc21e9232ea5120eaf2e0c824fd Merge: b9ea44b 61d9e85 Author: Linus Torvalds Date: Sat Feb 27 12:33:42 2016 -0800 Merge tag 'pci-v4.5-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "Enumeration: Revert x86 pcibios_alloc_irq() to fix regression (Bjorn Helgaas) Marvell MVEBU host bridge driver: Restrict build to 32-bit ARM (Thierry Reding)" * tag 'pci-v4.5-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: mvebu: Restrict build to 32-bit ARM Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()" Revert "PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed" Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled" commit 1e9d180ba39f42e8ca4a808baef3a3ef034b1c2c Author: Ross Zwisler Date: Sat Feb 27 14:01:13 2016 -0500 ext2, ext4: fix issue with missing journal entry in ext4_dax_mkwrite() As it is currently written ext4_dax_mkwrite() assumes that the call into __dax_mkwrite() will not have to do a block allocation so it doesn't create a journal entry. For a read that creates a zero page to cover a hole followed by a write that actually allocates storage this is incorrect. The ext4_dax_mkwrite() -> __dax_mkwrite() -> __dax_fault() path calls get_blocks() to allocate storage. Fix this by having the ->page_mkwrite fault handler call ext4_dax_fault() as this function already has all the logic needed to allocate a journal entry and call __dax_fault(). Also update the ext2 fault handlers in this same way to remove duplicate code and keep the logic between ext2 and ext4 the same. Reviewed-by: Jan Kara Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o fs/ext2/file.c | 19 +------------------ fs/ext4/file.c | 19 ++----------------- 2 files changed, 3 insertions(+), 35 deletions(-) commit b9ea44bf2c70b08b9ab3f3d71c2d16d6a134d35e Merge: 29a9faa a0d54c3 Author: Linus Torvalds Date: Sat Feb 27 10:30:14 2016 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One small fix to keep OMAP platforms working across a suspend/resume cycle" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: ti: omap3+: dpll: use non-locking version of clk_get_rate commit 7f6d5b529b7dfe2fca30cbf4bc81e16575090025 Author: Ross Zwisler Date: Fri Feb 26 15:19:55 2016 -0800 dax: move writeback calls into the filesystems Previously calls to dax_writeback_mapping_range() for all DAX filesystems (ext2, ext4 & xfs) were centralized in filemap_write_and_wait_range(). dax_writeback_mapping_range() needs a struct block_device, and it used to get that from inode->i_sb->s_bdev. This is correct for normal inodes mounted on ext2, ext4 and XFS filesystems, but is incorrect for DAX raw block devices and for XFS real-time files. Instead, call dax_writeback_mapping_range() directly from the filesystem ->writepages function so that it can supply us with a valid block device. This also fixes DAX code to properly flush caches in response to sync(2). Signed-off-by: Ross Zwisler Signed-off-by: Jan Kara Cc: Al Viro Cc: Dan Williams Cc: Dave Chinner Cc: Jens Axboe Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 13 ++++++++++++- fs/dax.c | 12 +++++++----- fs/ext2/inode.c | 8 ++++++++ fs/ext4/inode.c | 4 ++++ fs/xfs/xfs_aops.c | 4 ++++ include/linux/dax.h | 6 ++++-- mm/filemap.c | 12 ++++-------- 7 files changed, 43 insertions(+), 16 deletions(-) commit 20a90f58997245749c2bdfaea9e51f785ec90d0b Author: Ross Zwisler Date: Fri Feb 26 15:19:52 2016 -0800 dax: give DAX clearing code correct bdev dax_clear_blocks() needs a valid struct block_device and previously it was using inode->i_sb->s_bdev in all cases. This is correct for normal inodes on mounted ext2, ext4 and XFS filesystems, but is incorrect for DAX raw block devices and for XFS real-time devices. Instead, rename dax_clear_blocks() to dax_clear_sectors(), and change its arguments to take a bdev and a sector instead of an inode and a block. This better reflects what the function does, and it allows the filesystem and raw block device code to pass in an appropriate struct block_device. Signed-off-by: Ross Zwisler Suggested-by: Dan Williams Reviewed-by: Jan Kara Cc: Theodore Ts'o Cc: Al Viro Cc: Dave Chinner Cc: Jens Axboe Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Theodore Ts'o Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 9 ++++----- fs/ext2/inode.c | 6 ++++-- fs/xfs/xfs_aops.c | 2 +- fs/xfs/xfs_aops.h | 1 + fs/xfs/xfs_bmap_util.c | 3 ++- include/linux/dax.h | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) commit 73f34a5e2ceddfca27c999c170620e6354aaf6d7 Author: Ross Zwisler Date: Fri Feb 26 15:19:49 2016 -0800 ext4: online defrag not supported with DAX Online defrag operations for ext4 are hard coded to use the page cache. See ext4_ioctl() -> ext4_move_extents() -> move_extent_per_page() When combined with DAX I/O, which circumvents the page cache, this can result in data corruption. This was observed with xfstests ext4/307 and ext4/308. Fix this by only allowing online defrag for non-DAX files. Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Theodore Ts'o Cc: Al Viro Cc: Dan Williams Cc: Dave Chinner Cc: Jens Axboe Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext4/ioctl.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0a6cf9137ded4856b41910a4336677ee0ffa6736 Author: Ross Zwisler Date: Fri Feb 26 15:19:46 2016 -0800 ext2, ext4: only set S_DAX for regular inodes When S_DAX is set on an inode we assume that if there are pages attached to the mapping (mapping->nrpages != 0), those pages are clean zero pages that were used to service reads from holes. Any dirty data associated with the inode should be in the form of DAX exceptional entries (mapping->nrexceptional) that is written back via dax_writeback_mapping_range(). With the current code, though, this isn't always true. For example, ext2 and ext4 directory inodes can have S_DAX set, but have their dirty data stored as dirty page cache entries. For these types of inodes, having S_DAX set doesn't really make sense since their I/O doesn't actually happen through the DAX code path. Instead, only allow S_DAX to be set for regular inodes for ext2 and ext4. This allows us to have strict DAX vs non-DAX paths in the writeback code. Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Theodore Ts'o Cc: Al Viro Cc: Dan Williams Cc: Dave Chinner Cc: Jens Axboe Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext2/inode.c | 2 +- fs/ext4/inode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 03cdadb04077b9311bbc67d98cc5401aff76482d Author: Dan Williams Date: Fri Feb 26 15:19:43 2016 -0800 block: disable block device DAX by default The recent *sync enabling discovered that we are inserting into the block_device pagecache counter to the expectations of the dirty data tracking for dax mappings. This can lead to data corruption. We want to support DAX for block devices eventually, but it requires wider changes to properly manage the pagecache. dump_stack+0x85/0xc2 dax_writeback_mapping_range+0x60/0xe0 blkdev_writepages+0x3f/0x50 do_writepages+0x21/0x30 __filemap_fdatawrite_range+0xc6/0x100 filemap_write_and_wait+0x4a/0xa0 set_blocksize+0x70/0xd0 sb_set_blocksize+0x1d/0x50 ext4_fill_super+0x75b/0x3360 mount_bdev+0x180/0x1b0 ext4_mount+0x15/0x20 mount_fs+0x38/0x170 Mark the support broken so its disabled by default, but otherwise still available for testing. Signed-off-by: Dan Williams Signed-off-by: Ross Zwisler Reported-by: Ross Zwisler Suggested-by: Dave Chinner Reviewed-by: Jan Kara Cc: Jens Axboe Cc: Matthew Wilcox Cc: Al Viro Cc: Theodore Ts'o Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/Kconfig | 13 +++++++++++++ fs/block_dev.c | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit a4a8481ff68a8a324a878e281bc37f18665224f7 Author: Guozhonghua Date: Fri Feb 26 15:19:40 2016 -0800 ocfs2: unlock inode if deleting inode from orphan fails When doing append direct io cleanup, if deleting inode fails, it goes out without unlocking inode, which will cause the inode deadlock. This issue was introduced by commit cf1776a9e834 ("ocfs2: fix a tiny race when truncate dio orohaned entry"). Signed-off-by: Guozhonghua Signed-off-by: Joseph Qi Reviewed-by: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: [4.2+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 1 + 1 file changed, 1 insertion(+) commit 5ef11c35ce86b94bfb878b684de4cdaf96f54b2f Author: Daniel Cashman Date: Fri Feb 26 15:19:37 2016 -0800 mm: ASLR: use get_random_long() Replace calls to get_random_int() followed by a cast to (unsigned long) with calls to get_random_long(). Also address shifting bug which, in case of x86 removed entropy mask for mmap_rnd_bits values > 31 bits. Signed-off-by: Daniel Cashman Acked-by: Kees Cook Cc: "Theodore Ts'o" Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Catalin Marinas Cc: Will Deacon Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: David S. Miller Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Al Viro Cc: Nick Kralevich Cc: Jeff Vander Stoep Cc: Mark Salyzyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/mmap.c | 2 +- arch/arm64/mm/mmap.c | 4 ++-- arch/mips/mm/mmap.c | 4 ++-- arch/powerpc/kernel/process.c | 4 ++-- arch/powerpc/mm/mmap.c | 4 ++-- arch/sparc/kernel/sys_sparc_64.c | 2 +- arch/x86/mm/mmap.c | 6 +++--- fs/binfmt_elf.c | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) commit ec9ee4acd97c0039a61c0ae4f12705767ae62153 Author: Daniel Cashman Date: Fri Feb 26 15:19:34 2016 -0800 drivers: char: random: add get_random_long() Commit d07e22597d1d ("mm: mmap: add new /proc tunable for mmap_base ASLR") added the ability to choose from a range of values to use for entropy count in generating the random offset to the mmap_base address. The maximum value on this range was set to 32 bits for 64-bit x86 systems, but this value could be increased further, requiring more than the 32 bits of randomness provided by get_random_int(), as is already possible for arm64. Add a new function: get_random_long() which more naturally fits with the mmap usage of get_random_int() but operates exactly the same as get_random_int(). Also, fix the shifting constant in mmap_rnd() to be an unsigned long so that values greater than 31 bits generate an appropriate mask without overflow. This is especially important on x86, as its shift instruction uses a 5-bit mask for the shift operand, which meant that any value for mmap_rnd_bits over 31 acts as a no-op and effectively disables mmap_base randomization. Finally, replace calls to get_random_int() with get_random_long() where appropriate. This patch (of 2): Add get_random_long(). Signed-off-by: Daniel Cashman Acked-by: Kees Cook Cc: "Theodore Ts'o" Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Catalin Marinas Cc: Will Deacon Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: David S. Miller Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Al Viro Cc: Nick Kralevich Cc: Jeff Vander Stoep Cc: Mark Salyzyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/char/random.c | 22 ++++++++++++++++++++++ include/linux/random.h | 1 + 2 files changed, 23 insertions(+) commit 8479eba7781fa9ffb28268840de6facfc12c35a7 Author: Mel Gorman Date: Fri Feb 26 15:19:31 2016 -0800 mm: numa: quickly fail allocations for NUMA balancing on full nodes Commit 4167e9b2cf10 ("mm: remove GFP_THISNODE") removed the GFP_THISNODE flag combination due to confusing semantics. It noted that alloc_misplaced_dst_page() was one such user after changes made by commit e97ca8e5b864 ("mm: fix GFP_THISNODE callers and clarify"). Unfortunately when GFP_THISNODE was removed, users of alloc_misplaced_dst_page() started waking kswapd and entering direct reclaim because the wrong GFP flags are cleared. The consequence is that workloads that used to fit into memory now get reclaimed which is addressed by this patch. The problem can be demonstrated with "mutilate" that exercises memcached which is software dedicated to memory object caching. The configuration uses 80% of memory and is run 3 times for varying numbers of clients. The results on a 4-socket NUMA box are mutilate 4.4.0 4.4.0 vanilla numaswap-v1 Hmean 1 8394.71 ( 0.00%) 8395.32 ( 0.01%) Hmean 4 30024.62 ( 0.00%) 34513.54 ( 14.95%) Hmean 7 32821.08 ( 0.00%) 70542.96 (114.93%) Hmean 12 55229.67 ( 0.00%) 93866.34 ( 69.96%) Hmean 21 39438.96 ( 0.00%) 85749.21 (117.42%) Hmean 30 37796.10 ( 0.00%) 50231.49 ( 32.90%) Hmean 47 18070.91 ( 0.00%) 38530.13 (113.22%) The metric is queries/second with the more the better. The results are way outside of the noise and the reason for the improvement is obvious from some of the vmstats 4.4.0 4.4.0 vanillanumaswap-v1r1 Minor Faults 1929399272 2146148218 Major Faults 19746529 3567 Swap Ins 57307366 9913 Swap Outs 50623229 17094 Allocation stalls 35909 443 DMA allocs 0 0 DMA32 allocs 72976349 170567396 Normal allocs 5306640898 5310651252 Movable allocs 0 0 Direct pages scanned 404130893 799577 Kswapd pages scanned 160230174 0 Kswapd pages reclaimed 55928786 0 Direct pages reclaimed 1843936 41921 Page writes file 2391 0 Page writes anon 50623229 17094 The vanilla kernel is swapping like crazy with large amounts of direct reclaim and kswapd activity. The figures are aggregate but it's known that the bad activity is throughout the entire test. Note that simple streaming anon/file memory consumers also see this problem but it's not as obvious. In those cases, kswapd is awake when it should not be. As there are at least two reclaim-related bugs out there, it's worth spelling out the user-visible impact. This patch only addresses bugs related to excessive reclaim on NUMA hardware when the working set is larger than a NUMA node. There is a bug related to high kswapd CPU usage but the reports are against laptops and other UMA hardware and is not addressed by this patch. Signed-off-by: Mel Gorman Cc: Vlastimil Babka Cc: Johannes Weiner Cc: David Rientjes Cc: [4.1+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad33bb04b2a6cee6c1f99fabb15cddbf93ff0433 Author: Andrea Arcangeli Date: Fri Feb 26 15:19:28 2016 -0800 mm: thp: fix SMP race condition between THP page fault and MADV_DONTNEED pmd_trans_unstable()/pmd_none_or_trans_huge_or_clear_bad() were introduced to locklessy (but atomically) detect when a pmd is a regular (stable) pmd or when the pmd is unstable and can infinitely transition from pmd_none() and pmd_trans_huge() from under us, while only holding the mmap_sem for reading (for writing not). While holding the mmap_sem only for reading, MADV_DONTNEED can run from under us and so before we can assume the pmd to be a regular stable pmd we need to compare it against pmd_none() and pmd_trans_huge() in an atomic way, with pmd_trans_unstable(). The old pmd_trans_huge() left a tiny window for a race. Useful applications are unlikely to notice the difference as doing MADV_DONTNEED concurrently with a page fault would lead to undefined behavior. [akpm@linux-foundation.org: tidy up comment grammar/layout] Signed-off-by: Andrea Arcangeli Reported-by: Kirill A. Shutemov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 61d9e854dfb91b46b99ffd3d31fc7d45d2b95f31 Author: Thierry Reding Date: Thu Feb 18 14:32:10 2016 +0100 PCI: mvebu: Restrict build to 32-bit ARM This driver uses PCI glue that is only available on 32-bit ARM. This used to work fine as long as ARCH_MVEBU and ARCH_DOVE were exclusively 32-bit, but there's a patch in the pipe to make ARCH_MVEBU also available on 64-bit ARM. [bhelgaas: changelog; patch is coming but not merged yet] Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas Acked-by: Thomas Petazzoni drivers/pci/host/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6c777e8799a93e3bdb67bec622429e1b48dc90fb Author: Bjorn Helgaas Date: Wed Feb 17 12:26:42 2016 -0600 Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()" 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") appeared in v4.3 and helps support IOAPIC hotplug. Олег reported that the Elcus-1553 TA1-PCI driver worked in v4.2 but not v4.3 and bisected it to 991de2e59090. Sunjin reported that the RocketRAID 272x driver worked in v4.2 but not v4.3. In both cases booting with "pci=routirq" is a workaround. I think the problem is that after 991de2e59090, we no longer call pcibios_enable_irq() for upstream bridges. Prior to 991de2e59090, when a driver called pci_enable_device(), we recursively called pcibios_enable_irq() for upstream bridges via pci_enable_bridge(). After 991de2e59090, we call pcibios_enable_irq() from pci_device_probe() instead of the pci_enable_device() path, which does *not* call pcibios_enable_irq() for upstream bridges. Revert 991de2e59090 to fix these driver regressions. Link: https://bugzilla.kernel.org/show_bug.cgi?id=111211 Fixes: 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") Reported-and-tested-by: Олег Мороз Reported-by: Sunjin Yang Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki CC: Jiang Liu arch/x86/include/asm/pci_x86.h | 2 ++ arch/x86/pci/common.c | 20 +++++++++++--------- arch/x86/pci/intel_mid_pci.c | 7 ++----- arch/x86/pci/irq.c | 15 ++++++++++++++- drivers/acpi/pci_irq.c | 9 ++++++++- 5 files changed, 37 insertions(+), 16 deletions(-) commit 21b81716c6bff24cda52dc75588455f879ddbfe9 Author: Gabriel Krisman Bertazi Date: Thu Feb 25 13:54:20 2016 -0300 ipr: Fix regression when loading firmware Commit d63c7dd5bcb9 ("ipr: Fix out-of-bounds null overwrite") removed the end of line handling when storing the update_fw sysfs attribute. This changed the userpace API because it started refusing writes terminated by a line feed, which broke the update tools we already have. This patch re-adds that handling, so both a write terminated by a line feed or not can make it through with the update. Fixes: d63c7dd5bcb9 ("ipr: Fix out-of-bounds null overwrite") Signed-off-by: Gabriel Krisman Bertazi Cc: Insu Yun Acked-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 5 +++++ 1 file changed, 5 insertions(+) commit e1cd3911170eda37fd9501e81ee1c2eb63803fd0 Author: jiangyiwen Date: Tue Feb 16 20:14:13 2016 +0800 SCSI: Free resources when we return BLKPREP_INVALID When called scsi_prep_fn return BLKPREP_INVALID, we should use the same code with BLKPREP_KILL in scsi_prep_return. Signed-off-by: Yiwen Jiang Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 1 + 1 file changed, 1 insertion(+) commit 9bf148cb0812595bfdf5100bd2c07e9bec9c6ef5 Author: Colin Ian King Date: Fri Feb 26 18:55:31 2016 +0000 x86/mpx: Fix off-by-one comparison with nr_registers In the unlikely event that regno == nr_registers then we get an array overrun on regoff because the invalid register check is currently off-by-one. Fix this with a check that regno is >= nr_registers instead. Detected with static analysis using CoverityScan. Fixes: fcc7ffd67991 "x86, mpx: Decode MPX instruction to get bound violation information" Signed-off-by: Colin Ian King Acked-by: Dave Hansen Cc: Borislav Petkov Cc: "Kirill A . Shutemov" Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1456512931-3388-1-git-send-email-colin.king@canonical.com Signed-off-by: Thomas Gleixner arch/x86/mm/mpx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 472681d57a5dde7c6d16b05469be57f1c4ed9d99 Author: MINOURA Makoto / 箕浦 真 Date: Thu Feb 25 14:20:48 2016 +0900 net: ndo_fdb_dump should report -EMSGSIZE to rtnl_fdb_dump. When the send skbuff reaches the end, nlmsg_put and friends returns -EMSGSIZE but it is silently thrown away in ndo_fdb_dump. It is called within a for_each_netdev loop and the first fdb entry of a following netdev could fit in the remaining skbuff. This breaks the mechanism of cb->args[0] and idx to keep track of the entries that are already dumped, which results missing entries in bridge fdb show command. Signed-off-by: Minoura Makoto Signed-off-by: David S. Miller drivers/net/vxlan.c | 4 +++- net/bridge/br_fdb.c | 15 ++++++++++----- net/core/rtnetlink.c | 6 ++++++ net/switchdev/switchdev.c | 5 ++++- 4 files changed, 23 insertions(+), 7 deletions(-) commit dfd55ad85e4a7fbaa82df12467515ac3c81e8a3e Author: Ard Biesheuvel Date: Fri Feb 26 17:57:13 2016 +0100 arm64: vmemmap: use virtual projection of linear region Commit dd006da21646 ("arm64: mm: increase VA range of identity map") made some changes to the memory mapping code to allow physical memory to reside at an offset that exceeds the size of the virtual mapping. However, since the size of the vmemmap area is proportional to the size of the VA area, but it is populated relative to the physical space, we may end up with the struct page array being mapped outside of the vmemmap region. For instance, on my Seattle A0 box, I can see the following output in the dmesg log. vmemmap : 0xffffffbdc0000000 - 0xffffffbfc0000000 ( 8 GB maximum) 0xffffffbfc0000000 - 0xffffffbfd0000000 ( 256 MB actual) We can fix this by deciding that the vmemmap region is not a projection of the physical space, but of the virtual space above PAGE_OFFSET, i.e., the linear region. This way, we are guaranteed that the vmemmap region is of sufficient size, and we can even reduce the size by half. Cc: Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 7 ++++--- arch/arm64/mm/init.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit 29a9faa641857425af76e44f2fab22db53032401 Merge: c213341 cd8140c Author: Linus Torvalds Date: Fri Feb 26 09:35:03 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull Ceph fixes from Sage Weil: "There are two small messenger bug fixes and a log spam regression fix" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: libceph: don't spam dmesg with stray reply warnings libceph: use the right footer size when skipping a message libceph: don't bail early from try_read() when skipping a message commit c213341e4962c798274e024e89dd4b14d4826872 Merge: bb134ff 473f414 Author: Linus Torvalds Date: Fri Feb 26 09:27:21 2016 -0800 Merge tag 'sound-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Things got calmed down for rc6, as it seems, and we have only a few HD-audio fixes at this time: a fix for Skylake codec probe errors, a fix for missing interrupt handling, and a few Dell and HP quirks" * tag 'sound-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Loop interrupt handling until really cleared ALSA: hda - Fix headset support and noise on HP EliteBook 755 G2 ALSA: hda - Fixup speaker pass-through control for nid 0x14 on ALC225 ALSA: hda - Fixing background noise on Dell Inspiron 3162 ALSA: hda - Apply clock gate workaround to Skylake, too commit bb134ff50709fda187027c2263036ccb41024ca5 Merge: 34d47a7 1711fd9c Author: Linus Torvalds Date: Fri Feb 26 09:21:48 2016 -0800 Merge tag 'pm+acpi-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: "These are two reverts of recent PCI-related ACPI core changes (one of which caused some systems to crash on boot and the other was a cleanup on top of it) and a devfreq fix for Tegra. Specifics: - Revert an ACPI core change related to IRQ management in PCI that introduced code relying on the use of kmalloc() which turned out to also run during early init when that's not available yet and caused some systems to crash on boot for this reason along with a cleanup on top of it (Rafael Wysocki). - Prevent devfreq from flooding the kernel log with useless messages on Tegra (which started to happen after some recent changes in the devfreq core) by fixing the driver to follow the documentation and the core's expectations in its ->target callback (Tomeu Vizoso)" * tag 'pm+acpi-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPI, PCI, irq: remove interrupt count restriction" Revert "ACPI / PCI: Simplify acpi_penalize_isa_irq()" PM / devfreq: tegra: Set freq in rate callback commit 1711fd9cf92f366d42da29b108746accd807789a Merge: 351228e e249714 Author: Rafael J. Wysocki Date: Fri Feb 26 13:50:55 2016 +0100 Merge branches 'pm-devfreq' and 'acpi-pci' * pm-devfreq: PM / devfreq: tegra: Set freq in rate callback * acpi-pci: Revert "ACPI, PCI, irq: remove interrupt count restriction" Revert "ACPI / PCI: Simplify acpi_penalize_isa_irq()" commit 70e4da7a8ff62f2775337b705f45c804bb450454 Author: Paolo Bonzini Date: Fri Feb 26 12:28:40 2016 +0100 KVM: x86: fix root cause for missed hardware breakpoints Commit 172b2386ed16 ("KVM: x86: fix missed hardware breakpoints", 2016-02-10) worked around a case where the debug registers are not loaded correctly on preemption and on the first entry to KVM_RUN. However, Xiao Guangrong pointed out that the root cause must be that KVM_DEBUGREG_BP_ENABLED is not being set correctly. This can indeed happen due to the lazy debug exit mechanism, which does not call kvm_update_dr7. Fix it by replacing the existing loop (more or less equivalent to kvm_update_dr0123) with calls to all the kvm_update_dr* functions. Cc: stable@vger.kernel.org # 4.1+ Fixes: 172b2386ed16a9143d9a456aae5ec87275c61489 Reviewed-by: Xiao Guangrong Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a1e533ec07d583d01349ef13c0c965b8633e1b91 Author: Jean-Philippe Brucker Date: Mon Feb 15 18:41:33 2016 +0000 fbcon: set a default value to blink interval Since commit 27a4c827c34ac4256a190cc9d24607f953c1c459 fbcon: use the cursor blink interval provided by vt two attempts have been made at fixing a possible hang caused by cursor_timer_handler. That function registers a timer to be triggered at "jiffies + fbcon_ops.cur_blink_jiffies". A new case had been encountered during initialisation of clcd-pl11x: fbcon_fb_registered do_fbcon_takeover -> do_register_con_driver fbcon_startup (A) add_cursor_timer (with cur_blink_jiffies = 0) -> do_bind_con_driver visual_init fbcon_init (B) cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); If we take an softirq anywhere between A and B (and we do), cursor_timer_handler executes indefinitely. Instead of patching all possible paths that lead to this case one at a time, fix the issue at the source and initialise cur_blink_jiffies to 200ms when allocating fbcon_ops. This was its default value before aforesaid commit. fbcon_cursor or fbcon_init will refine this value downstream. Signed-off-by: Jean-Philippe Brucker Cc: # v4.2 Tested-by: Scot Doyle Signed-off-by: Tomi Valkeinen drivers/video/console/fbcon.c | 2 ++ 1 file changed, 2 insertions(+) commit 10da848f67a7e7152bf7cbe332e4c92d71a990d2 Author: Arnd Bergmann Date: Thu Feb 25 21:57:43 2016 +0100 ssb: host_soc depends on sprom Drivers that use the SSB sprom functionality typically 'select SSB_SPROM' from Kconfig, but CONFIG_SSB_HOST_SOC misses this, which results in a build failure unless at least one of the other drivers that selects it is enabled: drivers/built-in.o: In function `ssb_host_soc_get_invariants': (.text+0x459494): undefined reference to `ssb_fill_sprom_with_fallback' This adds the same select statement that is used elsewhere. Signed-off-by: Arnd Bergmann Fixes: 541c9a84cd85 ("ssb: pick SoC invariants code from MIPS BCM47xx arch") Signed-off-by: Kalle Valo drivers/ssb/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1a4f6557dd7c7f0eba18aadbc72e3cf09dae496d Merge: c699404d 905e36a Author: Kalle Valo Date: Fri Feb 26 12:43:40 2016 +0200 Merge tag 'iwlwifi-for-kalle-2016-02-25' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Two fixes for 4.5: * We forgot to free the paging memory (Matti) * Fix the frames in flight accounting (Liad) commit 34d47a77591f2fe7988beeca86d8ee281aee827f Merge: 5bb9871 e817c2f Author: James Morris Date: Fri Feb 26 19:32:16 2016 +1100 Merge branch 'stable-4.5' of git://git.infradead.org/users/pcmoore/selinux into for-linus commit 473f414564528a819f0c2bb6b4bf26366b64c9ab Author: Takashi Iwai Date: Tue Feb 23 15:54:47 2016 +0100 ALSA: hda - Loop interrupt handling until really cleared Currently the interrupt handler of HD-audio driver assumes that no irq update is needed while processing the irq. But in reality, it has been confirmed that the HW irq is issued even during the irq handling. Since we clear the irq status at the beginning, process the interrupt, then exits from the handler, the lately issued interrupt is left untouched without being properly processed. This patch changes the interrupt handler code to loop over the check-and-process. The handler tries repeatedly as long as the IRQ status are turned on, and either stream or CORB/RIRB is handled. For checking the stream handling, snd_hdac_bus_handle_stream_irq() returns a value indicating the stream indices bits. Other than that, the change is only in the irq handler itself. Reported-by: Libin Yang Cc: Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 2 +- sound/hda/hdac_controller.c | 7 ++++++- sound/pci/hda/hda_controller.c | 47 +++++++++++++++++++++++------------------- 3 files changed, 33 insertions(+), 23 deletions(-) commit e9a2d81b1761093386a0bb8a4f51642ac785ef63 Author: Maximilain Schneider Date: Tue Feb 23 01:17:28 2016 +0000 can: gs_usb: fixed disconnect bug by removing erroneous use of kfree() gs_destroy_candev() erroneously calls kfree() on a struct gs_can *, which is allocated through alloc_candev() and should instead be freed using free_candev() alone. The inappropriate use of kfree() causes the kernel to hang when gs_destroy_candev() is called. Only the struct gs_usb * which is allocated through kzalloc() should be freed using kfree() when the device is disconnected. Signed-off-by: Maximilian Schneider Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 5bb9871eb8daa2e6a07caf7aeafbe2d0b3faad8f Merge: 73056bb d045437 Author: Linus Torvalds Date: Thu Feb 25 20:12:09 2016 -0800 Merge tag 'trace-fixes-v4.5-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Another small bug reported to me by Chunyu Hu. When perf added a "reg" function to the function tracing event (not a tracepoint), it caused that event to be displayed as a tracepoint and could cause errors in tracepoint handling. That was solved by adding a flag to ignore ftrace non-tracepoint events. But that flag was missed when displaying events in available_events, which should only contain tracepoint events. This broke a documented way to enable all events with: cat available_events > set_event As the function non-tracepoint event would cause that to error out. The commit here fixes that by having the available_events file not list events that have the ignore flag set" * tag 'trace-fixes-v4.5-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix showing function event in available_events commit 73056bbc683f16672b948968a92fc3aa6aefbfbd Merge: 5882c16 0fb00d3 Author: Linus Torvalds Date: Thu Feb 25 19:53:54 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "KVM/ARM fixes: - Fix per-vcpu vgic bitmap allocation - Do not give copy random memory on MMIO read - Fix GICv3 APR register restore order KVM/x86 fixes: - Fix ubsan warning - Fix hardware breakpoints in a guest vs. preempt notifiers - Fix Hurd Generic: - use __GFP_NOWARN together with GFP_NOWAIT" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: MMU: fix ubsan index-out-of-range warning arm64: KVM: vgic-v3: Restore ICH_APR0Rn_EL2 before ICH_APR1Rn_EL2 KVM: async_pf: do not warn on page allocation failures KVM: x86: fix conversion of addresses to linear in 32-bit protected mode KVM: x86: fix missed hardware breakpoints arm/arm64: KVM: Feed initialized memory to MMIO accesses KVM: arm/arm64: vgic: Ensure bitmaps are long enough commit 5882c169be18e42b855443574f8e95215f7ba461 Merge: 9aca90a 0378ba4 Author: Linus Torvalds Date: Thu Feb 25 19:47:01 2016 -0800 Merge tag 'renesas-sh-drivers-fixes-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas Pull SuperH driver fix from Simon Horman: "Restore legacy clock domain on SuperH platforms" * tag 'renesas-sh-drivers-fixes-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: drivers: sh: Restore legacy clock domain on SuperH platforms commit 9aca90a7ca911af4da5d77fad11f54f040dc027d Merge: 70d070f 9ab3ac2 Author: Linus Torvalds Date: Thu Feb 25 19:41:53 2016 -0800 Merge tag 'powerpc-4.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - eeh: Fix partial hotplug criterion from Gavin Shan - mm: Clear the invalid slot information correctly from Aneesh Kumar K.V * tag 'powerpc-4.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm/hash: Clear the invalid slot information correctly powerpc/eeh: Fix partial hotplug criterion commit 70d070f56a24b0d966aee547b6c51d09e9185b63 Merge: 81904db 1b17cb7 Author: Linus Torvalds Date: Thu Feb 25 19:36:33 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 bugfixes from Martin Schwidefsky: "Two critical bug fixes for the signal handling" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/fpu: signals vs. floating point control register s390/compat: correct restore of high gprs on signal return commit 81904dbbb45490642d16fb1343f95dc0d0eec93f Merge: 3acdb84 b7052cd Author: Linus Torvalds Date: Thu Feb 25 19:31:01 2016 -0800 Merge tag 'nfsd-4.5-1' of git://linux-nfs.org/~bfields/linux Pull nfsd bugfix from Bruce Fields: "One fix for a bug that could cause a NULL write past the end of a buffer in case of unusually long writes to some system interfaces used by mountd and other nfs support utilities" * tag 'nfsd-4.5-1' of git://linux-nfs.org/~bfields/linux: sunrpc/cache: fix off-by-one in qword_get() commit 3acdb84c22fc5fcd8384ff0238b62cceba8ed549 Merge: 3d7b365 3772e72 Author: Linus Torvalds Date: Thu Feb 25 19:01:42 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This is a bit larger than Id like, but I asked the Intel guys to pull in some Skylake fixes in the possibly vain hope that Skylake might be more functional now that I'm seeing production hardware shipping. For i915, it's mostly the same patch in a few places, making sure the hw doesn't turn off when we are programming it. Apart from that are two nouveau fixes, one for a module defer bug, and one for using nouveau on new Lenovo P50 models. Then there are a bunch of AMDGPU fixes, one is a fix for v4.4 vblank regressions, and some PM fixes" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (26 commits) drm/nouveau/disp/dp: ensure sink is powered up before attempting link training drm/nouveau: platform: Fix deferred probe drm/amdgpu: disable direct VM updates when vm_debug is set amdgpu: fix NULL pointer dereference at tonga_check_states_equal drm/i915/gen9: Verify and enforce dc6 state writes drm/i915/gen9: Check for DC state mismatch drm/radeon/pm: adjust display configuration after powerstate drm/amdgpu/pm: adjust display configuration after powerstate drm/amdgpu/pm: add some checks for PX drm/amdgpu: fix locking in force performance level drm/amdgpu/gfx8: fix priv reg interrupt enable drm/i915/skl: Ensure HW is powered during DDB HW state readout drm/i915/lvds: Ensure the HW is powered during HW state readout drm/i915/hdmi: Ensure the HW is powered during HW state readout drm/i915/dsi: Ensure the HW is powered during HW state readout drm/i915/dp: Ensure the HW is powered during HW state readout drm/i915: Ensure the HW is powered when accessing the CRC HW block drm/i915/ddi: Ensure the HW is powered during HW state readout drm/i915/crt: Ensure the HW is powered during HW state readout drm/i915: Ensure the HW is powered during HW access in assert_pipe ... commit 3d7b365490d5f2f8ac1aaaf6cce775e6a8b7f570 Merge: 1ebe383 c454420 Author: Linus Torvalds Date: Thu Feb 25 18:54:53 2016 -0800 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: - Two fixes for compatibility with the ACPI 6.1 specification. Without these fixes multi-interface DIMMs will fail to be probed, and address range scrub commands to find memory errors will give results that the kernel will mis-interpret. For multi-interface DIMMs Linux will accept either the original 6.0 implementation or 6.1. For address range scrub we'll only support 6.1 since ACPI formalized this DSM differently than the original example [1] implemented in v4.2. The expectation is that production systems will only ever ship the ACPI 6.1 address range scrub command definition. - The wider async address range scrub work targeting 4.6 discovered that the original synchronous implementation in 4.5 is not sizing its return buffer correctly. - Arnd caught that my recent fix to the size of the pfn_t flags missed updating the flags variable used in the pmem driver. - Toshi found that we mishandle the memremap() return value in devm_memremap(). * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nvdimm: use 'u64' for pfn flags devm_memremap: Fix error value when memremap failed nfit: update address range scrub commands to the acpi 6.1 format libnvdimm, tools/testing/nvdimm: fix 'ars_status' output buffer sizing nfit: fix multi-interface dimm handling, acpi6.1 compatibility commit 1ebe3839e66ae85e065157ba9d6f7923ad8d8fbf Merge: 6dc390a 9aafabc Author: Linus Torvalds Date: Thu Feb 25 18:42:08 2016 -0800 Merge tag 'for-v4.5-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel: "Add a regression fix for changed sysfs path of bq27xxx_battery and update MAINTAINERS file" * tag 'for-v4.5-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: bq27xxx_battery: Restore device name MAINTAINERS: update bq27xxx driver commit c8560b7c917f8738f5d80dd516930edc1d05e4e4 Author: Carlo Caione Date: Tue Feb 23 09:50:20 2016 +0100 ASoC: cht_bsw_rt5645: Fix writing to string literal We cannot use strcpy() to write to a const char * location. This is causing a 'BUG: unable to handle kernel paging request' error at boot when using the cht-bsw-rt5645 driver. With this patch we also fix a wrong indexing in the driver where the codec_name of the wrong dai_link is being overwritten. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f4833a519aec793cf8349bf479589d37473ef6a7 Author: Arnd Bergmann Date: Wed Feb 24 17:38:14 2016 +0100 ASoC: trace: fix printing jack name After a change to the snd_jack structure, the 'name' member is no longer available in all configurations, which results in a build failure in the tracing code: include/trace/events/asoc.h: In function 'trace_event_raw_event_snd_soc_jack_report': include/trace/events/asoc.h:240:32: error: 'struct snd_jack' has no member named 'name' The name field is normally initialized from the card shortname and the jack "id" field: snprintf(jack->name, sizeof(jack->name), "%s %s", card->shortname, jack->id); This changes the tracing output to just contain the 'id' by itself, which slightly changes the output format but avoids the link error and is hopefully still enough to see what is going on. Signed-off-by: Arnd Bergmann Fixes: fe0d128c57bf ("ALSA: jack: Allow building the jack layer without input device") Signed-off-by: Mark Brown include/trace/events/asoc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4ee34ea3a12396f35b26d90a094c75db95080baa Author: Harvey Hunt Date: Wed Feb 24 15:16:43 2016 +0000 libata: Align ata_device's id on a cacheline The id buffer in ata_device is a DMA target, but it isn't explicitly cacheline aligned. Due to this, adjacent fields can be overwritten with stale data from memory on non coherent architectures. As a result, the kernel is sometimes unable to communicate with an ATA device. Fix this by ensuring that the id buffer is cacheline aligned. This issue is similar to that fixed by Commit 84bda12af31f ("libata: align ap->sector_buf"). Signed-off-by: Harvey Hunt Cc: linux-kernel@vger.kernel.org Cc: # 2.6.18 Signed-off-by: Tejun Heo include/linux/libata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c0b6eaf373a5323f03a3a20c42fc435715b073d Author: Sunil Goutham Date: Wed Feb 24 16:40:50 2016 +0530 net: thunderx: Fix for Qset error due to CQ full On Thunderx pass 1.x and pass2 due to a HW errata default CQ DROP_LEVEL of 0x80 is not sufficient to avoid CQ_WR_FULL Qset error when packets are being received at >20Mpps resulting in complete stall of packet reception. This patch will configure it to 0x100 which is what is expected by HW on Thunderx. On future passes of thunderx and other chips HW default/reset value will be 0x100 or higher hence not overwritten. Signed-off-by: Jerin Jacob Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 9 +++++++++ drivers/net/ethernet/cavium/thunder/nic_main.c | 6 ++++++ drivers/net/ethernet/cavium/thunder/nic_reg.h | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) commit f09cf4b7832d029fb22d8f476eac12fc27dde61f Author: Chun-Hao Lin Date: Wed Feb 24 14:18:42 2016 +0800 r8169:fix "rtl_counters_cond == 1 (loop: 1000, delay: 10)" log spam. There will be a log spam when there is no cable plugged. Please refer to following links. https://bugzilla.kernel.org/show_bug.cgi?id=104351 https://bugzilla.kernel.org/show_bug.cgi?id=107421 This issue is caused by runtime power management. When there is no cable plugged, the driver will be suspend (runtime suspend) by OS and NIC will be put into the D3 state. During this time, if OS call rtl8169_get_stats64() to dump tally counter, because NIC is in D3 state, the register value read by driver will return all 0xff. This will let driver think tally counter flag is not toggled and then sends the warning message "rtl_counters_cond == 1 (loop: 1000, delay: 10)" to kernel log. For fixing this issue, 1.add checking driver's pm runtime status in rtl8169_get_stats64(). 2.dump tally counter before going runtime suspend for counter accuracy in runtime suspend. Signed-off-by: Chunhao Lin Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 9b368814b336b0a1a479135eb2815edbc00efd3c Author: Linus Lüssing Date: Wed Feb 24 04:21:42 2016 +0100 net: fix bridge multicast packet checksum validation We need to update the skb->csum after pulling the skb, otherwise an unnecessary checksum (re)computation can ocure for IGMP/MLD packets in the bridge code. Additionally this fixes the following splats for network devices / bridge ports with support for and enabled RX checksum offloading: [...] [ 43.986968] eth0: hw csum failure [ 43.990344] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.0 #2 [ 43.996193] Hardware name: BCM2709 [ 43.999647] [<800204e0>] (unwind_backtrace) from [<8001cf14>] (show_stack+0x10/0x14) [ 44.007432] [<8001cf14>] (show_stack) from [<801ab614>] (dump_stack+0x80/0x90) [ 44.014695] [<801ab614>] (dump_stack) from [<802e4548>] (__skb_checksum_complete+0x6c/0xac) [ 44.023090] [<802e4548>] (__skb_checksum_complete) from [<803a055c>] (ipv6_mc_validate_checksum+0x104/0x178) [ 44.032959] [<803a055c>] (ipv6_mc_validate_checksum) from [<802e111c>] (skb_checksum_trimmed+0x130/0x188) [ 44.042565] [<802e111c>] (skb_checksum_trimmed) from [<803a06e8>] (ipv6_mc_check_mld+0x118/0x338) [ 44.051501] [<803a06e8>] (ipv6_mc_check_mld) from [<803b2c98>] (br_multicast_rcv+0x5dc/0xd00) [ 44.060077] [<803b2c98>] (br_multicast_rcv) from [<803aa510>] (br_handle_frame_finish+0xac/0x51c) [...] Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code") Reported-by: Álvaro Fernández Rojas Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller net/core/skbuff.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit a4690afeb0d2d7ba4d60dfa98a89f3bb1ce60ecd Author: Stefan Wahren Date: Tue Feb 23 19:23:24 2016 +0000 net: qca_spi: clear IFF_TX_SKB_SHARING ether_setup sets IFF_TX_SKB_SHARING but this is not supported by qca_spi as it modifies the skb on xmit. Signed-off-by: Stefan Wahren Fixes: 291ab06ecf67 (net: qualcomm: new Ethernet over SPI driver for QCA7000) Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_spi.c | 1 + 1 file changed, 1 insertion(+) commit 2b70bad23c89b121a3e4a00f8968d14ebb78887d Author: Stefan Wahren Date: Tue Feb 23 19:23:23 2016 +0000 net: qca_spi: Don't clear IFF_BROADCAST Currently qcaspi_netdev_setup accidentally clears IFF_BROADCAST. So fix this by keeping the flags from ether_setup. Reported-by: Michael Heimpold Signed-off-by: Stefan Wahren Fixes: 291ab06ecf67 (net: qualcomm: new Ethernet over SPI driver for QCA7000) Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_spi.c | 1 - 1 file changed, 1 deletion(-) commit 65c38aa653c14df49e19faad74bd375f36e61c57 Author: David Ahern Date: Tue Feb 23 10:10:26 2016 -0800 net: vrf: Remove direct access to skb->data Nik pointed that the VRF driver should be using skb_header_pointer instead of accessing skb->data and bits beyond directly which can be garbage. Fixes: 35402e313663 ("net: Add IPv6 support to VRF device") Cc: Nikolay Aleksandrov Signed-off-by: David Ahern Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller drivers/net/vrf.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 44248affb5d82d32cdb58a92a94ce191d4ddee60 Author: Han Xu Date: Thu Feb 18 03:55:15 2016 +0000 MAINTAINERS: add maintainer entry for FREESCALE GPMI NAND driver Add a maintainer entry for FREESCALE GPMI NAND driver and add myself as a maintainer. Signed-off-by: Han Xu Acked-by: Huang Shijie Signed-off-by: Brian Norris MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit bf70e5513dfea29c3682e7eb3dbb45f0723bac09 Author: Dexuan Cui Date: Thu Feb 25 01:58:12 2016 -0800 x86/mm: Fix slow_virt_to_phys() for X86_PAE again "d1cd12108346: x86, pageattr: Prevent overflow in slow_virt_to_phys() for X86_PAE" was unintentionally removed by the recent "34437e67a672: x86/mm: Fix slow_virt_to_phys() to handle large PAT bit". And, the variable 'phys_addr' was defined as "unsigned long" by mistake -- it should be "phys_addr_t". As a result, Hyper-V network driver in 32-PAE Linux guest can't work again. Fixes: commit 34437e67a672: "x86/mm: Fix slow_virt_to_phys() to handle large PAT bit" Signed-off-by: Dexuan Cui Reviewed-by: Toshi Kani Cc: olaf@aepfle.de Cc: gregkh@linuxfoundation.org Cc: jasowang@redhat.com Cc: driverdev-devel@linuxdriverproject.org Cc: linux-mm@kvack.org Cc: apw@canonical.com Cc: Andrew Morton Cc: K. Y. Srinivasan Cc: Haiyang Zhang Link: http://lkml.kernel.org/r/1456394292-9030-1-git-send-email-decui@microsoft.com Signed-off-by: Thomas Gleixner arch/x86/mm/pageattr.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 358875fd52ab8f00f66328cbf1a1d2486f265829 Author: Jay Cornwall Date: Wed Feb 10 15:48:01 2016 -0600 iommu/amd: Apply workaround for ATS write permission check The AMD Family 15h Models 30h-3Fh (Kaveri) BIOS and Kernel Developer's Guide omitted part of the BIOS IOMMU L2 register setup specification. Without this setup the IOMMU L2 does not fully respect write permissions when handling an ATS translation request. The IOMMU L2 will set PTE dirty bit when handling an ATS translation with write permission request, even when PTE RW bit is clear. This may occur by direct translation (which would cause a PPR) or by prefetch request from the ATC. This is observed in practice when the IOMMU L2 modifies a PTE which maps a pagecache page. The ext4 filesystem driver BUGs when asked to writeback these (non-modified) pages. Enable ATS write permission check in the Kaveri IOMMU L2 if BIOS has not. Signed-off-by: Jay Cornwall Cc: # v3.19+ Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 38e45d02ea9f194b89d6bf41e52ccafc8e2c2b47 Author: Suravee Suthikulpanit Date: Tue Feb 23 13:03:30 2016 +0100 iommu/amd: Fix boot warning when device 00:00.0 is not iommu covered The setup code for the performance counters in the AMD IOMMU driver tests whether the counters can be written. It tests to setup a counter for device 00:00.0, which fails on systems where this particular device is not covered by the IOMMU. Fix this by not relying on device 00:00.0 but only on the IOMMU being present. Cc: stable@vger.kernel.org Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit b26a719bdba9aa926ceaadecc66e07623d2b8a53 Author: Geert Uytterhoeven Date: Thu Feb 18 17:06:30 2016 +0100 gpio: rcar: Add Runtime PM handling for interrupts The R-Car GPIO driver handles Runtime PM for requested GPIOs only. When using a GPIO purely as an interrupt source, no Runtime PM handling is done, and the GPIO module's clock may not be enabled. To fix this: - Add .irq_request_resources() and .irq_release_resources() callbacks to handle Runtime PM when an interrupt is requested, - Add irq_bus_lock() and sync_unlock() callbacks to handle Runtime PM when e.g. disabling/enabling an interrupt, or configuring the interrupt type. Fixes: d5c3d84657db57bd "net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS" Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/gpio/gpio-rcar.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit f883982dc1b117f04579f0896821cd9f2e397f94 Author: Takashi Iwai Date: Thu Feb 25 14:31:59 2016 +0100 ALSA: hda - Fix headset support and noise on HP EliteBook 755 G2 HP EliteBook 755 G2 with ALC3228 (ALC280) codec [103c:221c] requires the known fixup (ALC269_FIXUP_HEADSET_MIC) for making the headset mic working. Also, it suffers from the loopback noise problem, so we should disable aamix path as well. Reported-by: Derick Eddington Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit be629c62a603e5935f8177fd8a19e014100a259e Author: David Woodhouse Date: Mon Feb 1 14:04:46 2016 +0000 Fix directory hardlinks from deleted directories When a directory is deleted, we don't take too much care about killing off all the dirents that belong to it — on the basis that on remount, the scan will conclude that the directory is dead anyway. This doesn't work though, when the deleted directory contained a child directory which was moved *out*. In the early stages of the fs build we can then end up with an apparent hard link, with the child directory appearing both in its true location, and as a child of the original directory which are this stage of the mount process we don't *yet* know is defunct. To resolve this, take out the early special-casing of the "directories shall not have hard links" rule in jffs2_build_inode_pass1(), and let the normal nlink processing happen for directories as well as other inodes. Then later in the build process we can set ic->pino_nlink to the parent inode#, as is required for directories during normal operaton, instead of the nlink. And complain only *then* about hard links which are still in evidence even after killing off all the unreachable paths. Reported-by: Liu Song Signed-off-by: David Woodhouse Cc: stable@vger.kernel.org fs/jffs2/build.c | 75 ++++++++++++++++++++++++++++++++++++++++------------- fs/jffs2/nodelist.h | 6 ++++- 2 files changed, 62 insertions(+), 19 deletions(-) commit 49e91e7079febe59a20ca885a87dd1c54240d0f1 Author: David Woodhouse Date: Mon Feb 1 12:37:20 2016 +0000 jffs2: Fix page lock / f->sem deadlock With this fix, all code paths should now be obtaining the page lock before f->sem. Reported-by: Szabó Tamás Tested-by: Thomas Betker Signed-off-by: David Woodhouse Cc: stable@vger.kernel.org fs/jffs2/README.Locking | 5 +---- fs/jffs2/gc.c | 17 ++++++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 157078f64b8a9cd7011b6b900b2f2498df850748 Author: Thomas Betker Date: Tue Nov 10 22:18:15 2015 +0100 Revert "jffs2: Fix lock acquisition order bug in jffs2_write_begin" This reverts commit 5ffd3412ae55 ("jffs2: Fix lock acquisition order bug in jffs2_write_begin"). The commit modified jffs2_write_begin() to remove a deadlock with jffs2_garbage_collect_live(), but this introduced new deadlocks found by multiple users. page_lock() actually has to be called before mutex_lock(&c->alloc_sem) or mutex_lock(&f->sem) because jffs2_write_end() and jffs2_readpage() are called with the page locked, and they acquire c->alloc_sem and f->sem, resp. In other words, the lock order in jffs2_write_begin() was correct, and it is the jffs2_garbage_collect_live() path that has to be changed. Revert the commit to get rid of the new deadlocks, and to clear the way for a better fix of the original deadlock. Reported-by: Deng Chao Reported-by: Ming Liu Reported-by: wangzaiwei Signed-off-by: Thomas Betker Signed-off-by: David Woodhouse Cc: stable@vger.kernel.org fs/jffs2/file.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 2ae955774f29bbd7d16149cb0ae8d0319bf2ecc4 Author: David Henningsson Date: Thu Feb 25 09:37:05 2016 +0100 ALSA: hda - Fixup speaker pass-through control for nid 0x14 on ALC225 On one of the machines we enable, we found that the actual speaker volume did not always correspond to the volume set in alsamixer. This patch fixes that problem. This patch was orginally written by Kailang @ Realtek, I've rebased it to fit sound git master. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1549660 Co-Authored-By: Kailang Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 0fb00d326ffc36844fac0bfefd8644585a86d4a6 Merge: 17e4bce fd451b9 Author: Paolo Bonzini Date: Thu Feb 25 09:53:55 2016 +0100 Merge tag 'kvm-arm-for-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/ARM fixes for 4.5-rc6 - Fix per-vcpu vgic bitmap allocation - Do not give copy random memory on MMIO read - Fix GICv3 APR register restore order commit 17e4bce0ae63c7e03f3c7fa8d80890e7af3d4971 Author: Mike Krinkin Date: Wed Feb 24 21:02:31 2016 +0300 KVM: x86: MMU: fix ubsan index-out-of-range warning Ubsan reports the following warning due to a typo in update_accessed_dirty_bits template, the patch fixes the typo: [ 168.791851] ================================================================================ [ 168.791862] UBSAN: Undefined behaviour in arch/x86/kvm/paging_tmpl.h:252:15 [ 168.791866] index 4 is out of range for type 'u64 [4]' [ 168.791871] CPU: 0 PID: 2950 Comm: qemu-system-x86 Tainted: G O L 4.5.0-rc5-next-20160222 #7 [ 168.791873] Hardware name: LENOVO 23205NG/23205NG, BIOS G2ET95WW (2.55 ) 07/09/2013 [ 168.791876] 0000000000000000 ffff8801cfcaf208 ffffffff81c9f780 0000000041b58ab3 [ 168.791882] ffffffff82eb2cc1 ffffffff81c9f6b4 ffff8801cfcaf230 ffff8801cfcaf1e0 [ 168.791886] 0000000000000004 0000000000000001 0000000000000000 ffffffffa1981600 [ 168.791891] Call Trace: [ 168.791899] [] dump_stack+0xcc/0x12c [ 168.791904] [] ? _atomic_dec_and_lock+0xc4/0xc4 [ 168.791910] [] ubsan_epilogue+0xd/0x8a [ 168.791914] [] __ubsan_handle_out_of_bounds+0x15c/0x1a3 [ 168.791918] [] ? __ubsan_handle_shift_out_of_bounds+0x2bd/0x2bd [ 168.791922] [] ? get_user_pages_fast+0x2bf/0x360 [ 168.791954] [] ? kvm_largepages_enabled+0x30/0x30 [kvm] [ 168.791958] [] ? __get_user_pages_fast+0x360/0x360 [ 168.791987] [] paging64_walk_addr_generic+0x1b28/0x2600 [kvm] [ 168.792014] [] ? init_kvm_mmu+0x1100/0x1100 [kvm] [ 168.792019] [] ? debug_check_no_locks_freed+0x350/0x350 [ 168.792044] [] ? init_kvm_mmu+0x1100/0x1100 [kvm] [ 168.792076] [] paging64_gva_to_gpa+0x7d/0x110 [kvm] [ 168.792121] [] ? paging64_walk_addr_generic+0x2600/0x2600 [kvm] [ 168.792130] [] ? debug_lockdep_rcu_enabled+0x7b/0x90 [ 168.792178] [] emulator_read_write_onepage+0x27a/0x1150 [kvm] [ 168.792208] [] ? __kvm_read_guest_page+0x54/0x70 [kvm] [ 168.792234] [] ? kvm_task_switch+0x160/0x160 [kvm] [ 168.792238] [] ? debug_lockdep_rcu_enabled+0x7b/0x90 [ 168.792263] [] emulator_read_write+0xe7/0x6d0 [kvm] [ 168.792290] [] ? em_cr_write+0x230/0x230 [kvm] [ 168.792314] [] emulator_write_emulated+0x15/0x20 [kvm] [ 168.792340] [] segmented_write+0xf8/0x130 [kvm] [ 168.792367] [] ? em_lgdt+0x20/0x20 [kvm] [ 168.792374] [] ? vmx_read_guest_seg_ar+0x42/0x1e0 [kvm_intel] [ 168.792400] [] writeback+0x3f2/0x700 [kvm] [ 168.792424] [] ? em_sidt+0xa0/0xa0 [kvm] [ 168.792449] [] ? x86_decode_insn+0x1b3d/0x4f70 [kvm] [ 168.792474] [] x86_emulate_insn+0x572/0x3010 [kvm] [ 168.792499] [] x86_emulate_instruction+0x3bd/0x2110 [kvm] [ 168.792524] [] ? reexecute_instruction.part.110+0x2e0/0x2e0 [kvm] [ 168.792532] [] handle_ept_misconfig+0x61/0x460 [kvm_intel] [ 168.792539] [] ? handle_pause+0x450/0x450 [kvm_intel] [ 168.792546] [] vmx_handle_exit+0xd6a/0x1ad0 [kvm_intel] [ 168.792572] [] ? kvm_arch_vcpu_ioctl_run+0xbdc/0x6090 [kvm] [ 168.792597] [] kvm_arch_vcpu_ioctl_run+0xd3d/0x6090 [kvm] [ 168.792621] [] ? kvm_arch_vcpu_ioctl_run+0xbdc/0x6090 [kvm] [ 168.792627] [] ? __ww_mutex_lock_interruptible+0x1630/0x1630 [ 168.792651] [] ? kvm_arch_vcpu_runnable+0x4f0/0x4f0 [kvm] [ 168.792656] [] ? preempt_notifier_unregister+0x190/0x190 [ 168.792681] [] ? kvm_arch_vcpu_load+0x127/0x650 [kvm] [ 168.792704] [] kvm_vcpu_ioctl+0x553/0xda0 [kvm] [ 168.792727] [] ? vcpu_put+0x40/0x40 [kvm] [ 168.792732] [] ? debug_check_no_locks_freed+0x350/0x350 [ 168.792735] [] ? _raw_spin_unlock+0x27/0x40 [ 168.792740] [] ? handle_mm_fault+0x1673/0x2e40 [ 168.792744] [] ? trace_hardirqs_on_caller+0x478/0x6c0 [ 168.792747] [] ? trace_hardirqs_on+0xd/0x10 [ 168.792751] [] ? debug_lockdep_rcu_enabled+0x7b/0x90 [ 168.792756] [] do_vfs_ioctl+0x1b0/0x12b0 [ 168.792759] [] ? ioctl_preallocate+0x210/0x210 [ 168.792763] [] ? __fget+0x273/0x4a0 [ 168.792766] [] ? __fget+0x50/0x4a0 [ 168.792770] [] ? __fget_light+0x96/0x2b0 [ 168.792773] [] SyS_ioctl+0x79/0x90 [ 168.792777] [] entry_SYSCALL_64_fastpath+0x23/0xc1 [ 168.792780] ================================================================================ Signed-off-by: Mike Krinkin Reviewed-by: Xiao Guangrong Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/paging_tmpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b43b71f05d3ecd01c4116254666d9492301697d Author: Kai-Heng Feng Date: Thu Feb 25 15:19:38 2016 +0800 ALSA: hda - Fixing background noise on Dell Inspiron 3162 After login to the desktop on Dell Inspiron 3162, there's a very loud background noise comes from the builtin speaker. The noise does not go away even if the speaker is muted. The noise disappears after using the aamix fixup. Codec: Realtek ALC3234 Address: 0 AFG Function Id: 0x1 (unsol 1) Vendor Id: 0x10ec0255 Subsystem Id: 0x10280725 Revision Id: 0x100002 No Modem Function Group found BugLink: http://bugs.launchpad.net/bugs/1549620 Signed-off-by: Kai-Heng Feng Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0da4cf3e0a68c97ef811569804616a811f786729 Author: Peter Zijlstra Date: Wed Feb 24 18:45:51 2016 +0100 perf: Robustify task_function_call() Since there is no serialization between task_function_call() doing task_curr() and the other CPU doing context switches, we could end up not sending an IPI even if we had to. And I'm not sure I still buy my own argument we're OK. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174948.340031200@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit a096309bc4677f60caa8e93fcc613a55073c51d4 Author: Peter Zijlstra Date: Wed Feb 24 18:45:50 2016 +0100 perf: Fix scaling vs. perf_install_in_context() Completely reworks perf_install_in_context() (again!) in order to ensure that there will be no ctx time hole between add_event_to_ctx() and any potential ctx_sched_in(). Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174948.279399438@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 115 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 45 deletions(-) commit bd2afa49d194c6412c333e9fdd48bc5d06bb465d Author: Peter Zijlstra Date: Wed Feb 24 18:45:49 2016 +0100 perf: Fix scaling vs. perf_event_enable() Similar to the perf_enable_on_exec(), ensure that event timings are consistent across perf_event_enable(). Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174948.218288698@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 7fce250915efca0f8f51dddee3ae89bf30d86ca5 Author: Peter Zijlstra Date: Wed Feb 24 18:45:48 2016 +0100 perf: Fix scaling vs. perf_event_enable_on_exec() The recent commit 3e349507d12d ("perf: Fix perf_enable_on_exec() event scheduling") caused this by moving task_ctx_sched_out() from before __perf_event_mask_enable() to after it. The overlooked consequence of that change is that task_ctx_sched_out() would update the ctx time fields, and now __perf_event_mask_enable() uses stale time. In order to fix this, explicitly stop our context's time before enabling the event(s). Reported-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Fixes: 3e349507d12d ("perf: Fix perf_enable_on_exec() event scheduling") Link: http://lkml.kernel.org/r/20160224174948.159242158@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) commit 3cbaa59069677920186dcf502632ca1df4329f80 Author: Peter Zijlstra Date: Wed Feb 24 18:45:47 2016 +0100 perf: Fix ctx time tracking by introducing EVENT_TIME Currently any ctx_sched_in() call will re-start the ctx time tracking, this means that calls like: ctx_sched_in(.event_type = EVENT_PINNED); ctx_sched_in(.event_type = EVENT_FLEXIBLE); will have a hole in their ctx time tracking. This is likely harmless but can confuse things a little. By adding EVENT_TIME, we can have the first ctx_sched_in() (is_active: 0 -> !0) start the time and any further ctx_sched_in() will leave the timestamps alone. Secondly, this allows for an early disable like: ctx_sched_out(.event_type = EVENT_TIME); which would update the ctx time (if the ctx is active) and any further calls to ctx_sched_out() would not further modify the ctx time. For ctx_sched_in() any 0 -> !0 transition will automatically include EVENT_TIME. For ctx_sched_out(), any transition that clears EVENT_ALL will automatically clear EVENT_TIME. These two rules ensure that under normal circumstances we need not bother with EVENT_TIME and get natural ctx time behaviour. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174948.100446561@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit 28a967c3a2f99fa3b5f762f25cb2a319d933571b Author: Peter Zijlstra Date: Wed Feb 24 18:45:46 2016 +0100 perf: Cure event->pending_disable race Because event_sched_out() checks event->pending_disable _before_ actually disabling the event, it can happen that the event fires after it checks but before it gets disabled. This would leave event->pending_disable set and the queued irq_work will try and process it. However, if the event trigger was during schedule(), the event might have been de-scheduled by the time the irq_work runs, and perf_event_disable_local() will fail. Fix this by checking event->pending_disable _after_ we call event->pmu->del(). This depends on the latter being a compiler barrier, such that the compiler does not lift the load and re-creates the problem. Tested-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174948.040469884@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9107c89e269d2738019861bb518e3d59bef01781 Author: Peter Zijlstra Date: Wed Feb 24 18:45:45 2016 +0100 perf: Fix race between event install and jump_labels perf_install_in_context() relies upon the context switch hooks to have scheduled in events when the IPI misses its target -- after all, if the task has moved from the CPU (or wasn't running at all), it will have to context switch to run elsewhere. This however doesn't appear to be happening. It is possible for the IPI to not happen (task wasn't running) only to later observe the task running with an inactive context. The only possible explanation is that the context switch hooks are not called. Therefore put in a sync_sched() after toggling the jump_label to guarantee all CPUs will have them enabled before we install an event. A simple if (0->1) sync_sched() will not in fact work, because any further increment can race and complete before the sync_sched(). Therefore we must jump through some hoops. Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174947.980211985@infradead.org Signed-off-by: Ingo Molnar include/linux/perf_event.h | 6 +++--- kernel/events/core.c | 49 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 11 deletions(-) commit a69b0ca4ac3bf5427b571f11cbf33f0a32b728d5 Author: Peter Zijlstra Date: Wed Feb 24 18:45:44 2016 +0100 perf: Fix cloning Alexander reported that when the 'original' context gets destroyed, no new clones happen. This can happen irrespective of the ctx switch optimization, any task can die, even the parent, and we want to continue monitoring the task hierarchy until we either close the event or no tasks are left in the hierarchy. perf_event_init_context() will attempt to pin the 'parent' context during clone(). At that point current is the parent, and since current cannot have exited while executing clone(), its context cannot have passed through perf_event_exit_task_context(). Therefore perf_pin_task_context() cannot observe ctx->task == TASK_TOMBSTONE. However, since inherit_event() does: if (parent_event->parent) parent_event = parent_event->parent; it looks at the 'original' event when it does: is_orphaned_event(). This can return true if the context that contains the this event has passed through perf_event_exit_task_context(). And thus we'll fail to clone the perf context. Fix this by adding a new state: STATE_DEAD, which is set by perf_release() to indicate that the filedesc (or kernel reference) is dead and there are no observers for our data left. Only for STATE_DEAD will is_orphaned_event() be true and inhibit cloning. STATE_EXIT is otherwise preserved such that is_event_hup() remains functional and will report when the observed task hierarchy becomes empty. Reported-by: Alexander Shishkin Tested-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Fixes: c6e5b73242d2 ("perf: Synchronously clean up child events") Link: http://lkml.kernel.org/r/20160224174947.919845295@infradead.org Signed-off-by: Ingo Molnar include/linux/perf_event.h | 1 + kernel/events/core.c | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 15 deletions(-) commit 6f932e5be1503ab0783699e843db325d44c2fabb Author: Peter Zijlstra Date: Wed Feb 24 18:45:43 2016 +0100 perf: Only update context time when active Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174947.860690919@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a4f4bb6d0c69d0bb573f1d9e6f1b806f9b038b19 Author: Peter Zijlstra Date: Wed Feb 24 18:45:42 2016 +0100 perf: Allow perf_release() with !event->ctx In the err_file: fput(event_file) case, the event will not yet have been attached to a context. However perf_release() does assume it has been. Cure this. Tested-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174947.793996260@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 130056275ade730e7a79c110212c8815202773ee Author: Peter Zijlstra Date: Wed Feb 24 18:45:41 2016 +0100 perf: Do not double free In case of: err_file: fput(event_file), we'll end up calling perf_release() which in turn will free the event. Do not then free the event _again_. Tested-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174947.697350349@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 84c4e620d35f49f486a900af214ad12276afb386 Author: Peter Zijlstra Date: Wed Feb 24 18:45:40 2016 +0100 perf: Close install vs. exit race Consider the following scenario: CPU0 CPU1 ctx = find_get_ctx(); perf_event_exit_task_context() mutex_lock(&ctx->mutex); perf_install_in_context(ctx, ...); /* NO-OP */ mutex_unlock(&ctx->mutex); ... perf_release() WARN_ON_ONCE(event->state != STATE_EXIT); Since the event doesn't pass through perf_remove_from_context() because perf_install_in_context() NO-OPs because the ctx is dead, and perf_event_exit_task_context() will not observe the event because its not attached yet, the event->state will not be set. Solve this by revalidating ctx->task after we acquire ctx->mutex and failing the event creation as a whole. Tested-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dvyukov@google.com Cc: eranian@google.com Cc: oleg@redhat.com Cc: panand@redhat.com Cc: sasha.levin@oracle.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160224174947.626853419@infradead.org Signed-off-by: Ingo Molnar kernel/events/core.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) commit 3d44d51bd339766f0178f0cf2e8d048b4a4872aa Author: Andy Lutomirski Date: Wed Feb 24 12:18:49 2016 -0800 x86/entry/compat: Add missing CLAC to entry_INT80_32 This doesn't seem to fix a regression -- I don't think the CLAC was ever there. I double-checked in a debugger: entries through the int80 gate do not automatically clear AC. Stable maintainers: I can provide a backport to 4.3 and earlier if needed. This needs to be backported all the way to 3.10. Reported-by: Brian Gerst Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: # v3.10 and later Fixes: 63bcff2a307b ("x86, smap: Add STAC and CLAC instructions to control user space access") Link: http://lkml.kernel.org/r/b02b7e71ae54074be01fc171cbd4b72517055c0e.1456345086.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64_compat.S | 1 + 1 file changed, 1 insertion(+) commit ee50c130c82175eaa0820c96b6d3763928af2241 Author: Diego Viola Date: Tue Feb 23 12:04:04 2016 -0300 net: jme: fix suspend/resume on JMC260 The JMC260 network card fails to suspend/resume because the call to jme_start_irq() was too early, moving the call to jme_start_irq() after the call to jme_reset_link() makes it work. Prior this change suspend/resume would fail unless /sys/power/pm_async=0 was explicitly specified. Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351 Signed-off-by: Diego Viola Signed-off-by: David S. Miller drivers/net/ethernet/jme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3772e72720c6bfe1c1fc592ac3d6270559b4ce09 Merge: 870571a5 95664e6 Author: Dave Airlie Date: Thu Feb 25 13:17:50 2016 +1000 Merge branch 'linux-4.5' of git://github.com/skeggsb/linux into drm-fixes single for for eDP panel issues on Lenovo P50 * 'linux-4.5' of git://github.com/skeggsb/linux: drm/nouveau/disp/dp: ensure sink is powered up before attempting link training commit 95664e66fad964c3dd7945d6edfb1d0931844664 Author: Ben Skeggs Date: Thu Feb 18 08:14:19 2016 +1000 drm/nouveau/disp/dp: ensure sink is powered up before attempting link training This can happen under some annoying circumstances, and is a quick fix until more substantial changes can be made. Fixed eDP mode changes on (at least) the Lenovo P50. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/engine/disp/dport.c | 10 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/disp/dport.h | 6 ++++++ 2 files changed, 16 insertions(+) commit 870571a5698b2e9d0f4d2e5c6245967b582aab45 Author: Thierry Reding Date: Wed Feb 24 18:34:43 2016 +0100 drm/nouveau: platform: Fix deferred probe The error cleanup paths aren't quite correct and will crash upon deferred probe. Cc: stable@vger.kernel.org # v4.3+ Reviewed-by: Ben Skeggs Reviewed-by: Alexandre Courbot Signed-off-by: Thierry Reding Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_platform.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 40 ++++++++++++++++------ 2 files changed, 30 insertions(+), 12 deletions(-) commit d144dfea8af7108f613139623e63952ed7e69c0c Author: Peter Chen Date: Wed Feb 24 11:05:25 2016 +0800 usb: chipidea: otg: change workqueue ci_otg as freezable If we use USB ID pin as wakeup source, and there is a USB block device on this USB OTG (ID) cable, the system will be deadlock after system resume. The root cause for this problem is: the workqueue ci_otg may try to remove hcd before the driver resume has finished, and hcd will disconnect the device on it, then, it will call device_release_driver, and holds the device lock "dev->mutex", but it is never unlocked since it waits workqueue writeback to run to flush the block information, but the workqueue writeback is freezable, it is not thawed before driver resume has finished. When the driver (device: sd 0:0:0:0:) resume goes to dpm_complete, it tries to get its device lock "dev->mutex", but it can't get it forever, then the deadlock occurs. Below call stacks show the situation. So, in order to fix this problem, we need to change workqueue ci_otg as freezable, then the work item in this workqueue will be run after driver's resume, this workqueue will not be blocked forever like above case since the workqueue writeback has been thawed too. Tested at: i.mx6qdl-sabresd and i.mx6sx-sdb. [ 555.178869] kworker/u2:13 D c07de74c 0 826 2 0x00000000 [ 555.185310] Workqueue: ci_otg ci_otg_work [ 555.189353] Backtrace: [ 555.191849] [] (__schedule) from [] (schedule+0x48/0xa0) [ 555.198912] r10:ee471ba0 r9:00000000 r8:00000000 r7:00000002 r6:ee470000 r5:ee471ba4 [ 555.206867] r4:ee470000 [ 555.209453] [] (schedule) from [] (schedule_timeout+0x15c/0x1e0) [ 555.217212] r4:7fffffff r3:edc2b000 [ 555.220862] [] (schedule_timeout) from [] (wait_for_common+0x94/0x144) [ 555.229140] r8:00000000 r7:00000002 r6:ee470000 r5:ee471ba4 r4:7fffffff [ 555.235980] [] (wait_for_common) from [] (wait_for_completion+0x18/0x1c) [ 555.244430] r10:00000001 r9:c0b5563c r8:c0042e48 r7:ef086000 r6:eea4372c r5:ef131b00 [ 555.252383] r4:00000000 [ 555.254970] [] (wait_for_completion) from [] (flush_work+0x19c/0x234) [ 555.263177] [] (flush_work) from [] (flush_delayed_work+0x48/0x4c) [ 555.271106] r8:ed5b5000 r7:c0b38a3c r6:eea439cc r5:eea4372c r4:eea4372c [ 555.277958] [] (flush_delayed_work) from [] (bdi_unregister+0x84/0xec) [ 555.286236] r4:eea43520 r3:20000153 [ 555.289885] [] (bdi_unregister) from [] (blk_cleanup_queue+0x180/0x29c) [ 555.298250] r5:eea43808 r4:eea43400 [ 555.301909] [] (blk_cleanup_queue) from [] (__scsi_remove_device+0x48/0xb8) [ 555.310623] r7:00000000 r6:20000153 r5:ededa950 r4:ededa800 [ 555.316403] [] (__scsi_remove_device) from [] (scsi_forget_host+0x64/0x68) [ 555.325028] r5:ededa800 r4:ed5b5000 [ 555.328689] [] (scsi_forget_host) from [] (scsi_remove_host+0x78/0x104) [ 555.337054] r5:ed5b5068 r4:ed5b5000 [ 555.340709] [] (scsi_remove_host) from [] (usb_stor_disconnect+0x50/0xb4) [ 555.349247] r6:ed5b56e4 r5:ed5b5818 r4:ed5b5690 r3:00000008 [ 555.355025] [] (usb_stor_disconnect) from [] (usb_unbind_interface+0x78/0x25c) [ 555.363997] r8:c13919b4 r7:edd3c000 r6:edd3c020 r5:ee551c68 r4:ee551c00 r3:c04cdf7c [ 555.371892] [] (usb_unbind_interface) from [] (__device_release_driver+0x8c/0x118) [ 555.381213] r10:00000001 r9:edd90c00 r8:c13919b4 r7:ee551c68 r6:c0b546e0 r5:c0b5563c [ 555.389167] r4:edd3c020 [ 555.391752] [] (__device_release_driver) from [] (device_release_driver+0x28/0x34) [ 555.401071] r5:edd3c020 r4:edd3c054 [ 555.404721] [] (device_release_driver) from [] (bus_remove_device+0xe0/0x110) [ 555.413607] r5:edd3c020 r4:ef17f04c [ 555.417253] [] (bus_remove_device) from [] (device_del+0x114/0x21c) [ 555.425270] r6:edd3c028 r5:edd3c020 r4:ee551c00 r3:00000000 [ 555.431045] [] (device_del) from [] (usb_disable_device+0xa4/0x1e8) [ 555.439061] r8:edd3c000 r7:eded8000 r6:00000000 r5:00000001 r4:ee551c00 [ 555.445906] [] (usb_disable_device) from [] (usb_disconnect+0x74/0x224) [ 555.454271] r9:edd90c00 r8:ee551000 r7:ee551c68 r6:ee551c9c r5:ee551c00 r4:00000001 [ 555.462156] [] (usb_disconnect) from [] (usb_disconnect+0x1d8/0x224) [ 555.470259] r10:00000001 r9:edd90000 r8:ee471e2c r7:ee551468 r6:ee55149c r5:ee551400 [ 555.478213] r4:00000001 [ 555.480797] [] (usb_disconnect) from [] (usb_remove_hcd+0xa0/0x1ac) [ 555.488813] r10:00000001 r9:ee471eb0 r8:00000000 r7:ef3d9500 r6:eded810c r5:eded80b0 [ 555.496765] r4:eded8000 [ 555.499351] [] (usb_remove_hcd) from [] (host_stop+0x28/0x64) [ 555.506847] r6:eeb50010 r5:eded8000 r4:eeb51010 [ 555.511563] [] (host_stop) from [] (ci_otg_work+0xc4/0x124) [ 555.518885] r6:00000001 r5:eeb50010 r4:eeb502a0 r3:c04d4130 [ 555.524665] [] (ci_otg_work) from [] (process_one_work+0x194/0x420) [ 555.532682] r6:ef086000 r5:eeb502a0 r4:edc44480 [ 555.537393] [] (process_one_work) from [] (worker_thread+0x34/0x514) [ 555.545496] r10:edc44480 r9:ef086000 r8:c0b1a100 r7:ef086034 r6:00000088 r5:edc44498 [ 555.553450] r4:ef086000 [ 555.556032] [] (worker_thread) from [] (kthread+0xdc/0xf8) [ 555.563268] r10:00000000 r9:00000000 r8:00000000 r7:c004577c r6:edc44480 r5:eddc15c0 [ 555.571221] r4:00000000 [ 555.573804] [] (kthread) from [] (ret_from_fork+0x14/0x24) [ 555.581040] r7:00000000 r6:00000000 r5:c004b9d8 r4:eddc15c0 [ 553.429383] sh D c07de74c 0 694 691 0x00000000 [ 553.435801] Backtrace: [ 553.438295] [] (__schedule) from [] (schedule+0x48/0xa0) [ 553.445358] r10:edd3c054 r9:edd3c078 r8:edddbd50 r7:edcbbc00 r6:c1377c34 r5:60000153 [ 553.453313] r4:eddda000 [ 553.455896] [] (schedule) from [] (schedule_preempt_disabled+0x10/0x14) [ 553.464261] r4:edd3c058 r3:0000000a [ 553.467910] [] (schedule_preempt_disabled) from [] (mutex_lock_nested+0x1a0/0x3e8) [ 553.477254] [] (mutex_lock_nested) from [] (dpm_complete+0xc0/0x1b0) [ 553.485358] r10:00561408 r9:edd3c054 r8:c0b4863c r7:edddbd90 r6:c0b485d8 r5:edd3c020 [ 553.493313] r4:edd3c0d0 [ 553.495896] [] (dpm_complete) from [] (dpm_resume_end+0x1c/0x20) [ 553.503652] r9:00000000 r8:c0b1a9d0 r7:c1334ec0 r6:c1334edc r5:00000003 r4:00000010 [ 553.511544] [] (dpm_resume_end) from [] (suspend_devices_and_enter+0x158/0x504) [ 553.520604] r4:00000000 r3:c1334efc [ 553.524250] [] (suspend_devices_and_enter) from [] (pm_suspend+0x234/0x2cc) [ 553.532961] r10:00561408 r9:ed6b7300 r8:00000004 r7:c1334eec r6:00000000 r5:c1334ee8 [ 553.540914] r4:00000003 [ 553.543493] [] (pm_suspend) from [] (state_store+0x6c/0xc0) [ 555.703684] 7 locks held by kworker/u2:13/826: [ 555.708140] #0: ("%s""ci_otg"){++++.+}, at: [] process_one_work+0x128/0x420 [ 555.716277] #1: ((&ci->work)){+.+.+.}, at: [] process_one_work+0x128/0x420 [ 555.724317] #2: (usb_bus_list_lock){+.+.+.}, at: [] usb_remove_hcd+0x98/0x1ac [ 555.732626] #3: (&dev->mutex){......}, at: [] usb_disconnect+0x48/0x224 [ 555.740403] #4: (&dev->mutex){......}, at: [] usb_disconnect+0x48/0x224 [ 555.748179] #5: (&dev->mutex){......}, at: [] device_release_driver+0x20/0x34 [ 555.756487] #6: (&shost->scan_mutex){+.+.+.}, at: [] scsi_remove_host+0x20/0x104 Cc: #v3.14+ Cc: Jun Li Signed-off-by: Peter Chen drivers/usb/chipidea/otg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0378ba4899d5fbd8494ed6580cbc81d7b44dbac6 Author: Geert Uytterhoeven Date: Wed Feb 24 09:43:23 2016 +0100 drivers: sh: Restore legacy clock domain on SuperH platforms CONFIG_ARCH_SHMOBILE is not only enabled for Renesas ARM platforms (which are DT based and multi-platform), but also on a select set of Renesas SuperH platforms (SH7722/SH7723/SH7724/SH7343/SH7366). Hence since commit 0ba58de231066e47 ("drivers: sh: Get rid of CONFIG_ARCH_SHMOBILE_MULTI"), the legacy clock domain is no longer installed on these SuperH platforms, and module clocks may not be enabled when needed, leading to driver failures. To fix this, add an additional check for CONFIG_OF. Fixes: 0ba58de231066e47 ("drivers: sh: Get rid of CONFIG_ARCH_SHMOBILE_MULTI"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/sh/pm_runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 398cb0c93b18b625703db30d874351e6d4cc645a Merge: ad00a57 9b18572 Author: Dave Airlie Date: Thu Feb 25 08:22:43 2016 +1000 Merge tag 'drm-intel-fixes-2016-02-22' of git://anongit.freedesktop.org/drm-intel into drm-fixes This is a bit large, but it really helps Skylake bugs we are seeing on a number of laptops. Most of the commits are quite similar, ensuring the display power doesn't vanish under us during hardware access. Also do note that it's not just Skylake that's affected. * tag 'drm-intel-fixes-2016-02-22' of git://anongit.freedesktop.org/drm-intel: drm/i915/gen9: Verify and enforce dc6 state writes drm/i915/gen9: Check for DC state mismatch drm/i915/skl: Ensure HW is powered during DDB HW state readout drm/i915/lvds: Ensure the HW is powered during HW state readout drm/i915/hdmi: Ensure the HW is powered during HW state readout drm/i915/dsi: Ensure the HW is powered during HW state readout drm/i915/dp: Ensure the HW is powered during HW state readout drm/i915: Ensure the HW is powered when accessing the CRC HW block drm/i915/ddi: Ensure the HW is powered during HW state readout drm/i915/crt: Ensure the HW is powered during HW state readout drm/i915: Ensure the HW is powered during HW access in assert_pipe drm/i915: Ensure the HW is powered when disabling VGA drm/i915/ibx: Ensure the HW is powered during PLL HW readout drm/i915: Ensure the HW is powered during display pipe HW readout drm/i915: Add helper to get a display power ref if it was already enabled commit ad00a57ad78f33590b392eabcacb0e1d57b640a1 Merge: 84e54c4 6378076 Author: Dave Airlie Date: Thu Feb 25 08:21:33 2016 +1000 Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A few radeon and amdgpu fixes for 4.5. A few further fixes for the vblank regressions in 4.4 and a couple of other minor fixes. * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: disable direct VM updates when vm_debug is set amdgpu: fix NULL pointer dereference at tonga_check_states_equal drm/radeon/pm: adjust display configuration after powerstate drm/amdgpu/pm: adjust display configuration after powerstate drm/amdgpu/pm: add some checks for PX drm/amdgpu: fix locking in force performance level drm/amdgpu/gfx8: fix priv reg interrupt enable drm/amdgpu: Don't hang in amdgpu_flip_work_func on disabled crtc. drm/radeon: Don't hang in radeon_flip_work_func on disabled crtc. (v2) commit 6dc390ad61ac8dfca5fa9b0823981fb6f7ec17a0 Merge: aa263c4 9ef2d8b Author: Linus Torvalds Date: Wed Feb 24 14:06:17 2016 -0800 Merge tag 'arc-4.5-rc6-fixes-upd' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - Fix for csd deadlock due to missing self IPI - Accompanying IPI cleanups / optimization - Brown paper bag bug in one of the cleanups above - Boot reporting updates for new hardware features - Don't force DEVTMPFS if INITRAMFS * tag 'arc-4.5-rc6-fixes-upd' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: arc: SMP: CONFIG_ARC_IPI_DBG cleanup ARC: SMP: No need for CONFIG_ARC_IPI_DBG ARCv2: Elide sending new cross core intr if receiver didn't ack prev ARCv2: SMP: Push IPI_IRQ into IPI provider ARC: [intc-compact] Remove IPI setup from ARCompact port ARCv2: SMP: Emulate IPI to self using software triggered interrupt arc: get rid of DEVTMPFS dependency on INITRAMFS_SOURCE ARCv2: boot report CCMs (Closely Coupled Memories) ARCv2: boot print Low Latency Memory ARC: Assume multiplier is always present commit aa263c43fee300af018aec437dbd64570ec65825 Merge: 2ac015e 7ae8fd0 Author: Linus Torvalds Date: Wed Feb 24 14:00:26 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Assorted fixes - xattr one from this cycle, the rest - stable fodder" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/pnode.c: treat zero mnt_group_id-s as unequal affs_do_readpage_ofs(): just use kmap_atomic() around memcpy() xattr handlers: plug a lock leak in simple_xattr_list fs: allow no_seek_end_llseek to actually seek commit 25ac3417b79b0aafd2401c96503716901be4533b Merge: 2da897e b860715 Author: David S. Miller Date: Wed Feb 24 16:58:12 2016 -0500 Merge tag 'mac80211-for-davem-2016-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Another small set of fixes: * stop critical protocol session on disconnect to avoid it getting stuck * wext: fix two RTNL message ordering issues * fix an uninitialized value (found by KASAN) * fix an out-of-bounds access (also found by KASAN) * clear connection keys when freeing them in all cases (IBSS, all other places already did so) * fix expected throughput unit to get consistent values * set default TX aggregation timeout to 0 in minstrel to avoid (really just hide) issues and perform better ==================== Signed-off-by: David S. Miller commit 2da897e51d7f23f872224218b9a4314503b0d360 Author: Daniel Borkmann Date: Tue Feb 23 02:05:26 2016 +0100 bpf: fix csum setting for bpf_set_tunnel_key The fix in 35e2d1152b22 ("tunnels: Allow IPv6 UDP checksums to be correctly controlled.") changed behavior for bpf_set_tunnel_key() when in use with IPv6 and thus uncovered a bug that TUNNEL_CSUM needed to be set but wasn't. As a result, the stack dropped ingress vxlan IPv6 packets, that have been sent via eBPF through collect meta data mode due to checksum now being zero. Since after LCO, we enable IPv4 checksum by default, so make that analogous and only provide a flag BPF_F_ZERO_CSUM_TX for the user to turn it off in IPv4 case. Fixes: 35e2d1152b22 ("tunnels: Allow IPv6 UDP checksums to be correctly controlled.") Fixes: c6c33454072f ("bpf: support ipv6 for bpf_skb_{set,get}_tunnel_key") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 3 +++ net/core/filter.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit cd8140c673d9ba9be3591220e1b2226d9e1e40d3 Author: Ilya Dryomov Date: Fri Feb 19 11:38:57 2016 +0100 libceph: don't spam dmesg with stray reply warnings Commit d15f9d694b77 ("libceph: check data_len in ->alloc_msg()") mistakenly bumped the log level on the "tid %llu unknown, skipping" message. Turn it back into a dout() - stray replies are perfectly normal when OSDs flap, crash, get killed for testing purposes, etc. Cc: stable@vger.kernel.org # 4.3+ Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/osd_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbc0d3caff5b7591e0cf8e34ca686ca6f4479ee1 Author: Ilya Dryomov Date: Fri Feb 19 11:38:57 2016 +0100 libceph: use the right footer size when skipping a message ceph_msg_footer is 21 bytes long, while ceph_msg_footer_old is only 13. Don't skip too much when CEPH_FEATURE_MSG_AUTH isn't negotiated. Cc: stable@vger.kernel.org # 3.19+ Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/messenger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e7a88e82fe380459b864e05b372638aeacb0f52d Author: Ilya Dryomov Date: Wed Feb 17 20:04:08 2016 +0100 libceph: don't bail early from try_read() when skipping a message The contract between try_read() and try_write() is that when called each processes as much data as possible. When instructed by osd_client to skip a message, try_read() is violating this contract by returning after receiving and discarding a single message instead of checking for more. try_write() then gets a chance to write out more requests, generating more replies/skips for try_read() to handle, forcing the messenger into a starvation loop. Cc: stable@vger.kernel.org # 3.10+ Reported-by: Varada Kari Signed-off-by: Ilya Dryomov Tested-by: Varada Kari Reviewed-by: Alex Elder net/ceph/messenger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8c4a2522a0808c5c2143612909717d1115c40cf Author: Hannes Frederic Sowa Date: Mon Feb 22 18:43:25 2016 +0100 ipv4: only create late gso-skb if skb is already set up with CHECKSUM_PARTIAL Otherwise we break the contract with GSO to only pass CHECKSUM_PARTIAL skbs down. This can easily happen with UDP+IPv4 sockets with the first MSG_MORE write smaller than the MTU, second write is a sendfile. Returning -EOPNOTSUPP lets the callers fall back into normal sendmsg path, were we calculate the checksum manually during copying. Commit d749c9cbffd6 ("ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked sockets") started to exposes this bug. Fixes: d749c9cbffd6 ("ipv4: no CHECKSUM_PARTIAL on MSG_MORE corked sockets") Reported-by: Jiri Benc Cc: Jiri Benc Reported-by: Wakko Warner Cc: Wakko Warner Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv4/ip_output.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2ac015e293bbe3858533009612eac58842daf325 Author: Kirill A. Shutemov Date: Wed Feb 24 18:58:03 2016 +0300 thp: call pmdp_invalidate() with correct virtual address Sebastian Ott and Gerald Schaefer reported random crashes on s390. It was bisected to my THP refcounting patchset. The problem is that pmdp_invalidated() called with wrong virtual address. It got offset up by HPAGE_PMD_SIZE by loop over ptes. The solution is to introduce new variable to be used in loop and don't touch 'haddr'. Signed-off-by: Kirill A. Shutemov Reported-and-tested-by: Gerald Schaefer Reported-and-tested-by Sebastian Ott Reviewed-by: Will Deacon Cc: Christian Borntraeger Cc: Martin Schwidefsky Cc: Aneesh Kumar K.V Cc: Andrea Arcangeli Cc: Sasha Levin Cc: Jerome Marchand Cc: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 6378076bcfdcd1d4f8d726d08d3fa044736873eb Author: Christian König Date: Fri Feb 19 10:03:03 2016 +0100 drm/amdgpu: disable direct VM updates when vm_debug is set That should make user space bugs more obvious. Signed-off-by: Christian König Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 827108d08070c7515c14eb47e5fa03f59cfe38cf Author: Bradley Pankow Date: Mon Feb 22 20:11:47 2016 -0500 amdgpu: fix NULL pointer dereference at tonga_check_states_equal The event_data passed from pem_fini was not cleared upon initialization. This caused NULL checks to pass and cast_const_phw_tonga_power_state to attempt to dereference an invalid pointer. Clear the event_data in pem_init and pem_fini before calling pem_handle_event. Reviewed-by: Rex Zhu Signed-off-by: Bradley Pankow Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd451b90e78c4178bcfc5072f2b2b637500c109a Author: Marc Zyngier Date: Wed Feb 17 10:25:05 2016 +0000 arm64: KVM: vgic-v3: Restore ICH_APR0Rn_EL2 before ICH_APR1Rn_EL2 The GICv3 architecture spec says: Writing to the active priority registers in any order other than the following order will result in UNPREDICTABLE behavior: - ICH_AP0R_EL2. - ICH_AP1R_EL2. So let's not pointlessly go against the rule... Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/vgic-v3-sr.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 428b315a2475d614d6efbdbeaa13f3977416b21a Merge: e5bdfd5 3b24351 Author: Greg Kroah-Hartman Date: Wed Feb 24 09:04:21 2016 -0800 Merge tag 'fixes-for-v4.5-rc6' of http://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.5-rc6 The most important fixes here are: a) yet another fix to dwc3's EP transfer resource assignment logic. This time around we will be pre-allocating transfer resources to avoid any future issues; b) two DMA fixes for the old MUSB driver. c) dwc2's data toggle fix for FS Other than these, we have a few other minor fixes elsewhere. commit d877a214d54619762ae86114fbd04932002ffecd Merge: 7931845 901c5ff Author: Olof Johansson Date: Wed Feb 24 08:48:22 2016 -0800 Merge tag 'renesas-soc-fixes-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Renesas ARM Based SoC Fixes for v4.5 * Avoid writing to .text * tag 'renesas-soc-fixes-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Remove shmobile_boot_arg ARM: shmobile: Move shmobile_smp_{mpidr, fn, arg}[] from .text to .bss ARM: shmobile: r8a7779: Remove remainings of removed SCU boot setup code ARM: shmobile: Move shmobile_scu_base from .text to .bss Signed-off-by: Olof Johansson commit c7dfe3abf40ec9a298884a4c0775062eac27afc9 Author: Sebastian Frias Date: Mon Feb 22 13:33:14 2016 +0100 net: ethernet: nb8800: support fixed-link DT node Under some circumstances, e.g. when connecting to a switch, the ethernet port will not be connected to a PHY. In that case a "fixed-link" DT node can be used to replace it. https://stackoverflow.com/questions/31046172/device-tree-for-phy-less-connection-to-a-dsa-switch This patch adds support for the "fixed-link" node to the nb8800 driver. Signed-off-by: Sebastian Frias Acked-by: Mans Rullgard Cc: Mason Signed-off-by: David S. Miller drivers/net/ethernet/aurora/nb8800.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit d045437a169f899dfb0f6f7ede24cc042543ced9 Author: Steven Rostedt (Red Hat) Date: Wed Feb 24 09:04:24 2016 -0500 tracing: Fix showing function event in available_events The ftrace:function event is only displayed for parsing the function tracer data. It is not used to enable function tracing, and does not include an "enable" file in its event directory. Originally, this event was kept separate from other events because it did not have a ->reg parameter. But perf added a "reg" parameter for its use which caused issues, because it made the event available to functions where it was not compatible for. Commit 9b63776fa3ca9 "tracing: Do not enable function event with enable" added a TRACE_EVENT_FL_IGNORE_ENABLE flag that prevented the function event from being enabled by normal trace events. But this commit missed keeping the function event from being displayed by the "available_events" directory, which is used to show what events can be enabled by set_event. One documented way to enable all events is to: cat available_events > set_event But because the function event is displayed in the available_events, this now causes an INVALID error: cat: write error: Invalid argument Reported-by: Chunyu Hu Fixes: 9b63776fa3ca9 "tracing: Do not enable function event with enable" Cc: stable@vger.kernel.org # 3.4+ Signed-off-by: Steven Rostedt kernel/trace/trace_events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d7444794a02ff655eda87e3cc54e86b940e7736f Author: Christian Borntraeger Date: Fri Feb 19 13:11:46 2016 +0100 KVM: async_pf: do not warn on page allocation failures In async_pf we try to allocate with NOWAIT to get an element quickly or fail. This code also handle failures gracefully. Lets silence potential page allocation failures under load. qemu-system-s39: page allocation failure: order:0,mode:0x2200000 [...] Call Trace: ([<00000000001146b8>] show_trace+0xf8/0x148) [<000000000011476a>] show_stack+0x62/0xe8 [<00000000004a36b8>] dump_stack+0x70/0x98 [<0000000000272c3a>] warn_alloc_failed+0xd2/0x148 [<000000000027709e>] __alloc_pages_nodemask+0x94e/0xb38 [<00000000002cd36a>] new_slab+0x382/0x400 [<00000000002cf7ac>] ___slab_alloc.constprop.30+0x2dc/0x378 [<00000000002d03d0>] kmem_cache_alloc+0x160/0x1d0 [<0000000000133db4>] kvm_setup_async_pf+0x6c/0x198 [<000000000013dee8>] kvm_arch_vcpu_ioctl_run+0xd48/0xd58 [<000000000012fcaa>] kvm_vcpu_ioctl+0x372/0x690 [<00000000002f66f6>] do_vfs_ioctl+0x3be/0x510 [<00000000002f68ec>] SyS_ioctl+0xa4/0xb8 [<0000000000781c5e>] system_call+0xd6/0x264 [<000003ffa24fa06a>] 0x3ffa24fa06a Cc: stable@vger.kernel.org Signed-off-by: Christian Borntraeger Reviewed-by: Dominik Dingel Signed-off-by: Paolo Bonzini virt/kvm/async_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c1d77f4ba5cc9c05a29adca3d6466cdf4969b70 Author: Paolo Bonzini Date: Fri Feb 19 18:07:21 2016 +0100 KVM: x86: fix conversion of addresses to linear in 32-bit protected mode Commit e8dd2d2d641c ("Silence compiler warning in arch/x86/kvm/emulate.c", 2015-09-06) broke boot of the Hurd. The bug is that the "default:" case actually could modify "la", but after the patch this change is not reflected in *linear. The bug is visible whenever a non-zero segment base causes the linear address to wrap around the 4GB mark. Fixes: e8dd2d2d641cb2724ee10e76c0ad02e04289c017 Cc: stable@vger.kernel.org Reported-by: Aurelien Jarno Tested-by: Aurelien Jarno Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 172b2386ed16a9143d9a456aae5ec87275c61489 Author: Paolo Bonzini Date: Wed Feb 10 17:50:23 2016 +0100 KVM: x86: fix missed hardware breakpoints Sometimes when setting a breakpoint a process doesn't stop on it. This is because the debug registers are not loaded correctly on VCPU load. The following simple reproducer from Oleg Nesterov tries using debug registers in two threads. To see the bug, run a 2-VCPU guest with "taskset -c 0" and run "./bp 0 1" inside the guest. #include #include #include #include #include #include #include #include #include #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) unsigned long encode_dr7(int drnum, int enable, unsigned int type, unsigned int len) { unsigned long dr7; dr7 = ((len | type) & 0xf) << (DR_CONTROL_SHIFT + drnum * DR_CONTROL_SIZE); if (enable) dr7 |= (DR_GLOBAL_ENABLE << (drnum * DR_ENABLE_SIZE)); return dr7; } int write_dr(int pid, int dr, unsigned long val) { return ptrace(PTRACE_POKEUSER, pid, offsetof (struct user, u_debugreg[dr]), val); } void set_bp(pid_t pid, void *addr) { unsigned long dr7; assert(write_dr(pid, 0, (long)addr) == 0); dr7 = encode_dr7(0, 1, DR_RW_EXECUTE, DR_LEN_1); assert(write_dr(pid, 7, dr7) == 0); } void *get_rip(int pid) { return (void*)ptrace(PTRACE_PEEKUSER, pid, offsetof(struct user, regs.rip), 0); } void test(int nr) { void *bp_addr = &&label + nr, *bp_hit; int pid; printf("test bp %d\n", nr); assert(nr < 16); // see 16 asm nops below pid = fork(); if (!pid) { assert(ptrace(PTRACE_TRACEME, 0,0,0) == 0); kill(getpid(), SIGSTOP); for (;;) { label: asm ( "nop; nop; nop; nop;" "nop; nop; nop; nop;" "nop; nop; nop; nop;" "nop; nop; nop; nop;" ); } } assert(pid == wait(NULL)); set_bp(pid, bp_addr); for (;;) { assert(ptrace(PTRACE_CONT, pid, 0, 0) == 0); assert(pid == wait(NULL)); bp_hit = get_rip(pid); if (bp_hit != bp_addr) fprintf(stderr, "ERR!! hit wrong bp %ld != %d\n", bp_hit - &&label, nr); } } int main(int argc, const char *argv[]) { while (--argc) { int nr = atoi(*++argv); if (!fork()) test(nr); } while (wait(NULL) > 0) ; return 0; } Cc: stable@vger.kernel.org Suggested-by: Nadav Amit Reported-by: Andrey Wagin Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) commit e249714571db26cdb1ae8df7ed39971bafa041a7 Author: Rafael J. Wysocki Date: Wed Feb 24 13:55:38 2016 +0100 Revert "ACPI, PCI, irq: remove interrupt count restriction" Revert commit b5bd02695471 (ACPI, PCI, irq: remove interrupt count restriction) that introduced a boot regression on some systems where it caused kmalloc() to be used too early. Link: http://marc.info/?l=linux-acpi&m=145580159209240&w=2 Reported-by: Nalla, Ravikanth Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 136 ++++++++++++------------------------------------ 1 file changed, 34 insertions(+), 102 deletions(-) commit 5ec5d10682745d3280a37e8ffee1ddcd37ecfa94 Author: Rafael J. Wysocki Date: Wed Feb 24 13:53:46 2016 +0100 Revert "ACPI / PCI: Simplify acpi_penalize_isa_irq()" Revert commit 0971686954f9 "ACPI / PCI: Simplify acpi_penalize_isa_irq()" that depends on commit b5bd02695471 (ACPI, PCI, irq: remove interrupt count restriction) which introduced a regression and needs to be reverted for this reason. Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 1d6a821277aaa0cdd666278aaff93298df313d41 Author: Marc Zyngier Date: Mon Feb 15 17:04:04 2016 +0000 arm/arm64: KVM: Feed initialized memory to MMIO accesses On an MMIO access, we always copy the on-stack buffer info the shared "run" structure, even if this is a read access. This ends up leaking up to 8 bytes of uninitialized memory into userspace, depending on the size of the access. An obvious fix for this one is to only perform the copy if this is an actual write. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/mmio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9ef2d8be55652804205a34dcbfec78b933c0ea30 Author: Valentin Rothberg Date: Wed Feb 24 09:40:22 2016 +0100 arc: SMP: CONFIG_ARC_IPI_DBG cleanup Previous Commit ("ARC: SMP: No need for CONFIG_ARC_IPI_DBG") removed the Kconfig option ARC_IPI_DBG. Remove the last reference on this option. Signed-off-by: Valentin Rothberg Signed-off-by: Vineet Gupta arch/arc/kernel/mcip.c | 5 ----- 1 file changed, 5 deletions(-) commit 79318452cb36678bde20d384dc3eab537d930d3e Author: Carlo Caione Date: Tue Feb 23 10:43:11 2016 +0100 MAINTAINERS: Extend info, add wiki and ml for meson arch Update the maintainers info with wiki and mailing list for the meson platform. Fix a wrong file attribution and add maintainership for the generic meson platforms. Signed-off-by: Carlo Caione Signed-off-by: Olof Johansson MAINTAINERS | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9fa6c2b1aa7f6b05cd96a0d6bec499c9aef45479 Merge: a9e5547 3f315c5 Author: Olof Johansson Date: Wed Feb 24 00:10:11 2016 -0800 Merge tag 'omap-for-v4.5/fixes-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Two omap fixes for omaps against v4.5-rc5: - Yet another fix for n900 onenand to avoid corruption. This time to fix the issue of mounting onenand back and forth between the original maemo kernel and mainline Linux kernel. And it also seems there will be two more fixes coming via the MTD tree as issues were discovered also in the onenand driver during testing. - Revert tps65217 regulator clean up as it breaks MMC for am335x variants. The proper way to clean this up is just to rename the tps65217.dtsi file into tps65217-am335x.dtsi as a similar setup is used on many am335x boards. * tag 'omap-for-v4.5/fixes-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix onenand initialization to avoid filesystem corruption Revert "regulator: tps65217: remove tps65217.dtsi file" Signed-off-by: Olof Johansson commit a9e5547b1908ee282b875470a08c96acf17656d6 Author: Antoine Tenart Date: Mon Feb 22 14:22:30 2016 +0100 MAINTAINERS: alpine: add a new maintainer and update the entry Add myself as a co-maintainer for the Alpine support. Also update the entry to take in account Alpine ARM64 boards, Alpine ARM device trees and Alpine-specific drivers. Signed-off-by: Antoine Tenart Acked-by: Tsahee Zidenberg Signed-off-by: Olof Johansson MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit 5e45a2589d24573c564630990c88ac93659f8fe4 Author: Ludovic Desroches Date: Fri Feb 19 20:21:17 2016 +0100 ARM: at91/dt: fix typo in sama5d2 pinmux descriptions PIN_PA15 macro has the same value as PIN_PA14 so we were overriding PA14 mux/configuration. Signed-off-by: Ludovic Desroches Reported-by: Cyrille Pitchen Fixes: 7f16cb676c00 ("ARM: at91/dt: add sama5d2 pinmux") Cc: # v4.4+ Signed-off-by: Alexandre Belloni Signed-off-by: Olof Johansson arch/arm/boot/dts/sama5d2-pinfunc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b223c9f59389a7802c47ea4c6889dccb2f1a1a60 Merge: e3acd74 f5d0ca2 Author: Olof Johansson Date: Wed Feb 24 00:05:58 2016 -0800 Merge tag 'imx-fixes-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes The i.MX fixes for v4.5: - Drop the bogus interrupt-parent from i.MX6 CAAM node, which leads to the CAAM IRQs not getting unmasked at the GPC level. * tag 'imx-fixes-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6: remove bogus interrupt-parent from CAAM node Signed-off-by: Olof Johansson commit e3acd74f9268a713b08d5461567cd8bfe47054f7 Merge: 74a46ec cf26f11 Author: Olof Johansson Date: Wed Feb 24 00:05:11 2016 -0800 Merge tag 'omap-for-v4.5/fixes-rc3-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Few fixes for omaps against v4.5-rc3: - Improve omap_device error message to tell driver writers what is wrong after commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind"). There will be also a handful of driver related fixes also queued separately. But adding this error message makes it easy to fix any omap_device using drivers suffering from this issue so I think it's important to have. - Also related to commit 5de85b9d57ab discussion, let's fix a bug where disabling PM runtime via sysfs will also cause the hardware state to be different from PM runtime state. - Fix audio clocks for beagle-x15. - Use wakeup-source instead of gpio-key,wakeup for the new entries that sneaked in during the merge window. - Fix a legacy booting vs device tree based booting regression for n900 where the legacy user space expects to have the device revision available in /proc/atags also when booted with device tree. * tag 'omap-for-v4.5/fixes-rc3-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix omap_device for module reload on PM runtime forbid ARM: OMAP2+: Improve omap_device error for driver writers ARM: DTS: am57xx-beagle-x15: Select SYS_CLK2 for audio clocks ARM: dts: am335x/am57xx: replace gpio-key,wakeup with wakeup-source property ARM: OMAP2+: Set system_rev from ATAGS for n900 Signed-off-by: Olof Johansson commit 74a46ec6fbc1b410f3cbf897d3802c0bf554ea5a Merge: 81f70ba 44361a2 Author: Olof Johansson Date: Tue Feb 23 23:59:29 2016 -0800 Merge tag 'mvebu-fixes-4.5-2' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.5 (part 2) - Fix the missing mtd flash on linkstation lswtgl - Use unique machine name for the kirkwood ds112 (for Debian flash-kernel tool) * tag 'mvebu-fixes-4.5-2' of git://git.infradead.org/linux-mvebu: ARM: dts: orion5x: fix the missing mtd flash on linkstation lswtgl ARM: dts: kirkwood: use unique machine name for ds112 Signed-off-by: Olof Johansson commit 04d1d281dcfe683a53cddfab8371fc8bb302b069 Author: Andy Lutomirski Date: Tue Feb 23 13:19:29 2016 -0800 x86/entry/32: Add an ASM_CLAC to entry_SYSENTER_32 Both before and after 5f310f739b4c ("x86/entry/32: Re-implement SYSENTER using the new C path"), we relied on a uaccess very early in the SYSENTER path to clear AC. After that change, though, we can potentially make it all the way into C code with AC set, which enlarges the attack surface for SMAP bypass by doing SYSENTER with AC set. Strengthen the SMAP protection by addding the missing ASM_CLAC right at the beginning. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3e36be110724896e32a4a1fe73bacb349d3cba94.1456262295.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 1 + 1 file changed, 1 insertion(+) commit d73b73f5626ac0b131b31b7b9457e19201bc570b Author: Vineet Gupta Date: Fri Feb 19 08:18:11 2016 +0530 ARC: SMP: No need for CONFIG_ARC_IPI_DBG This was more relevant during SMP bringup. The warning for bogus msg better be visible always. Signed-off-by: Vineet Gupta arch/arc/Kconfig | 8 -------- arch/arc/kernel/mcip.c | 9 +-------- arch/arc/kernel/smp.c | 3 --- 3 files changed, 1 insertion(+), 19 deletions(-) commit 3dea30ca5bef0e013abe857057a952a9d6757fe5 Author: Vineet Gupta Date: Fri Feb 19 07:57:41 2016 +0530 ARCv2: Elide sending new cross core intr if receiver didn't ack prev ARConnect/MCIP IPI sending has a retry-wait loop in case caller had not seen a previous such interrupt. Turns out that it is not needed at all. Linux cross core calling allows coalescing multiple IPIs to same receiver - it is fine as long as there is one. This logic is built into upper layer already, at a higher level of abstraction. ipi_send_msg_one() sets the actual msg payload, but it only calls MCIP IPI sending if msg holder was empty (using atomic-set-new-and-get-old construct). Thus it is unlikely that the retry-wait looping was ever getting exercised at all. Cc: Chuck Jordan Cc: Peter Zijlstra Signed-off-by: Vineet Gupta arch/arc/kernel/mcip.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 9681787930cec7cee77db0a93c747153ef962b8a Author: Vineet Gupta Date: Tue Feb 23 13:35:12 2016 +0530 ARCv2: SMP: Push IPI_IRQ into IPI provider Signed-off-by: Vineet Gupta arch/arc/include/asm/irq.h | 1 - arch/arc/kernel/mcip.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit dbcbc7e7cee15058fdb9696b2b38c692680fc413 Author: Vineet Gupta Date: Thu Jan 28 12:48:05 2016 +0530 ARC: [intc-compact] Remove IPI setup from ARCompact port There is no real ARC700 based SMP SoC so remove IPI definition. EZChip's SMP ARC700 is going to use a different intc and IPI provider anyways. Signed-off-by: Vineet Gupta arch/arc/include/asm/irq.h | 1 - arch/arc/kernel/intc-compact.c | 3 --- 2 files changed, 4 deletions(-) commit bb143f814ea488769ca2e79e0b376139cb5f134b Author: Vineet Gupta Date: Tue Feb 23 11:55:16 2016 +0530 ARCv2: SMP: Emulate IPI to self using software triggered interrupt ARConnect/MCIP Inter-Core-Interrupt module can't send interrupt to local core. So use core intc capability to trigger software interrupt to self, using an unsued IRQ #21. This showed up as csd deadlock with LTP trace_sched on a dual core system. This test acts as scheduler fuzzer, triggering all sorts of schedulting activity. Trouble starts with IPI to self, which doesn't get delivered (effectively lost due to H/w capability), but the msg intended to be sent remain enqueued in per-cpu @ipi_data. All subsequent IPIs to this core from other cores get elided due to the IPI coalescing optimization in ipi_send_msg_one() where a pending msg implies an IPI already sent and assumes other core is yet to ack it. After the elided IPI, other core simply goes into csd_lock_wait() but never comes out as this core never sees the interrupt. Fixes STAR 9001008624 Cc: Peter Zijlstra Cc: [4.2] Signed-off-by: Vineet Gupta arch/arc/include/asm/irqflags-arcv2.h | 11 +++++++++++ arch/arc/kernel/entry-arcv2.S | 11 ++++++----- arch/arc/kernel/mcip.c | 15 +++++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) commit 7c139db2e579669c3313f92d2dd2256b255fcc07 Author: Andreas Irestål Date: Tue Feb 16 13:56:41 2016 +0100 ASoC: adau17x1: Fix incorrect BCLK ratio definitions Signed-off-by: Andreas Irestål Signed-off-by: Mark Brown sound/soc/codecs/adau17x1.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit da9b9303ed8d1673a89a4bdd85464e33614775e3 Author: Robert Jarzmik Date: Mon Feb 22 23:35:44 2016 +0100 ASoC: wm9713: fix regmap free path In the conversion to regmap, I assumed that the devm_() variant could be used in the soc probe function. As a mater of fact with the current code the regmap is freed twice because of the devm_() call: (mutex_lock) from [] (debugfs_remove_recursive+0x50/0x1d0) (debugfs_remove_recursive) from [] (regmap_debugfs_exit+0x1c/0xd4) (regmap_debugfs_exit) from [] (regmap_exit+0x28/0xc8) (regmap_exit) from [] (release_nodes+0x18c/0x204) (release_nodes) from [] (device_release+0x18/0x90) (device_release) from [] (kobject_release+0x90/0x1bc) (kobject_release) from [] (wm9713_soc_remove+0x1c/0x24) (wm9713_soc_remove) from [] (soc_remove_component+0x50/0x7c) (soc_remove_component) from [] (soc_remove_dai_links+0x118/0x228) (soc_remove_dai_links) from [] (snd_soc_register_card+0x4e4/0xdd4) (snd_soc_register_card) from [] (devm_snd_soc_register_card+0x34/0x70) Fix this by replacing the devm_regmap initialization code with the non devm_() variant. Fixes: 700dadfefc3d ASoC: wm9713: convert to regmap Signed-off-by: Robert Jarzmik Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm9713.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84e54c46b2f440a365a5224f1e5f173a462b7cca Merge: 0ecdcd3 4328daa Author: Linus Torvalds Date: Tue Feb 23 19:03:43 2016 -0800 Merge tag 'dm-4.5-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fix from Mike Snitzer: "Fix a 112 byte leak for each IO request that is requeued while DM multipath is handling faults due to path failures. This leak does not happen if blk-mq DM multipath is used. It only occurs if .request_fn DM multipath is stacked ontop of blk-mq paths (e.g. scsi-mq devices)" * tag 'dm-4.5-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: fix dm_rq_target_io leak on faults with .request_fn DM w/ blk-mq paths commit 0ecdcd3a520b99287d0573df4feb43bdceb44b87 Merge: 420eb6d 814a3c0 Author: Linus Torvalds Date: Tue Feb 23 18:54:58 2016 -0800 Merge tag 'mmc-v4.5-rc4' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fix from Ulf Hansson: "Here's an mmc fix intended for v4.5 rc6. MMC host: - omap_hsmmc: Fix PM regression for deferred probe" * tag 'mmc-v4.5-rc4' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: omap_hsmmc: Fix PM regression with deferred probe for pm_runtime_reinit commit c45442055dfdeb265cc20c9eeaa9fd11a75fbf51 Author: Arnd Bergmann Date: Mon Feb 22 22:58:34 2016 +0100 nvdimm: use 'u64' for pfn flags A recent bugfix changed pfn_t to always be 64-bit wide, but did not change the code in pmem.c, which is now broken on 32-bit architectures as reported by gcc: In file included from ../drivers/nvdimm/pmem.c:28:0: drivers/nvdimm/pmem.c: In function 'pmem_alloc': include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow] #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3)) This changes the intermediate pfn_flags in struct pmem_device to be 64 bit wide as well, so they can store the flags correctly. Signed-off-by: Arnd Bergmann Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem") Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93f834df9c2d4e362dfdc4b05daa0a4e18814836 Author: Toshi Kani Date: Sat Feb 20 14:32:24 2016 -0800 devm_memremap: Fix error value when memremap failed devm_memremap() returns an ERR_PTR() value in case of error. However, it returns NULL when memremap() failed. This causes the caller, such as the pmem driver, to proceed and oops later. Change devm_memremap() to return ERR_PTR(-ENXIO) when memremap() failed. Signed-off-by: Toshi Kani Cc: Andrew Morton Cc: Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams kernel/memremap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4577b0665515e0abc7bc72562d6328d179598815 Author: Dan Williams Date: Wed Feb 17 13:08:58 2016 -0800 nfit: update address range scrub commands to the acpi 6.1 format The original format of these commands from the "NVDIMM DSM Interface Example" [1] are superseded by the ACPI 6.1 definition of the "NVDIMM Root Device _DSMs" [2]. [1]: http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf [2]: http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf "9.20.7 NVDIMM Root Device _DSMs" Changes include: 1/ New 'restart' fields in ars_status, unfortunately these are implemented in the middle of the existing definition so this change is not backwards compatible. The expectation is that shipping platforms will only ever support the ACPI 6.1 definition. 2/ New status values for ars_start ('busy') and ars_status ('overflow'). Cc: Vishal Verma Cc: Linda Knippers Cc: Signed-off-by: Dan Williams drivers/acpi/nfit.c | 6 +++--- drivers/nvdimm/bus.c | 12 ++++++------ include/linux/libnvdimm.h | 2 +- include/uapi/linux/ndctl.h | 11 +++++++++-- 4 files changed, 19 insertions(+), 12 deletions(-) commit 351228eaa2aa32e5b3f22747246199807488f5f2 Merge: 81f70ba dbb0c7c Author: Rafael J. Wysocki Date: Wed Feb 24 02:13:43 2016 +0100 Merge branch 'for-rafael' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull a devfreq fix for v4.5 from MyungJoo Ham. * 'for-rafael' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: tegra: Set freq in rate callback commit 420eb6d7efc4591ef1968106cdaa980ea06fe00e Merge: de9e478 9fd4b9f Author: Linus Torvalds Date: Tue Feb 23 16:39:21 2016 -0800 Merge tag 'nfs-for-4.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Stable bugfixes: - Fix nfs_size_to_loff_t - NFSv4: Fix a dentry leak on alias use Other bugfixes: - Don't schedule a layoutreturn if the layout segment can be freed immediately. - Always set NFS_LAYOUT_RETURN_REQUESTED with lo->plh_return_iomode - rpcrdma_bc_receive_call() should init rq_private_buf.len - fix stateid handling for the NFS v4.2 operations - pnfs/blocklayout: fix a memeory leak when using,vmalloc_to_page - fix panic in gss_pipe_downcall() in fips mode - Fix a race between layoutget and pnfs_destroy_layout - Fix a race between layoutget and bulk recalls" * tag 'nfs-for-4.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFSv4.x/pnfs: Fix a race between layoutget and bulk recalls NFSv4.x/pnfs: Fix a race between layoutget and pnfs_destroy_layout auth_gss: fix panic in gss_pipe_downcall() in fips mode pnfs/blocklayout: fix a memeory leak when using,vmalloc_to_page nfs4: fix stateid handling for the NFS v4.2 operations NFSv4: Fix a dentry leak on alias use xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len pNFS: Always set NFS_LAYOUT_RETURN_REQUESTED with lo->plh_return_iomode pNFS: Fix pnfs_mark_matching_lsegs_return() nfs: fix nfs_size_to_loff_t commit de9e478b9d49f3a0214310d921450cf5bb4a21e6 Author: Linus Torvalds Date: Tue Feb 23 14:58:52 2016 -0800 x86: fix SMAP in 32-bit environments In commit 11f1a4b9755f ("x86: reorganize SMAP handling in user space accesses") I changed how the stac/clac instructions were generated around the user space accesses, which then made it possible to do batched accesses efficiently for user string copies etc. However, in doing so, I completely spaced out, and didn't even think about the 32-bit case. And nobody really even seemed to notice, because SMAP doesn't even exist until modern Skylake processors, and you'd have to be crazy to run 32-bit kernels on a modern CPU. Which brings us to Andy Lutomirski. He actually tested the 32-bit kernel on new hardware, and noticed that it doesn't work. My bad. The trivial fix is to add the required uaccess begin/end markers around the raw accesses in . I feel a bit bad about this patch, just because that header file really should be cleaned up to avoid all the duplicated code in it, and this commit just expands on the problem. But this just fixes the bug without any bigger cleanup surgery. Reported-and-tested-by: Andy Lutomirski Signed-off-by: Linus Torvalds arch/x86/include/asm/uaccess_32.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit fbb0fa8b48892a3db8f5b89fb591c741fbd2fe7a Author: Michael Chan Date: Mon Feb 22 02:10:26 2016 -0500 bnxt_en: Fix zero padding of tx push data. The arithmetic to zero pad the last 64-bit word in the push buffer is not correct. 1. It should be pdata + length to get to the end. 2. 'pdata' is void pointer and passing it to PTR_ALIGN() will cast the aligned pointer to void. Pass 'end' which is u64 pointer to PTR_ALIGN() instead so that the aligned pointer - 1 is the last 64-bit pointer to data. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5146d1f151122e868e594c7b45115d64825aee5f Author: Bernie Harris Date: Mon Feb 22 12:58:05 2016 +1300 tunnel: Clear IPCB(skb)->opt before dst_link_failure called IPCB may contain data from previous layers (in the observed case the qdisc layer). In the observed scenario, the data was misinterpreted as ip header options, which later caused the ihl to be set to an invalid value (<5). This resulted in an infinite loop in the mips implementation of ip_fast_csum. This patch clears IPCB(skb)->opt before dst_link_failure can be called for various types of tunnels. This change only applies to encapsulated ipv4 packets. The code introduced in 11c21a30 which clears all of IPCB has been removed to be consistent with these changes, and instead the opt field is cleared unconditionally in ip_tunnel_xmit. The change in ip_tunnel_xmit applies to SIT, GRE, and IPIP tunnels. The relevant vti, l2tp, and pptp functions already contain similar code for clearing the IPCB. Signed-off-by: Bernie Harris Signed-off-by: David S. Miller net/ipv4/ip_tunnel.c | 3 ++- net/ipv4/udp_tunnel.c | 2 ++ net/ipv6/ip6_gre.c | 2 ++ net/ipv6/ip6_tunnel.c | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) commit 9bdfb3b79e61c60e1a3e2dc05ad164528afa6b8a Author: Konstantin Khlebnikov Date: Sun Feb 21 10:12:39 2016 +0300 tcp: convert cached rtt from usec to jiffies when feeding initial rto Currently it's converted into msecs, thus HZ=1000 intact. Signed-off-by: Konstantin Khlebnikov Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution") Signed-off-by: David S. Miller net/ipv4/tcp_metrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb5eb24cdd5cdb83be77d3e4b2f16e92e06bd9e9 Author: Patrik Halfar Date: Sat Feb 20 18:49:40 2016 +0100 Add Dell Wireless 5809e Gobi 4G HSPA+ Mobile Broadband Card (rev3) to qmi_wwan New revison of Dell Wireless 5809e Gobi 4G HSPA+ Mobile Broadband Card has new idProduct Bus 002 Device 006: ID 413c:81b3 Dell Computer Corp. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x413c Dell Computer Corp. idProduct 0x81b3 bcdDevice 0.06 iManufacturer 1 Sierra Wireless, Incorporated iProduct 2 Dell Wireless 5809e Gobi™ 4G HSPA+ Mobile Broadband Card iSerial 3 bNumConfigurations 2 Signed-off-by: Patrik Halfar Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 905e36ae172c83a30894a3adefab7d4f850fcf54 Author: Matti Gottlieb Date: Sun Feb 14 17:05:39 2016 +0200 iwlwifi: mvm: Fix paging memory leak If the opmode is stopped and started again we did not free the paging buffers. Fix that. In addition when freeing the firmware's paging download buffer, set the pointer to NULL. Signed-off-by: Matti Gottlieb Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 +++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) commit 236cf17c2502007a9d2dda3c39fb0d9a6bd03cc2 Author: Mark Rutland Date: Tue Feb 16 14:47:31 2016 +0000 KVM: arm/arm64: vgic: Ensure bitmaps are long enough When we allocate bitmaps in vgic_vcpu_init_maps, we divide the number of bits we need by 8 to figure out how many bytes to allocate. However, bitmap elements are always accessed as unsigned longs, and if we didn't happen to allocate a size such that size % sizeof(unsigned long) == 0, bitmap accesses may go past the end of the allocation. When using KASAN (which does byte-granular access checks), this results in a continuous stream of BUGs whenever these bitmaps are accessed: ============================================================================= BUG kmalloc-128 (Tainted: G B ): kasan: bad access detected ----------------------------------------------------------------------------- INFO: Allocated in vgic_init.part.25+0x55c/0x990 age=7493 cpu=3 pid=1730 INFO: Slab 0xffffffbde6d5da40 objects=16 used=15 fp=0xffffffc935769700 flags=0x4000000000000080 INFO: Object 0xffffffc935769500 @offset=1280 fp=0x (null) Bytes b4 ffffffc9357694f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffffffc935769500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffffffc935769510: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffffffc935769520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffffffc935769530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffffffc935769540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffffffc935769550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffffffc935769560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffffffc935769570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Padding ffffffc9357695b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Padding ffffffc9357695c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Padding ffffffc9357695d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Padding ffffffc9357695e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Padding ffffffc9357695f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ CPU: 3 PID: 1740 Comm: kvm-vcpu-0 Tainted: G B 4.4.0+ #17 Hardware name: ARM Juno development board (r1) (DT) Call trace: [] dump_backtrace+0x0/0x280 [] show_stack+0x14/0x20 [] dump_stack+0x100/0x188 [] print_trailer+0xfc/0x168 [] object_err+0x3c/0x50 [] kasan_report_error+0x244/0x558 [] __asan_report_load8_noabort+0x48/0x50 [] __bitmap_or+0xc0/0xc8 [] kvm_vgic_flush_hwstate+0x1bc/0x650 [] kvm_arch_vcpu_ioctl_run+0x2ec/0xa60 [] kvm_vcpu_ioctl+0x474/0xa68 [] do_vfs_ioctl+0x5b8/0xcb0 [] SyS_ioctl+0x8c/0xa0 [] el0_svc_naked+0x24/0x28 Memory state around the buggy address: ffffffc935769400: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffffffc935769480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffffffc935769500: 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffffffc935769580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffffffc935769600: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Fix the issue by always allocating a multiple of sizeof(unsigned long), as we do elsewhere in the vgic code. Fixes: c1bfb577a ("arm/arm64: KVM: vgic: switch to dynamic allocation") Cc: stable@vger.kernel.org Acked-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier virt/kvm/arm/vgic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7052cd7bcf3c1478796e93e3dff2b44c9e82943 Author: Stefan Hajnoczi Date: Thu Feb 18 18:55:54 2016 +0000 sunrpc/cache: fix off-by-one in qword_get() The qword_get() function NUL-terminates its output buffer. If the input string is in hex format \xXXXX... and the same length as the output buffer, there is an off-by-one: int qword_get(char **bpp, char *dest, int bufsize) { ... while (len < bufsize) { ... *dest++ = (h << 4) | l; len++; } ... *dest = '\0'; return len; } This patch ensures the NUL terminator doesn't fall outside the output buffer. Signed-off-by: Stefan Hajnoczi Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields net/sunrpc/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b86071528f3261ab592fad5b9b1a02aea3dcabf3 Author: Arend van Spriel Date: Mon Feb 15 14:35:53 2016 +0100 cfg80211: stop critical protocol session upon disconnect event When user-space has started a critical protocol session and a disconnect event occurs, the rdev::crit_prot_nlportid remains set. This caused a subsequent NL80211_CMD_CRIT_PROTO_START to fail (-EBUSY). Fix this by clearing the rdev attribute and call .crit_proto_stop() callback upon disconnect event. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg net/wireless/sme.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5e950a78bf5b18ded277a27aed0bcdbe7c1b868a Author: Ola Olsson Date: Thu Feb 11 01:00:22 2016 +0100 nl80211: Zero out the connection keys memory when freeing them. The connection keys are zeroed out in all other cases except this one. Let's fix the last one as well. Signed-off-by: Ola Olsson Reviewed-by: Julian Calaby Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a36b930e6ed4702c866dc74a5ad07318a57c688 Author: Felix Fietkau Date: Thu Feb 18 19:49:18 2016 +0100 mac80211: minstrel_ht: set default tx aggregation timeout to 0 The value 5000 was put here with the addition of the timeout field to ieee80211_start_tx_ba_session. It was originally added in mac80211 to save resources for drivers like iwlwifi, which only supports a limited number of concurrent aggregation sessions. Since iwlwifi does not use minstrel_ht and other drivers don't need this, 0 is a better default - especially since there have been recent reports of aggregation setup related issues reproduced with ath9k. This should improve stability without causing any adverse effects. Cc: stable@vger.kernel.org Acked-by: Avery Pennarun Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e5177c1919bdc7651b5056f35409d0b4d728841 Author: Alexey Brodkin Date: Sat Feb 20 16:04:26 2016 +0300 arc: get rid of DEVTMPFS dependency on INITRAMFS_SOURCE Even though DEVTMPFS is required when our pre-built initramfs is used it is not the case in general. It is perfectly possible to use initramfs with device nodes already populated or there could be other usages, see discussion below for more detials: http://thread.gmane.org/gmane.comp.embedded.openwrt.devel/37819/focus=37821 This change removes mentioned dependency from arch/arc/Kconfig updating instead those defconfigs that are usually used with this kind of pre-build initramfs. And while at it all touched defconfigs were regenerated via savedefconfig and some options were removed: * USB is selected by other options implicitly * VGA_CONSOLE is disableb for ARC since 031e29b5877f31676739dc2f847d04c2c0732034 * EXT3_FS automatically selects EXT4_FS * MTDxxx and JFFS2_FS make no sense for AXS because AXS NAND controller is not upstreamed * NET_OSCI_LAN is not in upstream as well * ARCPGU_xxx options make no sense because ARC PGU is not yet in upstream and when it gets there all config options would be taken from devicetree Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/Kconfig | 2 -- arch/arc/configs/axs101_defconfig | 4 +--- arch/arc/configs/axs103_defconfig | 10 +--------- arch/arc/configs/axs103_smp_defconfig | 10 +--------- arch/arc/configs/nsim_700_defconfig | 5 ++--- arch/arc/configs/nsim_hs_defconfig | 3 +-- arch/arc/configs/nsim_hs_smp_defconfig | 6 ++---- arch/arc/configs/nsimosci_defconfig | 2 +- arch/arc/configs/nsimosci_hs_defconfig | 3 +-- arch/arc/configs/nsimosci_hs_smp_defconfig | 12 ++---------- arch/arc/configs/tb10x_defconfig | 18 ++++++------------ 11 files changed, 18 insertions(+), 57 deletions(-) commit 3b2435192fe917a826c91c8b34032428d6efdfc7 Author: Felipe Balbi Date: Fri Feb 19 11:04:55 2016 +0200 MAINTAINERS: drop OMAP USB and MUSB maintainership Now that I have switched to another company, I won't be able to help by maintaining OMAP USB Support and/or the MUSB driver. OMAP USB Support is left Orphaned. MUSB's new maintainer will be Bin Liu from Texas Instruments who has accepted to take over starting with v4.6. Cc: Bin Liu Acked-by: Greg Kroah-Hartman Signed-off-by: Felipe Balbi MAINTAINERS | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 4c2ba0c67394514f3f75c660c9f5d02e66a7efd4 Author: Cristian Birsan Date: Fri Feb 19 10:11:56 2016 +0200 usb: musb: fix DMA for host mode Commit ac33cdb16681 ("usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part5") introduces a problem setting DMA host mode. The musb_advance_schedule() is called immediately after receiving an endpoint RX interrupt without waiting for the DMA transfer to complete. As a consequence when the dma complete interrupt arrives the in_qh member of hw_ep is already null an the musb_host_rx() exits on !urb error case. Fix the done condition that advances the musb schedule. Signed-off-by: Cristian Birsan Signed-off-by: Joshua Henderson Tested-by: Ladislav Michl Signed-off-by: Felipe Balbi drivers/usb/musb/musb_host.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8de4b3a3fcbc18e0aa62e9defe5c08821351be12 Author: Ivan T. Ivanov Date: Fri Feb 5 19:17:09 2016 +0000 usb: phy: msm: Trigger USB state detection work in DRD mode When working in Dual Role Device mode, USB state machine is not kicked, when host or gadget drivers are loaded. Fix this be explicitly triggering state detection on client driver load. Issue is that if the board is booted without micro usb cable and usb device attached, kernel fails to populate the usb host and device. The reason for this is that the state machine worker logic only checks for USB_DR_MODE_PERIPHERAL and USB_DR_MODE_HOST modes to run worker thread. However if the phy is configured in OTG mode it would fail to run the state machine, resulting in failure to detect for very first time. This patch fixes the issue by removing the explicit checks. Issue is noticed on Qualcomm Dragon board DB410C. [srinivas.kandagatla@linaro.org: Added more details to log] Signed-off-by: Ivan T. Ivanov Signed-off-by: Srinivas Kandagatla Signed-off-by: Felipe Balbi drivers/usb/phy/phy-msm-usb.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit ca1c11894274c1687417945c034d6b8aee49f625 Author: Simon Appleby Date: Tue Feb 9 09:19:46 2016 +0000 usb: gadget: net2280: fix endpoint max packet for super speed connections This patch fixes the register offset used for super-speed connection's max packet size. Without it using the 338x series of devices in enhanced mode will only allow full or high speed operation to function correctly. Signed-off-by: Simon Appleby Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/net2280.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 7b0a271d5cadf5fbb5a9c7cb868776af2a2c248c Author: Marek Szyprowski Date: Thu Feb 18 08:59:26 2016 +0100 usb: gadget: gadgetfs: unregister gadget only if it got successfully registered Gadgetfs driver called usb_gadget_unregister_driver unconditionally, even if it didn't register it earlier due to other failures. This patch fixes this. Reported-by: Vegard Nossum Signed-off-by: Marek Szyprowski Tested-by: Vegard Nossum Signed-off-by: Felipe Balbi drivers/usb/gadget/legacy/inode.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 31b994a4986dcdd664c597afcef2c0918763019a Author: Marek Szyprowski Date: Mon Feb 8 13:42:14 2016 +0100 usb: gadget: remove driver from pending list on probe error Retry gadget probe only if the probe result is -EPROBE_DEFER, not on every probe error. Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/udc-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd71a17b1193dd4a4c35ecd0ba227aac3d110836 Author: Bryan O'Donoghue Date: Tue Feb 23 01:29:58 2016 +0000 x86/platform/intel/quark: Change the kernel's IMR lock bit to false Currently when setting up an IMR around the kernel's .text section we lock that IMR, preventing further modification. While superficially this appears to be the right thing to do, in fact this doesn't account for a legitimate change in the memory map such as when executing a new kernel via kexec. In such a scenario a second kernel can have a different size and location to it's predecessor and can view some of the memory occupied by it's predecessor as legitimately usable DMA RAM. If this RAM were then subsequently allocated to DMA agents within the system it could conceivably trigger an IMR violation. This patch fixes the this potential situation by keeping the kernel's .text section IMR lock bit false by default. Suggested-by: Ingo Molnar Reported-by: Andy Shevchenko Signed-off-by: Bryan O'Donoghue Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boon.leong.ong@intel.com Cc: paul.gortmaker@windriver.com Link: http://lkml.kernel.org/r/1456190999-12685-2-git-send-email-pure.logic@nexus-software.ie Signed-off-by: Ingo Molnar arch/x86/platform/intel-quark/imr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbb0c7c430ddbe4299f3580baec0e2503f6f5a93 Author: Tomeu Vizoso Date: Thu Jan 21 08:52:26 2016 +0100 PM / devfreq: tegra: Set freq in rate callback As per the documentation of the devfreq_dev_profile.target callback, set the freq argument to the new frequency before returning. This caused endless messages like this after recent changes in the core: devfreq 6000c800.actmon: Couldn't update frequency transition information. Signed-off-by: Tomeu Vizoso Reported-by: Tyler Baker Tested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: MyungJoo Ham drivers/devfreq/tegra-devfreq.c | 2 ++ 1 file changed, 2 insertions(+) commit 9fd4b9fc7695a4da1363a0b439853f88fb6a034f Author: Trond Myklebust Date: Mon Feb 22 17:46:34 2016 -0500 NFSv4.x/pnfs: Fix a race between layoutget and bulk recalls Replace another case where the layout 'plh_block_lgets' can trigger infinite loops in send_layoutget(). Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 2454dfea0aef8a883d4302c38124edb373d47a25 Author: Trond Myklebust Date: Mon Feb 22 17:34:59 2016 -0500 NFSv4.x/pnfs: Fix a race between layoutget and pnfs_destroy_layout If the server reboots while there is a layoutget outstanding, then the call to pnfs_choose_layoutget_stateid() will fail with an EAGAIN error, which causes an infinite loop in send_layoutget(). The reason why we never break out of the loop is that the layout 'plh_block_lgets' field is never cleared. Fix is to replace plh_block_lgets with NFS_LAYOUT_INVALID_STID, which can be reset after a new layoutget. Fixes: ab7d763e477c5 ("pNFS: Ensure nfs4_layoutget_prepare returns...") Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 4de8ebeff8ddefaceeb7fc6a9b1a514fc9624509 Merge: 692b8c6 6e22c83 Author: Linus Torvalds Date: Mon Feb 22 14:09:18 2016 -0800 Merge tag 'trace-fixes-v4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Two more small fixes. One is by Yang Shi who added a READ_ONCE_NOCHECK() to the scan of the stack made by the stack tracer. As the stack tracer scans the entire kernel stack, KASAN triggers seeing it as a "stack out of bounds" error. As the scan is looking at the contents of the stack from parent functions. The NOCHECK() tells KASAN that this is done on purpose, and is not some kind of stack overflow. The second fix is to the ftrace selftests, to retrieve the PID of executed commands from the shell with '$!' and not by parsing 'jobs'" * tag 'trace-fixes-v4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing, kasan: Silence Kasan warning in check_stack of stack_tracer ftracetest: Fix instance test to use proper shell command for pids commit a0d54c3899aaeb047969d9479263c6bcf385c331 Author: Tero Kristo Date: Sat Feb 20 13:12:57 2016 +0200 clk: ti: omap3+: dpll: use non-locking version of clk_get_rate As the code in this file is being executed within irq context in some cases, we must avoid the clk_get_rate which uses mutex internally. Switch the code to use clk_hw_get_rate instead which is non-locking. This fixes an issue where PM runtime will hang the system if enabled with a serial console before a suspend-resume cycle. Signed-off-by: Tero Kristo Tested-by: Tony Lindgren Fixes: a53ad8ef3dcc ("clk: ti: Convert to clk_hw based provider APIs") Signed-off-by: Stephen Boyd drivers/clk/ti/dpll3xxx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 692b8c663cbaf892d10106fbca543b4bbc3202ad Merge: dea08e6 4d8c8bd Author: Linus Torvalds Date: Mon Feb 22 13:57:01 2016 -0800 Merge tag 'for-linus-4.5-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen bug fixes from David Vrabel: - Two scsiback fixes (resource leak and spurious warning). - Fix DMA mapping of compound pages on arm/arm64. - Fix some pciback regressions in MSI-X handling. - Fix a pcifront crash due to some uninitialize state. * tag 'for-linus-4.5-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. xen/pcifront: Report the errors better. xen/pciback: Save the number of MSI-X entries to be copied later. xen/pciback: Check PF instead of VF for PCI_COMMAND_MEMORY xen: fix potential integer overflow in queue_reply xen/arm: correctly handle DMA mapping of compound pages xen/scsiback: avoid warnings when adding multiple LUNs to a domain xen/scsiback: correct frontend counting commit dea08e604408d0303e2332896c5fdd8c1f7d79a2 Merge: 5c102d0 d856626 Author: Linus Torvalds Date: Mon Feb 22 12:18:07 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Looks like a lot, but mostly driver fixes scattered all over as usual. Of note: 1) Add conditional sched in nf conntrack in cleanup to avoid NMI watchdogs. From Florian Westphal. 2) Fix deadlock in nfnetlink cttimeout, also from Floarian. 3) Fix handling of slaves in bonding ARP monitor validation, from Jay Vosburgh. 4) Callers of ip_cmsg_send() are responsible for freeing IP options, some were not doing so. Fix from Eric Dumazet. 5) Fix per-cpu bugs in mvneta driver, from Gregory CLEMENT. 6) Fix vlan handling in mv88e6xxx DSA driver, from Vivien Didelot. 7) bcm7xxx PHY driver bug fixes from Florian Fainelli. 8) Avoid unaligned accesses to protocol headers wrt. GRE, from Alexander Duyck. 9) SKB leaks and other problems in arc_emac driver, from Alexander Kochetkov. 10) tcp_v4_inbound_md5_hash() releases listener socket instead of request socket on error path, oops. Fix from Eric Dumazet. 11) Missing socket release in pppoe_rcv_core() that seems to have existed basically forever. From Guillaume Nault. 12) Missing slave_dev unregister in dsa_slave_create() error path, from Florian Fainelli. 13) crypto_alloc_hash() never returns NULL, fix return value check in __tcp_alloc_md5sig_pool. From Insu Yun. 14) Properly expire exception route entries in ipv4, from Xin Long. 15) Fix races in tcp/dccp listener socket dismantle, from Eric Dumazet. 16) Don't set IFF_TX_SKB_SHARING in vxlan, geneve, or GRE, it's not legal. These drivers modify the SKB on transmit. From Jiri Benc. 17) Fix regression in the initialziation of netdev->tx_queue_len. From Phil Sutter. 18) Missing unlock in tipc_nl_add_bc_link() error path, from Insu Yun. 19) SCTP port hash sizing does not properly ensure that table is a power of two in size. From Neil Horman. 20) Fix initializing of software copy of MAC address in fmvj18x_cs driver, from Ken Kawasaki" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (129 commits) bnx2x: Fix 84833 phy command handler bnx2x: Fix led setting for 84858 phy. bnx2x: Correct 84858 PHY fw version bnx2x: Fix 84833 RX CRC bnx2x: Fix link-forcing for KR2 net: ethernet: davicom: fix devicetree irq resource fmvj18x_cs: fix incorrect indexing of dev->dev_addr[] when copying the MAC address Driver: Vmxnet3: Update Rx ring 2 max size net: netcp: rework the code for get/set sw_data in dma desc soc: ti: knav_dma: rename pad in struct knav_dma_desc to sw_data net: ti: netcp: restore get/set_pad_info() functionality MAINTAINERS: Drop myself as xen netback maintainer sctp: Fix port hash table size computation can: ems_usb: Fix possible tx overflow Bluetooth: hci_core: Avoid mixing up req_complete and req_complete_skb net: bcmgenet: Fix internal PHY link state af_unix: Don't use continue to re-execute unix_stream_read_generic loop unix_diag: fix incorrect sign extension in unix_lookup_by_ino bnxt_en: Failure to update PHY is not fatal condition. bnxt_en: Remove unnecessary call to update PHY settings. ... commit 5c102d0eca3c41b10ccc1525cbb1eba7fd6efd7c Merge: a16152c 000e094 Author: Linus Torvalds Date: Mon Feb 22 12:12:46 2016 -0800 Merge tag 'hwmon-for-linus-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Two fixes headed for stable: - Remove an unnecessary speed_index lookup for thermal hook in the gpio-fan driver. The unnecessary speed lookup can hog the system. - Handle negative conversion values correctly in the ads1015 driver" * tag 'hwmon-for-linus-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (gpio-fan) Remove un-necessary speed_index lookup for thermal hook hwmon: (ads1015) Handle negative conversion values correctly commit a16152c897d74abcca15c120c746264ac4b3bfd1 Merge: 7ee302f c2bab61 Author: Linus Torvalds Date: Mon Feb 22 12:04:11 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "One ocrdma fix: - The new CQ API support was added to ocrdma, but they got the arming logic wrong, so without this, transfers eventually fail when they fail to arm the interrupt properly under load Two related fixes for mlx4: - When we added the 64bit extended counters support to the core IB code, they forgot to update the RoCE side of the mlx4 driver (the IB side they properly updated). I debated whether or not to include these patches as they could be considered feature enablement patches, but the existing code will blindy copy the 32bit counters, whether any counters were requested at all (a bug). These two patches make it (a) check to see that counters were requested and (b) copy the right counters (the 64bit support is new, the 32bit is not). For that reason I went ahead and took them" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/mlx4: Add support for the port info class for RoCE ports IB/mlx4: Add support for extended counters over RoCE ports RDMA/ocrdma: Fix arm logic to align with new cq API commit 7ee302f6f770712a54060928ee3390f6572655bc Merge: 81f70ba 1a1503c Author: Linus Torvalds Date: Mon Feb 22 11:55:18 2016 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Some bugfixes from I2C for you: A fix for a RuntimePM regression with OMAP, a fix to enable TCO for Lewisburg platforms, and a typo fix while we are here" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: i801: Adding Intel Lewisburg support for iTCO i2c: uniphier: fix typos in error messages i2c: omap: Fix PM regression with deferred probe for pm_runtime_reinit commit 253baffdcefba73011e6d2102e69e0b86547836f Merge: bf5b1f3 8f31852 Author: Thomas Gleixner Date: Mon Feb 22 19:31:44 2016 +0100 Merge tag 'gic-fixes-4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull GIC fixes for 4.5-rc5 from Marc Zyngier: - EOI handling for LPIs when GICv3 is in EOImode==1 - Another fallout from changing page size while allocating ITS tables - Missing memory barrier in the 32bit GICv3 code commit 3f315c5b850fa7aff73f50de8e316b98f611a32b Author: Ivaylo Dimitrov Date: Fri Feb 5 16:37:08 2016 +0200 ARM: OMAP2+: Fix onenand initialization to avoid filesystem corruption Commit e7b11dc7b77b ("ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption") partially fixed onenand configuration when GPMC module is reset. Finish the job by also providing the correct values in ONENAND_REG_SYS_CFG1 register. Fixes: e7b11dc7b77b ("ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Ivaylo Dimitrov Tested-by: Aaro Koskinen Signed-off-by: Tony Lindgren arch/arm/mach-omap2/gpmc-onenand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9b18572e83bfd5378b3fcff3acf123f7bddf558a Author: Mika Kuoppala Date: Thu Feb 18 17:58:09 2016 +0200 drm/i915/gen9: Verify and enforce dc6 state writes It has been observed that sometimes disabling the dc6 fails and dc6 state pops back up, brief moment after disabling. This has to be dmc save/restore timing issue or other bug in the way dc states are handled. Try to work around this issue as we don't have firmware fix yet available. Verify that the value we wrote for the dmc sticks, and also enforce it by rewriting it, if it didn't. v2: Zero rereads on rewrite for extra paranoia (Imre) Testcase: kms_flip/basic-flip-vs-dpms References: https://bugs.freedesktop.org/show_bug.cgi?id=93768 Cc: Patrik Jakobsson Cc: Rodrigo Vivi Cc: Imre Deak Signed-off-by: Mika Kuoppala Reviewed-by: Imre Deak Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1455811089-27884-1-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 779cb5d3ddd72950ec726f86e38f7575c7fbdd4c) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_runtime_pm.c | 41 +++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) commit 9b6f20984c5402af06e13cde64b5fe7c31853d1a Author: Patrik Jakobsson Date: Thu Feb 18 17:21:11 2016 +0200 drm/i915/gen9: Check for DC state mismatch The DMC can incorrectly run off and allow DC states on it's own. We don't know the root-cause for this yet but this patch makes it more visible. Reviewed-by: Mika Kuoppala Signed-off-by: Patrik Jakobsson Signed-off-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/1455808874-22089-2-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 832dba889e27487c3087149f1039acc3feb89003) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_csr.c | 2 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 8 ++++++++ 3 files changed, 11 insertions(+) commit 39d4275058baf53e89203407bf3841ff2c74fa32 Author: Alex Deucher Date: Fri Feb 19 18:05:10 2016 -0500 drm/radeon/pm: adjust display configuration after powerstate set_power_state defaults to no displays, so we need to update the display configuration after setting up the powerstate on the first call. In most cases this is not an issue since ends up getting called multiple times at any given modeset and the proper order is achieved in the display changed handling at the top of the function. Reviewed-by: Christian König Acked-by: Jordan Lazare Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_pm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8e7cedc6f7fe762ffe6e348502be34b11fa79298 Author: Alex Deucher Date: Fri Feb 19 17:55:31 2016 -0500 drm/amdgpu/pm: adjust display configuration after powerstate set_power_state defaults to no displays, so we need to update the display configuration after setting up the powerstate on the first call. In most cases this is not an issue since ends up getting called multiple times at any given modeset and the proper order is achieved in the display changed handling at the top of the function. Reviewed-by: Christian König Acked-by: Jordan Lazare Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0c67df48597f0e60eaf7f187ee38f6ccce56561e Author: Alex Deucher Date: Fri Feb 19 15:30:15 2016 -0500 drm/amdgpu/pm: add some checks for PX I.e., doesn't make sense to change power states or check the temperature when the asic is powered off. Reviewed-by: Christian König Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 10f950f640e689336af0a0d587a4b3c26a73cd44 Author: Alex Deucher Date: Fri Feb 19 15:18:45 2016 -0500 drm/amdgpu: fix locking in force performance level Looks like a copy paste typo when we added powerplay support. Reviewed-by: Christian König Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04ab3b7622a618ea081d17427c15a292710b40cb Author: Alex Deucher Date: Thu Feb 18 11:10:09 2016 -0500 drm/amdgpu/gfx8: fix priv reg interrupt enable Looks like a copy/paste typo. Reviewed-by: Christian König Noticed-by: David Panariti Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e31a0159461818a1bda49662921b98a29c1187b Author: Takashi Iwai Date: Mon Feb 22 15:18:13 2016 +0100 ALSA: hda - Apply clock gate workaround to Skylake, too Some Skylake machines show the codec probe errors in certain situations, e.g. HP Z240 desktop fails to probe the onboard Realtek codec at reloading the snd-hda-intel module like: snd_hda_intel 0000:00:1f.3: spurious response 0x200:0x2, last cmd=0x000000 snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to polling mode: lastcmd=0x000f0000 snd_hda_intel 0000:00:1f.3: No response from codec, disabling MSI: last cmd=0x000f0000 snd_hda_intel 0000:00:1f.3: Codec #0 probe error; disabling it... hdaudio hdaudioC0D2: no AFG or MFG node found snd_hda_intel 0000:00:1f.3: no codecs initialized Also, HP G470 G3 suffers from the similar problem, as reported in bugzilla below. On this machine, the codec probe error appears even at a fresh boot. As Libin suggested, the same workaround used for Broxton in the commit [6639484ddaf6: ALSA: hda - disable dynamic clock gating on Broxton before reset] can be applied for Skylake in order to fix this problem. The Intel HW team also confirmed that this is needed for SKL. This patch makes the workaround applied to both SKL and BXT platforms. The referred macros are moved and one superfluous macro (IS_BROXTON()) is another one (IS_BXT()) as well. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112731 Suggested-by: Libin Yang Cc: # v4.4+ Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 53188eb40121a135892881c5f61e41efce60b00a Author: Imre Deak Date: Tue Feb 16 18:56:46 2016 +0200 drm/i915/skl: Ensure HW is powered during DDB HW state readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Spotted-by: Mika Kuoppala Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93441 CC: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1455719489-3008-1-git-send-email-imre.deak@intel.com (cherry picked from commit 4d800030238878c1a98d1d3a37a3d673eea661ce) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 380bdff2d05b498227c80caedd125e8cfcdba00d Author: Imre Deak Date: Fri Feb 12 18:55:21 2016 +0200 drm/i915/lvds: Ensure the HW is powered during HW state readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-13-git-send-email-imre.deak@intel.com (cherry picked from commit ecb2448218acf23c401434c26be256147833b221) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lvds.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 31feb61a688bd4b1c1cb66cc24d931ee77826d93 Author: Imre Deak Date: Fri Feb 12 18:55:20 2016 +0200 drm/i915/hdmi: Ensure the HW is powered during HW state readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-12-git-send-email-imre.deak@intel.com (cherry picked from commit 5b0921748c0b1d0362bbfa802dc25a5c23de7e76) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_hdmi.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit fe97fd7eb87255883ae1da2d726baaae2b50e80d Author: Imre Deak Date: Fri Feb 12 18:55:19 2016 +0200 drm/i915/dsi: Ensure the HW is powered during HW state readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-11-git-send-email-imre.deak@intel.com (cherry picked from commit 3f3f42b887fbffc3353e44ef9f32456c19ae4280) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dsi.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit b81b801f8675838d69d1062a47ca46530ca7217b Author: Imre Deak Date: Fri Feb 12 18:55:18 2016 +0200 drm/i915/dp: Ensure the HW is powered during HW state readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-10-git-send-email-imre.deak@intel.com (cherry picked from commit 6fa9a5ecf7a54450b255229ac1fc6df276cf0653) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 02f9f5e62a9b0a1af2edd4fbd8194c9c5475459b Author: Imre Deak Date: Fri Feb 12 18:55:17 2016 +0200 drm/i915: Ensure the HW is powered when accessing the CRC HW block The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. While at it also add the missing reference around the HW access in i915_interrupt_info(). v2: - update the commit message mentioning that this also fixes the HW access in the interrupt info debugfs entry (Daniel) Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-9-git-send-email-imre.deak@intel.com (cherry picked from commit e129649b7a3e1d50d196e159492496777769437e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_debugfs.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit d59410219ae396a5649eecff1a041e4588aff999 Author: Imre Deak Date: Fri Feb 12 18:55:16 2016 +0200 drm/i915/ddi: Ensure the HW is powered during HW state readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. CC: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-8-git-send-email-imre.deak@intel.com (cherry picked from commit e27daab49718e3232318d8b539cb302521b4b724) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 112 +++++++++++++++++++++++++++------------ 1 file changed, 79 insertions(+), 33 deletions(-) commit 7a6252c6bce1124eebf620948280f8255a83f04a Author: Imre Deak Date: Fri Feb 12 18:55:15 2016 +0200 drm/i915/crt: Ensure the HW is powered during HW state readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93439 CC: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-7-git-send-email-imre.deak@intel.com (cherry picked from commit 1c8fdda1ea947ae8cf994969a1c285acc7089cb9) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_crt.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5a24fab098d6f1aeae3e184a704cf2cd1f677ecd Author: Imre Deak Date: Fri Feb 12 18:55:14 2016 +0200 drm/i915: Ensure the HW is powered during HW access in assert_pipe The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-6-git-send-email-imre.deak@intel.com (cherry picked from commit 4feed0ebfa45879bc422c9a0bfa3cffec82ea60a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit bacd67d6a36c8905258d08ed6ef41346fa01607c Author: Imre Deak Date: Fri Feb 12 18:55:13 2016 +0200 drm/i915: Ensure the HW is powered when disabling VGA The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Signed-off-by: Imre Deak Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-5-git-send-email-imre.deak@intel.com (cherry picked from commit 6392f8478e6f119467b1ad06e30e1f078e62efc1) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 013ef6cfc411bfe4a6009eaa7dabb6531bbb41bb Author: Imre Deak Date: Fri Feb 12 18:55:12 2016 +0200 drm/i915/ibx: Ensure the HW is powered during PLL HW readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Signed-off-by: Imre Deak Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-4-git-send-email-imre.deak@intel.com (cherry picked from commit 12fda3876d08519bdf6f0acc70dd35754b422ed5) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9fb84d5a9299ac678dedc56487f394e5f68b91cb Author: Imre Deak Date: Fri Feb 12 18:55:11 2016 +0200 drm/i915: Ensure the HW is powered during display pipe HW readout The assumption when adding the intel_display_power_is_enabled() checks was that if it returns success the power can't be turned off afterwards during the HW access, which is guaranteed by modeset locks. This isn't always true, so make sure we hold a dedicated reference for the time of the access. Signed-off-by: Imre Deak Revieved-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1455296121-4742-3-git-send-email-imre.deak@intel.com (cherry picked from commit 1729050eb4bbc192e54069e82069f2811313c1dd) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 67 ++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 19 deletions(-) commit 5af9a454769bb5528ba1e5268e5649414ae832bd Author: Imre Deak Date: Wed Feb 17 14:17:42 2016 +0200 drm/i915: Add helper to get a display power ref if it was already enabled We have many places in the code where we check if a given display power domain is enabled and if so access registers backed by this power domain. We assumed that some modeset lock will prevent the power reference from vanishing in the middle of the HW access, but this assumption doesn't always hold. In such cases we get either the wakeref not held, or an unclaimed register access error message. To fix this in a future-proof way that's independent of other locks wrap any such access with a get_ref_if_enabled()/put_ref() pair. Kudos to Ville and Joonas for the ideas of this new interface. v2: - init the power_domains ptr when declaring it everywhere (Joonas) v3: - don't report the device to be powered if runtime PM is disabled CC: Mika Kuoppala CC: Chris Wilson CC: Joonas Lahtinen CC: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1455711462-7442-1-git-send-email-imre.deak@intel.com (cherry picked from commit 09731280028ce03e6a27e1998137f1775a2839f3) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_drv.h | 3 + drivers/gpu/drm/i915/intel_runtime_pm.c | 100 +++++++++++++++++++++++++++++--- 2 files changed, 94 insertions(+), 9 deletions(-) commit c7edd7f99cdaec65e9303b4c9edc19bb595564ed Author: Jean-Philippe Brucker Date: Fri Feb 19 11:04:45 2016 +0100 ARM: 8534/1: virt: fix hyp-stub build for pre-ARMv7 CPUs ARMv6 CPUs do not have virtualisation extensions, but hyp-stub.S is still included into the image to keep it generic. In order to use ARMv7 instructions during HYP initialisation, add -march=armv7-a flag to hyp-stub's build. On an ARMv6 CPU, __hyp_stub_install returns as soon as it detects that the mode isn't HYP, so we will never reach those instructions. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Russell King arch/arm/boot/compressed/Makefile | 2 ++ arch/arm/kernel/Makefile | 1 + 2 files changed, 3 insertions(+) commit 1b17cb796f5d40ffa239c6926385abd83a77a49b Author: Martin Schwidefsky Date: Fri Feb 19 15:29:05 2016 +0100 s390/fpu: signals vs. floating point control register git commit 904818e2f229f3d94ec95f6932a6358c81e73d78 "s390/kernel: introduce fpu-internal.h with fpu helper functions" introduced the fpregs_store / fp_regs_load helper. These function fail to save and restore the floating pointer control registers. The effect is that the FPC is not correctly handled on signal delivery and signal return. Cc: stable@vger.kernel.org # 4.4 Signed-off-by: Martin Schwidefsky arch/s390/include/asm/fpu/internal.h | 2 ++ 1 file changed, 2 insertions(+) commit 342300cc9cd3428bc6bfe5809bfcc1b9a0f06702 Author: Martin Schwidefsky Date: Fri Feb 19 14:44:14 2016 +0100 s390/compat: correct restore of high gprs on signal return git commit 8070361799ae1e3f4ef347bd10f0a508ac10acfb "s390: add support for vector extension" broke 31-bit compat processes in regard to signal handling. The restore_sigregs_ext32() function is used to restore the additional elements from the user space signal frame. Among the additional elements are the upper registers halves for 64-bit register support for 31-bit processes. The copy_from_user that is used to retrieve the high-gprs array from the user stack uses an incorrect length, 8 bytes instead of 64 bytes. This causes incorrect upper register halves to get loaded. Cc: stable@vger.kernel.org # 3.8+ Signed-off-by: Martin Schwidefsky arch/s390/kernel/compat_signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ab3ac233a8b4ffcc27c8475b83dee49fc46bc76 Author: Aneesh Kumar K.V Date: Sat Feb 20 20:41:54 2016 +0530 powerpc/mm/hash: Clear the invalid slot information correctly We can get a hash pte fault with 4k base page size and find the pte already inserted with 64K base page size. In that case we need to clear the existing slot information from the old pte. Fix this correctly With THP, we also clear the slot information with respect to all the 64K hash pte mapping that 16MB page. They are all invalid now. This make sure we don't find the slot valid when we fault with 4k base page size. Finding the slot valid should not result in any wrong behavior because we do check again in hash page table for the validity. But we can avoid that check completely. Fixes: a43c0eb8364c022 ("powerpc/mm: Convert 4k hash insert to C") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hash64_64k.c | 8 +++++++- arch/powerpc/mm/hugepage-hash64.c | 12 +++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) commit f6bf0fa14cf848ae770e0b7842c9b11ce2f01645 Author: Gavin Shan Date: Fri Feb 12 16:03:05 2016 +1100 powerpc/eeh: Fix partial hotplug criterion During error recovery, the device could be removed as part of the partial hotplug. The criterion used to come with partial hotplug is: if the device driver provides error_detected(), slot_reset() and resume() callbacks, it's immune from hotplug. Otherwise, it's going to experience partial hotplug during EEH recovery. But the criterion isn't correct enough: mlx4_core driver for Mellanox adapters provides error_detected(), slot_reset() callbacks, but resume() isn't there. Those Mellanox adapters won't be to involved in the partial hotplug. This fixes the criterion to a practical one: adpater with driver that provides error_detected(), slot_reset() will be immune from partial hotplug. resume() isn't mandatory. Fixes: f2da4ccf ("powerpc/eeh: More relaxed hotplug criterion") Cc: stable@vger.kernel.org #v4.4+ Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d856626d3b051a3ad7139ba59463b692c131f844 Merge: dd78dac 90cfde4 Author: David S. Miller Date: Sun Feb 21 22:51:55 2016 -0500 Merge tag 'linux-can-fixes-for-4.5-20160221' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-02-21 this is a pull reqeust of one patch for net/master. The patch is by Gerhard Uttenthaler and fixes a potential tx overflow in the ems_usb driver. ==================== Signed-off-by: David S. Miller commit dd78dac893bc66de0bc241bdf54c2211c2c55567 Merge: 9ca69b7 4ec0b6d Author: David S. Miller Date: Sun Feb 21 22:50:55 2016 -0500 Merge branch 'bnx2x-848xx-phy-fixes' Yuval Mintz says: ==================== bnx2x: Fix 848xx phys This series contains link-related fixes, mostly for the 848xx phys [2 patches are for 84833, and 2 patches are for 84858]. ==================== Signed-off-by: David S. Miller commit 4ec0b6d506186de559b331bd08f8483463116f72 Author: Yuval Mintz Date: Sun Feb 21 15:07:29 2016 +0200 bnx2x: Fix 84833 phy command handler Current initialization sequence is lacking, causing some configurations to fail. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 81 +++++++++++++++--------- drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | 4 ++ 2 files changed, 56 insertions(+), 29 deletions(-) commit bb1187af658f9ed05a24ab0f25d3b41324176590 Author: Yuval Mintz Date: Sun Feb 21 15:07:28 2016 +0200 bnx2x: Fix led setting for 84858 phy. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 94 ++++++++++++++++++++++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | 2 + 2 files changed, 91 insertions(+), 5 deletions(-) commit 27ba2d2df0d7882008d9cf21f7dc05711415eeac Author: Yuval Mintz Date: Sun Feb 21 15:07:27 2016 +0200 bnx2x: Correct 84858 PHY fw version The phy's firmware version isn't being parsed properly as it's currently parsed like the rest of the 848xx phys. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 92 ++++++++++++++++++++---- 1 file changed, 79 insertions(+), 13 deletions(-) commit 512ab9a001eb88e197859cefbb89b609a971251f Author: Yuval Mintz Date: Sun Feb 21 15:07:26 2016 +0200 bnx2x: Fix 84833 RX CRC There's a problem in current 84833 phy configuration - in case 1Gb link is configured and jumbo-sized packets are being used, device will experience RX crc errors. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 1e411f0138a1b05e805e2043f73f546dba651e27 Author: Yuval Mintz Date: Sun Feb 21 15:07:25 2016 +0200 bnx2x: Fix link-forcing for KR2 Currently, when link is using KR2 it cannot be forced to any speed other than 20g. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9ca69b705486a6fd5c3ecf0558b2203c376ec048 Merge: b5a099c 3bd7594 Author: David S. Miller Date: Sun Feb 21 22:46:26 2016 -0500 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Johan Hedberg says: ==================== pull request: bluetooth 2016-02-20 Here's an important patch for 4.5 which fixes potential invalid pointer access when processing completed Bluetooth HCI commands. Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit b5a099c67a1c36b91356624ce86eb3f9f48a82c7 Author: Robert Jarzmik Date: Sat Feb 20 21:45:26 2016 +0100 net: ethernet: davicom: fix devicetree irq resource The dm9000 driver doesn't work in at least one device-tree configuration, spitting an error message on irq resource : [    1.062495] dm9000 8000000.ethernet: insufficient resources [    1.068439] dm9000 8000000.ethernet: not found (-2). [    1.073451] dm9000: probe of 8000000.ethernet failed with error -2 The reason behind is that the interrupt might be provided by a gpio controller, not probed when dm9000 is probed, and needing the probe deferral mechanism to apply. Currently, the interrupt is directly taken from resources. This patch changes this to use the more generic platform_get_irq(), which handles the deferral. Moreover, since commit Fixes: 7085a7401ba5 ("drivers: platform: parse IRQ flags from resources"), the interrupt trigger flags are honored in platform_get_irq(), so remove the needless code in dm9000. Signed-off-by: Robert Jarzmik Acked-by: Marcel Ziswiler Cc: Sergei Shtylyov Tested-by: Sergei Ianovich Signed-off-by: David S. Miller drivers/net/ethernet/davicom/dm9000.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 1ad5466812c0b4d7851f98573be6a332e82bc920 Author: Ken Kawasaki Date: Sat Feb 20 19:14:36 2016 +0900 fmvj18x_cs: fix incorrect indexing of dev->dev_addr[] when copying the MAC address fix incorrect indexing of dev->dev_addr[] when copying the MAC address of FMV-J182 at buf[5]. Signed-off-by: Ken Kawasaki Signed-off-by: David S. Miller drivers/net/ethernet/fujitsu/fmvj18x_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14112ca5625db8a7fbdc724783510751577a8a1b Author: Shrikrishna Khare Date: Fri Feb 19 11:19:52 2016 -0800 Driver: Vmxnet3: Update Rx ring 2 max size Device emulation supports max size of 4096. Signed-off-by: Shrikrishna Khare Signed-off-by: Bhavesh Davda Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_defs.h | 2 +- drivers/net/vmxnet3/vmxnet3_int.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit d3e17183b9820ccf3c1aacc5ec5459a23a574ba7 Merge: 3301be3 0632448 Author: David S. Miller Date: Sun Feb 21 22:03:21 2016 -0500 Merge branch 'netcp-fixes' Murali Karicheri says: ==================== net: ti: netcp: restore get/set_pad_info() functionality This series fixes a regression and add some improvements for the ease of maintainance. Incorporated comments against v1. Changelogs: v2 : combined 2-3 into one patch as this involves a header change fixed a parse warning in 3/4 per comment from Arnd. Removed Sign-off from Arnd against 1/4 added comments in 3/3 to alert on the usage of sw data per review comments v1 : added 2-4 to accomodate feedback received from review v0 : initial version to fix the regression (From Grygorii) ==================== Signed-off-by: David S. Miller commit 0632448134d0ac1450a19d26f90948fde3b558ad Author: Karicheri, Muralidharan Date: Fri Feb 19 12:58:44 2016 -0500 net: netcp: rework the code for get/set sw_data in dma desc SW data field in descriptor can be used by software to hold private data for the driver. As there are 4 words available for this purpose, use separate macros to place it or retrieve the same to/from descriptors. Also do type cast of data types accordingly. Cc: Wingman Kwok Cc: Mugunthan V N CC: Arnd Bergmann CC: Grygorii Strashko CC: David Laight Signed-off-by: Murali Karicheri Acked-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 72 +++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 17 deletions(-) commit b1cb86ae0e5951e9747ec7a5b33d1c1217791b75 Author: Karicheri, Muralidharan Date: Fri Feb 19 12:58:43 2016 -0500 soc: ti: knav_dma: rename pad in struct knav_dma_desc to sw_data Rename the pad to sw_data as per description of this field in the hardware spec(refer sprugr9 from www.ti.com). Latest version of the document is at http://www.ti.com/lit/ug/sprugr9h/sprugr9h.pdf and section 3.1 Host Packet Descriptor describes this field. Define and use a constant for the size of sw_data field similar to other fields in the struct for desc and document the sw_data field in the header. As the sw_data is not touched by hw, it's type can be changed to u32. Rename the helpers to match with the updated dma desc field sw_data. Cc: Wingman Kwok Cc: Mugunthan V N CC: Arnd Bergmann CC: Grygorii Strashko CC: David Laight Signed-off-by: Murali Karicheri Acked-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 40 +++++++++++++++++++----------------- include/linux/soc/ti/knav_dma.h | 4 +++- 2 files changed, 24 insertions(+), 20 deletions(-) commit 9ecfe875c4f311618cc918aded716017dcd2ddf1 Author: Karicheri, Muralidharan Date: Fri Feb 19 12:58:42 2016 -0500 net: ti: netcp: restore get/set_pad_info() functionality The commit 899077791403 ("netcp: try to reduce type confusion in descriptors") introduces a regression in Kernel 4.5-rc1 and it breaks get/set_pad_info() functionality. The TI NETCP driver uses pad0 and pad1 fields of knav_dma_desc to store DMA/MEM buffer pointer and buffer size respectively. And in both cases for Keystone 2 the pointer type size is 32 bit regardless of LAPE enabled or not, because CONFIG_ARCH_DMA_ADDR_T_64BIT originally is not expected to be defined. Unfortunately, above commit changed buffer's pointers save/restore code (get/set_pad_info()) and added intermediate conversation to u64 which works incorrectly on 32bit Keystone 2 and causes TI NETCP driver crash in RX/TX path due to "Unable to handle kernel NULL pointer" exception. This issue was reported and discussed in [1]. Hence, fix it by partially reverting above commit and restoring get/set_pad_info() functionality as it was before. [1] https://www.mail-archive.com/netdev@vger.kernel.org/msg95361.html Cc: Wingman Kwok Cc: Mugunthan V N CC: David Laight CC: Arnd Bergmann Reported-by: Franklin S Cooper Jr Signed-off-by: Grygorii Strashko Signed-off-by: Murali Karicheri Acked-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 59 +++++++++++------------------------- 1 file changed, 18 insertions(+), 41 deletions(-) commit 56e5fd8feb286ab71f4ca7674505b0d17967376d Author: Fabio Estevam Date: Sun Feb 21 11:35:00 2016 -0300 ASoC: fsl_ssi: Go back to explicit register defaults Commit 5c408fee2546 ("ASoC: fsl_ssi: remove explicit register defaults") causes the driver to fail to probe: fsl-ssi-dai 2028000.ssi: No cache defaults, reading back from HW fsl-ssi-dai 2028000.ssi: Failed to init register map fsl-ssi-dai: probe of 2028000.ssi failed with error -22 , so revert this commit. Reported-by: Mika Penttilä Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 3301be32d4ba95136ff52fb0aee2bdb6077f40b1 Author: Ian Campbell Date: Fri Feb 19 11:44:51 2016 +0000 MAINTAINERS: Drop myself as xen netback maintainer Wei has been picking this up for quite a while now. Signed-off-by: Ian Campbell Cc: Wei Liu Acked-by: Wei Liu Signed-off-by: David S. Miller MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit d9749fb5942f51555dc9ce1ac0dbb1806960a975 Author: Neil Horman Date: Thu Feb 18 16:10:57 2016 -0500 sctp: Fix port hash table size computation Dmitry Vyukov noted recently that the sctp_port_hashtable had an error in its size computation, observing that the current method never guaranteed that the hashsize (measured in number of entries) would be a power of two, which the input hash function for that table requires. The root cause of the problem is that two values need to be computed (one, the allocation order of the storage requries, as passed to __get_free_pages, and two the number of entries for the hash table). Both need to be ^2, but for different reasons, and the existing code is simply computing one order value, and using it as the basis for both, which is wrong (i.e. it assumes that ((1< Reported-by: Dmitry Vyukov CC: Dmitry Vyukov CC: Vladislav Yasevich CC: "David S. Miller" Signed-off-by: David S. Miller net/sctp/protocol.c | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) commit 4328daa2e79ed904a42ce00a9f38b9c36b44b21a Author: Mike Snitzer Date: Sun Feb 21 19:09:22 2016 -0500 dm: fix dm_rq_target_io leak on faults with .request_fn DM w/ blk-mq paths Using request-based DM mpath configured with the following stacking (.request_fn DM mpath ontop of scsi-mq paths): echo Y > /sys/module/scsi_mod/parameters/use_blk_mq echo N > /sys/module/dm_mod/parameters/use_blk_mq 'struct dm_rq_target_io' would leak if a request is requeued before a blk-mq clone is allocated (or fails to allocate). free_rq_tio() wasn't being called. kmemleak reported: unreferenced object 0xffff8800b90b98c0 (size 112): comm "kworker/7:1H", pid 5692, jiffies 4295056109 (age 78.589s) hex dump (first 32 bytes): 00 d0 5c 2c 03 88 ff ff 40 00 bf 01 00 c9 ff ff ..\,....@....... e0 d9 b1 34 00 88 ff ff 00 00 00 00 00 00 00 00 ...4............ backtrace: [] kmemleak_alloc+0x4e/0xb0 [] kmem_cache_alloc+0xc3/0x1e0 [] mempool_alloc_slab+0x15/0x20 [] mempool_alloc+0x6e/0x170 [] dm_old_prep_fn+0x3c/0x180 [dm_mod] [] blk_peek_request+0x168/0x290 [] dm_request_fn+0xb2/0x1b0 [dm_mod] [] __blk_run_queue+0x33/0x40 [] blk_delay_work+0x25/0x40 [] process_one_work+0x14f/0x3d0 [] worker_thread+0x125/0x4b0 [] kthread+0xd8/0xf0 [] ret_from_fork+0x3f/0x70 [] 0xffffffffffffffff crash> struct -o dm_rq_target_io struct dm_rq_target_io { ... } SIZE: 112 Fixes: e5863d9ad7 ("dm: allocate requests in target when stacking on blk-mq devices") Cc: stable@vger.kernel.org # 4.0+ Signed-off-by: Mike Snitzer drivers/md/dm.c | 2 ++ 1 file changed, 2 insertions(+) commit bf5b1f352cc1ad1c53673ebeb76b8128da0e079f Merge: 49b245e aeb67ae Author: Thomas Gleixner Date: Sun Feb 21 20:51:26 2016 +0100 Merge tag 'irqchip-urgent-4.5' of git://git.infradead.org/users/jcooper/linux into irq/urgent Pull irqchip fixes for v4.5 from Jason Cooper: - mxs: Add a missing set_handle_irq() commit 9aafabc7fece13c8e2a1f680908c73ee19f0f79b Author: Ivaylo Dimitrov Date: Tue Feb 2 14:47:37 2016 +0200 power: bq27xxx_battery: Restore device name Patch <703df6c09795> ("power: bq27xxx_battery: Reorganize I2C into a module") has removed the device name numbering from bq27xxx_battery_i2c_probe. Fix that by restoring the code. Fixes: 703df6c097956d17a818e63961c82e8e9eef9fef Signed-off-by: Ivaylo Dimitrov Reviewed-by: Pali Rohár Tested-by: Pali Rohár Signed-off-by: Sebastian Reichel drivers/power/bq27xxx_battery_i2c.c | 37 ++++++++++++++++++++++++++++++++--- include/linux/power/bq27xxx_battery.h | 1 + 2 files changed, 35 insertions(+), 3 deletions(-) commit e35a49b163fa2108cf82c6f07a3fbe371e468878 Author: Sebastian Reichel Date: Sun Jan 17 21:36:03 2016 +0100 MAINTAINERS: update bq27xxx driver Update reviewers for bq27xxx, so that Pali and Andrew are reviewers with status and maintainer inherited from the power supply subsystem entry. Signed-off-by: Sebastian Reichel Acked-by: Pali Rohár Acked-by: Andrew F. Davis MAINTAINERS | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 90cfde46586d2286488d8ed636929e936c0c9ab2 Author: Gerhard Uttenthaler Date: Tue Dec 22 17:29:16 2015 +0100 can: ems_usb: Fix possible tx overflow This patch fixes the problem that more CAN messages could be sent to the interface as could be send on the CAN bus. This was more likely for slow baud rates. The sleeping _start_xmit was woken up in the _write_bulk_callback. Under heavy TX load this produced another bulk transfer without checking the free_slots variable and hence caused the overflow in the interface. Signed-off-by: Gerhard Uttenthaler Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ems_usb.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 7a64cd887fdb97f074c3fda03bee0bfb9faceac3 Author: Lisa Du Date: Wed Feb 17 09:32:52 2016 +0800 drivers: android: correct the size of struct binder_uintptr_t for BC_DEAD_BINDER_DONE There's one point was missed in the patch commit da49889deb34 ("staging: binder: Support concurrent 32 bit and 64 bit processes."). When configure BINDER_IPC_32BIT, the size of binder_uintptr_t was 32bits, but size of void * is 64bit on 64bit system. Correct it here. Signed-off-by: Lisa Du Signed-off-by: Nicolas Boichat Fixes: da49889deb34 ("staging: binder: Support concurrent 32 bit and 64 bit processes.") Cc: Acked-by: Olof Johansson Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5bdfd50d6f76077bf8441d130c606229e100d40 Author: Greg Kroah-Hartman Date: Sat Feb 20 14:19:34 2016 -0800 Revert "usb: hub: do not clear BOS field during reset device" This reverts commit d8f00cd685f5c8e0def8593e520a7fef12c22407. Tony writes: This upstream commit is causing an oops: d8f00cd685f5 ("usb: hub: do not clear BOS field during reset device") This patch has already been included in several -stable kernels. Here are the affected kernels: 4.5.0-rc4 (current git) 4.4.2 4.3.6 (currently in review) 4.1.18 3.18.27 3.14.61 How to reproduce the problem: Boot kernel with slub debugging enabled (otherwise memory corruption will cause random oopses later instead of immediately) Plug in USB 3.0 disk to xhci USB 3.0 port dd if=/dev/sdc of=/dev/null bs=65536 (where /dev/sdc is the USB 3.0 disk) Unplug USB cable while dd is still going Oops is immediate: Reported-by: Tony Battersby Cc: Du, Changbin Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f9a96d2e7e46ed1ece71cf5b34ad9fe2492bacc5 Merge: 3c7dc6a d061c1c Author: Greg Kroah-Hartman Date: Sat Feb 20 14:18:34 2016 -0800 Merge tag 'usb-serial-4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.5-rc5 Here are some new device ids. Signed-off-by: Johan Hovold commit 3c7dc6a079182bdab5ff7a66307bd63c2be837eb Merge: 18558ca 8c0614c Author: Greg Kroah-Hartman Date: Sat Feb 20 14:13:55 2016 -0800 Merge tag 'usb-ci-v4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Some tiny bug fixes for chipidea driver commit 81f70ba233d5f660e1ea5fe23260ee323af5d53a Author: Linus Torvalds Date: Sat Feb 20 13:39:35 2016 -0800 Linux 4.5-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0389075ecfb6231818de9b0225d3a5a21a661171 Merge: 06b74c6 f4eafd8 Author: Linus Torvalds Date: Sat Feb 20 09:32:40 2016 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "This is unusually large, partly due to the EFI fixes that prevent accidental deletion of EFI variables through efivarfs that may brick machines. These fixes are somewhat involved to maintain compatibility with existing install methods and other usage modes, while trying to turn off the 'rm -rf' bricking vector. Other fixes are for large page ioremap()s and for non-temporal user-memcpy()s" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Fix vmalloc_fault() to handle large pages properly hpet: Drop stale URLs x86/uaccess/64: Handle the caching of 4-byte nocache copies properly in __copy_user_nocache() x86/uaccess/64: Make the __copy_user_nocache() assembly code more readable lib/ucs2_string: Correct ucs2 -> utf8 conversion efi: Add pstore variables to the deletion whitelist efi: Make efivarfs entries immutable by default efi: Make our variable validation list include the guid efi: Do variable name validation tests in utf8 efi: Use ucs2_as_utf8 in efivarfs instead of open coding a bad version lib/ucs2_string: Add ucs2 -> utf8 helper functions commit 06b74c658c595e4ef9fd5746f927a1cb6c3a59d5 Merge: e6a1c1e 059fcd8 Author: Linus Torvalds Date: Sat Feb 20 09:30:42 2016 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "A handful of CPU hotplug related fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Plug potential memory leak in CPU_UP_PREPARE perf/core: Remove the bogus and dangerous CPU_DOWN_FAILED hotplug state perf/core: Remove bogus UP_CANCELED hotplug state perf/x86/amd/uncore: Plug reference leak commit e6a1c1e9ddcc873c33833d5c1fc69f22b1838962 Merge: da6b736 6ecad91 Author: Linus Torvalds Date: Sat Feb 20 09:22:11 2016 -0800 Merge tag 'powerpc-4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix build error on 32-bit with checkpoint restart from Aneesh Kumar - Fix dedotify for binutils >= 2.26 from Andreas Schwab - Don't trace hcalls on offline CPUs from Denis Kirjanov - eeh: Fix stale cached primary bus from Gavin Shan - eeh: Fix stale PE primary bus from Gavin Shan - mm: Fix Multi hit ERAT cause by recent THP update from Aneesh Kumar K.V - ioda: Set "read" permission when "write" is set from Alexey Kardashevskiy * tag 'powerpc-4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/ioda: Set "read" permission when "write" is set powerpc/mm: Fix Multi hit ERAT cause by recent THP update powerpc/powernv: Fix stale PE primary bus powerpc/eeh: Fix stale cached primary bus powerpc/pseries: Don't trace hcalls on offline CPUs powerpc: Fix dedotify for binutils >= 2.26 powerpc/book3s_32: Fix build error with checkpoint restart commit da6b7366dbfc93f59873e252b8d53f17fb47a802 Merge: 37aa4da ee1cdcd Author: Linus Torvalds Date: Sat Feb 20 09:19:56 2016 -0800 Merge tag 'dmaengine-fix-4.5-rc5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "A few fixes for drivers, nothing major here. Fixes are: iotdma fix to restart channels, new ID for wildcat PCH, residue fix for edma, disable irq for non-cyclic in dw" * tag 'dmaengine-fix-4.5-rc5' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: dw: disable BLOCK IRQs for non-cyclic xfer dmaengine: edma: fix residue race for cyclic dmaengine: dw: pci: add ID for WildcatPoint PCH dmaengine: IOATDMA: fix timer code that continues to restart channels during idle commit 37aa4dac99418efa17329d98c2a0ed372ed9aa9e Merge: a703f42 4462b4b Author: Linus Torvalds Date: Sat Feb 20 09:16:51 2016 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk driver fixes from Stephen Boyd: "An assortment of vendor specific clk drivers fixes, most notably fallout from adding Tegra210 and rockchip rk3036/rk3368 drivers this cycle. There's also the random smattering of sparse/checker fixes, a build "fix" to get the Tango clk driver to compile because the Kconfig symbol was renamed after the fact, and a clk gpio fix for a patch mismerge" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (28 commits) clk: gpio: Really allow an optional clock= DT property Revert "clk: qcom: Specify LE device endianness" clk: versatile: mask VCO bits before writing clk: tegra: super: Fix sparse warnings for functions not declared as static clk: tegra: Fix sparse warnings for functions not declared as static clk: tegra: Fix sparse warning for pll_m clk: tegra: Use definition for pll_u override bit clk: tegra: Fix warning caused by pll_u failing to lock clk: tegra: Fix clock sources for Tegra210 EMC clk: tegra: Add the APB2APE audio clock on Tegra210 clk: tegra: Add missing of_node_put() clk: tegra: Fix PLLE SS coefficients clk: tegra: Fix typos around clearing PLLE bits during enable clk: tegra: Do not disable PLLE when under hardware control clk: tegra: Fix pllx dyn step calculation clk: tegra: pll: Fix potential sleeping-while-atomic clk: tegra: Fix the misnaming of nvenc from msenc clk: tegra: Fix naming of MISC registers clk: tango4: rename ARCH_TANGOX to ARCH_TANGO clk: scpi: Fix checking return value of platform_device_register_simple() ... commit a703f42d6caa724236521a5a7dcf4ab637483b66 Merge: 59ceeaa 4fbbed4 Author: Linus Torvalds Date: Sat Feb 20 09:13:18 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull more drm fixes from Dave Airlie: "Some more fixes trickled in: A bunch of VC4 ones since it's a pretty new driver not much chance of regressions, and it fixes GPU resets. Also one atomic fix, one set of fixes for a common bug in TTM cleanup, and one i915 hotplug fix" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/nouveau: use post-decrement in error handling drm/atomic: Allow for holes in connector state, v2. drm/i915: Fix hpd live status bits for g4x drm/vc4: Use runtime PM to power cycle the device when the GPU hangs. drm/vc4: Enable runtime PM. drm/vc4: Fix spurious GPU resets due to BO reuse. drm/vc4: Drop error message on seqno wait timeouts. drm/vc4: Fix -ERESTARTSYS error return from BO waits. drm/vc4: Return an ERR_PTR from BO creation instead of NULL. drm/vc4: Fix the clear color for the first tile rendered. drm/vc4: Validate that WAIT_BO padding is cleared. drm/radeon: use post-decrement in error handling drm/amdgpu: use post-decrement in error handling commit 59ceeaaf355fa0fb16558ef7c24413c804932ada Author: Simon Guinot Date: Thu Sep 10 00:15:18 2015 +0200 kernel/resource.c: fix muxed resource handling in __request_region() In __request_region, if a conflict with a BUSY and MUXED resource is detected, then the caller goes to sleep and waits for the resource to be released. A pointer on the conflicting resource is kept. At wake-up this pointer is used as a parent to retry to request the region. A first problem is that this pointer might well be invalid (if for example the conflicting resource have already been freed). Another problem is that the next call to __request_region() fails to detect a remaining conflict. The previously conflicting resource is passed as a parameter and __request_region() will look for a conflict among the children of this resource and not at the resource itself. It is likely to succeed anyway, even if there is still a conflict. Instead, the parent of the conflicting resource should be passed to __request_region(). As a fix, this patch doesn't update the parent resource pointer in the case we have to wait for a muxed region right after. Reported-and-tested-by: Vincent Pelletier Signed-off-by: Simon Guinot Tested-by: Vincent Donnefort Cc: stable@kernel.org Signed-off-by: Linus Torvalds kernel/resource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3bd7594e69bd97c962faa6a5ae15dd8c6c082636 Author: Douglas Anderson Date: Fri Feb 19 14:25:21 2016 -0800 Bluetooth: hci_core: Avoid mixing up req_complete and req_complete_skb In commit 44d271377479 ("Bluetooth: Compress the size of struct hci_ctrl") we squashed down the size of the structure by using a union with the assumption that all users would use the flag to determine whether we had a req_complete or a req_complete_skb. Unfortunately we had a case in hci_req_cmd_complete() where we weren't looking at the flag. This can result in a situation where we might be storing a hci_req_complete_skb_t in a hci_req_complete_t variable, or vice versa. During some testing I found at least one case where the function hci_req_sync_complete() was called improperly because the kernel thought that it didn't require an SKB. Looking through the stack in kgdb I found that it was called by hci_event_packet() and that hci_event_packet() had both of its locals "req_complete" and "req_complete_skb" pointing to the same place: both to hci_req_sync_complete(). Let's make sure we always check the flag. For more details on debugging done, see . Fixes: 44d271377479 ("Bluetooth: Compress the size of struct hci_ctrl") Signed-off-by: Douglas Anderson Acked-by: Johan Hedberg Signed-off-by: Marcel Holtmann net/bluetooth/hci_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7ae8fd0351f912b075149a1e03a017be8b903b9a Author: Maxim Patlasov Date: Tue Feb 16 11:45:33 2016 -0800 fs/pnode.c: treat zero mnt_group_id-s as unequal propagate_one(m) calculates "type" argument for copy_tree() like this: > if (m->mnt_group_id == last_dest->mnt_group_id) { > type = CL_MAKE_SHARED; > } else { > type = CL_SLAVE; > if (IS_MNT_SHARED(m)) > type |= CL_MAKE_SHARED; > } The "type" argument then governs clone_mnt() behavior with respect to flags and mnt_master of new mount. When we iterate through a slave group, it is possible that both current "m" and "last_dest" are not shared (although, both are slaves, i.e. have non-NULL mnt_master-s). Then the comparison above erroneously makes new mount shared and sets its mnt_master to last_source->mnt_master. The patch fixes the problem by handling zero mnt_group_id-s as though they are unequal. The similar problem exists in the implementation of "else" clause above when we have to ascend upward in the master/slave tree by calling: > last_source = last_source->mnt_master; > last_dest = last_source->mnt_parent; proper number of times. The last step is governed by "n->mnt_group_id != last_dest->mnt_group_id" condition that may lie if both are zero. The patch fixes this case in the same way as the former one. [AV: don't open-code an obvious helper...] Signed-off-by: Maxim Patlasov Signed-off-by: Al Viro fs/pnode.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0bacbe528e26422e424d110ebda4ec68ea0fd5eb Author: Al Viro Date: Tue Feb 2 02:28:05 2016 +0000 affs_do_readpage_ofs(): just use kmap_atomic() around memcpy() It forgets kunmap() on a failure exit, but there's really no point keeping the page kmapped at all - after all, what we are doing is a bunch of memcpy() into the parts of page, so kmap_atomic()/kunmap_atomic() just around those memcpy() is enough. Spotted-by: Insu Yun Signed-off-by: Al Viro fs/affs/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0e9a7da51b028aee7a72c95096c99fe5ea2a01f0 Author: Mateusz Guzik Date: Thu Feb 4 02:56:30 2016 +0100 xattr handlers: plug a lock leak in simple_xattr_list The code could leak xattrs->lock on error. Problem introduced with 786534b92f3ce68f4 "tmpfs: listxattr should include POSIX ACL xattrs". Signed-off-by: Mateusz Guzik Signed-off-by: Al Viro fs/xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2feb55f89096b22e2de066e411a3263647211987 Author: Wouter van Kesteren Date: Tue Feb 16 22:20:59 2016 +0100 fs: allow no_seek_end_llseek to actually seek The user-visible impact of the issue is for example that without this patch sensors-detect breaks when trying to seek in /dev/cpu/0/cpuid. '~0ULL' is a 'unsigned long long' that when converted to a loff_t, which is signed, gets turned into -1. later in vfs_setpos we have 'if (offset > maxsize)', which makes it always return EINVAL. Fixes: b25472f9b961 ("new helpers: no_seek_end_llseek{,_size}()") Signed-off-by: Wouter van Kesteren Reviewed-by: Andreas Dilger Signed-off-by: Al Viro fs/read_write.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d07c0278da1f4cfc91c3d46d0d07a0d13a949892 Author: Jaedon Shin Date: Fri Feb 19 13:48:50 2016 +0900 net: bcmgenet: Fix internal PHY link state The PHY link state is not chaged in GENETv2 caused by the previous commit 49f7a471e4d1 ("net: bcmgenet: Properly configure PHY to ignore interrupt") was set to PHY_IGNORE_INTERRUPT in bcmgenet_mii_probe(). The internal PHY should use phy_mac_interrupt() when not in use PHY_POLL. The statement for phy_mac_interrupt() has two conditions. The first condition to check GENET_HAS_MDIO_INTR is not related PHY link state, so this patch removes it. Fixes: 49f7a471e4d1 ("net: bcmgenet: Properly configure PHY to ignore interrupt") Signed-off-by: Jaedon Shin Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 18eceb818dc37bbc783ec7ef7703f270cc6cd281 Author: Rainer Weikusat Date: Thu Feb 18 12:39:46 2016 +0000 af_unix: Don't use continue to re-execute unix_stream_read_generic loop The unix_stream_read_generic function tries to use a continue statement to restart the receive loop after waiting for a message. This may not work as intended as the caller might use a recvmsg call to peek at control messages without specifying a message buffer. If this was the case, the continue will cause the function to return without an error and without the credential information if the function had to wait for a message while it had returned with the credentials otherwise. Change to using goto to restart the loop without checking the condition first in this case so that credentials are returned either way. Signed-off-by: Rainer Weikusat Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/unix/af_unix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b5f0549231ffb025337be5a625b0ff9f52b016f0 Author: Dmitry V. Levin Date: Fri Feb 19 04:27:48 2016 +0300 unix_diag: fix incorrect sign extension in unix_lookup_by_ino The value passed by unix_diag_get_exact to unix_lookup_by_ino has type __u32, but unix_lookup_by_ino's argument ino has type int, which is not a problem yet. However, when ino is compared with sock_i_ino return value of type unsigned long, ino is sign extended to signed long, and this results to incorrect comparison on 64-bit architectures for inode numbers greater than INT_MAX. This bug was found by strace test suite. Fixes: 5d3cae8bc39d ("unix_diag: Dumping exact socket core") Signed-off-by: Dmitry V. Levin Acked-by: Cong Wang Signed-off-by: David S. Miller net/unix/diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a0e2f2622eb65b59bcefb01c5c475af4fab0e6d Merge: 8d2c3ab ba41d46 Author: David S. Miller Date: Fri Feb 19 23:39:32 2016 -0500 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Phy related fixes. 3 small patches to fix PHY related code. ==================== Signed-off-by: David S. Miller commit ba41d46fe03223279054e58d570069fdc62fb768 Author: Michael Chan Date: Fri Feb 19 19:43:21 2016 -0500 bnxt_en: Failure to update PHY is not fatal condition. If we fail to update the PHY, we should print a warning and continue. The current code to exit is buggy as it has not freed up the NIC resources yet. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de73018fb5474b33dc4f6d6b8d889e40232e325b Author: Michael Chan Date: Fri Feb 19 19:43:20 2016 -0500 bnxt_en: Remove unnecessary call to update PHY settings. Fix bnxt_update_phy_setting() to check the correct parameters when determining whether to update the PHY. Requested line speed/duplex should only be checked for forced speed mode. This avoids unnecessary link interruptions when loading the driver. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 035a1539ab63bfdb284bdf6e8459e35897c60564 Author: Michael Chan Date: Fri Feb 19 19:43:19 2016 -0500 bnxt_en: Poll link at the end of __bnxt_open_nic(). When shutting down the NIC, we shutdown async event processing before freeing all the rings. If there is a link change event during reset, the driver may miss it and the link state may be incorrect after the NIC is re-opened. Poll the link at the end of __bnxt_open_nic() to get the correct link status. Signed-off-by Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + 1 file changed, 1 insertion(+) commit 000e0949148382c4962489593a2f05504c2a6771 Author: Nishanth Menon Date: Fri Feb 19 18:09:51 2016 -0600 hwmon: (gpio-fan) Remove un-necessary speed_index lookup for thermal hook Thermal hook gpio_fan_get_cur_state is only interested in knowing the current speed index that was setup in the system, this is already available as part of fan_data->speed_index which is always set by set_fan_speed. Using get_fan_speed_index is useful when we have no idea about the fan speed configuration (for example during fan_ctrl_init). When thermal framework invokes gpio_fan_get_cur_state=>get_fan_speed_index via gpio_fan_get_cur_state especially in a polled configuration for thermal governor, we basically hog the i2c interface to the extent that other functions fail to get any traffic out :(. Instead, just provide the last state set in the driver - since the gpio fan driver is responsible for the fan state immaterial of override, the fan_data->speed_index should accurately reflect the state. Fixes: b5cf88e46bad ("(gpio-fan): Add thermal control hooks") Reported-by: Tony Lindgren Cc: Guenter Roeck Cc: Eduardo Valentin Signed-off-by: Nishanth Menon Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 747ffe11b440ef9ea752888806d3aac677ca52a4 Author: Dan Williams Date: Fri Feb 19 15:21:14 2016 -0800 libnvdimm, tools/testing/nvdimm: fix 'ars_status' output buffer sizing Use the output length specified in the command to size the receive buffer rather than the arbitrary 4K limit. This bug was hiding the fact that the ndctl implementation of ndctl_bus_cmd_new_ars_status() was not specifying an output buffer size. Cc: Cc: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit.c | 13 +++++++------ drivers/nvdimm/bus.c | 8 ++++---- include/linux/libnvdimm.h | 1 - tools/testing/nvdimm/test/nfit.c | 8 ++++++-- 4 files changed, 17 insertions(+), 13 deletions(-) commit e1d09dc0ccc6c91e3916476f636edb76da1f65bb Author: Mario Kleiner Date: Fri Feb 19 02:06:39 2016 +0100 drm/amdgpu: Don't hang in amdgpu_flip_work_func on disabled crtc. This fixes a regression introduced in Linux 4.4. This is a port of the same fix for radeon-kms in the patch "drm/radeon: Don't hang in radeon_flip_work_func on disabled crtc. (v2)" Limit the amount of time amdgpu_flip_work_func can delay programming a page flip, by both limiting the maximum amount of time per wait cycle and the maximum number of wait cycles. Continue the flip if the limit is exceeded, even if that may result in a visual or timing glitch. This is to prevent a hang of page flips, as reported in fdo bug #93746: Disconnecting a DisplayPort display in parallel to a kms pageflip getting queued can cause the following hang of page flips and thereby an unusable desktop: 1. kms pageflip ioctl() queues pageflip -> queues execution of amdgpu_flip_work_func. 2. Hotunplug of display causes the driver to DPMS OFF the unplugged display. Display engine shuts down, scanout no longer moves, but stays at its resting position at start line of vblank. 3. amdgpu_flip_work_func executes while crtc is off, and due to the non-moving scanout position, the new flip delay code introduced into Linux 4.4 by commit 8e36f9d33c13 ("drm/amdgpu: Fixup hw vblank counter/ts..") enters an infinite wait loop. 4. After reconnecting the display, the pageflip continues to hang in 3. and the display doesn't update its view of the desktop. This patch fixes the Linux 4.4 regression from fdo bug #93746 Reported-by: Bernd Steinhauser Signed-off-by: Mario Kleiner Cc: # 4.4+ Cc: Michel Dänzer Cc: Alex Deucher Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 2b8341b3f917c108b47f6a8a771a40d226c57883 Author: Mario Kleiner Date: Fri Feb 19 02:06:38 2016 +0100 drm/radeon: Don't hang in radeon_flip_work_func on disabled crtc. (v2) This fixes a regression introduced in Linux 4.4. Limit the amount of time radeon_flip_work_func can delay programming a page flip, by both limiting the maximum amount of time per wait cycle and the maximum number of wait cycles. Continue the flip if the limit is exceeded, even if that may result in a visual or timing glitch. This is to prevent a hang of page flips, as reported in fdo bug #93746: Disconnecting a DisplayPort display in parallel to a kms pageflip getting queued can cause the following hang of page flips and thereby an unusable desktop: 1. kms pageflip ioctl() queues pageflip -> queues execution of radeon_flip_work_func. 2. Hotunplug of display causes the driver to DPMS OFF the unplugged display. Display engine shuts down, scanout no longer moves, but stays at its resting position at start line of vblank. 3. radeon_flip_work_func executes while crtc is off, and due to the non-moving scanout position, the new flip delay code introduced into Linux 4.4 by commit 5b5561b3660d ("drm/radeon: Fixup hw vblank counter/ts..") enters an infinite wait loop. 4. After reconnecting the display, the pageflip continues to hang in 3. and the display doesn't update its view of the desktop. This patch fixes the Linux 4.4 regression from fdo bug #93746 v2: Skip wait immediately if !radeon_crtc->enabled, as suggested by Michel. Reported-by: Bernd Steinhauser Signed-off-by: Mario Kleiner Tested-by: Bernd Steinhauser Cc: # 4.4+ Cc: Michel Dänzer Cc: Alex Deucher Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_display.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 020ecbba0548cefc91c3c5de32c28a62bcf37ed9 Merge: ce6b714 74dae42 Author: Linus Torvalds Date: Fri Feb 19 13:44:12 2016 -0800 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 bugfixes from Ted Ts'o: "Miscellaneous ext4 bug fixes for v4.5" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix crashes in dioread_nolock mode ext4: fix bh->b_state corruption ext4: fix memleak in ext4_readdir() ext4: remove unused parameter "newblock" in convert_initialized_extent() ext4: don't read blocks from disk after extents being swapped ext4: fix potential integer overflow ext4: add a line break for proc mb_groups display ext4: ioctl: fix erroneous return value ext4: fix scheduling in atomic on group checksum failure ext4 crypto: move context consistency check to ext4_file_open() ext4 crypto: revalidate dentry after adding or removing the key commit ce6b71432d42afe5c3ae25ab2980304c32ecb915 Merge: 87d9ac7 413eddc Author: Linus Torvalds Date: Fri Feb 19 13:40:42 2016 -0800 Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fix from Chris Mason: "My for-linus-4.5 branch has a btrfs DIO error passing fix. I know how much you love DIO, so I'm going to suggest against reading it. We'll follow up with a patch to drop the error arg from dio_end_io in the next merge window." * 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix direct IO requests not reporting IO error to user space commit 87d9ac712b727705dc07e05e851e84387397d696 Merge: 23300f6 52b4b95 Author: Linus Torvalds Date: Fri Feb 19 13:36:00 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton : mm: slab: free kmem_cache_node after destroy sysfs file ipc/shm: handle removed segments gracefully in shm_mmap() MAINTAINERS: update Kselftest Framework mailing list devm_memremap_release(): fix memremap'd addr handling mm/hugetlb.c: fix incorrect proc nr_hugepages value mm, x86: fix pte_page() crash in gup_pte_range() fsnotify: turn fsnotify reaper thread into a workqueue job Revert "fsnotify: destroy marks with call_srcu instead of dedicated thread" mm: fix regression in remap_file_pages() emulation thp, dax: do not try to withdraw pgtable from non-anon VMA commit e817c2f33efb4aa7f02c98dfab9a5f8ff383ea7e Author: Andreas Gruenbacher Date: Thu Feb 18 12:04:08 2016 +0100 selinux: Don't sleep inside inode_getsecid hook The inode_getsecid hook is called from contexts in which sleeping is not allowed, so we cannot revalidate inode security labels from there. Use the non-validating version of inode_security() instead. Reported-by: Benjamin Coddington Signed-off-by: Andreas Gruenbacher Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d2c3ab4445640957d136caa3629857d63544a2a Author: Paul Bolle Date: Thu Feb 18 21:29:08 2016 +0100 ser_gigaset: use container_of() instead of detour The purpose of gigaset_device_release() is to kfree() the struct ser_cardstate that contains our struct device. This is done via a bit of a detour. First we make our struct device's driver_data point to the container of our struct ser_cardstate (which is a struct cardstate). In gigaset_device_release() we then retrieve that driver_data again. And after that we finally kfree() the struct ser_cardstate that was saved in the struct cardstate. All of this can be achieved much easier by using container_of() to get from our struct device to its container, struct ser_cardstate. Do so. Note that at the time the detour was implemented commit b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") had just entered the tree. That commit disconnected our platform_device and our platform_driver. These were reconnected again in v4.5-rc2 through commit 25cad69f21f5 ("base/platform: Fix platform drivers with no probe callback"). And one of the consequences of that fix was that it broke the detour via driver_data. That's because it made __device_release_driver() stop being a NOP for our struct device and actually do stuff again. One of the things it now does, is setting our driver_data to NULL. That, in turn, makes it impossible for gigaset_device_release() to get to our struct cardstate. Which has the net effect of leaking a struct ser_cardstate at every call of this driver's tty close() operation. So using container_of() has the additional benefit of actually working. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Signed-off-by: Paul Bolle Acked-by: Tilman Schmidt Signed-off-by: David S. Miller drivers/isdn/gigaset/ser-gigaset.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 0b7662cf97ee41af03bc8d4498ff4100d0843338 Merge: 1003e19 c699404d Author: David S. Miller Date: Fri Feb 19 15:51:18 2016 -0500 Merge tag 'wireless-drivers-for-davem-2016-02-18' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== rtlwifi * fix broken VHT (802.11ac) support, reported by Linus wlcore * fix firmware initialisation regression on wl1271 iwlwifi * fix a race that users reported when we try to load the firmware and the hardware rfkill interrupt triggers at the same time * fix a very visible bug in scheduled scan: the firmware doesn't support scheduled scan with no profile configured and the supplicant sometimes requests such scheduled scans * build system fix to be able to link iwlwifi statically into kernel * firmware name update for 8265 * typo fix in return value ==================== Signed-off-by: David S. Miller commit 1003e19c466dc37812b5f88b2d5308ee63bb3fa0 Author: Steve Wise Date: Thu Feb 18 06:34:24 2016 -0800 cxgb3: fix up vpd strings for kstrto*() The vpd strings are left justified, in a fixed length array, with possible trailing white space and no NUL. So fix them up before calling kstrto*(). This is a recent regression which causes cxgb3 to fail to load. Fixes: e72c932 ("cxgb3: Convert simple_strtoul to kstrtox") Signed-off-by: Steve Wise Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb3/t3_hw.c | 34 ++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) commit c868ee7063bdb53f3ef9eac7bcec84960980b471 Author: Paolo Abeni Date: Wed Feb 17 19:30:01 2016 +0100 lwt: fix rx checksum setting for lwt devices tunneling over ipv6 the commit 35e2d1152b22 ("tunnels: Allow IPv6 UDP checksums to be correctly controlled.") changed the default xmit checksum setting for lwt vxlan/geneve ipv6 tunnels, so that now the checksum is not set into external UDP header. This commit changes the rx checksum setting for both lwt vxlan/geneve devices created by openvswitch accordingly, so that lwt over ipv6 tunnel pairs are again able to communicate with default values. Signed-off-by: Paolo Abeni Acked-by: Jiri Benc Acked-by: Jesse Gross Signed-off-by: David S. Miller drivers/net/geneve.c | 3 ++- net/openvswitch/vport-vxlan.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit b53ce3e7d407aa4196877a48b8601181162ab158 Author: Insu Yun Date: Wed Feb 17 11:47:35 2016 -0500 tipc: unlock in error path tipc_bcast_unlock need to be unlocked in error path. Signed-off-by: Insu Yun Signed-off-by: David S. Miller net/tipc/link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 29d1441dfc737c9422db02e4c95eb4ea0035effd Merge: a97eb33 1bc4e2b Author: David S. Miller Date: Fri Feb 19 15:35:29 2016 -0500 Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== Two of the fixes included in this patchset prevent wrong memory access - it was triggered when removing an object from a list after it was already free'd due to bad reference counting. This misbehaviour existed for both the gw_node and the orig_node_vlan object and has been fixed by Sven Eckelmann. The last patch fixes our interface feasibility check and prevents it from looping indefinitely when two net_device objects reference each other via iflink index (i.e. veth pair), by Andrew Lunn ==================== Signed-off-by: David S. Miller commit a97eb33ff225f34a8124774b3373fd244f0e83ce Author: Anton Protopopov Date: Tue Feb 16 21:43:16 2016 -0500 rtnl: RTM_GETNETCONF: fix wrong return value An error response from a RTM_GETNETCONF request can return the positive error value EINVAL in the struct nlmsgerr that can mislead userspace. Signed-off-by: Anton Protopopov Acked-by: Cong Wang Signed-off-by: David S. Miller net/ipv4/devinet.c | 2 +- net/ipv6/addrconf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cfdd28beb3205dbd1e91571516807199c8ab84ca Author: Nikolay Aleksandrov Date: Wed Feb 17 18:00:31 2016 +0100 net: make netdev_for_each_lower_dev safe for device removal When I used netdev_for_each_lower_dev in commit bad531623253 ("vrf: remove slave queue and private slave struct") I thought that it acts like netdev_for_each_lower_private and can be used to remove the current device from the list while walking, but unfortunately it acts more like netdev_for_each_lower_private_rcu and doesn't allow it. The difference is where the "iter" points to, right now it points to the current element and that makes it impossible to remove it. Change the logic to be similar to netdev_for_each_lower_private and make it point to the "next" element so we can safely delete the current one. VRF is the only such user right now, there's no change for the read-only users. Here's what can happen now: [98423.249858] general protection fault: 0000 [#1] SMP [98423.250175] Modules linked in: vrf bridge(O) stp llc nfsd auth_rpcgss oid_registry nfs_acl nfs lockd grace sunrpc crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel jitterentropy_rng sha256_generic hmac drbg ppdev aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd evdev serio_raw pcspkr virtio_balloon parport_pc parport i2c_piix4 i2c_core virtio_console acpi_cpufreq button 9pnet_virtio 9p 9pnet fscache ipv6 autofs4 ext4 crc16 mbcache jbd2 sg virtio_blk virtio_net sr_mod cdrom e1000 ata_generic ehci_pci uhci_hcd ehci_hcd usbcore usb_common virtio_pci ata_piix libata floppy virtio_ring virtio scsi_mod [last unloaded: bridge] [98423.255040] CPU: 1 PID: 14173 Comm: ip Tainted: G O 4.5.0-rc2+ #81 [98423.255386] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014 [98423.255777] task: ffff8800547f5540 ti: ffff88003428c000 task.ti: ffff88003428c000 [98423.256123] RIP: 0010:[] [] netdev_lower_get_next+0x1e/0x30 [98423.256534] RSP: 0018:ffff88003428f940 EFLAGS: 00010207 [98423.256766] RAX: 0002000100000004 RBX: ffff880054ff9000 RCX: 0000000000000000 [98423.257039] RDX: ffff88003428f8b8 RSI: ffff88003428f950 RDI: ffff880054ff90c0 [98423.257287] RBP: ffff88003428f940 R08: 0000000000000000 R09: 0000000000000000 [98423.257537] R10: 0000000000000001 R11: 0000000000000000 R12: ffff88003428f9e0 [98423.257802] R13: ffff880054a5fd00 R14: ffff88003428f970 R15: 0000000000000001 [98423.258055] FS: 00007f3d76881700(0000) GS:ffff88005d000000(0000) knlGS:0000000000000000 [98423.258418] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [98423.258650] CR2: 00007ffe5951ffa8 CR3: 0000000052077000 CR4: 00000000000406e0 [98423.258902] Stack: [98423.259075] ffff88003428f960 ffffffffa0442636 0002000100000004 ffff880054ff9000 [98423.259647] ffff88003428f9b0 ffffffff81518205 ffff880054ff9000 ffff88003428f978 [98423.260208] ffff88003428f978 ffff88003428f9e0 ffff88003428f9e0 ffff880035b35f00 [98423.260739] Call Trace: [98423.260920] [] vrf_dev_uninit+0x76/0xa0 [vrf] [98423.261156] [] rollback_registered_many+0x205/0x390 [98423.261401] [] unregister_netdevice_many+0x1c/0x70 [98423.261641] [] rtnl_delete_link+0x3c/0x50 [98423.271557] [] rtnl_dellink+0xcb/0x1d0 [98423.271800] [] ? __inc_zone_state+0x4a/0x90 [98423.272049] [] rtnetlink_rcv_msg+0x84/0x200 [98423.272279] [] ? trace_hardirqs_on+0xd/0x10 [98423.272513] [] ? rtnetlink_rcv+0x1b/0x40 [98423.272755] [] ? rtnetlink_rcv+0x40/0x40 [98423.272983] [] netlink_rcv_skb+0x97/0xb0 [98423.273209] [] rtnetlink_rcv+0x2a/0x40 [98423.273476] [] netlink_unicast+0x11b/0x1a0 [98423.273710] [] netlink_sendmsg+0x3e1/0x610 [98423.273947] [] sock_sendmsg+0x38/0x70 [98423.274175] [] ___sys_sendmsg+0x2e3/0x2f0 [98423.274416] [] ? do_raw_spin_unlock+0xbe/0x140 [98423.274658] [] ? handle_mm_fault+0x26c/0x2210 [98423.274894] [] ? handle_mm_fault+0x4d/0x2210 [98423.275130] [] ? __fget_light+0x91/0xb0 [98423.275365] [] __sys_sendmsg+0x42/0x80 [98423.275595] [] SyS_sendmsg+0x12/0x20 [98423.275827] [] entry_SYSCALL_64_fastpath+0x16/0x7a [98423.276073] Code: c3 31 c0 5d c3 0f 1f 84 00 00 00 00 00 66 66 66 66 90 48 8b 06 55 48 81 c7 c0 00 00 00 48 89 e5 48 8b 00 48 39 f8 74 09 48 89 06 <48> 8b 40 e8 5d c3 31 c0 5d c3 0f 1f 84 00 00 00 00 00 66 66 66 [98423.279639] RIP [] netdev_lower_get_next+0x1e/0x30 [98423.279920] RSP CC: David Ahern CC: David S. Miller CC: Roopa Prabhu CC: Vlad Yasevich Fixes: bad531623253 ("vrf: remove slave queue and private slave struct") Signed-off-by: Nikolay Aleksandrov Reviewed-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller include/linux/netdevice.h | 2 +- net/core/dev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6697b2cf69d4363266ca47eaebc49ef13dabc1c9 Author: Dan Williams Date: Thu Feb 4 16:51:00 2016 -0800 nfit: fix multi-interface dimm handling, acpi6.1 compatibility ACPI 6.1 clarified that multi-interface dimms require multiple control region entries (DCRs) per dimm. Previously we were assuming that a control region is only present when block-data-windows are present. This implementation was done with an eye to be compatibility with the looser ACPI 6.0 interpretation of this table. 1/ When coalescing the memory device (MEMDEV) tables for a single dimm, coalesce on device_handle rather than control region index. 2/ Whenever we disocver a control region with non-zero block windows re-scan for block-data-window (BDW) entries. We may need to revisit this if a DIMM ever implements a format interface outside of blk or pmem, but that is not on the foreseeable horizon. Cc: Signed-off-by: Dan Williams drivers/acpi/nfit.c | 71 ++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 36 deletions(-) commit 6e22c8366416251a3d88ba6c92d13d595089f0ed Author: Yang Shi Date: Fri Feb 12 12:46:00 2016 -0800 tracing, kasan: Silence Kasan warning in check_stack of stack_tracer When enabling stack trace via "echo 1 > /proc/sys/kernel/stack_tracer_enabled", the below KASAN warning is triggered: BUG: KASAN: stack-out-of-bounds in check_stack+0x344/0x848 at addr ffffffc0689ebab8 Read of size 8 by task ksoftirqd/4/29 page:ffffffbdc3a27ac0 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x0() page dumped because: kasan: bad access detected CPU: 4 PID: 29 Comm: ksoftirqd/4 Not tainted 4.5.0-rc1 #129 Hardware name: Freescale Layerscape 2085a RDB Board (DT) Call trace: [] dump_backtrace+0x0/0x3a0 [] show_stack+0x24/0x30 [] dump_stack+0xd8/0x168 [] kasan_report_error+0x6a0/0x920 [] kasan_report+0x70/0xb8 [] __asan_load8+0x60/0x78 [] check_stack+0x344/0x848 [] stack_trace_call+0x1c4/0x370 [] ftrace_ops_no_ops+0x2c0/0x590 [] ftrace_graph_call+0x0/0x14 [] fpsimd_thread_switch+0x24/0x1e8 [] __switch_to+0x34/0x218 [] __schedule+0x3ac/0x15b8 [] schedule+0x5c/0x178 [] smpboot_thread_fn+0x350/0x960 [] kthread+0x1d8/0x2b0 [] ret_from_fork+0x10/0x40 Memory state around the buggy address: ffffffc0689eb980: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f4 f4 f4 ffffffc0689eba00: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffc0689eba80: 00 00 f1 f1 f1 f1 00 f4 f4 f4 f3 f3 f3 f3 00 00 ^ ffffffc0689ebb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffffc0689ebb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 The stacker tracer traverses the whole kernel stack when saving the max stack trace. It may touch the stack red zones to cause the warning. So, just disable the instrumentation to silence the warning. Link: http://lkml.kernel.org/r/1455309960-18930-1-git-send-email-yang.shi@linaro.org Signed-off-by: Yang Shi Signed-off-by: Steven Rostedt kernel/trace/trace_stack.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9a154c8911e39e32bdbc2cd6c9b08a64e17612aa Author: Steven Rostedt Date: Fri Dec 11 14:36:17 2015 -0500 ftracetest: Fix instance test to use proper shell command for pids The ftracetest instance test used parsing of the "jobs" output to find the pid of the subshell that is executed previously. But this is not portable to all major shells that may run these tests. The proper way to get the pid of the subshell is the shell command "$!". This will return the pid of the previously executed command. Use that instead, otherwise the test does not work in all environments. Link: http://lkml.kernel.org/r/20151211143617.65f4d7a1@gandalf.local.home Reported-by: Michael Ellerman Signed-off-by: Steven Rostedt .../testing/selftests/ftrace/test.d/instances/instance.tc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit e327b3f564031a8d0090a6b3e3562a8b59bafe0e Author: Peter Ujfalusi Date: Fri Feb 19 16:12:19 2016 +0200 Revert "regulator: tps65217: remove tps65217.dtsi file" This reverts commit 8e6ebfaa9b384088002baa10f7534efa73a0794e. Without the patch reverted regulators will not work. This prevents MMC to be working for example so the boards can not boot to MMC rootfs. Tested it on beaglebone white and bisect also points to the reverted commit. The issue can be also fixed by adding "regulator-compatible =" to all board dts file for the regulators. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren .../devicetree/bindings/regulator/tps65217.txt | 10 ---- arch/arm/boot/dts/am335x-bone-common.dtsi | 14 ++---- arch/arm/boot/dts/am335x-chilisom.dtsi | 14 +----- arch/arm/boot/dts/am335x-nano.dts | 14 +----- arch/arm/boot/dts/am335x-pepper.dts | 14 +----- arch/arm/boot/dts/am335x-sl50.dts | 13 +---- arch/arm/boot/dts/tps65217.dtsi | 56 ++++++++++++++++++++++ 7 files changed, 67 insertions(+), 68 deletions(-) commit 23300f657594656e7ebac3130b43460ebc4381cc Merge: ff5f168 52d7523 Author: Linus Torvalds Date: Fri Feb 19 08:40:05 2016 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Here are some more arm64 fixes for 4.5. This has mostly come from Yang Shi, who saw some issues under -rt that also affect mainline. The rest of it is pretty small, but still worth having. We've got an old issue outstanding with valid_user_regs which will likely wait until 4.6 (since it would really benefit from some time in -next) and another issue with kasan and idle which should be fixed next week. Apart from that, pretty quiet here (and still no sign of the THP issue reported on s390...) Summary: - Allow EFI stub to use strnlen(), which is required by recent libfdt - Avoid smp_processor_id() in preempt context during unwinding - Avoid false Kasan warnings during unwinding - Ensure early devices are picked up by the IOMMU DMA ops - Avoid rebuilding the kernel for the 'install' target - Run fixup handlers for alignment faults on userspace access" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: allow the kernel to handle alignment faults on user accesses arm64: kbuild: make "make install" not depend on vmlinux arm64: dma-mapping: fix handling of devices registered before arch_initcall arm64/efi: Make strnlen() available to the EFI namespace arm/arm64: crypto: assure that ECB modes don't require an IV arm64: make irq_stack_ptr more robust arm64: debug: re-enable irqs before sending breakpoint SIGTRAP arm64: disable kasan when accessing frame->fp in unwind_frame commit ff5f16820f632079d5095884adc5d71ee3249fa4 Merge: 409ee13 12d319b Author: Linus Torvalds Date: Fri Feb 19 08:33:12 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Several bug fixes: - There are four different stack tracers, and three of them have bugs. For 4.5 the bugs are fixed and we prepare a cleanup patch for the next merge window. - Three bug fixes for the dasd driver in regard to parallel access volumes and the new max_dev_sectors block device queue limit - The irq restore optimization needs a fixup for memcpy_real - The diagnose trace code has a conflict with lockdep" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/dasd: fix performance drop s390/maccess: reduce stnsm instructions s390/diag: avoid lockdep recursion s390/dasd: fix refcount for PAV reassignment s390/dasd: prevent incorrect length error under z/VM after PAV changes s390: fix DAT off memory access, e.g. on kdump s390/oprofile: fix address range for asynchronous stack s390/perf_event: fix address range for asynchronous stack s390/stacktrace: add save_stack_trace_regs() s390/stacktrace: save full stack traces s390/stacktrace: add missing end marker s390/stacktrace: fix address ranges for asynchronous and panic stack s390/stacktrace: fix save_stack_trace_tsk() for current task commit 409ee136f28f71cbec518cfc85a379a508ccbaa0 Merge: 9001b8e d9ff0eb Author: Linus Torvalds Date: Fri Feb 19 08:25:40 2016 -0800 Merge tag 'pinctrl-v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull Pin control fixes from Linus Walleij: "Pin control fixes for the v4.5 series, all are individual driver fixes: - Fix the PXA2xx driver to export its init function so we do not break modular compiles. - Hide unused functions in the Nomadik driver. - Fix up direction control in the Mediatek driver. - Toggle the sunxi GPIO lines to input when you read them on the H3 GPIO controller, lest you only get garbage. - Fix up the number of settings in the MVEBU driver. - Fix a serious SMP race condition in the Samsung driver" * tag 'pinctrl-v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: samsung: fix SMP race condition pinctrl: mvebu: fix num_settings in mpp group assignment pinctrl: sunxi: H3 requires irq_read_needs_mux pinctrl: mediatek: fix direction control issue pinctrl: nomadik: hide unused functions pinctrl: pxa: export pxa2xx_pinctrl_init() commit 9001b8e4f08dd7ae8429214979bd7783160932c5 Merge: 705d43d 67ec107 Author: Linus Torvalds Date: Fri Feb 19 08:01:41 2016 -0800 Merge tag 'sound-4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This update contains again a few more fixes for ALSA core stuff although it's no longer high flux: two race fixes in sequencer and one PCM race fix for non-atomic PCM ops. In addition, HD-audio gained a similar fix for race at reloading the driver" * tag 'sound-4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream ALSA: seq: Fix double port list deletion ALSA: hda - Cancel probe work instead of flush at remove ALSA: seq: Fix leak of pool buffer at concurrent writes commit 65b4bcb82967fd5a60694c3477e58a04a9170aea Author: Alan Date: Fri Feb 19 11:42:32 2016 +0530 ASoC: Intel: Skylake: fix pointer scaling skl_tplg_tlv_control_set does pointer maths on data but forgets that data is not uint8_t so the maths is already scaled in the pointer type. Signed-off-by: Alan Cox Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 316fa9e09ad76e095b9d7e9350c628b918370a22 Author: Charles Keepax Date: Thu Feb 18 15:47:13 2016 +0000 ASoC: samsung: Use IRQ safe spin lock calls Lockdep warns of a potential lock inversion, i2s->lock is held numerous times whilst we are under the substream lock (snd_pcm_stream_lock). If we use the IRQ unsafe spin lock calls, you can also end up locking snd_pcm_stream_lock whilst under i2s->lock (if an IRQ happens whilst we are holding i2s->lock). This could result in deadlock. [ 18.147001] CPU0 CPU1 [ 18.151509] ---- ---- [ 18.156022] lock(&(&pri_dai->spinlock)->rlock); [ 18.160701] local_irq_disable(); [ 18.166622] lock(&(&substream->self_group.lock)->rlock); [ 18.174595] lock(&(&pri_dai->spinlock)->rlock); [ 18.181806] [ 18.184408] lock(&(&substream->self_group.lock)->rlock); [ 18.190045] [ 18.190045] *** DEADLOCK *** This patch changes to using the irq safe spinlock calls, to avoid this issue. Fixes: ce8bcdbb61d9 ("ASoC: samsung: i2s: Protect more registers with a spinlock") Signed-off-by: Charles Keepax Tested-by: Anand Moon Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/samsung/i2s.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 52d7523d84d534c241ebac5ac89f5c0a6cb51e41 Author: EunTaik Lee Date: Tue Feb 16 04:44:35 2016 +0000 arm64: mm: allow the kernel to handle alignment faults on user accesses Although we don't expect to take alignment faults on access to normal memory, misbehaving (i.e. buggy) user code can pass MMIO pointers into system calls, leading to things like get_user accessing device memory. Rather than OOPS the kernel, allow any exception fixups to run and return something like -EFAULT back to userspace. This makes the behaviour more consistent with userspace, even though applications with access to device mappings can easily cause other issues if they try hard enough. Acked-by: Catalin Marinas Signed-off-by: Eun Taik Lee [will: dropped __kprobes annotation and rewrote commit mesage] Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8684fa3e7a9ee629ca60bd811d1597646451f918 Author: Masahiro Yamada Date: Fri Feb 19 15:05:50 2016 +0900 arm64: kbuild: make "make install" not depend on vmlinux For the same reason as commit 19514fc665ff ("arm, kbuild: make "make install" not depend on vmlinux"), the install targets should never trigger the rebuild of the kernel. Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon arch/arm64/Makefile | 2 +- arch/arm64/boot/Makefile | 4 ++-- arch/arm64/boot/install.sh | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) commit 8c0614ca312c847ca5409ea11c39434dec69631d Author: Wei Yongjun Date: Sat Feb 6 22:57:06 2016 +0800 usb: chipidea: fix return value check in ci_hdrc_pci_probe() In case of error, the function usb_phy_generic_register() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4de018d2b0364e40a626fa521ec21e31a10ac84 Author: Alan Date: Mon Feb 15 19:09:46 2016 +0000 usb: chipidea: error on overflow for port_test_write The write value is 8bit, but currently writing a larger number (eg a doubled digit) is not errored but instead gets cast and sets off an action probably undesired. Signed-off-by: Alan Cox Signed-off-by: Peter Chen (Change the style of commit log to fix checkpatch.pl warning) drivers/usb/chipidea/debug.c | 3 +++ 1 file changed, 3 insertions(+) commit 74dae4278546b897eb81784fdfcce872ddd8b2b8 Author: Jan Kara Date: Fri Feb 19 00:33:21 2016 -0500 ext4: fix crashes in dioread_nolock mode Competing overwrite DIO in dioread_nolock mode will just overwrite pointer to io_end in the inode. This may result in data corruption or extent conversion happening from IO completion interrupt because we don't properly set buffer_defer_completion() when unlocked DIO races with locked DIO to unwritten extent. Since unlocked DIO doesn't need io_end for anything, just avoid allocating it and corrupting pointer from inode for locked DIO. A cleaner fix would be to avoid these games with io_end pointer from the inode but that requires more intrusive changes so we leave that for later. Cc: stable@vger.kernel.org Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit ed8ad83808f009ade97ebbf6519bc3a97fefbc0c Author: Jan Kara Date: Fri Feb 19 00:18:25 2016 -0500 ext4: fix bh->b_state corruption ext4 can update bh->b_state non-atomically in _ext4_get_block() and ext4_da_get_block_prep(). Usually this is fine since bh is just a temporary storage for mapping information on stack but in some cases it can be fully living bh attached to a page. In such case non-atomic update of bh->b_state can race with an atomic update which then gets lost. Usually when we are mapping bh and thus updating bh->b_state non-atomically, nobody else touches the bh and so things work out fine but there is one case to especially worry about: ext4_finish_bio() uses BH_Uptodate_Lock on the first bh in the page to synchronize handling of PageWriteback state. So when blocksize < pagesize, we can be atomically modifying bh->b_state of a buffer that actually isn't under IO and thus can race e.g. with delalloc trying to map that buffer. The result is that we can mistakenly set / clear BH_Uptodate_Lock bit resulting in the corruption of PageWriteback state or missed unlock of BH_Uptodate_Lock. Fix the problem by always updating bh->b_state bits atomically. CC: stable@vger.kernel.org Reported-by: Nikolay Borisov Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 4fbbed46dca83bcba3a0170205110a06c116a8e6 Author: Rasmus Villemoes Date: Mon Feb 15 19:41:46 2016 +0100 drm/nouveau: use post-decrement in error handling We need to use post-decrement to get the dma_map_page undone also for i==0, and to avoid some very unpleasant behaviour if dma_map_page failed already at i==0. Signed-off-by: Rasmus Villemoes Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fff80bbdb6b84a94f90391ba674471d37b57eb2 Author: Maarten Lankhorst Date: Wed Feb 17 08:32:05 2016 +0100 drm/atomic: Allow for holes in connector state, v2. Because we record connector_mask using 1 << drm_connector_index now the connector_mask should stay the same even when other connectors are removed. This was not the case with MST, in that case when removing a connector all other connectors may change their index. This is fixed by waiting until the first get_connector_state to allocate connector_state, and force reallocation when state is too small. As a side effect connector arrays no longer have to be preallocated, and can be allocated on first use which means a less allocations in the page flip only path. Changes since v1: - Whitespace. (Ville) - Call ida_remove when destroying the connector. (Ville) - u32 alloc -> int. (Ville) Fixes: 14de6c44d149 ("drm/atomic: Remove drm_atomic_connectors_for_crtc.") Signed-off-by: Maarten Lankhorst Cc: Ville Syrjälä Reviewed-by: Lyude Reviewed-by: Ville Syrjälä Signed-off-by: Dave Airlie drivers/gpu/drm/drm_atomic.c | 44 +++++++++++++++------------------ drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_crtc.c | 49 +++++++++++++++---------------------- include/drm/drm_crtc.h | 8 +++++- 4 files changed, 48 insertions(+), 55 deletions(-) commit acc146943957d7418a6846f06e029b2c5e87e0d5 Author: Peter Rosin Date: Thu Feb 18 14:07:52 2016 +0100 hwmon: (ads1015) Handle negative conversion values correctly Make the divisor signed as DIV_ROUND_CLOSEST is undefined for negative dividends when the divisor is unsigned. Signed-off-by: Peter Rosin Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck drivers/hwmon/ads1015.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4462b4bbfc33a44f19710ead784ff361bda2c3b3 Author: Stephen Boyd Date: Thu Feb 18 19:07:44 2016 -0800 clk: gpio: Really allow an optional clock= DT property We mis-merged the original patch from Russell here and so the patch went almost all the way, except that we still failed to probe when there wasn't a clocks property in the DT node. Allow that case by making a negative value from of_clk_get_parent_count() into "no parents", like the original patch did. Fixes: 7ed88aa2efa5 ("clk: fix clk-gpio.c with optional clock= DT property") Cc: Russell King Cc: Michael Turquette Signed-off-by: Stephen Boyd drivers/clk/clk-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5441ea115ef153458b443917b02c7f5686cc2bd7 Merge: aaa7dd2 36cb625 Author: Dave Airlie Date: Fri Feb 19 12:50:00 2016 +1000 Merge tag 'drm-vc4-fixes-2016-02-17' of github.com:anholt/linux into drm-fixes This pull request fixes GPU reset (which was disabled shortly after V3D integration due to build breakage) and waits for idle in the presence of signals (which X likes to do a lot). * tag 'drm-vc4-fixes-2016-02-17' of github.com:anholt/linux: drm/vc4: Use runtime PM to power cycle the device when the GPU hangs. drm/vc4: Enable runtime PM. drm/vc4: Fix spurious GPU resets due to BO reuse. drm/vc4: Drop error message on seqno wait timeouts. drm/vc4: Fix -ERESTARTSYS error return from BO waits. drm/vc4: Return an ERR_PTR from BO creation instead of NULL. drm/vc4: Fix the clear color for the first tile rendered. drm/vc4: Validate that WAIT_BO padding is cleared. commit aaa7dd2ced17c8e977faeadc4884c422456371c5 Merge: 42412b1 bc3f5d8 Author: Dave Airlie Date: Fri Feb 19 12:49:03 2016 +1000 Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Just two small fixes in the ttm_tt_populate error handling; one for radeon, one for amdgpu. * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: use post-decrement in error handling drm/amdgpu: use post-decrement in error handling commit 42412b120d2877df40171c5ea22218f30fe89e20 Merge: 705d43d 8d409cb Author: Dave Airlie Date: Fri Feb 19 12:43:03 2016 +1000 Merge tag 'drm-intel-fixes-2016-02-18' of git://anongit.freedesktop.org/drm-intel into drm-fixes single g4x hpd fix. * tag 'drm-intel-fixes-2016-02-18' of git://anongit.freedesktop.org/drm-intel: drm/i915: Fix hpd live status bits for g4x commit d07fbb8fdf57c4af28679ad7c4b2542e78ca7218 Merge: 437b300 9f74660 Author: Trond Myklebust Date: Thu Feb 18 20:22:03 2016 -0500 Merge tag 'nfs-rdma-4.5-1' of git://git.linux-nfs.org/projects/anna/nfs-rdma NFS: NFSoRDMA Client Bugfix This patch fixes a bug where NFS v4.1 callbacks were returning RPC_GARBAGE_ARGS to the server. Signed-off-by: Anna Schumaker commit 705d43dbe10d6e213a75187ac92b61f9bd00af0b Merge: dd8fc10 7dcd182 Author: Linus Torvalds Date: Thu Feb 18 16:34:15 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching fixes from Jiri Kosina: - regression (from 4.4) fix for ordering issue, introduced by an earlier ftrace change, that broke live patching of modules. The fix replaces the ftrace module notifier by direct call in order to make the ordering guaranteed and well-defined. The patch, from Jessica Yu, has been acked both by Steven and Rusty - error message fix from Miroslav Benes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: ftrace/module: remove ftrace module notifier livepatch: change the error message in asm/livepatch.h header files commit dd8fc10e606127e2dffdb6704e7ec203c86a214d Merge: 2850713 2a8d9cd Author: Linus Torvalds Date: Thu Feb 18 16:24:48 2016 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two simple fixes. One prevents a soft lockup on some target removal scenarios and the other prevents us trying to probe the marvell console device, which causes it to time out and need the bus resetting" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fix soft lockup in scsi_remove_target() on module removal SCSI: Add Marvell configuration device to VPD blacklist commit 52b4b950b50740bff507a62907e86710743c22e7 Author: Dmitry Safonov Date: Wed Feb 17 13:11:37 2016 -0800 mm: slab: free kmem_cache_node after destroy sysfs file When slub_debug alloc_calls_show is enabled we will try to track location and user of slab object on each online node, kmem_cache_node structure and cpu_cache/cpu_slub shouldn't be freed till there is the last reference to sysfs file. This fixes the following panic: BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 IP: list_locations+0x169/0x4e0 PGD 257304067 PUD 438456067 PMD 0 Oops: 0000 [#1] SMP CPU: 3 PID: 973074 Comm: cat ve: 0 Not tainted 3.10.0-229.7.2.ovz.9.30-00007-japdoll-dirty #2 9.30 Hardware name: DEPO Computers To Be Filled By O.E.M./H67DE3, BIOS L1.60c 07/14/2011 task: ffff88042a5dc5b0 ti: ffff88037f8d8000 task.ti: ffff88037f8d8000 RIP: list_locations+0x169/0x4e0 Call Trace: alloc_calls_show+0x1d/0x30 slab_attr_show+0x1b/0x30 sysfs_read_file+0x9a/0x1a0 vfs_read+0x9c/0x170 SyS_read+0x58/0xb0 system_call_fastpath+0x16/0x1b Code: 5e 07 12 00 b9 00 04 00 00 3d 00 04 00 00 0f 4f c1 3d 00 04 00 00 89 45 b0 0f 84 c3 00 00 00 48 63 45 b0 49 8b 9c c4 f8 00 00 00 <48> 8b 43 20 48 85 c0 74 b6 48 89 df e8 46 37 44 00 48 8b 53 10 CR2: 0000000000000020 Separated __kmem_cache_release from __kmem_cache_shutdown which now called on slab_kmem_cache_release (after the last reference to sysfs file object has dropped). Reintroduced locking in free_partial as sysfs file might access cache's partial list after shutdowning - partial revert of the commit 69cb8e6b7c29 ("slub: free slabs without holding locks"). Zap __remove_partial and use remove_partial (w/o underscores) as free_partial now takes list_lock which s partial revert for commit 1e4dd9461fab ("slub: do not assert not having lock in removing freed partial") Signed-off-by: Dmitry Safonov Suggested-by: Vladimir Davydov Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 12 ++++++------ mm/slab.h | 1 + mm/slab_common.c | 1 + mm/slob.c | 4 ++++ mm/slub.c | 38 +++++++++++++++++--------------------- 5 files changed, 29 insertions(+), 27 deletions(-) commit 1ac0b6dec656f3f78d1c3dd216fad84cb4d0a01e Author: Kirill A. Shutemov Date: Wed Feb 17 13:11:35 2016 -0800 ipc/shm: handle removed segments gracefully in shm_mmap() remap_file_pages(2) emulation can reach file which represents removed IPC ID as long as a memory segment is mapped. It breaks expectations of IPC subsystem. Test case (rewritten to be more human readable, originally autogenerated by syzkaller[1]): #define _GNU_SOURCE #include #include #include #include #define PAGE_SIZE 4096 int main() { int id; void *p; id = shmget(IPC_PRIVATE, 3 * PAGE_SIZE, 0); p = shmat(id, NULL, 0); shmctl(id, IPC_RMID, NULL); remap_file_pages(p, 3 * PAGE_SIZE, 0, 7, 0); return 0; } The patch changes shm_mmap() and code around shm_lock() to propagate locking error back to caller of shm_mmap(). [1] http://github.com/google/syzkaller Signed-off-by: Kirill A. Shutemov Reported-by: Dmitry Vyukov Cc: Davidlohr Bueso Cc: Manfred Spraul Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 53 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 10 deletions(-) commit 64f00850011b834746bab94119d1d5eb7eabb19a Author: Shuah Khan Date: Wed Feb 17 13:11:32 2016 -0800 MAINTAINERS: update Kselftest Framework mailing list Kselftest Framework now has a dedicated mailing list linux-kselftest. Update the entry in MAINTAINERS file. Signed-off-by: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9273a8bbf58a15051e53a777389a502420ddc60e Author: Toshi Kani Date: Wed Feb 17 13:11:29 2016 -0800 devm_memremap_release(): fix memremap'd addr handling The pmem driver calls devm_memremap() to map a persistent memory range. When the pmem driver is unloaded, this memremap'd range is not released so the kernel will leak a vma. Fix devm_memremap_release() to handle a given memremap'd address properly. Signed-off-by: Toshi Kani Acked-by: Dan Williams Cc: Christoph Hellwig Cc: Ross Zwisler Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8b74815a452ff2904b5d7fcce1a5ae2a4d7ca5e Author: Vaishali Thakkar Date: Wed Feb 17 13:11:26 2016 -0800 mm/hugetlb.c: fix incorrect proc nr_hugepages value Currently incorrect default hugepage pool size is reported by proc nr_hugepages when number of pages for the default huge page size is specified twice. When multiple huge page sizes are supported, /proc/sys/vm/nr_hugepages indicates the current number of pre-allocated huge pages of the default size. Basically /proc/sys/vm/nr_hugepages displays default_hstate-> max_huge_pages and after boot time pre-allocation, max_huge_pages should equal the number of pre-allocated pages (nr_hugepages). Test case: Note that this is specific to x86 architecture. Boot the kernel with command line option 'default_hugepagesz=1G hugepages=X hugepagesz=2M hugepages=Y hugepagesz=1G hugepages=Z'. After boot, 'cat /proc/sys/vm/nr_hugepages' and 'sysctl -a | grep hugepages' returns the value X. However, dmesg output shows that Z huge pages were pre-allocated. So, the root cause of the problem here is that the global variable default_hstate_max_huge_pages is set if a default huge page size is specified (directly or indirectly) on the command line. After the command line processing in hugetlb_init, if default_hstate_max_huge_pages is set, the value is assigned to default_hstae.max_huge_pages. However, default_hstate.max_huge_pages may have already been set based on the number of pre-allocated huge pages of default_hstate size. The solution to this problem is if hstate->max_huge_pages is already set then it should not set as a result of global max_huge_pages value. Basically if the value of the variable hugepages is set multiple times on a command line for a specific supported hugepagesize then proc layer should consider the last specified value. Signed-off-by: Vaishali Thakkar Reviewed-by: Naoya Horiguchi Cc: Mike Kravetz Cc: Hillf Danton Cc: Kirill A. Shutemov Cc: Dave Hansen Cc: Paul Gortmaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 457a98b0809fa6cde7aab8c314a59d99772b445e Author: Hugh Dickins Date: Wed Feb 17 13:11:23 2016 -0800 mm, x86: fix pte_page() crash in gup_pte_range() Commit 3565fce3a659 ("mm, x86: get_user_pages() for dax mappings") has moved up the pte_page(pte) in x86's fast gup_pte_range(), for no discernible reason: put it back where it belongs, after the pte_flags check and the pfn_valid cross-check. That may be the cause of the NULL pointer dereference in gup_pte_range(), seen when vfio called vaddr_get_pfn() when starting a qemu-kvm based VM. Signed-off-by: Hugh Dickins Reported-by: Michael Long Tested-by: Michael Long Acked-by: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/gup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0918f1c309b86301605650c836ddd2021d311ae2 Author: Jeff Layton Date: Wed Feb 17 13:11:21 2016 -0800 fsnotify: turn fsnotify reaper thread into a workqueue job We don't require a dedicated thread for fsnotify cleanup. Switch it over to a workqueue job instead that runs on the system_unbound_wq. In the interest of not thrashing the queued job too often when there are a lot of marks being removed, we delay the reaper job slightly when queueing it, to allow several to gather on the list. Signed-off-by: Jeff Layton Tested-by: Eryu Guan Reviewed-by: Jan Kara Cc: Eric Paris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/mark.c | 49 ++++++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 31 deletions(-) commit 13d34ac6e55b8284c592c67e166ac614b3c4c1d7 Author: Jeff Layton Date: Wed Feb 17 13:11:18 2016 -0800 Revert "fsnotify: destroy marks with call_srcu instead of dedicated thread" This reverts commit c510eff6beba ("fsnotify: destroy marks with call_srcu instead of dedicated thread"). Eryu reported that he was seeing some OOM kills kick in when running a testcase that adds and removes inotify marks on a file in a tight loop. The above commit changed the code to use call_srcu to clean up the marks. While that does (in principle) work, the srcu callback job is limited to cleaning up entries in small batches and only once per jiffy. It's easily possible to overwhelm that machinery with too many call_srcu callbacks, and Eryu's reproduer did just that. There's also another potential problem with using call_srcu here. While you can obviously sleep while holding the srcu_read_lock, the callbacks run under local_bh_disable, so you can't sleep there. It's possible when putting the last reference to the fsnotify_mark that we'll end up putting a chain of references including the fsnotify_group, uid, and associated keys. While I don't see any obvious ways that that could occurs, it's probably still best to avoid using call_srcu here after all. This patch reverts the above patch. A later patch will take a different approach to eliminated the dedicated thread here. Signed-off-by: Jeff Layton Reported-by: Eryu Guan Tested-by: Eryu Guan Cc: Jan Kara Cc: Eric Paris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/mark.c | 66 +++++++++++++++++++++++++++++++--------- include/linux/fsnotify_backend.h | 5 +-- 2 files changed, 53 insertions(+), 18 deletions(-) commit 48f7df329474b49d83d0dffec1b6186647f11976 Author: Kirill A. Shutemov Date: Wed Feb 17 13:11:15 2016 -0800 mm: fix regression in remap_file_pages() emulation Grazvydas Ignotas has reported a regression in remap_file_pages() emulation. Testcase: #define _GNU_SOURCE #include #include #include #include #define SIZE (4096 * 3) int main(int argc, char **argv) { unsigned long *p; long i; p = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { perror("mmap"); return -1; } for (i = 0; i < SIZE / 4096; i++) p[i * 4096 / sizeof(*p)] = i; if (remap_file_pages(p, 4096, 0, 1, 0)) { perror("remap_file_pages"); return -1; } if (remap_file_pages(p, 4096 * 2, 0, 1, 0)) { perror("remap_file_pages"); return -1; } assert(p[0] == 1); munmap(p, SIZE); return 0; } The second remap_file_pages() fails with -EINVAL. The reason is that remap_file_pages() emulation assumes that the target vma covers whole area we want to over map. That assumption is broken by first remap_file_pages() call: it split the area into two vma. The solution is to check next adjacent vmas, if they map the same file with the same flags. Fixes: c8d78c1823f4 ("mm: replace remap_file_pages() syscall with emulation") Signed-off-by: Kirill A. Shutemov Reported-by: Grazvydas Ignotas Tested-by: Grazvydas Ignotas Cc: [4.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit 69a8ec2d8155b9121ca2990d43f8363b8e2bf550 Author: Kirill A. Shutemov Date: Wed Feb 17 13:11:12 2016 -0800 thp, dax: do not try to withdraw pgtable from non-anon VMA DAX doesn't deposit pgtables when it maps huge pages: nothing to withdraw. It can lead to crash. Signed-off-by: Kirill A. Shutemov Cc: Dan Williams Cc: Matthew Wilcox Cc: Andrea Arcangeli Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba4a3550e93415f4ff300810b8d0659949fea193 Author: Gao Pan Date: Mon Jan 18 15:44:01 2016 +0800 spi: imx: fix spi resource leak with dma transfer In spi_imx_dma_transfer(), when desc_rx = dmaengine_prep_slave_sg() fails, the context goes to label no_dma and then return. However, the memory allocated for desc_tx has not been freed yet, which leads to resource leak. Signed-off-by: Gao Pan Reviewed-by: Fugang Duan Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f3bb23764fac042d189129d485d3a9246cb777da Author: Arnd Bergmann Date: Wed Feb 17 23:25:11 2016 +0100 USB: cdc_subset: only build when one driver is enabled This avoids a harmless randconfig warning I get when USB_NET_CDC_SUBSET is enabled, but all of the more specific drivers are not: drivers/net/usb/cdc_subset.c:241:2: #warning You need to configure some hardware for this driver The current behavior is clearly intentional, giving a warning when a user picks a configuration that won't do anything good. The only reason for even addressing this is that I'm getting close to eliminating all 'randconfig' warnings on ARM, and this came up a couple of times. My workaround is to not even build the module when none of the configurations are enable. Alternatively we could simply remove the #warning (nothing wrong for compile-testing), turn it into a runtime warning, or change the Kconfig options into a menu to hide CONFIG_USB_NET_CDC_SUBSET. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/usb/Kconfig | 10 ++++++++++ drivers/net/usb/Makefile | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) commit f468a729a2ddb1a26f8c4b98a82050e4030fe458 Author: Jiri Benc Date: Tue Feb 16 22:18:26 2016 +0100 vxlan: do not use fdb in metadata mode In metadata mode, the vxlan interface is not supposed to use the fdb control plane but an external one (openvswitch or static routes). With the current code, packets may leak into the fdb handling code which usually causes them to be dropped anyway but may have strange side effects. Just drop the packets directly when in metadata mode if the destination data are not correctly provided on egress. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e60b13e4f56fc56cc0dea845ce0711773d514149 Author: Anton Protopopov Date: Wed Feb 17 11:19:56 2016 -0500 mISDN: prevent possible NULL pointer dereference A return value of the bchannel_get_rxbuf() function is compared with the positive ENOMEM value instead of the negative -ENOMEM value to detect a memory allocation problem. Thus, after a possible memory allocation failure the bc->bch.rx_skb will be NULL which will lead to a NULL pointer dereference. Signed-off-by: Anton Protopopov Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/netjet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 449f14f01f65f45f332e3360aa46b3d3571b2cba Author: Anton Protopopov Date: Wed Feb 17 10:54:13 2016 -0500 net: caif: fix erroneous return value The cfrfml_receive() function might return positive value EPROTO Signed-off-by: Anton Protopopov Signed-off-by: David S. Miller net/caif/cfrfml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48bb230e8723d7dd87928f0c0c3f6cb1fd5bc9be Author: Anton Protopopov Date: Wed Feb 17 10:53:59 2016 -0500 appletalk: fix erroneous return value The atalk_sendmsg() function might return wrong value ENETUNREACH instead of -ENETUNREACH. Signed-off-by: Anton Protopopov Signed-off-by: David S. Miller net/appletalk/ddp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a09f4af177d2a5b7dc424aba6ba808f4a674ce81 Author: Amitoj Kaur Chawla Date: Wed Feb 17 20:33:26 2016 +0530 lance: Return correct error code Failure of kzalloc should cause the enclosing function to return -ENOMEM, not -ENODEV. Additionally, removed the following checkpatch warnings: ERROR: spaces required around that '==' (ctx:VxV) ERROR: space required before the open parenthesis '(' CHECK: Comparison to NULL could be written "!lp" Signed-off-by: Amitoj Kaur Chawla Signed-off-by: David S. Miller drivers/net/ethernet/amd/lance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a813104d923339144078939175faf4e66aca19b4 Author: Phil Sutter Date: Wed Feb 17 15:37:43 2016 +0100 IFF_NO_QUEUE: Fix for drivers not calling ether_setup() My implementation around IFF_NO_QUEUE driver flag assumed that leaving tx_queue_len untouched (specifically: not setting it to zero) by drivers would make it possible to assign a regular qdisc to them without having to worry about setting tx_queue_len to a useful value. This was only partially true: I overlooked that some drivers don't call ether_setup() and therefore not initialize tx_queue_len to the default value of 1000. Consequently, removing the workarounds in place for that case in qdisc implementations which cared about it (namely, pfifo, bfifo, gred, htb, plug and sfb) leads to problems with these specific interface types and qdiscs. Luckily, there's already a sanitization point for drivers setting tx_queue_len to zero, which can be reused to assign the fallback value most qdisc implementations used, which is 1. Fixes: 348e3435cbefa ("net: sched: drop all special handling of tx_queue_len == 0") Tested-by: Mathieu Desnoyers Signed-off-by: Phil Sutter Signed-off-by: David S. Miller net/core/dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d13b161c2c7c67401bb222c30302339285ac148e Author: Jiri Benc Date: Wed Feb 17 15:32:53 2016 +0100 gre: clear IFF_TX_SKB_SHARING ether_setup sets IFF_TX_SKB_SHARING but this is not supported by gre as it modifies the skb on xmit. Also, clean up whitespace in ipgre_tap_setup when we're already touching it. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 5 +++-- net/ipv6/ip6_gre.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit fc41cdb322a2a513efd60f81133efecd69d4f336 Author: Jiri Benc Date: Wed Feb 17 15:31:35 2016 +0100 geneve: clear IFF_TX_SKB_SHARING ether_setup sets IFF_TX_SKB_SHARING but this is not supported by geneve as it modifies the skb on xmit. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/geneve.c | 1 + 1 file changed, 1 insertion(+) commit 82a0f6b4aba95a21729f56ed0cbe57f2701b4872 Author: Jiri Benc Date: Tue Feb 16 22:16:53 2016 +0100 vxlan: clear IFF_TX_SKB_SHARING ether_setup sets IFF_TX_SKB_SHARING but this is not supported by vxlan as it modifies the skb on xmit. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 1 + 1 file changed, 1 insertion(+) commit 8f318526a292c5e7cebb82f3f766b83c22343293 Author: Marc Zyngier Date: Thu Feb 18 19:15:45 2016 +0000 irqchip/gic-v3: Add missing barrier to 32bit version of gic_read_iar() Commit 1a1ebd5 ("irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is visible on redestributor") fixed the missing barrier on arm64, but forgot to update the 32bit counterpart, which has the same requirements. Let's fix it. Fixes: 1a1ebd5 ("irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is visible on redestributor") Signed-off-by: Marc Zyngier arch/arm/include/asm/arch_gicv3.h | 1 + 1 file changed, 1 insertion(+) commit aeee0e66c6b46cee311be22cb82735763eceb7c3 Author: David Wragg Date: Thu Feb 18 17:43:29 2016 +0000 geneve: Refine MTU limit Calculate the maximum MTU taking into account the size of headers involved in GENEVE encapsulation, as for other tunnel types. Changes in v3: - Correct comment style Changes in v2: - Conform more closely to ip_tunnel_change_mtu - Exclude GENEVE options from max MTU calculation Signed-off-by: David Wragg Acked-by: Jesse Gross Signed-off-by: David S. Miller drivers/net/geneve.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 7716682cc58e305e22207d5bb315f26af6b1e243 Author: Eric Dumazet Date: Thu Feb 18 05:39:18 2016 -0800 tcp/dccp: fix another race at listener dismantle Ilya reported following lockdep splat: kernel: ========================= kernel: [ BUG: held lock freed! ] kernel: 4.5.0-rc1-ceph-00026-g5e0a311 #1 Not tainted kernel: ------------------------- kernel: swapper/5/0 is freeing memory ffff880035c9d200-ffff880035c9dbff, with a lock still held there! kernel: (&(&queue->rskq_lock)->rlock){+.-...}, at: [] inet_csk_reqsk_queue_add+0x28/0xa0 kernel: 4 locks held by swapper/5/0: kernel: #0: (rcu_read_lock){......}, at: [] netif_receive_skb_internal+0x4b/0x1f0 kernel: #1: (rcu_read_lock){......}, at: [] ip_local_deliver_finish+0x3f/0x380 kernel: #2: (slock-AF_INET){+.-...}, at: [] sk_clone_lock+0x19b/0x440 kernel: #3: (&(&queue->rskq_lock)->rlock){+.-...}, at: [] inet_csk_reqsk_queue_add+0x28/0xa0 To properly fix this issue, inet_csk_reqsk_queue_add() needs to return to its callers if the child as been queued into accept queue. We also need to make sure listener is still there before calling sk->sk_data_ready(), by holding a reference on it, since the reference carried by the child can disappear as soon as the child is put on accept queue. Reported-by: Ilya Dryomov Fixes: ebb516af60e1 ("tcp/dccp: fix race at listener dismantle phase") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_connection_sock.h | 5 +++-- net/dccp/ipv4.c | 14 +++++++------- net/dccp/ipv6.c | 14 +++++++------- net/ipv4/inet_connection_sock.c | 14 +++++++------- net/ipv4/tcp_ipv4.c | 14 +++++++------- net/ipv6/tcp_ipv6.c | 14 +++++++------- 6 files changed, 38 insertions(+), 37 deletions(-) commit deed49df7390d5239024199e249190328f1651e7 Author: Xin Long Date: Thu Feb 18 21:21:19 2016 +0800 route: check and remove route cache when we get route Since the gc of ipv4 route was removed, the route cached would has no chance to be removed, and even it has been timeout, it still could be used, cause no code to check it's expires. Fix this issue by checking and removing route cache when we get route. Signed-off-by: Xin Long Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller include/net/ip_fib.h | 1 + net/ipv4/route.c | 77 ++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 64 insertions(+), 14 deletions(-) commit f5bdd66c705484b4bc77eb914be15c1b7881fae7 Author: Alexandra Yates Date: Wed Feb 17 19:36:20 2016 -0800 Adding Intel Lewisburg device IDs for SATA This patch complements the list of device IDs previously added for lewisburg sata. Signed-off-by: Alexandra Yates Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org drivers/ata/ahci.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 018361767a21fb2d5ebd3ac182c04baf8a8b4e08 Author: Gabor Juhos Date: Wed Feb 17 12:58:20 2016 +0100 pata-rb532-cf: get rid of the irq_to_gpio() call The RB532 platform specific irq_to_gpio() implementation has been removed with commit 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h"). Now the platform uses the generic stub which causes the following error: pata-rb532-cf pata-rb532-cf: no GPIO found for irq149 pata-rb532-cf: probe of pata-rb532-cf failed with error -2 Drop the irq_to_gpio() call and get the GPIO number from platform data instead. After this change, the driver works again: scsi host0: pata-rb532-cf ata1: PATA max PIO4 irq 149 ata1.00: CFA: CF 1GB, 20080820, max MWDMA4 ata1.00: 1989792 sectors, multi 0: LBA ata1.00: configured for PIO4 scsi 0:0:0:0: Direct-Access ATA CF 1GB 0820 PQ: 0\ ANSI: 5 sd 0:0:0:0: [sda] 1989792 512-byte logical blocks: (1.01 GB/971 MiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't\ support DPO or FUA sda: sda1 sda2 sd 0:0:0:0: [sda] Attached SCSI disk Fixes: 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h") Cc: Alban Bedel Cc: Ralf Baechle Cc: Arnd Bergmann Cc: #v4.3+ Signed-off-by: Gabor Juhos Signed-off-by: Tejun Heo drivers/ata/pata_rb532_cf.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 619fe32640b4b01f370574d50344ae0f62689816 Author: Jamal Hadi Salim Date: Thu Feb 18 07:38:04 2016 -0500 net_sched fix: reclassification needs to consider ether protocol changes actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, will ask for the packet to be reclassified. We then need to restart the classification with the new proto header. Example setup used to catch this: sudo tc qdisc add dev $ETH ingress sudo $TC filter add dev $ETH parent ffff: pref 1 protocol 802.1Q \ u32 match u32 0 0 flowid 1:1 \ action vlan pop reclassify Fixes: 3b3ae880266d ("net: sched: consolidate tc_classify{,_compat}") Signed-off-by: Jamal Hadi Salim Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/sched/sch_api.c | 1 + 1 file changed, 1 insertion(+) commit 39712e599b3d01bc34df113f51652ae4e1bdb8bf Merge: 562a9f9 28a01d2 Author: David S. Miller Date: Thu Feb 18 10:44:27 2016 -0500 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw fixes Another bulk of fixes from Ido. ==================== Signed-off-by: David S. Miller commit 28a01d2d7dbf6d56e6130b3094b7c62a54773f27 Author: Ido Schimmel Date: Thu Feb 18 11:30:02 2016 +0100 mlxsw: spectrum: Allow for PVID deletion When PVID is toggled off on a port member in a VLAN filtering bridge or the PVID VLAN is deleted, make the port drop untagged packets. Reverse the operation when PVID is toggled back on. Set the PVID back to the default (1), when leaving the bridge so that untagged traffic will be directed to the CPU. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 69 +++++++++++++++++++--- 3 files changed, 63 insertions(+), 9 deletions(-) commit 148f472da5db4d78fcfe61807c18f020eb5bd7fc Author: Ido Schimmel Date: Thu Feb 18 11:30:01 2016 +0100 mlxsw: reg: Add the Switch Port Acceptable Frame Types register When VLAN filtering is enabled on a bridge and PVID is deleted from a bridge port, then untagged frames are not allowed to ingress into the bridge from this port. Add the Switch Port Acceptable Frame Types (SPAFT) register, which configures the frame admittance of the port. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 1a1503c5396eb7f2edf4b8ef6067853014478c0c Author: Alexandra Yates Date: Wed Feb 17 18:21:21 2016 -0800 i2c: i801: Adding Intel Lewisburg support for iTCO Starting from Intel Sunrisepoint (Skylake PCH) the iTCO watchdog resources have been moved to reside under the i801 SMBus host controller whereas previously they were under the LPC device. This patch adds Intel lewisburg SMBus support for iTCO device. It allows to load watchdog dynamically when the hardware is present. Fixes: cdc5a3110e7c ("i2c: i801: add Intel Lewisburg device IDs") Reviewed-by: Jean Delvare Signed-off-by: Alexandra Yates Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-i801.c | 2 ++ 1 file changed, 2 insertions(+) commit d061c1caa31d4d9792cfe48a2c6b309a0e01ef46 Author: Bjørn Mork Date: Fri Feb 12 16:40:00 2016 +0100 USB: option: add "4G LTE usb-modem U901" Thomas reports: T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=05c6 ProdID=6001 Rev=00.00 S: Manufacturer=USB Modem S: Product=USB Modem S: SerialNumber=1234567890ABCDEF C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage Cc: Reported-by: Thomas Schäfer Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit a150b085b66c87bd4d362a523cb85ce2b0a2d77b Author: Vineet Gupta Date: Tue Feb 16 12:36:18 2016 +0530 ARCv2: boot report CCMs (Closely Coupled Memories) - ARCv2 uses a seperate BCR for {I,D}CCM base address: ARCompact encoded both base/size in same BCR - Size encoding in common BCR is different for ARCompact/ARCv2 Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 32 ++++++++++------- arch/arc/kernel/setup.c | 78 +++++++++++++++++++++++++++--------------- 2 files changed, 70 insertions(+), 40 deletions(-) commit 98341f7dc9d9080d7999654ab589657272559b04 Author: Vineet Gupta Date: Mon Feb 15 15:58:42 2016 +0530 ARCv2: boot print Low Latency Memory Signed-off-by: Vineet Gupta arch/arc/kernel/mcip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0eca6fdb3193410fbe66b6f064431cc394513e82 Author: Vineet Gupta Date: Tue Feb 16 09:42:57 2016 +0530 ARC: Assume multiplier is always present It is unlikely that designs running Linux will not have multiplier. Further the current support is not complete as tool don't generate a multilib w/o multiplier. Signed-off-by: Vineet Gupta arch/arc/Kconfig | 8 -------- arch/arc/Makefile | 4 ---- arch/arc/kernel/setup.c | 2 -- 3 files changed, 14 deletions(-) commit 6627ae19385283b89356a199d7f03c75ba35fb29 Author: Ken Lin Date: Mon Feb 1 14:57:25 2016 -0500 USB: cp210x: add IDs for GE B650V3 and B850V3 boards Add USB ID for cp2104/5 devices on GE B650v3 and B850v3 boards. Signed-off-by: Ken Lin Signed-off-by: Akshay Bhat Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 2 ++ 1 file changed, 2 insertions(+) commit 3158a8d416f4e1b79dcc867d67cb50013140772c Author: Andrey Skvortsov Date: Fri Jan 29 00:07:30 2016 +0300 USB: option: add support for SIM7100E $ lsusb: Bus 001 Device 101: ID 1e0e:9001 Qualcomm / Option $ usb-devices: T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=101 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 2 P: Vendor=1e0e ProdID=9001 Rev= 2.32 S: Manufacturer=SimTech, Incorporated S: Product=SimTech, Incorporated S: SerialNumber=0123456789ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=80 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) The last interface (6) is used for Android Composite ADB interface. Serial port layout: 0: QCDM/DIAG 1: NMEA 2: AT 3: AT/PPP 4: audio Signed-off-by: Andrey Skvortsov Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 67ec1072b053c15564e6090ab30127895dc77a89 Author: Takashi Iwai Date: Wed Feb 17 14:30:26 2016 +0100 ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream A non-atomic PCM stream may take snd_pcm_link_rwsem rw semaphore twice in the same code path, e.g. one in snd_pcm_action_nonatomic() and another in snd_pcm_stream_lock(). Usually this is OK, but when a write lock is issued between these two read locks, the problem happens: the write lock is blocked due to the first reade lock, and the second read lock is also blocked by the write lock. This eventually deadlocks. The reason is the way rwsem manages waiters; it's queued like FIFO, so even if the writer itself doesn't take the lock yet, it blocks all the waiters (including reads) queued after it. As a workaround, in this patch, we replace the standard down_write() with an spinning loop. This is far from optimal, but it's good enough, as the spinning time is supposed to be relatively short for normal PCM operations, and the code paths requiring the write lock aren't called so often. Reported-by: Vinod Koul Tested-by: Ramesh Babu Cc: # v3.18+ Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit f4eafd8bcd5229e998aa252627703b8462c3b90f Author: Toshi Kani Date: Wed Feb 17 18:16:54 2016 -0700 x86/mm: Fix vmalloc_fault() to handle large pages properly A kernel page fault oops with the callstack below was observed when a read syscall was made to a pmem device after a huge amount (>512GB) of vmalloc ranges was allocated by ioremap() on a x86_64 system: BUG: unable to handle kernel paging request at ffff880840000ff8 IP: vmalloc_fault+0x1be/0x300 PGD c7f03a067 PUD 0 Oops: 0000 [#1] SM Call Trace: __do_page_fault+0x285/0x3e0 do_page_fault+0x2f/0x80 ? put_prev_entity+0x35/0x7a0 page_fault+0x28/0x30 ? memcpy_erms+0x6/0x10 ? schedule+0x35/0x80 ? pmem_rw_bytes+0x6a/0x190 [nd_pmem] ? schedule_timeout+0x183/0x240 btt_log_read+0x63/0x140 [nd_btt] : ? __symbol_put+0x60/0x60 ? kernel_read+0x50/0x80 SyS_finit_module+0xb9/0xf0 entry_SYSCALL_64_fastpath+0x1a/0xa4 Since v4.1, ioremap() supports large page (pud/pmd) mappings in x86_64 and PAE. vmalloc_fault() however assumes that the vmalloc range is limited to pte mappings. vmalloc faults do not normally happen in ioremap'd ranges since ioremap() sets up the kernel page tables, which are shared by user processes. pgd_ctor() sets the kernel's PGD entries to user's during fork(). When allocation of the vmalloc ranges crosses a 512GB boundary, ioremap() allocates a new pud table and updates the kernel PGD entry to point it. If user process's PGD entry does not have this update yet, a read/write syscall to the range will cause a vmalloc fault, which hits the Oops above as it does not handle a large page properly. Following changes are made to vmalloc_fault(). 64-bit: - No change for the PGD sync operation as it handles large pages already. - Add pud_huge() and pmd_huge() to the validation code to handle large pages. - Change pud_page_vaddr() to pud_pfn() since an ioremap range is not directly mapped (while the if-statement still works with a bogus addr). - Change pmd_page() to pmd_pfn() since an ioremap range is not backed by struct page (while the if-statement still works with a bogus addr). 32-bit: - No change for the sync operation since the index3 PGD entry covers the entire vmalloc range, which is always valid. (A separate change to sync PGD entry is necessary if this memory layout is changed regardless of the page size.) - Add pmd_huge() to the validation code to handle large pages. This is for completeness since vmalloc_fault() won't happen in ioremap'd ranges as its PGD entry is always valid. Reported-by: Henning Schild Signed-off-by: Toshi Kani Acked-by: Borislav Petkov Cc: # 4.1+ Cc: Andrew Morton Cc: Andy Lutomirski Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: linux-mm@kvack.org Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/1455758214-24623-1-git-send-email-toshi.kani@hpe.com Signed-off-by: Ingo Molnar arch/x86/mm/fault.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 562a9f91a0300ecaaf28722f57bcdd9cd5f38f0e Author: Insu Yun Date: Mon Feb 15 21:23:47 2016 -0500 et131x: check return value of dma_alloc_coherent For error handling, dma_alloc_coherent's return value needs to be checked, not argument. Signed-off-by: Insu Yun Signed-off-by: David S. Miller drivers/net/ethernet/agere/et131x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fbe366ce304d836d53685c1dd26865dc1fea66c Merge: 1eea84b ad2eceb Author: David S. Miller Date: Wed Feb 17 22:24:57 2016 -0500 Merge branch 'thunderx-fixes' Sunil Goutham says: ==================== net: thunderx: Miscellaneous fixes This patch series fixes couple of issues w.r.t multiqset mode and receive packet statastics. ==================== Signed-off-by: David S. Miller commit ad2ecebd67d8a80fe5412d11df375a5ed2db7cd1 Author: Sunil Goutham Date: Tue Feb 16 16:29:51 2016 +0530 net: thunderx: Fix receive packet stats Counting rx packets for every CQE_RX in CQ irq handler is incorrect. Synchronization is missing when multiple queues are receiving packets simultaneously. Like transmit packet stats use HW stats here. Also removed unused 'cqe_type' parameter in nicvf_rcv_pkt_handler(). Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 11 ++++++----- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 8 ++------ drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 3 +-- 3 files changed, 9 insertions(+), 13 deletions(-) commit 8d210d54c5250c52b69266f299e64fe8356f9453 Author: Sunil Goutham Date: Tue Feb 16 16:29:50 2016 +0530 net: thunderx: Fix for HW TSO not enabled for secondary qsets For secondary Qsets 'hw_tso' is not getting set as probe() returns much earlier. Fixed it by moving silicon revision check. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6a9bab79bb79bd9b2eda16f0aba1b4c43f677be9 Author: Sunil Goutham Date: Tue Feb 16 16:29:49 2016 +0530 net: thunderx: Fix for multiqset not configured upon interface toggle When a interface is assigned morethan 8 queues and the logical interface is toggled i.e down & up, additional queues or qsets are not initialized as secondary qset count is being set to zero while tearing down. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 1 - 1 file changed, 1 deletion(-) commit 1eea84b74cd28773c37bf1bda69915f7b9a67efc Author: Insu Yun Date: Mon Feb 15 21:30:33 2016 -0500 tcp: correctly crypto_alloc_hash return check crypto_alloc_hash never returns NULL Signed-off-by: Insu Yun Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73dcb556538a4192222c3a919a51e1701bae553b Author: Florian Fainelli Date: Wed Feb 17 18:43:22 2016 -0800 net: dsa: Unregister slave_dev in error path With commit 0071f56e46da ("dsa: Register netdev before phy"), we are now trying to free a network device that has been previously registered, and in case of errors, this will make us hit the BUG_ON(dev->reg_state != NETREG_UNREGISTERED) condition. Fix this by adding a missing unregister_netdev() before free_netdev(). Fixes: 0071f56e46da ("dsa: Register netdev before phy") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 1 + 1 file changed, 1 insertion(+) commit 67b4eab91caf2ad574cab1b17ae09180ea2e116e Author: Bjorn Helgaas Date: Wed Feb 17 12:26:38 2016 -0600 Revert "PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed" Revert 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed"). This is part of reverting 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") to fix regressions it introduced. Link: https://bugzilla.kernel.org/show_bug.cgi?id=111211 Fixes: 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki CC: Jiang Liu arch/x86/pci/intel_mid_pci.c | 4 ++-- arch/x86/pci/irq.c | 10 ++++++---- drivers/acpi/pci_irq.c | 10 ++++++---- include/linux/pci.h | 17 ----------------- 4 files changed, 14 insertions(+), 27 deletions(-) commit aeb67ae7d1a318c8456345b8012474be6a3ff74a Author: Oleksij Rempel Date: Fri Jan 29 10:57:53 2016 +0100 irqchip/mxs: Add missing set_handle_irq() The rework of the driver missed to move the call to set_handle_irq() into asm9260_of_init(). As a consequence no interrupt entry point is installed and no interrupts are delivered Solution is: Install the interrupt entry handler. Fixes: 7e4ac676ee ("irqchip/mxs: Add Alphascale ASM9260 support") Signed-off-by: Oleksij Rempel Link: https://lkml.kernel.org/r/1454061473-24957-1-git-send-email-linux@rempel-privat.de Signed-off-by: Jason Cooper drivers/irqchip/irq-mxs.c | 1 + 1 file changed, 1 insertion(+) commit 79be1a1c9090048f6f327204b8b1cf4ac067b487 Author: Clemens Gruber Date: Mon Feb 15 23:46:45 2016 +0100 phy: marvell: Fix and unify reg-init behavior For the Marvell 88E1510, marvell_of_reg_init was called too late, in the config_aneg function. Since commit 113c74d83eef ("net: phy: turn carrier off on phy attach"), this lead to the link not coming up at boot anymore, due to the phy state machine being stuck at waiting for interrupts (off by default on the 88E1510). For seven other Marvell PHYs, marvell_of_reg_init was not called at all. Add a generic marvell_config_init function, which in turn calls marvell_of_reg_init. PHYs, which already have a specific config_init function with a call to marvell_of_reg_init, are left untouched. The generic marvell_config_init function is called for all the others, to get consistent behavior across all Marvell PHYs. Fixes: 113c74d83eef ("net: phy: turn carrier off on phy attach") Signed-off-by: Clemens Gruber Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 7dcd182bec271ab341b05b66b6006995795fc0e7 Author: Jessica Yu Date: Tue Feb 16 17:32:33 2016 -0500 ftrace/module: remove ftrace module notifier Remove the ftrace module notifier in favor of directly calling ftrace_module_enable() and ftrace_release_mod() in the module loader. Hard-coding the function calls directly in the module loader removes dependence on the module notifier call chain and provides better visibility and control over what gets called when, which is important to kernel utilities such as livepatch. This fixes a notifier ordering issue in which the ftrace module notifier (and hence ftrace_module_enable()) for coming modules was being called after klp_module_notify(), which caused livepatch modules to initialize incorrectly. This patch removes dependence on the module notifier call chain in favor of hard coding the corresponding function calls in the module loader. This ensures that ftrace and livepatch code get called in the correct order on patch module load and unload. Fixes: 5156dca34a3e ("ftrace: Fix the race between ftrace and insmod") Signed-off-by: Jessica Yu Reviewed-by: Steven Rostedt Reviewed-by: Petr Mladek Acked-by: Rusty Russell Reviewed-by: Josh Poimboeuf Reviewed-by: Miroslav Benes Signed-off-by: Jiri Kosina include/linux/ftrace.h | 6 ++++-- kernel/module.c | 4 ++++ kernel/trace/ftrace.c | 36 +----------------------------------- 3 files changed, 9 insertions(+), 37 deletions(-) commit 29e73269aa4d36f92b35610c25f8b01c789b0dc8 Author: Guillaume Nault Date: Mon Feb 15 17:01:10 2016 +0100 pppoe: fix reference counting in PPPoE proxy Drop reference on the relay_po socket when __pppoe_xmit() succeeds. This is already handled correctly in the error path. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/pppoe.c | 2 ++ 1 file changed, 2 insertions(+) commit 705bcdda81eda8b4b4c564c4be7b8cfad6a180d6 Author: Geert Uytterhoeven Date: Mon Feb 15 13:41:31 2016 +0100 ravb: Update DT binding example for final CPG/MSSR bindings The example in the DT binding documentation uses the preliminary DT bindings for the r8a7795 MSTP clocks, which never went upstream. Update the example to use the DT bindings for the upstream Clock Pulse Generator / Module Standby and Software Reset hardware block. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/renesas,ravb.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ffa8a1863962b0fc29f4670c3b949d87f1b54bf Merge: 853effc 6a9863a Author: David S. Miller Date: Wed Feb 17 15:52:59 2016 -0500 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw fixes Just a couple of fixes from Ido. ==================== Signed-off-by: David S. Miller commit 6a9863a62206dad8ad236bcde489978aedb072fa Author: Ido Schimmel Date: Mon Feb 15 13:19:54 2016 +0100 mlxsw: spectrum: Set STP state when leaving 802.1D bridge When a VLAN device leaves a bridge its STP state is set to DISABLED, which causes the hardware to discard any packets coming through the port with this VLAN. Fix that by setting STP state to FORWARDING when the device leaves its bridge and allow traffic to be directed to CPU. Fixes: 26f0e7fb15de ("mlxsw: spectrum: Add support for VLAN devices bridging") Reported-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1e5ad30c649a82a062ce79a87c1296e6c6f328c2 Author: Ido Schimmel Date: Mon Feb 15 13:19:53 2016 +0100 mlxsw: Treat local port 64 as valid MLXSW_PORT_MAX_PORTS represents the maximum number of local ports, which is 65 for both ASICs (SwitchX-2 and Spectrum) supported by this driver. Fixes: 93c1edb27f9e ("mlxsw: Introduce Mellanox switch driver core") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 853effc55b0f975abd6d318cca486a9c1b67e10f Author: Mark Tomlinson Date: Mon Feb 15 16:24:44 2016 +1300 l2tp: Fix error creating L2TP tunnels A previous commit (33f72e6) added notification via netlink for tunnels when created/modified/deleted. If the notification returned an error, this error was returned from the tunnel function. If there were no listeners, the error code ESRCH was returned, even though having no listeners is not an error. Other calls to this and other similar notification functions either ignore the error code, or filter ESRCH. This patch checks for ESRCH and does not flag this as an error. Reviewed-by: Hamish Martin Signed-off-by: Mark Tomlinson Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 2850713576e81e3b887cd92a9965fba0dd1717c0 Merge: c28b947 18f922d0 Author: Linus Torvalds Date: Wed Feb 17 11:59:23 2016 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A collection of fixes from the past few weeks that should go into 4.5. This contains: - Overflow fix for sysfs discard show function from Alan. - A stacking limit init fix for max_dev_sectors, so we don't end up artificially capping some use cases. From Keith. - Have blk-mq proper end unstarted requests on a dying queue, instead of pushing that to the driver. From Keith. - NVMe: - Update to Kconfig description for NVME_SCSI, since it was vague and having it on is important for some SUSE distros. From Christoph. - Set of fixes from Keith, around surprise removal. Also kills the no-merge flag, so it supports merging. - Set of fixes for lightnvm from Matias, Javier, and Wenwei. - Fix null_blk oops when asked for lightnvm, but not available. From Matias. - Copy-to-user EINTR fix from Hannes, fixing a case where SG_IO fails if interrupted by a signal. - Two floppy fixes from Jiri, fixing signal handling and blocking open. - A use-after-free fix for O_DIRECT, from Mike Krinkin. - A block module ref count fix from Roman Pen. - An fs IO wait accounting fix for O_DSYNC from Stephane Gasparini. - Smaller reallo fix for xen-blkfront from Bob Liu. - Removal of an unused struct member in the deadline IO scheduler, from Tahsin. - Also from Tahsin, properly initialize inode struct members associated with cgroup writeback, if enabled. - From Tejun, ensure that we keep the superblock pinned during cgroup writeback" * 'for-linus' of git://git.kernel.dk/linux-block: (25 commits) blk: fix overflow in queue_discard_max_hw_show writeback: initialize inode members that track writeback history writeback: keep superblock pinned during cgroup writeback association switches bio: return EINTR if copying to user space got interrupted NVMe: Rate limit nvme IO warnings NVMe: Poll device while still active during remove NVMe: Requeue requests on suspended queues NVMe: Allow request merges NVMe: Fix io incapable return values blk-mq: End unstarted requests on dying queue block: Initialize max_dev_sectors to 0 null_blk: oops when initializing without lightnvm block: fix module reference leak on put_disk() call for cgroups throttle nvme: fix Kconfig description for BLK_DEV_NVME_SCSI kernel/fs: fix I/O wait not accounted for RW O_DSYNC floppy: refactor open() flags handling lightnvm: allow to force mm initialization lightnvm: check overflow and correct mlc pairs lightnvm: fix request intersection locking in rrpc lightnvm: warn if irqs are disabled in lock laddr ... commit c28b947d048d6539389309af70be0ac599122ec0 Merge: 35683dd 43f3408 Author: Linus Torvalds Date: Wed Feb 17 11:50:53 2016 -0800 Merge tag 'devicetree-fixes-for-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: - Fix irq msi-map calculation for nonzero rid-base. - Binding doc updates for GICv3, fsl-imx-uart, and S3C RTC. * tag 'devicetree-fixes-for-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: rtc: s3c: Document required clocks in the DT binding serial: fsl-imx-uart: Fix typo in fsl,dte-mode description dt-bindings: arm, gic-v3: require that reserved cells are always 0 of/irq: Fix msi-map calculation for nonzero rid-base commit 35683dd326b89751b5b45cb188978c83b22729c5 Merge: a9f70bd dada168 Author: Linus Torvalds Date: Wed Feb 17 11:45:10 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This has two main sets of fixes: - A bunch of Exynos fixes, mainly for their MIC component. - vblank regression fixes from Mario, apparantly some changes in 4.4 caused some vblank breakage on radeon/nouveau, this set fixes all the issues seen. There is also a revert of one of the MST changse, that I was overzealous in including, that broke 30" MST monitors, and two qxl fixes" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/qxl: fix erroneous return value drm/nouveau/display: Enable vblank irqs after display engine is on again. drm/radeon/pm: Handle failure of drm_vblank_get. drm: Fix treatment of drm_vblank_offdelay in drm_vblank_on() (v2) drm: Fix drm_vblank_pre/post_modeset regression from Linux 4.4 drm: Prevent vblank counter bumps > 1 with active vblank clients. (v2) drm: No-Op redundant calls to drm_vblank_off() (v2) drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command Revert "drm/dp/mst: change MST detection scheme" drm/exynos/decon: fix disable clocks order drm/exynos: fix incorrect cpu address for dma_mmap_attrs() drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable drm/exynos: dsi: restore support for drm bridge drm/exynos: mic: make all functions static drm/exynos: mic: convert to component framework drm/exynos: mic: use devm_clk interface drm/exynos: fix types for compilation on 64bit architectures drm/exynos: ipp: fix incorrect format specifiers in debug messages drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS commit a9f70bd4e787191ca27941e4dd9c1de00593fb58 Merge: 65c23c6 b33c8ff Author: Linus Torvalds Date: Wed Feb 17 11:35:41 2016 -0800 Merge tag 'trace-fixes-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "This includes two fixes. The first is something that has come up a few times and has been worked out individually, but it's come up now enough that the problem should be generic. Tracepoints are protected by RCU sched. There are several tracepoints within core infrastructure like kfree(). If a tracepoint is called when the CPU is going down, or when it's coming up but has yet to be recognized by RCU, a RCU warning is triggered. This is a true bug as that tracepoint is not protected by RCU. Usually, this is taken care of by testing for cpu online as a tracepoint condition. But as this is happening more often, moving it from a individual tracepoint to a check in the tracepoint infrastructure is more robust. Note, there is now a duplicate of a cpu online test, because this update does not remove the individual checks. But the overhead is small enough that the removal can be done in another release. The second change is strange linker breakage due to the branch tracer's builtin_constant_p() check failing, and treating the condition as a variable instead of a constant. Arnd Bergmann found that this can be fixed by testing !!(cond) instead of just (cond)" * tag 'trace-fixes-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix freak link error caused by branch tracer tracepoints: Do not trace when cpu is offline commit fe25d078874f2c29c38f4160467d74f5756537c9 Author: Bjorn Helgaas Date: Wed Feb 17 12:26:33 2016 -0600 Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled" Revert 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled"). This is part of reverting 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") to fix regressions it introduced. Link: https://bugzilla.kernel.org/show_bug.cgi?id=111211 Fixes: 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki CC: Jiang Liu CC: Joerg Roedel arch/x86/pci/common.c | 8 -------- 1 file changed, 8 deletions(-) commit 2eca0d6ceea1f108b2d3ac81fb34698c4fd41006 Author: Shanker Donthineni Date: Tue Feb 16 18:00:36 2016 -0600 irqchip/gicv3-its: Avoid cache flush beyond ITS_BASERn memory size Function its_alloc_tables() maintains two local variables, "order" and and "alloc_size", to hold memory size that has been allocated to ITS_BASEn. We don't always refresh the variable alloc_size whenever value of the variable order changes, causing the following two problems. - Cache flush operation with size more than required. - Information reported by pr_info is not correct. Use a helper macro that converts page order to size in bytes instead of variable "alloc_size" to fix both the problems. Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 18f922d037211a15543af935861bf92161e697e9 Author: Alan Date: Wed Feb 17 14:15:30 2016 +0000 blk: fix overflow in queue_discard_max_hw_show We get this right for queue_discard_max_show but not max_hw_show. Follow the same pattern as queue_discard_max_show instead so that we don't truncate. Signed-off-by: Alan Cox Signed-off-by: Jens Axboe block/blk-sysfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 437b300c6b28040ad87e4caf042e05f2c5f13c6d Author: Scott Mayhew Date: Tue Feb 16 16:20:25 2016 -0500 auth_gss: fix panic in gss_pipe_downcall() in fips mode On Mon, 15 Feb 2016, Trond Myklebust wrote: > Hi Scott, > > On Mon, Feb 15, 2016 at 2:28 PM, Scott Mayhew wrote: > > md5 is disabled in fips mode, and attempting to import a gss context > > using md5 while in fips mode will result in crypto_alg_mod_lookup() > > returning -ENOENT, which will make its way back up to > > gss_pipe_downcall(), where the BUG() is triggered. Handling the -ENOENT > > allows for a more graceful failure. > > > > Signed-off-by: Scott Mayhew > > --- > > net/sunrpc/auth_gss/auth_gss.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c > > index 799e65b..c30fc3b 100644 > > --- a/net/sunrpc/auth_gss/auth_gss.c > > +++ b/net/sunrpc/auth_gss/auth_gss.c > > @@ -737,6 +737,9 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) > > case -ENOSYS: > > gss_msg->msg.errno = -EAGAIN; > > break; > > + case -ENOENT: > > + gss_msg->msg.errno = -EPROTONOSUPPORT; > > + break; > > default: > > printk(KERN_CRIT "%s: bad return from " > > "gss_fill_context: %zd\n", __func__, err); > > -- > > 2.4.3 > > > > Well debugged, but I unfortunately do have to ask if this patch is > sufficient? In addition to -ENOENT, and -ENOMEM, it looks to me as if > crypto_alg_mod_lookup() can also fail with -EINTR, -ETIMEDOUT, and > -EAGAIN. Don't we also want to handle those? You're right, I was focusing on the panic that I could easily reproduce. I'm still not sure how I could trigger those other conditions. > > In fact, peering into the rats nest that is > gss_import_sec_context_kerberos(), it looks as if that is just a tiny > subset of all the errors that we might run into. Perhaps the right > thing to do here is to get rid of the BUG() (but keep the above > printk) and just return a generic error? That sounds fine to me -- updated patch attached. -Scott >From d54c6b64a107a90a38cab97577de05f9a4625052 Mon Sep 17 00:00:00 2001 From: Scott Mayhew Date: Mon, 15 Feb 2016 15:12:19 -0500 Subject: [PATCH] auth_gss: remove the BUG() from gss_pipe_downcall() Instead return a generic error via gss_msg->msg.errno. None of the errors returned by gss_fill_context() should necessarily trigger a kernel panic. Signed-off-by: Scott Mayhew Signed-off-by: Trond Myklebust net/sunrpc/auth_gss/auth_gss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c89757061a4e4017a21ef632dc100449a7bab7dd Author: Kinglong Mee Date: Mon Feb 1 09:39:29 2016 +0800 pnfs/blocklayout: fix a memeory leak when using,vmalloc_to_page unreferenced object 0xffffc90000abf000 (size 16900): comm "fsync02", pid 15765, jiffies 4297431627 (age 423.772s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 a0 c2 19 00 88 ff ff ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x4e/0xb0 [] __vmalloc_node_range+0x231/0x280 [] __vmalloc+0x4a/0x50 [] ext_tree_prepare_commit+0x231/0x2e0 [blocklayoutdriver] [] bl_prepare_layoutcommit+0xe/0x10 [blocklayoutdriver] [] pnfs_layoutcommit_inode+0x29c/0x330 [nfsv4] [] pnfs_generic_sync+0x13/0x20 [nfsv4] [] nfs4_file_fsync+0x58/0x150 [nfsv4] [] vfs_fsync_range+0x4b/0xb0 [] do_fsync+0x3d/0x70 [] SyS_fsync+0x10/0x20 [] entry_SYSCALL_64_fastpath+0x12/0x76 [] 0xffffffffffffffff v2, add missing include header Signed-off-by: Kinglong Mee Signed-off-by: Trond Myklebust fs/nfs/blocklayout/extent_tree.c | 10 ++++++++-- include/linux/nfs_xdr.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) commit 4bdf87ebda016b864b388f96ae349e76983ebac4 Author: Christoph Hellwig Date: Wed Feb 17 15:48:28 2016 +0100 nfs4: fix stateid handling for the NFS v4.2 operations The newly added NFS v4.2 operations (ALLOCATE, DEALLOCATE, SEEK and CLONE) use a helper called nfs42_set_rw_stateid to select a stateid that is sent to the server. But they don't set the inode and state fields in the nfs4_exception structure, and this don't partake in the stateid recovery protocol. Because of this they will simply return errors insted of trying to recover a stateid when the server return a BAD_STATEID error. Additionally CLONE has the problem that it operates on two files and thus two stateids, and thus needs to call the exception handler twice to recover stateids. While we're at it stop grabbing an addititional reference to the open context in all these operations - having the file open guarantees that the open context won't go away. All this can be produces with the generic/168 and generic/170 tests in xfstests which stress the CLONE stateid handling. Signed-off-by: Christoph Hellwig Signed-off-by: Trond Myklebust fs/nfs/nfs42proc.c | 119 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 43 deletions(-) commit d9dfd8d741683347ee159d25f5b50c346a0df557 Author: Benjamin Coddington Date: Wed Feb 17 10:41:41 2016 -0500 NFSv4: Fix a dentry leak on alias use In the case where d_add_unique() finds an appropriate alias to use it will have already incremented the reference count. An additional dget() to swap the open context's dentry is unnecessary and will leak a reference. Signed-off-by: Benjamin Coddington Fixes: 275bb307865a3 ("NFSv4: Move dentry instantiation into the NFSv4-...") Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d148bbd37a52b030b131ac5408c0f8293325ca0b Author: David Rivshin Date: Fri Feb 12 19:45:36 2016 -0500 drivers: net: cpsw-phy-sel: add dev_warn() for unsupported PHY mode The cpsw-phy-sel driver supports only MII, RMII, and RGMII PHY modes, and silently handled any other values as if MII was specified. In a case where the PHY mode was incorrectly specified, or a bug elsewhere, there would be no indication of a problem. If MII was the correct mode, then this will go unnoticed, otherwise the symptom will be a failure to transmit/receive data over the RMII/RGMII link. Add a dev_warn() to make this condition obvious and provide a breadcrumb to follow. Cc: Mugunthan V N Signed-off-by: David Rivshin Acked-by: Mugunthan V N Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw-phy-sel.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit cd772de358d6e001d308292c542f7908511287a4 Author: Woojung.Huh@microchip.com Date: Thu Feb 11 17:29:47 2016 +0000 phy: keep pause flags in phy driver features genphy_config_init() masked out pause flags set in phy driver structure. Pause flags needs to be preserved in phydev->supported & phydev->advertising. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1543b765d21c09e9f7c2a38a00f56433bbdc28ad Merge: aac8d3c 925ab1a Author: David S. Miller Date: Wed Feb 17 10:29:27 2016 -0500 Merge branch 'mlx4-fixes' Or Gerlitz says: ==================== Mellanox 10/40G mlx4 driver fixes for 4.5-rc Bunch of fixes from the team to the mlx4 Eth and core drivers. Series generated against net commit aac8d3c "qmi_wwan: add "4G LTE usb-modem U901"" Please push patches 1,2 and 6 to -stable as well changes from v0: - handled another wrongly accounted HW counter in patch #1 (Rick) - fixed coding style issues in patch #4 (Sergei) ==================== Signed-off-by: David S. Miller commit 925ab1aa9394bbaeac47ee5b65d3fdf0fb8135cf Author: Eugenia Emantayev Date: Wed Feb 17 17:24:27 2016 +0200 net/mlx4_en: Avoid changing dev->features directly in run-time It's forbidden to manually change dev->features in run-time. Currently, this is done in the driver to make sure that GSO_UDP_TUNNEL is advertized only when VXLAN tunnel is set. However, since the stack actually does features intersection with hw_enc_features, we can safely revert to advertizing features early when registering the netdevice. Fixes: f4a1edd56120 ('net/mlx4_en: Advertize encapsulation offloads [...]') Signed-off-by: Eugenia Emantayev Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 85743f1eb34548ba4b056d2f184a3d107a3b8917 Author: Huy Nguyen Date: Wed Feb 17 17:24:26 2016 +0200 net/mlx4_core: Set UAR page size to 4KB regardless of system page size problem description: The current code sets UAR page size equal to system page size. The ConnectX-3 and ConnectX-3 Pro HWs require minimum 128 UAR pages. The mlx4 kernel drivers are not loaded if there is less than 128 UAR pages. solution: Always set UAR page to 4KB. This allows more UAR pages if the OS has PAGE_SIZE larger than 4KB. For example, PowerPC kernel use 64KB system page size, with 4MB uar region, there are 4MB/2/64KB = 32 uars (half for uar, half for blueflame). This does not meet minimum 128 UAR pages requirement. With 4KB UAR page, there are 4MB/2/4KB = 512 uars which meet the minimum requirement. Note that only codes in mlx4_core that deal with firmware know that uar page size is 4KB. Codes that deal with usr page in cq and qp context (mlx4_ib, mlx4_en and part of mlx4_core) still have the same assumption that uar page size equals to system page size. Note that with this implementation, on 64KB system page size kernel, there are 16 uars per system page but only one uars is used. The other 15 uars are ignored because of the above assumption. Regarding SR-IOV, mlx4_core in hypervisor will set the uar page size to 4KB and mlx4_core code in virtual OS will obtain the uar page size from firmware. Regarding backward compatibility in SR-IOV, if hypervisor has this new code, the virtual OS must be updated. If hypervisor has old code, and the virtual OS has this new code, the new code will be backward compatible with the old code. If the uar size is big enough, this new code in VF continues to work with 64 KB uar page size (on PowerPc kernel). If the uar size does not meet 128 uars requirement, this new code not loaded in VF and print the same error message as the old code in Hypervisor. Signed-off-by: Huy Nguyen Reviewed-by: Yishai Hadas Signed-off-by: David S. Miller drivers/infiniband/hw/mlx4/qp.c | 7 ++- drivers/net/ethernet/mellanox/mlx4/cq.c | 4 +- drivers/net/ethernet/mellanox/mlx4/en_resources.c | 3 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 4 +- drivers/net/ethernet/mellanox/mlx4/eq.c | 7 +-- drivers/net/ethernet/mellanox/mlx4/main.c | 56 ++++++++++++++++++----- drivers/net/ethernet/mellanox/mlx4/pd.c | 12 +++-- include/linux/mlx4/device.h | 13 ++++++ 8 files changed, 84 insertions(+), 22 deletions(-) commit 22e3817e6c8301dc0520b855c8a2d764580e719c Author: Daniel Jurgens Date: Wed Feb 17 17:24:25 2016 +0200 net/mlx4_core: Do not BUG_ON during reset when PCI is offline The PCI channel could go offline during reset due to EEH. Don't bug on in this case, the error is recoverable. Fixes: f6bc11e42646 ('net/mlx4_core: Enhance the catas flow to support device reset') Signed-off-by: Daniel Jurgens Reviewed-by: Yishai Hadas Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/catas.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 6b94bab0ee8d5def6a2aac0ef6204ee6e24386b6 Author: Eran Ben Elisha Date: Wed Feb 17 17:24:24 2016 +0200 net/mlx4_core: Fix potential corruption in counters database The error flow in procedure handle_existing_counter() is wrong. The procedure should exit after encountering the error, not continue as if everything is OK. Fixes: 68230242cdbc ('net/mlx4_core: Add port attribute when tracking counters') Signed-off-by: Eran Ben Elisha Signed-off-by: Jack Morgenstein Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 31c128b66e5b28f468076e4f3ca3025c35342041 Author: Eugenia Emantayev Date: Wed Feb 17 17:24:23 2016 +0200 net/mlx4_en: Choose time-stamping shift value according to HW frequency Previously, the shift value used for time-stamping was constant and didn't depend on the HW chip frequency. Change that to take the frequency into account and calculate the maximal value in cycles per wraparound of ten seconds. This time slot was chosen since it gives a good accuracy in time synchronization. Algorithm for shift value calculation: * Round up the maximal value in cycles to nearest power of two * Calculate maximal multiplier by division of all 64 bits set to above result * Then, invert the function clocksource_khz2mult() to get the shift from maximal mult value Fixes: ec693d47010e ('net/mlx4_en: Add HW timestamping (TS) support') Signed-off-by: Eugenia Emantayev Reviewed-by: Matan Barak Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_clock.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 281e8b2fdf8e4ef366b899453cae50e09b577ada Author: Amir Vadai Date: Wed Feb 17 17:24:22 2016 +0200 net/mlx4_en: Count HW buffer overrun only once RdropOvflw counts overrun of HW buffer, therefore should be used for rx_fifo_errors only. Currently RdropOvflw counter is mistakenly also set into rx_missed_errors and rx_over_errors too, which makes the device total dropped packets accounting to show wrong results. Fix that. Use it for rx_fifo_errors only. Fixes: c27a02cd94d6 ('mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC') Signed-off-by: Amir Vadai Signed-off-by: Eugenia Emantayev Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f74660bcf1e4cca577be99e54bc77b5df62b508 Author: Chuck Lever Date: Mon Feb 15 10:23:59 2016 -0500 xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len Some NFSv4.1 OPEN requests were hanging waiting for the NFS server to finish recalling delegations. Turns out that each NFSv4.1 CB request on RDMA gets a GARBAGE_ARGS reply from the Linux client. Commit 756b9b37cfb2e3dc added a line in bc_svc_process that overwrites the incoming rq_rcv_buf's length with the value in rq_private_buf.len. But rpcrdma_bc_receive_call() does not invoke xprt_complete_bc_request(), thus rq_private_buf.len is not initialized. svc_process_common() is invoked with a zero-length RPC message, and fails. Fixes: 756b9b37cfb2e3dc ('SUNRPC: Fix callback channel') Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 2 ++ 1 file changed, 2 insertions(+) commit c2bab619813a525d3f58b5ffbfcdc4edee27e497 Author: Eran Ben Elisha Date: Thu Feb 11 10:24:44 2016 +0200 IB/mlx4: Add support for the port info class for RoCE ports Report that driver supports IB_PMA_CLASS_CAP_EXT_WIDTH in respond for IB_MGMT_CLASS_PERF_MGMT mad with IB_PMA_CLASS_PORT_INFO attr id. Signed-off-by: Eran Ben Elisha Signed-off-by: Matan Barak Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mad.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit c3c0c83667a9fe78cc28c27ec9e5ace3411ae775 Author: Eran Ben Elisha Date: Thu Feb 11 10:24:43 2016 +0200 IB/mlx4: Add support for extended counters over RoCE ports When attribute IB_PMA_PORT_COUNTERS_EXT is set, we now return 64 bit values for the counters. Signed-off-by: Eran Ben Elisha Signed-off-by: Matan Barak Reviewed-by: Or Gerlitz Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mad.c | 50 +++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 13 deletions(-) commit b41f7852f3b981df30727f5cd64c1877ceee794e Author: Devesh Sharma Date: Thu Feb 11 00:21:52 2016 -0500 RDMA/ocrdma: Fix arm logic to align with new cq API Today ocrdma driver defer arming the CQ till poll is called. This was used to prevent calling poll-cq on an armed CQ. Recently a set of new CQ API has been introduced into the linux kernel. The implementation of this API guarantees that a given CQ is never armed before calling poll on it. Most of the kernel ULPs have already moved to use this new API or have a code where poll is called before arming the CQ. Thus, the above workaround in ocrdma is not needed anymore. This patch removes the additional logic to deffer arm till poll is called. This patch adds a simple scheme where ib_req_notify_cq() will actually arm the cq. Signed-off-by: Devesh Sharma Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma.h | 3 --- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 18 ++++-------------- 2 files changed, 4 insertions(+), 17 deletions(-) commit bba40e6948b94cba71965285fbac31bd078c024a Author: Cristian Birsan Date: Thu Feb 11 08:58:17 2016 -0700 usb: musb: Fix DMA desired mode for Mentor DMA engine Commit 754fe4a92c07 ("usb: musb: Remove ifdefs for TX DMA for musb_host.c") introduces a problem setting the desired channel mode for the Mentor DMA engine. There is a case where an address is incorrectly assigned to the DMA channel desired mode when it should instead be assigned the actual mode value. This results in the value of channel->desired_mode not being correct. Acked-by: Sergei Shtylyov Signed-off-by: Cristian Birsan Signed-off-by: Joshua Henderson Signed-off-by: Felipe Balbi drivers/usb/musb/musb_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96c7de4ff41c2ed6da43141a4deb922de09617d0 Author: Andrzej Hajda Date: Mon Feb 15 15:35:25 2016 +0100 usb: gadget: fsl_qe_udc: fix IS_ERR_VALUE usage IS_ERR_VALUE macro should be used only with unsigned long type. Otherwise it can work incorrectly. The patch follows conclusion from discussion on LKML [1][2]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2120927 [2]: http://permalink.gmane.org/gmane.linux.kernel/2150581 Signed-off-by: Andrzej Hajda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/fsl_qe_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 390f0ffe92aea878b763c7fd8afd1dff62e0d20b Author: Anton Bondarenko Date: Wed Feb 17 14:28:47 2016 +0100 spi: imx: allow only WML aligned transfers to use DMA RX DMA tail data handling doesn't work correctly in many cases with current implementation. It happens because SPI core was setup to generates both RX and RX TAIL events. And RX TAIL event does not work correctly. This can be easily verified by sending SPI transaction with size modulus WML(32 in our case) not equal 0. Also removing change introduced in f6ee9b582d2db652497b73c1f117591dfb6d3a90 since this change only fix usecases with transfer size from 33 to 128 bytes and doesn't fix 129 bytes and bigger. This is output from transaction with len 138 bytes in loopback mode at 10Mhz: TX0000: a3 97 a2 55 53 be f1 fc f9 79 6b 52 14 13 e9 e2 TX0010: 2d 51 8e 1f 56 08 57 27 a7 05 d4 d0 52 82 77 75 TX0020: 1b 99 4a ed 58 3d 6a 52 36 d5 24 4a 68 8e ad 95 TX0030: 5f 3c 35 b5 c4 8c dd 6c 11 32 3d e2 b4 b4 59 cf TX0040: ce 23 3d 27 df a7 f9 96 fc 1e e0 66 2c 0e 7b 8c TX0050: ca 30 42 8f bc 9f 7b ce d1 b8 b1 87 ec 8a d6 bb TX0060: 2e 15 63 0e 3c dc a4 3a 7a 06 20 a7 93 1b 34 dd TX0070: 4c f5 ec 88 96 68 d6 68 a0 09 6f 8e 93 47 c9 41 TX0080: db ac cf 97 89 f3 51 05 79 71 RX0000: a3 97 a2 55 53 be f1 fc f9 79 6b 52 14 13 e9 e2 RX0010: 2d 51 8e 1f 56 08 57 27 a7 05 d4 d0 52 82 77 75 RX0020: 1b 99 4a ed 58 3d 6a 52 36 d5 24 4a 68 8e ad 95 RX0030: 5f 3c 35 00 00 b5 00 00 00 c4 00 00 8c 00 00 dd RX0040: 6c 11 32 3d e2 b4 b4 59 cf ce 23 3d 27 df a7 f9 RX0050: 96 fc 1e e0 66 2c 0e 7b 8c ca 30 42 8f 1f 1f bc RX0060: 9f 7b ce d1 b8 b1 87 ec 8a d6 bb 2e 15 63 0e ed RX0070: ed 3c 58 58 58 dc 3d 3d a4 6a 6a 3a 52 52 7a 36 RX0080: 06 20 a7 93 1b 34 dd 4c f5 ec Zeros at offset 33 and 34 caused by reading empty RX FIFO which not possible if DMA RX read was triggered by RX event. This mean DMA was triggered by RX TAIL event. Signed-off-by: Anton Bondarenko Signed-off-by: Sascha Hauer Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 6ecad912a0073c768db1491c27ca55ad2d0ee68f Author: Alexey Kardashevskiy Date: Wed Feb 17 18:26:31 2016 +1100 powerpc/ioda: Set "read" permission when "write" is set Quite often drivers set only "write" permission assuming that this includes "read" permission as well and this works on plenty of platforms. However IODA2 is strict about this and produces an EEH when "read" permission is not set and reading happens. This adds a workaround in the IODA code to always add the "read" bit when the "write" bit is set. Fixes: 10b35b2b7485 ("powerpc/powernv: Do not set "read" flag if direction==DMA_NONE") Cc: stable@vger.kernel.org # 4.2+ Cc: Benjamin Herrenschmidt Signed-off-by: Alexey Kardashevskiy Tested-by: Douglas Miller Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 722ec35f7faefcc34d12616eca7976a848870f9d Author: Marek Szyprowski Date: Tue Feb 16 15:14:44 2016 +0100 arm64: dma-mapping: fix handling of devices registered before arch_initcall This patch ensures that devices, which got registered before arch_initcall will be handled correctly by IOMMU-based DMA-mapping code. Cc: Fixes: 13b8629f6511 ("arm64: Add IOMMU dma_ops") Acked-by: Robin Murphy Signed-off-by: Marek Szyprowski Signed-off-by: Will Deacon arch/arm64/mm/dma-mapping.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8d409cb3e8a24196be7271defafd4638f3e0b514 Author: Ville Syrjälä Date: Wed Feb 10 19:59:05 2016 +0200 drm/i915: Fix hpd live status bits for g4x Looks like g4x hpd live status bits actually agree with the spec. At least they do on the machine I have, and apparently on Nick Bowler's g4x as well. So gm45 may be the only platform where they don't agree. At least that seems to be the case based on the (somewhat incomplete) logs/dumps in [1], and Daniel has also tested this on his gm45 sometime in the past. So let's change the bits to match the spec on g4x. That actually makes the g4x bits identical to vlv/chv so we can just share the code between those platforms, leaving gm45 as the special case. [1] https://bugzilla.kernel.org/show_bug.cgi?id=52361 Cc: Shashank Sharma Cc: Sonika Jindal Cc: Daniel Vetter Cc: Jani Nikula Cc: Nick Bowler References: https://lists.freedesktop.org/archives/dri-devel/2016-February/100382.html Reported-by: Nick Bowler Cc: stable@vger.kernel.org Fixes: 237ed86c693d ("drm/i915: Check live status before reading edid") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1455127145-20087-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter (cherry picked from commit 0780cd36c7af70c55981ee624084f0f48cae9b95) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 15 ++++++++------- drivers/gpu/drm/i915/intel_dp.c | 14 +++++++------- 2 files changed, 15 insertions(+), 14 deletions(-) commit 059fcd8cd16622da6513804a7a3e826d152c6c96 Author: Thomas Gleixner Date: Tue Feb 9 20:11:34 2016 +0000 perf/core: Plug potential memory leak in CPU_UP_PREPARE If CPU_UP_PREPARE is called it is not guaranteed, that a previously allocated and assigned hash has been freed already, but perf_event_init_cpu() unconditionally allocates and assignes a new hash if the swhash is referenced. By overwriting the pointer the existing hash is not longer accessible. Verify that there is no hash assigned on this cpu before allocating and assigning a new one. Signed-off-by: Thomas Gleixner Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Link: http://lkml.kernel.org/r/20160209201007.843269966@linutronix.de Signed-off-by: Ingo Molnar kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27ca9236c96f4a21b72a2b4f08260efeab951bd0 Author: Thomas Gleixner Date: Tue Feb 9 20:11:26 2016 +0000 perf/core: Remove the bogus and dangerous CPU_DOWN_FAILED hotplug state If CPU_DOWN_PREPARE fails the perf hotplug notifier is called for CPU_DOWN_FAILED and calls perf_event_init_cpu(), which checks whether the swhash is referenced. If yes it allocates a new hash and stores the pointer in the per cpu data structure. But at this point the cpu is still online, so there must be a valid hash already. By overwriting the pointer the existing hash is not longer accessible. Remove the CPU_DOWN_FAILED state, as there is nothing to (re)allocate. Signed-off-by: Thomas Gleixner Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Link: http://lkml.kernel.org/r/20160209201007.763417379@linutronix.de Signed-off-by: Ingo Molnar kernel/events/core.c | 1 - 1 file changed, 1 deletion(-) commit b4f75d44bed1bdbb14ac704bfc38f62a3675e591 Author: Thomas Gleixner Date: Tue Feb 9 20:11:20 2016 +0000 perf/core: Remove bogus UP_CANCELED hotplug state If CPU_UP_PREPARE fails the perf hotplug code calls perf_event_exit_cpu(), which is a pointless exercise. The cpu is not online, so the smp function calls return -ENXIO. So the result is a list walk to call noops. Remove it. Signed-off-by: Thomas Gleixner Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Link: http://lkml.kernel.org/r/20160209201007.682184765@linutronix.de Signed-off-by: Ingo Molnar kernel/events/core.c | 1 - 1 file changed, 1 deletion(-) commit 901c5ffaaed117a38be9d0c29247c4888d6c8636 Author: Geert Uytterhoeven Date: Mon Feb 15 13:20:08 2016 +0100 ARM: shmobile: Remove shmobile_boot_arg CPU boot configuration writes to shmobile_boot_arg, which is located in the .text section, and thus should not be written to. As of commit 1d33a354bbb618ba ("ARM: shmobile: Per-CPU SMP boot / sleep code for SCU SoCs"), and ignoring accidental remainings, shmobile_boot_arg is always set to MPIDR_HWID_BITMASK by C code. Hence we can just hardcode this in the assembler code, and remove the variable, and thus also remove the need to write to this variable. Signed-off-by: Geert Uytterhoeven Acked-by: Nicolas Pitre Signed-off-by: Simon Horman arch/arm/mach-shmobile/common.h | 1 - arch/arm/mach-shmobile/headsmp.S | 8 ++------ arch/arm/mach-shmobile/platsmp-apmu.c | 1 - arch/arm/mach-shmobile/platsmp-scu.c | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) commit 4e960f52fce16a3bf3261fa92c34cf2306059ba2 Author: Geert Uytterhoeven Date: Mon Feb 15 13:20:07 2016 +0100 ARM: shmobile: Move shmobile_smp_{mpidr, fn, arg}[] from .text to .bss If CONFIG_DEBUG_RODATA=y, the kernel crashes during system suspend: Freezing user space processes ... (elapsed 0.004 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done. PM: suspend of devices complete after 111.948 msecs PM: late suspend of devices complete after 1.086 msecs PM: noirq suspend of devices complete after 11.576 msecs Disabling non-boot CPUs ... Kernel panic - not syncing: Attempted to kill the idle task! 1014ec ---[ end Kernel panic - not syncing: Attempted to kill the idle task! CPU0: stopping This happens because the .text section is marked read-only, while the arrays shmobile_smp_mpidr[], shmobile_smp_fn[], and shmobile_smp_arg[] are being written to. Fix this by moving these arrays from the .text to the .bss section. This requires accessing them through PC-relative offsets. Signed-off-by: Geert Uytterhoeven Reviewed-by: Kees Cook Reviewed-by: Nicolas Pitre Signed-off-by: Simon Horman arch/arm/mach-shmobile/headsmp.S | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit b1568d80123a7e7ab528f587ef6896b2d5413b61 Author: Geert Uytterhoeven Date: Thu Jan 28 16:13:31 2016 +0100 ARM: shmobile: r8a7779: Remove remainings of removed SCU boot setup code Commit 0ca2894b5a900709 ("ARM: shmobile: Use shared SCU SMP boot code on r8a7779") obsoleted the r8a7779-specific SCU boot code, but forgot to remove the setup of shmobile_boot_fn and shmobile_boot_arg, which is overwritten by shmobile_smp_scu_prepare_cpus(). Note that shmobile_scu_base wasn't initialized at that point yet anyway. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/smp-r8a7779.c | 2 -- 1 file changed, 2 deletions(-) commit d2613f56ce0287211d70a86443a143cae1887911 Author: Geert Uytterhoeven Date: Thu Jan 28 16:04:21 2016 +0100 ARM: shmobile: Move shmobile_scu_base from .text to .bss shmobile_scu_base is being written to, so it doesn't belong in the .text section. Fix this by moving it from asm .text to C .bss, as it's no longer used from asm code since commit 4f6da36f7edd5790 ("ARM: shmobile: Remove old SCU boot code"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/headsmp-scu.S | 6 ------ arch/arm/mach-shmobile/platsmp-scu.c | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) commit c219b7ddb6a3524a61a89438d86e4a8639706308 Author: Steven Rostedt Date: Wed Feb 10 12:04:22 2016 -0500 sched/deadline: Fix trivial typo in printk() message It's "too much" not "to much". Signed-off-by: Steven Rostedt Acked-by: Juri Lelli Cc: Jiri Kosina Cc: Juri Lelli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160210120422.4ca77e68@gandalf.local.home Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e7f9df25874cedbbc604a5c5c2e7a6efe662387 Author: Michael S. Tsirkin Date: Thu Feb 11 01:05:01 2016 +0200 hpet: Drop stale URLs Looks like the HPET spec at intel.com got moved. It isn't hard to find so drop the link, just mention the revision assumed. Suggested-by: Thomas Gleixner Signed-off-by: Michael S. Tsirkin Acked-by: Greg Kroah-Hartman Cc: Arnd Bergmann Cc: Clemens Ladisch Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1455145462-3877-1-git-send-email-mst@redhat.com Signed-off-by: Ingo Molnar Documentation/timers/hpet.txt | 4 +--- arch/x86/Kconfig | 4 ++-- drivers/char/hpet.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) commit ee89b641a9ddca5f2d1e38d205473c4b0d26c670 Author: Geert Uytterhoeven Date: Tue Feb 16 16:10:59 2016 +0100 usb: dwc2: USB_DWC2 should depend on HAS_DMA If NO_DMA=y: ERROR: "usb_gadget_map_request" [drivers/usb/dwc2/dwc2.ko] undefined! ERROR: "usb_gadget_unmap_request" [drivers/usb/dwc2/dwc2.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/dwc2/dwc2.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Acked-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 62943b7dfa35887a40f71f698deec4488bf73036 Author: Tang, Jianqiang Date: Tue Feb 16 15:02:07 2016 -0800 usb: dwc2: host: fix the data toggle error in full speed descriptor dma There will be data toggle error happen for full speed buld-out transfer. The data toggle bit is saved in qh for non-control transfers, it is wrong to check the qtd for that case. Also fix one static analysis tool issue after fix the data toggle error. John Youn: * Added WARN() to warn on improper usage of the dwc2_hcd_save_data_toggle() function. Signed-off-by: Dyson Lee Signed-off-by: Tang, Jianqiang Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_ddma.c | 2 +- drivers/usb/dwc2/hcd_intr.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 3142a16b9816c24501103a92010a283eb6e2766c Author: Vardan Mikayelyan Date: Tue Feb 16 15:01:53 2016 -0800 usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc Fixes memory manipulation issues and makes Host DDMA bulk transfers work. dwc2_process_non_isoc_desc() must return non zero value ONLY when failure happens in one of the queued descriptors. After receiving non zero value the caller must stop processing of remaining QTDs and their descriptors from chain. Commit 26a19ea699060fde ("usb: dwc2: host: fix use of qtd after free in desc dma mode") breaks non_isoc transaction completion logic in Host DDMA mode. There were bugs before that, but after this patch dwc2_process_non_isoc_desc() returns fail status even if descriptor was processed normally. This causes break from loop which is processing remaining descriptors assigned to QTD, which is not correct for QTDs containing more than one descriptor. Current dwc2 driver gathers queued BULK URBs until receiving URB without URB_NO_INTERRUPT flag. Once getting it, SW creates descriptor chain, stores it in qh structure and passes start address to HW. Multiple URB data is contained in that chain. Hence on getting error on descriptor after its processing by HW, SW should go out of both loops(qh->qtd, qtd->descs) and report the failure. Fixes: 26a19ea699060fde ("usb: dwc2: host: fix use of qtd after free in desc dma mode") Cc: Gregory Herrero Signed-off-by: Vardan Mikayelyan Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd_ddma.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit c450960187f45d4260db87c7dd4fc0bceb5565d8 Author: John Youn Date: Tue Feb 16 20:10:53 2016 -0800 usb: dwc3: Fix assignment of EP transfer resources The assignement of EP transfer resources was not handled properly in the dwc3 driver. Commit aebda6187181 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE") previously fixed one aspect of this where resources may be exhausted with multiple calls to SET_INTERFACE. However, it introduced an issue where composite devices with multiple interfaces can be assigned the same transfer resources for different endpoints. This patch solves both issues. The assignment of transfer resources cannot perfectly follow the data book due to the fact that the controller driver does not have all knowledge of the configuration in advance. It is given this information piecemeal by the composite gadget framework after every SET_CONFIGURATION and SET_INTERFACE. Trying to follow the databook programming model in this scenario can cause errors. For two reasons: 1) The databook says to do DEPSTARTCFG for every SET_CONFIGURATION and SET_INTERFACE (8.1.5). This is incorrect in the scenario of multiple interfaces. 2) The databook does not mention doing more DEPXFERCFG for new endpoint on alt setting (8.1.6). The following simplified method is used instead: All hardware endpoints can be assigned a transfer resource and this setting will stay persistent until either a core reset or hibernation. So whenever we do a DEPSTARTCFG(0) we can go ahead and do DEPXFERCFG for every hardware endpoint as well. We are guaranteed that there are as many transfer resources as endpoints. This patch triggers off of the calling dwc3_gadget_start_config() for EP0-out, which always happens first, and which should only happen in one of the above conditions. Fixes: aebda6187181 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE") Cc: # v3.2+ Reported-by: Ravi Babu Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 1 - drivers/usb/dwc3/ep0.c | 5 ---- drivers/usb/dwc3/gadget.c | 70 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 52 insertions(+), 24 deletions(-) commit bd84f4ae9986ac9acd278566ccb39c60bc961abb Author: John Youn Date: Mon Feb 15 15:30:20 2016 -0800 usb: dwc2: Add extra delay when forcing dr_mode Fixes an issue found on rockchip rk3036 and rk3188 SOC platforms. For some reason, the existing msleep(25) is not enough after the force mode. The following patch was reported to fix the issue. This does increase the probe delay again slightly, but not up to the level it was before the original series of patches that this fixes. It does not cause any other issues when tested on Synopsys HAPS and Altera socfpga platforms. Need to revisit this series next release to see if we can address these issues without having an unconditional delay. Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force mode") Reported-by: Caesar Wang Reported-by: Michael Niewoehner Tested-by: Heiko Stuebner Tested-by: Caesar Wang Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 12d319b920fa673a4d5e7c1785c5dc82dcd15257 Author: Stefan Haberland Date: Fri Feb 12 14:50:52 2016 +0100 s390/dasd: fix performance drop Commit ca369d51b ("sd: Fix device-imposed transfer length limits") introduced a new queue limit max_dev_sectors which limits the maximum sectors for requests. The default value leads to small dasd requests and therefor to a performance drop. Set the max_dev_sectors value to the same value as the max_hw_sectors to use the maximum available request size for DASD devices. Signed-off-by: Stefan Haberland Cc: stable@vger.kernel.org # 4.4+ Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 1 + 1 file changed, 1 insertion(+) commit a82eee7424525e34e98d821dd059ce14560a1e35 Author: Toshi Kani Date: Thu Feb 11 14:24:17 2016 -0700 x86/uaccess/64: Handle the caching of 4-byte nocache copies properly in __copy_user_nocache() Data corruption issues were observed in tests which initiated a system crash/reset while accessing BTT devices. This problem is reproducible. The BTT driver calls pmem_rw_bytes() to update data in pmem devices. This interface calls __copy_user_nocache(), which uses non-temporal stores so that the stores to pmem are persistent. __copy_user_nocache() uses non-temporal stores when a request size is 8 bytes or larger (and is aligned by 8 bytes). The BTT driver updates the BTT map table, which entry size is 4 bytes. Therefore, updates to the map table entries remain cached, and are not written to pmem after a crash. Change __copy_user_nocache() to use non-temporal store when a request size is 4 bytes. The change extends the current byte-copy path for a less-than-8-bytes request, and does not add any overhead to the regular path. Reported-and-tested-by: Micah Parrish Reported-and-tested-by: Brian Boylston Signed-off-by: Toshi Kani Cc: Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Ross Zwisler Cc: Thomas Gleixner Cc: Toshi Kani Cc: Vishal Verma Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/1455225857-12039-3-git-send-email-toshi.kani@hpe.com [ Small readability edits. ] Signed-off-by: Ingo Molnar arch/x86/lib/copy_user_64.S | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit ee9737c924706aaa72c2ead93e3ad5644681dc1c Author: Toshi Kani Date: Thu Feb 11 14:24:16 2016 -0700 x86/uaccess/64: Make the __copy_user_nocache() assembly code more readable Add comments to __copy_user_nocache() to clarify its procedures and alignment requirements. Also change numeric branch target labels to named local labels. No code changed: arch/x86/lib/copy_user_64.o: text data bss dec hex filename 1239 0 0 1239 4d7 copy_user_64.o.before 1239 0 0 1239 4d7 copy_user_64.o.after md5: 58bed94c2db98c1ca9a2d46d0680aaae copy_user_64.o.before.asm 58bed94c2db98c1ca9a2d46d0680aaae copy_user_64.o.after.asm Signed-off-by: Toshi Kani Cc: Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: brian.boylston@hpe.com Cc: dan.j.williams@intel.com Cc: linux-nvdimm@lists.01.org Cc: micah.parrish@hpe.com Cc: ross.zwisler@linux.intel.com Cc: vishal.l.verma@intel.com Link: http://lkml.kernel.org/r/1455225857-12039-2-git-send-email-toshi.kani@hpe.com [ Small readability edits and added object file comparison. ] Signed-off-by: Ingo Molnar arch/x86/lib/copy_user_64.S | 114 ++++++++++++++++++++++++++++---------------- 1 file changed, 73 insertions(+), 41 deletions(-) commit 52499d93d6dec3872de3b982219af6d4c182a452 Author: Heiko Carstens Date: Fri Feb 12 12:40:31 2016 +0100 s390/maccess: reduce stnsm instructions When fixing the DAT off bug ("s390: fix DAT off memory access, e.g. on kdump") both Christian and I missed that we can save an additional stnsm instruction. This saves us a couple of cycles which could improve the speed of memcpy_real. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/maccess.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 8bc9162cd2bf37036c486b384ac445b59b334b04 Author: Thomas Gleixner Date: Tue Feb 16 23:04:41 2016 +0100 perf/x86/amd/uncore: Plug reference leak In the error path of amd_uncore_cpu_up_prepare() the newly allocated uncore struct is freed, but the percpu pointer still references it. Set it to NULL. Signed-off-by: Thomas Gleixner Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1602162302170.19512@nanos Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_amd_uncore.c | 2 ++ 1 file changed, 2 insertions(+) commit dada168b3b76439d83aff34f8fbd9c512c2d136a Author: Anton Protopopov Date: Sat Feb 6 23:25:28 2016 -0500 drm/qxl: fix erroneous return value The qxl_gem_prime_mmap() function returns ENOSYS instead of -ENOSYS Signed-off-by: Anton Protopopov Signed-off-by: Dave Airlie drivers/gpu/drm/qxl/qxl_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff683df7bf34f90766a50c7e7454e219aef2710e Author: Mario Kleiner Date: Fri Feb 12 20:30:32 2016 +0100 drm/nouveau/display: Enable vblank irqs after display engine is on again. In the display resume path, move the calls to drm_vblank_on() after the point when the display engine is running again. Since changes were made to drm_update_vblank_count() in Linux 4.4+ to emulate hw vblank counters via vblank timestamping, the function drm_vblank_on() now needs working high precision vblank timestamping and therefore working scanout position queries at time of call. These don't work before the display engine gets restarted, causing miscalculation of vblank counter increments and thereby large forward jumps in vblank count at display resume. These jumps can cause client hangs on resume, or desktop hangs in the case of composited desktops. Fix this Linux 4.4 regression by reordering calls accordingly. Signed-off-by: Mario Kleiner Cc: # 4.4+ Cc: Ben Skeggs Cc: ville.syrjala@linux.intel.com Cc: daniel.vetter@ffwll.ch Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e0b34e3857004ac2257458d6354c31349f51e207 Author: Mario Kleiner Date: Fri Feb 12 20:30:31 2016 +0100 drm/radeon/pm: Handle failure of drm_vblank_get. Make sure that drm_vblank_get/put() stay balanced in case drm_vblank_get fails, by skipping the corresponding put. Signed-off-by: Mario Kleiner Reviewed-by: Daniel Vetter Cc: michel@daenzer.net Cc: dri-devel@lists.freedesktop.org Cc: alexander.deucher@amd.com Cc: christian.koenig@amd.com Signed-off-by: Dave Airlie drivers/gpu/drm/radeon/radeon_pm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bb74fc1bf3072bd3ab4ed5f43afd287a63baf2d7 Author: Mario Kleiner Date: Fri Feb 12 20:30:30 2016 +0100 drm: Fix treatment of drm_vblank_offdelay in drm_vblank_on() (v2) drm_vblank_offdelay can have three different types of values: < 0 is to be always treated the same as dev->vblank_disable_immediate = 0 is to be treated as "never disable vblanks" > 0 is to be treated as disable immediate if kms driver wants it that way via dev->vblank_disable_immediate. Otherwise it is a disable timeout in msecs. This got broken in Linux 3.18+ for the implementation of drm_vblank_on. If the user specified a value of zero which should always reenable vblank irqs in this function, a kms driver could override the users choice by setting vblank_disable_immediate to true. This patch fixes the regression and keeps the user in control. v2: Only reenable vblank if there are clients left or the user requested to "never disable vblanks" via offdelay 0. Enabling vblanks even in the "delayed disable" case (offdelay > 0) was specifically added by Ville in commit cd19e52aee922 ("drm: Kick start vblank interrupts at drm_vblank_on()"), but after discussion it turns out that this was done by accident. Citing Ville: "I think it just ended up as a mess due to changing some of the semantics of offdelay<0 vs. offdelay==0 vs. disable_immediate during the review of the series. So yeah, given how drm_vblank_put() works now, I'd just make this check for offdelay==0." Signed-off-by: Mario Kleiner Reviewed-by: Daniel Vetter Cc: # 3.18+ Cc: michel@daenzer.net Cc: vbabka@suse.cz Cc: ville.syrjala@linux.intel.com Cc: daniel.vetter@ffwll.ch Cc: dri-devel@lists.freedesktop.org Cc: alexander.deucher@amd.com Cc: christian.koenig@amd.com Signed-off-by: Dave Airlie drivers/gpu/drm/drm_irq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c61934ed9a0e3911a9935df26858726a7ec35ec0 Author: Mario Kleiner Date: Fri Feb 12 20:30:29 2016 +0100 drm: Fix drm_vblank_pre/post_modeset regression from Linux 4.4 Changes to drm_update_vblank_count() in Linux 4.4 broke the behaviour of the pre/post modeset functions as the new update code doesn't deal with hw vblank counter resets inbetween calls to drm_vblank_pre_modeset an drm_vblank_post_modeset, as it should. This causes mistreatment of such hw counter resets as counter wraparound, and thereby large forward jumps of the software vblank counter which in turn cause vblank event dispatching and vblank waits to fail/hang --> userspace clients hang. This symptom was reported on radeon-kms to cause a infinite hang of KDE Plasma 5 shell's login procedure, preventing users from logging in. Fix this by detecting when drm_update_vblank_count() is called inside a pre->post modeset interval. If so, clamp valid vblank increments to the safe values 0 and 1, pretty much restoring the update behavior of the old update code of Linux 4.3 and earlier. Also reset the last recorded hw vblank count at call to drm_vblank_post_modeset() to be safe against hw that after modesetting, dpms on etc. only fires its first vblank irq after drm_vblank_post_modeset() was already called. Reported-by: Vlastimil Babka Signed-off-by: Mario Kleiner Reviewed-by: Daniel Vetter Tested-by: Vlastimil Babka Cc: # 4.4+ Cc: michel@daenzer.net Cc: vbabka@suse.cz Cc: ville.syrjala@linux.intel.com Cc: daniel.vetter@ffwll.ch Cc: dri-devel@lists.freedesktop.org Cc: alexander.deucher@amd.com Cc: christian.koenig@amd.com Signed-off-by: Dave Airlie drivers/gpu/drm/drm_irq.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 99b8e71597fadd6b2ac85e6e10f221f79dd9c1c1 Author: Mario Kleiner Date: Fri Feb 12 20:30:28 2016 +0100 drm: Prevent vblank counter bumps > 1 with active vblank clients. (v2) This fixes a regression introduced by the new drm_update_vblank_count() implementation in Linux 4.4: Restrict the bump of the software vblank counter in drm_update_vblank_count() to a safe maximum value of +1 whenever there is the possibility that concurrent readers of vblank timestamps could be active at the moment, as the current implementation of the timestamp caching and updating is not safe against concurrent readers for calls to store_vblank() with a bump of anything but +1. A bump != 1 would very likely return corrupted timestamps to userspace, because the same slot in the cache could be concurrently written by store_vblank() and read by one of those readers in a non-atomic fashion and without the read-retry logic detecting this collision. Concurrent readers can exist while drm_update_vblank_count() is called from the drm_vblank_off() or drm_vblank_on() functions or other non-vblank- irq callers. However, all those calls are happening with the vbl_lock locked thereby preventing a drm_vblank_get(), so the vblank refcount can't increase while drm_update_vblank_count() is executing. Therefore a zero vblank refcount during execution of that function signals that is safe for arbitrary counter bumps if called from outside vblank irq, whereas a non-zero count is not safe. Whenever the function is called from vblank irq, we have to assume concurrent readers could show up any time during its execution, even if the refcount is currently zero, as vblank irqs are usually only enabled due to the presence of readers, and because when it is called from vblank irq it can't hold the vbl_lock to protect it from sudden bumps in vblank refcount. Therefore also restrict bumps to +1 when the function is called from vblank irq. Such bumps of more than +1 can happen at other times than reenabling vblank irqs, e.g., when regular vblank interrupts get delayed by more than 1 frame due to long held locks, long irq off periods, realtime preemption on RT kernels, or system management interrupts. A better solution would be to rewrite the timestamp caching to use full seqlocks to allow concurrent writes and reads for arbitrary vblank counter increments. v2: Add code comment that this is essentially a hack and should be replaced by a full seqlock implementation for caching of timestamps. Signed-off-by: Mario Kleiner Reviewed-by: Daniel Vetter Cc: # 4.4+ Cc: michel@daenzer.net Cc: vbabka@suse.cz Cc: ville.syrjala@linux.intel.com Cc: daniel.vetter@ffwll.ch Cc: dri-devel@lists.freedesktop.org Cc: alexander.deucher@amd.com Cc: christian.koenig@amd.com Signed-off-by: Dave Airlie drivers/gpu/drm/drm_irq.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit e8235891b33799d597ff4ab5e45afe173a65da30 Author: Mario Kleiner Date: Fri Feb 12 20:30:27 2016 +0100 drm: No-Op redundant calls to drm_vblank_off() (v2) Otherwise if a kms driver calls into drm_vblank_off() more than once before calling drm_vblank_on() again, the redundant calls to vblank_disable_and_save() will call drm_update_vblank_count() while hw vblank counters and vblank timestamping are in a undefined state during modesets, dpms off etc. At least with the legacy drm helpers it is not unusual to get multiple calls to drm_vblank_off and drm_vblank_on, e.g., half a dozen calls to drm_vblank_off and two calls to drm_vblank_on were observed on radeon-kms during dpms-off -> dpms-on transition. We don't no-op calls from atomic modesetting drivers, as they should do a proper job of tracking hw state. Fixes large jumps of the software maintained vblank counter due to the hardware vblank counter resetting to zero during dpms off or modeset, e.g., if radeon-kms is modified to use drm_vblank_off/on instead of drm_vblank_pre/post_modeset(). This fixes a regression caused by the changes made to drm_update_vblank_count() in Linux 4.4. v2: Don't no-op on atomic modesetting drivers, per suggestion of Daniel Vetter. Signed-off-by: Mario Kleiner Reviewed-by: Daniel Vetter Cc: # 4.4+ Cc: michel@daenzer.net Cc: vbabka@suse.cz Cc: ville.syrjala@linux.intel.com Cc: alexander.deucher@amd.com Cc: christian.koenig@amd.com Signed-off-by: Dave Airlie drivers/gpu/drm/drm_irq.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 34855706c30d52b0a744da44348b5d1cc39fbe51 Author: Gerd Hoffmann Date: Tue Feb 16 14:25:00 2016 +0100 drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command This avoids integer overflows on 32bit machines when calculating reloc_info size, as reported by Alan Cox. Cc: stable@vger.kernel.org Cc: gnomes@lxorguk.ukuu.org.uk Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/qxl/qxl_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e8f051e9d8fe15d71d8d47c0d878d51bf5f864ad Merge: 8ae22cb 00780f3 Author: Dave Airlie Date: Wed Feb 17 14:14:22 2016 +1000 Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Summary: - fix compilation warnings on ARM64bit. - fix mic driver initialization. . MIC is a part of KMS so it converts it to use component framework like other KMS drivers did. - fix wrong driver state and disable clock order on DECON driver. - fix incorrect use of dma_mmap_attrs function. * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos/decon: fix disable clocks order drm/exynos: fix incorrect cpu address for dma_mmap_attrs() drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable drm/exynos: dsi: restore support for drm bridge drm/exynos: mic: make all functions static drm/exynos: mic: convert to component framework drm/exynos: mic: use devm_clk interface drm/exynos: fix types for compilation on 64bit architectures drm/exynos: ipp: fix incorrect format specifiers in debug messages drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS commit 8ae22cb419ad0bae84d3ed9784c92922fa6343eb Author: Dave Airlie Date: Wed Feb 17 11:36:38 2016 +1000 Revert "drm/dp/mst: change MST detection scheme" This reverts commit cfcfa086d43ced33e1099b9befb12f17fca102e1. This causes the tiling properties to break in some unexpected ways, Revert it for now. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 37 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 19 deletions(-) commit aac8d3c282e024c344c5b86dc1eab7af88bb9716 Author: Bjørn Mork Date: Fri Feb 12 16:42:14 2016 +0100 qmi_wwan: add "4G LTE usb-modem U901" Thomas reports: T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=05c6 ProdID=6001 Rev=00.00 S: Manufacturer=USB Modem S: Product=USB Modem S: SerialNumber=1234567890ABCDEF C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage Reported-by: Thomas Schäfer Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 729235554d805c63e5e274fcc6a98e71015dd847 Author: Eric Dumazet Date: Thu Feb 11 22:50:29 2016 -0800 tcp: md5: release request socket instead of listener If tcp_v4_inbound_md5_hash() returns an error, we must release the refcount on the request socket, not on the listener. The bug was added for IPv4 only. Fixes: 079096f103fac ("tcp/dccp: install syn_recv requests into ehash table") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 413eddc6ca748dc52057f142d707b9378af692fc Merge: bc4ef75 1636d1d Author: Chris Mason Date: Tue Feb 16 16:52:10 2016 -0800 Merge branch 'for-chris-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.5 commit 3d65ae4634ed8350aee98a4e6f4e41fe40c7d282 Author: Tahsin Erdogan Date: Tue Feb 16 13:34:39 2016 -0800 writeback: initialize inode members that track writeback history inode struct members that track cgroup writeback information should be reinitialized when inode gets allocated from kmem_cache. Otherwise, their values remain and get used by the new inode. Signed-off-by: Tahsin Erdogan Acked-by: Tejun Heo Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching") Signed-off-by: Jens Axboe fs/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 372022830b06d9980c7e8b41fa0a4081cff883b0 Author: Eric Dumazet Date: Thu Feb 11 08:58:18 2016 -0800 tcp: do not set rtt_min to 1 There are some cases where rtt_us derives from deltas of jiffies, instead of using usec timestamps. Since we want to track minimal rtt, better to assume a delta of 0 jiffie might be in fact be very close to 1 jiffie. It is kind of sad jiffies_to_usecs(1) calls a function instead of simply using a constant. Fixes: f672258391b42 ("tcp: track min RTT using windowed min-filter") Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Cc: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6c5d89a34a486ad782dfb5b6b3b8fb4976ae7619 Author: Ken Kawasaki Date: Thu Feb 11 20:27:04 2016 +0900 pcnet_cs: add new id add new id (CONTEC C-NET(PC)C-100TX2) Signed-off-by: Ken Kawasaki Signed-off-by: David S. Miller drivers/net/ethernet/8390/pcnet_cs.c | 1 + 1 file changed, 1 insertion(+) commit a407054f830ca9a28febdeeeaa34d2ed420b9ed3 Author: Sascha Hauer Date: Thu Feb 11 11:44:49 2016 +0100 net: dsa: remove phy_disconnect from error path The phy has not been initialized, disconnecting it in the error path results in a NULL pointer exception. Drop the phy_disconnect from the error path. Signed-off-by: Sascha Hauer Reviewed-by: Andrew Lunn Acked-by: Neil Armstrong Signed-off-by: David S. Miller net/dsa/slave.c | 1 - 1 file changed, 1 deletion(-) commit bd16a7248042dc62285fdc5598ec4888c0865819 Author: Sascha Hauer Date: Thu Feb 11 11:44:48 2016 +0100 net: dsa: mv88e6xxx: Add support for Marvell 88E6240 The Marvell 88E6240 has been tested successfully without further changes. Add entry to the table of supported devices. Signed-off-by: Sascha Hauer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6352.c | 1 + 1 file changed, 1 insertion(+) commit d5c91fb72f1652ea3026925240a0998a42ddb16b Author: Jon Paul Maloy Date: Wed Feb 10 16:14:57 2016 -0500 tipc: fix premature addition of node to lookup table In commit 5266698661401a ("tipc: let broadcast packet reception use new link receive function") we introduced a new per-node broadcast reception link instance. This link is created at the moment the node itself is created. Unfortunately, the allocation is done after the node instance has already been added to the node lookup hash table. This creates a potential race condition, where arriving broadcast packets are able to find and access the node before it has been fully initialized, and before the above mentioned link has been created. The result is occasional crashes in the function tipc_bcast_rcv(), which is trying to access the not-yet existing link. We fix this by deferring the addition of the node instance until after it has been fully initialized in the function tipc_node_create(). Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/node.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7facc5fbde878b2441962748823966bf2ec1d446 Merge: 56bb7fd 51dd55b Author: David S. Miller Date: Tue Feb 16 15:50:03 2016 -0500 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. Fixed autoneg logic and some related cleanups, fixed tx push operation, and reduced default ring sizes. ==================== Signed-off-by: David S. Miller commit 51dd55b5688e81f9f13fb520a59900d4c3959a9a Author: Michael Chan Date: Wed Feb 10 17:33:50 2016 -0500 bnxt_en: Reduce default ring sizes. The current default tx ring size of 512 causes an extra page to be allocated for the tx ring with only 1 entry in it. Reduce it to 511. The default rx ring size is also reduced to 511 to use less memory by default. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4419dbe6a0f031ddb2df4cd993805546a566d20e Author: Michael Chan Date: Wed Feb 10 17:33:49 2016 -0500 bnxt_en: Fix implementation of tx push operation. tx push is supported for small packets to reduce DMA latency. The following bugs are fixed in this patch: 1. Fix the definition of the push BD which is different from the DMA BD. 2. The push buffer has to be zero padded to the next 64-bit word boundary or tx checksum won't be correct. 3. Increase the tx push packet threshold to 164 bytes (192 bytes with the BD) so that small tunneled packets are within the threshold. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 42 ++++++++++++++++++------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 11 ++++++-- 2 files changed, 34 insertions(+), 19 deletions(-) commit 1c49c421f3ec446f1e0eda6d965a6cb23214d7a1 Author: Michael Chan Date: Wed Feb 10 17:33:48 2016 -0500 bnxt_en: Remove 20G support and advertise only 40GbaseCR4. 20G is not supported by production hardware and only the 40GbaseCR4 standard is supported. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 0d8abf020199b0cbc5fb3aa309d36f0ac1b91631 Author: Michael Chan Date: Wed Feb 10 17:33:47 2016 -0500 bnxt_en: Cleanup and Fix flow control setup logic Cleanup bnxt_probe_phy() to cleanly separate 2 code blocks for autoneg on and off. Autoneg flow control is possible only if autoneg is enabled. In bnxt_get_settings(), Pause and Asym_Pause are always supported. Only the advertisement bits change depending on the ethtool -A setting in auto mode. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 20 +++++++------------- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 15 ++------------- 2 files changed, 9 insertions(+), 26 deletions(-) commit b763499ee16b74707af0fb26ab0a26bd9719870b Author: Michael Chan Date: Wed Feb 10 17:33:46 2016 -0500 bnxt_en: Fix ethtool autoneg logic. 1. Determine autoneg on|off setting from link_info->autoneg. Using the firmware returned setting can be misleading if autoneg is changed and there hasn't been a phy update from the firmware. 2. If autoneg is disabled, link_info->autoneg should be set to 0 to indicate both speed and flow control autoneg are disabled. 3. To enable autoneg flow control, speed autoneg must be enabled. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 56bb7fd994f4cc163de08006bf68d959027a9f36 Author: Arnd Bergmann Date: Wed Feb 10 16:09:02 2016 +0100 bridge: mdb: avoid uninitialized variable warning A recent change to the mdb code confused the compiler to the point where it did not realize that the port-group returned from br_mdb_add_group() is always valid when the function returns a nonzero return value, so we get a spurious warning: net/bridge/br_mdb.c: In function 'br_mdb_add': net/bridge/br_mdb.c:542:4: error: 'pg' may be used uninitialized in this function [-Werror=maybe-uninitialized] __br_mdb_notify(dev, entry, RTM_NEWMDB, pg); Slightly rearranging the code in br_mdb_add_group() makes the problem go away, as gcc is clever enough to see that both functions check for 'ret != 0'. Signed-off-by: Arnd Bergmann Fixes: 9e8430f8d60d ("bridge: mdb: Passing the port-group pointer to br_mdb module") Signed-off-by: David S. Miller net/bridge/br_mdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5e4d0bcf77e56362252a7ced4dbb476425e1655 Author: Hariprasad Shenai Date: Wed Feb 10 12:28:49 2016 +0530 cxgb4: Add pci device id for chelsio t540 lom adapter Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 1 + 1 file changed, 1 insertion(+) commit 9c80a5d2e61380d3c5b634890f1893d0179c81f9 Merge: 7856520 b530b16 Author: David S. Miller Date: Tue Feb 16 15:26:31 2016 -0500 Merge branch 'arc_emac-fixes' Alexander Kochetkov says: ==================== Fixes for rockchip EMAC Here is a set of 3 patches what fix koops, memory leak and rockchip EMAC hang. Tested on radxarock lite. ==================== Signed-off-by: David S. Miller commit b530b16413b7f99977ded50a3c4bebd2ea79c41b Author: Alexander Kochetkov Date: Tue Feb 9 18:20:40 2016 +0300 net: arc_emac: fix sk_buff leak EMAC could be disabled, while there is some sb_buff in use. That buffers got lost for linux. In order to reproduce run on device during active ethernet work: ifconfig eth0 down Signed-off-by: Alexander Kochetkov Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_main.c | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 99f93a156a2aa9ac1e44f7cb1a197425e6d9879a Author: Alexander Kochetkov Date: Tue Feb 9 18:20:39 2016 +0300 net: arc_emac: reset txbd_curr and txbd_dirty pointers to zero EMAC reset internal tx ring pointer to zero at statup. txbd_curr and txbd_dirty can be different from zero. That cause ethernet transfer hang (no packets transmitted). In order to reproduce, run on device: ifconfig eth0 down ifconfig eth0 up Signed-off-by: Alexander Kochetkov Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_main.c | 3 +++ 1 file changed, 3 insertions(+) commit c278c253f3d992c6994d08aa0efb2b6806ca396f Author: Alexander Kochetkov Date: Tue Feb 9 18:20:38 2016 +0300 net: arc_emac: fix koops caused by sk_buff free There is a race between arc_emac_tx() and arc_emac_tx_clean(). sk_buff got freed by arc_emac_tx_clean() while arc_emac_tx() submitting sk_buff. In order to free sk_buff arc_emac_tx_clean() checks: if ((info & FOR_EMAC) || !txbd->data) break; ... dev_kfree_skb_irq(skb); If condition false, arc_emac_tx_clean() free sk_buff. In order to submit txbd, arc_emac_tx() do: priv->tx_buff[*txbd_curr].skb = skb; ... priv->txbd[*txbd_curr].data = cpu_to_le32(addr); ... ... <== arc_emac_tx_clean() check condition here ... <== (info & FOR_EMAC) is false ... <== !txbd->data is false ... *info = cpu_to_le32(FOR_EMAC | FIRST_OR_LAST_MASK | len); In order to reproduce the situation, run device: # iperf -s run on host: # iperf -t 600 -c [ 28.396284] ------------[ cut here ]------------ [ 28.400912] kernel BUG at .../net/core/skbuff.c:1355! [ 28.414019] Internal error: Oops - BUG: 0 [#1] SMP ARM [ 28.419150] Modules linked in: [ 28.422219] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G B 4.4.0+ #120 [ 28.429516] Hardware name: Rockchip (Device Tree) [ 28.434216] task: c0665070 ti: c0660000 task.ti: c0660000 [ 28.439622] PC is at skb_put+0x10/0x54 [ 28.443381] LR is at arc_emac_poll+0x260/0x474 [ 28.447821] pc : [] lr : [] psr: a0070113 [ 28.447821] sp : c0661e58 ip : eea68502 fp : ef377000 [ 28.459280] r10: 0000012c r9 : f08b2000 r8 : eeb57100 [ 28.464498] r7 : 00000000 r6 : ef376594 r5 : 00000077 r4 : ef376000 [ 28.471015] r3 : 0030488b r2 : ef13e880 r1 : 000005ee r0 : eeb57100 [ 28.477534] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 28.484658] Control: 10c5387d Table: 8eaf004a DAC: 00000051 [ 28.490396] Process swapper/0 (pid: 0, stack limit = 0xc0660210) [ 28.496393] Stack: (0xc0661e58 to 0xc0662000) [ 28.500745] 1e40: 00000002 00000000 [ 28.508913] 1e60: 00000000 ef376520 00000028 f08b23b8 00000000 ef376520 ef7b6900 c028fc64 [ 28.517082] 1e80: 2f158000 c0661ea8 c0661eb0 0000012c c065e900 c03bdeac ffff95e9 c0662100 [ 28.525250] 1ea0: c0663924 00000028 c0661ea8 c0661ea8 c0661eb0 c0661eb0 0000001e c0660000 [ 28.533417] 1ec0: 40000003 00000008 c0695a00 0000000a c066208c 00000100 c0661ee0 c0027410 [ 28.541584] 1ee0: ef0fb700 2f158000 00200000 ffff95e8 00000004 c0662100 c0662080 00000003 [ 28.549751] 1f00: 00000000 00000000 00000000 c065b45c 0000001e ef005000 c0647a30 00000000 [ 28.557919] 1f20: 00000000 c0027798 00000000 c005cf40 f0802100 c0662ffc c0661f60 f0803100 [ 28.566088] 1f40: c0661fb8 c00093bc c000ffb4 60070013 ffffffff c0661f94 c0661fb8 c00137d4 [ 28.574267] 1f60: 00000001 00000000 00000000 c001ffa0 00000000 c0660000 00000000 c065a364 [ 28.582441] 1f80: c0661fb8 c0647a30 00000000 00000000 00000000 c0661fb0 c000ffb0 c000ffb4 [ 28.590608] 1fa0: 60070013 ffffffff 00000051 00000000 00000000 c005496c c0662400 c061bc40 [ 28.598776] 1fc0: ffffffff ffffffff 00000000 c061b680 00000000 c0647a30 00000000 c0695294 [ 28.606943] 1fe0: c0662488 c0647a2c c066619c 6000406a 413fc090 6000807c 00000000 00000000 [ 28.615127] [] (skb_put) from [] (0xef376520) [ 28.621218] Code: e5902054 e590c090 e3520000 0a000000 (e7f001f2) [ 28.627307] ---[ end trace 4824734e2243fdb6 ]--- [ 34.377068] Internal error: Oops: 17 [#1] SMP ARM [ 34.382854] Modules linked in: [ 34.385947] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.4.0+ #120 [ 34.392219] Hardware name: Rockchip (Device Tree) [ 34.396937] task: ef02d040 ti: ef05c000 task.ti: ef05c000 [ 34.402376] PC is at __dev_kfree_skb_irq+0x4/0x80 [ 34.407121] LR is at arc_emac_poll+0x130/0x474 [ 34.411583] pc : [] lr : [] psr: 60030013 [ 34.411583] sp : ef05de68 ip : 0008e83c fp : ef377000 [ 34.423062] r10: c001bec4 r9 : 00000000 r8 : f08b24c8 [ 34.428296] r7 : f08b2400 r6 : 00000075 r5 : 00000019 r4 : ef376000 [ 34.434827] r3 : 00060000 r2 : 00000042 r1 : 00000001 r0 : 00000000 [ 34.441365] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 34.448507] Control: 10c5387d Table: 8f25c04a DAC: 00000051 [ 34.454262] Process ksoftirqd/0 (pid: 3, stack limit = 0xef05c210) [ 34.460449] Stack: (0xef05de68 to 0xef05e000) [ 34.464827] de60: ef376000 c028fd94 00000000 c0669480 c0669480 ef376520 [ 34.473022] de80: 00000028 00000001 00002ae4 ef376520 ef7b6900 c028fc64 2f158000 ef05dec0 [ 34.481215] dea0: ef05dec8 0000012c c065e900 c03bdeac ffff983f c0662100 c0663924 00000028 [ 34.489409] dec0: ef05dec0 ef05dec0 ef05dec8 ef05dec8 ef7b6000 ef05c000 40000003 00000008 [ 34.497600] dee0: c0695a00 0000000a c066208c 00000100 ef05def8 c0027410 ef7b6000 40000000 [ 34.505795] df00: 04208040 ffff983e 00000004 c0662100 c0662080 00000003 ef05c000 ef027340 [ 34.513985] df20: ef05c000 c0666c2c 00000000 00000001 00000002 00000000 00000000 c0027568 [ 34.522176] df40: ef027340 c003ef48 ef027300 00000000 ef027340 c003edd4 00000000 00000000 [ 34.530367] df60: 00000000 c003c37c ffffff7f 00000001 00000000 ef027340 00000000 00030003 [ 34.538559] df80: ef05df80 ef05df80 00000000 00000000 ef05df90 ef05df90 ef05dfac ef027300 [ 34.546750] dfa0: c003c2a4 00000000 00000000 c000f578 00000000 00000000 00000000 00000000 [ 34.554939] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 34.563129] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff dfff7fff [ 34.571360] [] (__dev_kfree_skb_irq) from [] (arc_emac_poll+0x130/0x474) [ 34.579840] [] (arc_emac_poll) from [] (net_rx_action+0xdc/0x28c) [ 34.587712] [] (net_rx_action) from [] (__do_softirq+0xcc/0x1f8) [ 34.595482] [] (__do_softirq) from [] (run_ksoftirqd+0x2c/0x50) [ 34.603168] [] (run_ksoftirqd) from [] (smpboot_thread_fn+0x174/0x18c) [ 34.611466] [] (smpboot_thread_fn) from [] (kthread+0xd8/0xec) [ 34.619075] [] (kthread) from [] (ret_from_fork+0x14/0x3c) [ 34.626317] Code: e8bd8010 e3a00000 e12fff1e e92d4010 (e59030a4) [ 34.632572] ---[ end trace cca5a3d86a82249a ]--- Signed-off-by: Alexander Kochetkov Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 78565208d73ca9b654fb9a6b142214d52eeedfd1 Author: Alexander Duyck Date: Tue Feb 9 06:14:43 2016 -0800 net: Copy inner L3 and L4 headers as unaligned on GRE TEB This patch corrects the unaligned accesses seen on GRE TEB tunnels when generating hash keys. Specifically what this patch does is make it so that we force the use of skb_copy_bits when the GRE inner headers will be unaligned due to NET_IP_ALIGNED being a non-zero value. Signed-off-by: Alexander Duyck Acked-by: Tom Herbert Signed-off-by: David S. Miller net/core/flow_dissector.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7b4c534ed43c6c132e507142b3edaa5256f08f53 Merge: 266b495 b0eed40 Author: David S. Miller Date: Tue Feb 16 15:21:48 2016 -0500 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== mlx5 driver fixes for 4.5-rc2 We added here a patch from Matan and Alaa for addressing Linus comments on the mess w.r.t reserved field names in the driver/firmware auto-generated file. Once the patch hits linus tree, we'll ask Doug to rebase his tree on that rc so both net-next and rdma-next development for 4.6 will be done under the fixed robust form. Also provided two patches that addresses the dynamic ndo initialization issue of mlx5e netdevice. Or and Saeed. changes from V1: (Only first patch was changed) In this V we fixed the issues addressed in Or's previous e-mail. 1. Offsets took into account two dimensional u8 arrays 2. Offsets took into account nesting unions and structs 3. Offsets for unions 4. Offsets for any reserved field ==================== Signed-off-by: David S. Miller commit b0eed40ea15235b1dd138093901569077ba532ee Author: Saeed Mahameed Date: Tue Feb 9 14:57:44 2016 +0200 net/mlx5e: Use static constant netdevice ndos Currently our netdevice ops is a one static global variable which is referenced by all mlx5e netdevice instances. This can be problematic when different driver instances do not share same HW capabilities (e.g SRIOV PF and VFs probed to the host). Now we have two constant global netdevice ops variables, one for basic netdevice ops and the other with extended SRIOV ops, on netdevice construction we choose the one suitable for current device capabilities. Fixes: 66e49dedada6 ("net/mlx5e: Add support for SR-IOV ndos") Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 41 ++++++++++++++++------- 1 file changed, 28 insertions(+), 13 deletions(-) commit b236872739df6410c7c60874ff8f3fb188ffb9d0 Author: Saeed Mahameed Date: Tue Feb 9 14:57:43 2016 +0200 net/mlx5e: Remove select queue ndo initialization Currently mlx5e_select_queue is redundant since num_tc is always 1. Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 --- 1 file changed, 3 deletions(-) commit b4ff3a36d3e409d365a09b6b783ff895063ff4ef Author: Matan Barak Date: Tue Feb 9 14:57:42 2016 +0200 net/mlx5: Use offset based reserved field names in the IFC header file mlx5_ifc.h is a header file representing the API and ABI between the driver to the firmware and hardware. This file is used from both the mlx5_ib and mlx5_core drivers. Previously, this file used incrementing counter to indicate reserved fields, for example: struct mlx5_ifc_odp_per_transport_service_cap_bits { u8 send[0x1]; u8 receive[0x1]; u8 write[0x1]; u8 read[0x1]; u8 reserved_0[0x1]; u8 srq_receive[0x1]; u8 reserved_1[0x1a]; }; If one developer implements through net-next feature A that uses reserved_0, they replace it with featureA and renames reserved_1 to reserved_0. In the same kernel cycle, a 2nd developer could implement feature B through the rdma tree, that uses reserved_1 and split it to featureB and a smaller reserved_1 field. This will cause a conflict when the two trees are merged. The source of this conflict is that the 1st developer changed *all* reserved fields. As Linus suggested, we change the layout of structs to: struct mlx5_ifc_odp_per_transport_service_cap_bits { u8 send[0x1]; u8 receive[0x1]; u8 write[0x1]; u8 read[0x1]; u8 reserved_at_4[0x1]; u8 srq_receive[0x1]; u8 reserved_at_6[0x1a]; }; This makes the conflicts much more rare and preserves the locality of changes. Signed-off-by: Matan Barak Signed-off-by: Alaa Hleihel Reported-by: Linus Torvalds Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller include/linux/mlx5/mlx5_ifc.h | 2968 ++++++++++++++++++++--------------------- 1 file changed, 1484 insertions(+), 1484 deletions(-) commit 36cb6253f9383fd9a59ee7b8458c6232ef48577c Author: Eric Anholt Date: Mon Feb 8 12:59:02 2016 -0800 drm/vc4: Use runtime PM to power cycle the device when the GPU hangs. This gets us functional GPU reset again, like we had until a refactor at merge time. Tested with a little patch to stuff in a broken binner job every 100 frames. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_drv.h | 6 +++++- drivers/gpu/drm/vc4/vc4_gem.c | 26 +++++++++++++++++++++----- drivers/gpu/drm/vc4/vc4_v3d.c | 12 ------------ 3 files changed, 26 insertions(+), 18 deletions(-) commit 001bdb55d9eb72a9e2d5b623bacfc52da74ae03e Author: Eric Anholt Date: Fri Feb 5 17:41:49 2016 -0800 drm/vc4: Enable runtime PM. This may actually get us a feature that the closed driver didn't have: turning off the GPU in between rendering jobs, while the V3D device is still opened by the client. There may be some tuning to be applied here to use autosuspend so that we don't bounce the device's power so much, but in steady-state GPU-bound rendering we keep the power on (since we keep multiple jobs outstanding) and even if we power cycle on every job we can still manage at least 680 fps. More importantly, though, runtime PM will allow us to power off the device to do a GPU reset. v2: Switch #ifdef to CONFIG_PM not CONFIG_PM_SLEEP (caught by kbuild test robot) Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_gem.c | 10 ++++++++++ drivers/gpu/drm/vc4/vc4_v3d.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit c4ce60dc30912df09b2438f1e5594eae1ef64d1e Author: Eric Anholt Date: Mon Feb 8 11:19:14 2016 -0800 drm/vc4: Fix spurious GPU resets due to BO reuse. We were tracking the "where are the head pointers pointing" globally, so if another job reused the same BOs and execution was at the same point as last time we checked, we'd stop and trigger a reset even though the GPU had made progress. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_drv.h | 6 +++++- drivers/gpu/drm/vc4/vc4_gem.c | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) commit 2ee94657e2bbd13b358060edc91b2b2fdef9038f Author: Eric Anholt Date: Mon Jan 25 14:33:50 2016 -0800 drm/vc4: Drop error message on seqno wait timeouts. These ioctls end up getting exposed to fairly directly to GL users, and having normal user operations print DRM errors is obviously wrong. The message was originally to give us some idea of what happened when a hang occurred, but we have a DRM_INFO from reset for that. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_gem.c | 3 --- 1 file changed, 3 deletions(-) commit 13cf8909ead67e313ea203ee524b3cf4b09b3c9d Author: Eric Anholt Date: Mon Jan 25 14:32:41 2016 -0800 drm/vc4: Fix -ERESTARTSYS error return from BO waits. This caused the wait ioctls to claim that waiting had completed when we actually got interrupted by a signal before it was done. Fixes broken rendering throttling that produced serious lag in X window dragging. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_gem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2c68f1fcfb9cfc10deff9bc59774aa331a6fabd2 Author: Eric Anholt Date: Mon Jan 25 14:13:12 2016 -0800 drm/vc4: Return an ERR_PTR from BO creation instead of NULL. Fixes igt vc4_create_bo/create-bo-0 by returning -EINVAL from the ioctl instead of -ENOMEM. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_bo.c | 16 ++++++++-------- drivers/gpu/drm/vc4/vc4_gem.c | 4 ++-- drivers/gpu/drm/vc4/vc4_irq.c | 2 +- drivers/gpu/drm/vc4/vc4_render_cl.c | 4 ++-- drivers/gpu/drm/vc4/vc4_validate.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) commit 54aec44ab02b1fa216706671ae12d64af74443c5 Author: Eric Anholt Date: Mon Jan 25 13:52:41 2016 -0800 drm/vc4: Fix the clear color for the first tile rendered. Apparently in hardware (as opposed to simulation), the clear colors need to be uploaded before the render config, otherwise they won't take effect. Fixes igt's vc4_wait_bo/used-bo-* subtests. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_render_cl.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e001523666d0b07592abe1822b78ed0e5c2a34ab Author: Eric Anholt Date: Mon Jan 25 13:05:00 2016 -0800 drm/vc4: Validate that WAIT_BO padding is cleared. This is ABI future-proofing if we ever want to extend the pad to mean something. Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_gem.c | 3 +++ 1 file changed, 3 insertions(+) commit 266b495f11d6706018f66250cb02a788ff2490d7 Author: Jay Vosburgh Date: Mon Feb 8 12:10:02 2016 -0800 bonding: don't use stale speed and duplex information There is presently a race condition between the bonding periodic link monitor and the updating of a slave's speed and duplex. The former occurs on a periodic basis, and the latter in response to a driver's calling of netif_carrier_on. It is possible for the periodic monitor to run between the driver call of netif_carrier_on and the receipt of the NETDEV_CHANGE event that causes bonding to update the slave's speed and duplex. This manifests most notably as a report that a slave is up and "0 Mbps full duplex" after enslavement, but in principle could report an incorrect speed and duplex after any link up event if the device comes up with a different speed or duplex. This affects the 802.3ad aggregator selection, as the speed and duplex are selection criteria. This is fixed by updating the speed and duplex in the periodic monitor, prior to using that information. This was done historically in bonding, but the call to bond_update_speed_duplex was removed in commit 876254ae2758 ("bonding: don't call update_speed_duplex() under spinlocks"), as it might sleep under lock. Later, the locking was changed to only hold RTNL, and so after commit 876254ae2758 ("bonding: don't call update_speed_duplex() under spinlocks") this call is again safe. Tested-by: "Tantilov, Emil S" Cc: Veaceslav Falico Cc: dingtianhong Fixes: 876254ae2758 ("bonding: don't call update_speed_duplex() under spinlocks") Signed-off-by: Jay Vosburgh Acked-by: Ding Tianhong Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 1 + 1 file changed, 1 insertion(+) commit a5a23ad52d1310976891c30471f4ee8d73f3cc9e Author: Arnd Bergmann Date: Mon Feb 8 15:33:42 2016 +0100 net: am79c961a: avoid %? in inline assembly The am79c961a.c driver fails to build with clang because of an unusual inline assembly construct: drivers/net/ethernet/amd/am79c961a.c:53:7: error: invalid % escape in inline assembly string "str%?h %1, [%2] @ NET_RAP\n\t" The same change has been done a decade ago in arch/arm as of 6a39dd6222dd ("[ARM] 3759/2: Remove uses of %?"), but apparently some drivers were missed. Signed-off-by: Arnd Bergmann Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/ethernet/amd/am79c961a.c | 64 ++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) commit bd59cfc51df7ddc88755a60a1293cee55f5d0a12 Author: Robert Jarzmik Date: Sat Feb 6 22:23:20 2016 +0100 net: smc91x: propagate irq return code The smc91x driver doesn't honor the probe deferral mechanism when the interrupt source is not yet available, such as one provided by a gpio controller not probed. Fix this by propagating the platform_get_irq() error code as the probe return value. Signed-off-by: Robert Jarzmik Cc: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc91x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfb3a9df6106b5384773734896bf0034f5790243 Merge: 5d8e498 815717d Author: David S. Miller Date: Tue Feb 16 14:55:36 2016 -0500 Merge branch 'bcm7xxx-fixes' Florian Fainelli says: ==================== Subject: [PATCH net v2 0/4] net: phy: bcm7xxx 40nm PHY fixes Here is a collection of fixes for the 40nm Ethernet PHY supported by the 7xxx PHY driver, please also queue these fixes for stable. Changes in v2: - dropped the cleanup patch, not appropriate - added another patch removing bogus wildcard entries ==================== Signed-off-by: David S. Miller commit 815717d1473e0d5c3a31c350975325e07ed736fa Author: Florian Fainelli Date: Sat Feb 6 12:58:51 2016 -0800 net: phy: bcm7xxx: Remove wildcard entries Remove the two wildcard entries, they serve no purpose and will match way too many devices, some of them being covered by the driver in drivers/net/phy/broadcom.c. Remove the now unused bcm7xxx_dummy_config_init() function which would produce a warning. Fixes: b560a58c45c6 ("net: phy: add Broadcom BCM7xxx internal PHY driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 31 ------------------------------- 1 file changed, 31 deletions(-) commit 258bf44364263cb6391f35ebaca3c2366655bded Author: Florian Fainelli Date: Sat Feb 6 12:58:50 2016 -0800 net: phy: bcm7xxx: Fix bcm7xxx_config_init() check Since we were wrongly advertising gigabit features for these 10/100 only Ethernet PHYs, bcm7xxx_config_init() which is supposed to apply workaround would have not run since the check would be true, now that we have fixed the PHY features, remove that check since it has no reasoning to be there anymore. Fixes: e18556ee3bd83 ("net: phy: bcm7xxx: do not use PHY_BRCM_100MBPS_WAR") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 4 ---- 1 file changed, 4 deletions(-) commit c6dd213abe40132f83e6ee569d70f3d60aa8b257 Author: Florian Fainelli Date: Sat Feb 6 12:58:49 2016 -0800 net: phy: bcm7xxx: Fix 40nm EPHY features The PHY entries for BCM7425/29/35 declare the 40nm Ethernet PHY as being 10/100/1000 capable, while this is just a 10/100 capable PHY device, fix that. Fixes: d068b02cfdfc2 ("net: phy: add BCM7425 and BCM7429 PHYs") Fixes: 9458ceab4917 ("net: phy: bcm7xxx: Add entry for BCM7435") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 50d899808d33a5b0aa82be23e824119944042689 Author: Florian Fainelli Date: Sat Feb 6 12:58:48 2016 -0800 net: phy: bcm7xxx: Fix shadow mode 2 disabling The clear and set masks in the call to phy_set_clr_bits() called from bcm7xxx_config_init() are inverted. We need to fix this by swapping the two arguments, that is, set 0 bits, but clear the shade mode 2 enable bit. Fixes: b560a58c45c66 ("net: phy: add Broadcom BCM7xxx internal PHY driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d8e498f2e81283a594bd6161f2581a195081765 Merge: dba36b3 50bfd83 Author: David S. Miller Date: Tue Feb 16 14:53:00 2016 -0500 Merge branch 'ravb-fixes' Sergei Shtylyov says: ==================== ravb: fix the fallout of R-Car gen3 gPTP support Here's a set of 2 patches against DaveM's 'net.git' repo fixing up the incomplete commit f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support"). I'm proposing these as fixes but they can be merged as cleanups as well... [1/2] ravb: kill duplicate setting of CCC.CSEL [2/2] ravb: skip gPTP start/stop on R-Car gen3 ==================== Signed-off-by: David S. Miller commit 50bfd83830b89f9273672dcaedf3b765724fd023 Author: Sergei Shtylyov Date: Sat Feb 6 17:47:22 2016 +0300 ravb: skip gPTP start/stop on R-Car gen3 When adding support for the R-Car gen3 gPTP active in configuration mode, some call sites of ravb_ptp_{init|stop}() were missed due to an oversight. Add checks for the R-Car gen2 SoCs around these... Fixes: f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d0c5f45ae3ede897114dea204fbaaa4dd18fa9cb Author: Sergei Shtylyov Date: Sat Feb 6 17:46:35 2016 +0300 ravb: kill duplicate setting of CCC.CSEL When adding support for the R-Car gen3 gPTP active in configuration mode, the code setting the CCC.CSEL field was duplicated due to an oversight. For R-Car gen 2 it's just redundant and for R-Car gen3 the write at this time is probably ignored due to CCC.GAC bit being already set... Fixes: f5d7837f96e5 ("ravb: ptp: Add CONFIG mode support") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 65c23c65bee479faceb042a52f5a7278dfa8d972 Merge: d82834e 4b550af Author: Linus Torvalds Date: Tue Feb 16 10:52:59 2016 -0800 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "A small set of cifs fixes. I am still reviewing some more, recently submitted SMB3 fixes, but these three are small and safe and ready now" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix erroneous return value cifs: fix potential overflow in cifs_compose_mount_options cifs: remove redundant check for null string pointer commit d82834ee13e8060bd20c7d3b834d2ac5ff89469a Merge: 87bbcfd c53d7a8 Author: Linus Torvalds Date: Tue Feb 16 10:50:46 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull ARM KVM fixes from Paolo Bonzini: - Fix for an unpleasant crash when the VM is created without a timer - Allow HYP mode to access the full PA space, and not only 40bit * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: arm64: KVM: Configure TCR_EL2.PS at runtime KVM: arm/arm64: Fix reference to uninitialised VGIC commit 5ff8eaac1636bf6deae86491f4818c4c69d1a9ac Author: Tejun Heo Date: Tue Feb 16 11:34:07 2016 -0700 writeback: keep superblock pinned during cgroup writeback association switches If cgroup writeback is in use, an inode is associated with a cgroup for writeback. If the inode's main dirtier changes to another cgroup, the association gets updated asynchronously. Nothing was pinning the superblock while such switches are in progress and superblock could go away while async switching is pending or in progress leading to crashes like the following. kernel BUG at fs/jbd2/transaction.c:319! invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC CPU: 1 PID: 29158 Comm: kworker/1:10 Not tainted 4.5.0-rc3 #51 Hardware name: Google Google, BIOS Google 01/01/2011 Workqueue: events inode_switch_wbs_work_fn task: ffff880213dbbd40 ti: ffff880209264000 task.ti: ffff880209264000 RIP: 0010:[] [] start_this_handle+0x382/0x3e0 RSP: 0018:ffff880209267c30 EFLAGS: 00010202 ... Call Trace: [] jbd2__journal_start+0xf4/0x190 [] __ext4_journal_start_sb+0x4e/0x70 [] ext4_evict_inode+0x12c/0x3d0 [] evict+0xbb/0x190 [] iput+0x130/0x190 [] inode_switch_wbs_work_fn+0x343/0x4c0 [] process_one_work+0x129/0x300 [] worker_thread+0x126/0x480 [] kthread+0xc4/0xe0 [] ret_from_fork+0x3f/0x70 Fix it by bumping s_active while cgroup association switching is in flight. Signed-off-by: Tejun Heo Reported-and-tested-by: Tahsin Erdogan Link: http://lkml.kernel.org/g/CAAeU0aNCq7LGODvVGRU-oU_o-6enii5ey0p1c26D1ZzYwkDc5A@mail.gmail.com Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching") Cc: stable@vger.kernel.org #v4.5+ Signed-off-by: Jens Axboe fs/fs-writeback.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit dba36b382e7a3feb5b04849543dc6ec5d522482e Merge: a5527dd 5cc6ce9 Author: David S. Miller Date: Tue Feb 16 12:56:00 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contain a rather large batch for your net that includes accumulated bugfixes, they are: 1) Run conntrack cleanup from workqueue process context to avoid hitting soft lockup via watchdog for large tables. This is required by the IPv6 masquerading extension. From Florian Westphal. 2) Use original skbuff from nfnetlink batch when calling netlink_ack() on error since this needs to access the skb->sk pointer. 3) Incremental fix on top of recent Sasha Levin's lock fix for conntrack resizing. 4) Fix several problems in nfnetlink batch message header sanitization and error handling, from Phil Turnbull. 5) Select NF_DUP_IPV6 based on CONFIG_IPV6, from Arnd Bergmann. 6) Fix wrong signess in return values on nf_tables counter expression, from Anton Protopopov. Due to the NetDev 1.1 organization burden, I had no chance to pass up this to you any sooner in this release cycle, sorry about that. ==================== Signed-off-by: David S. Miller commit a5527dda344fff0514b7989ef7a755729769daa1 Author: Rainer Weikusat Date: Thu Feb 11 19:37:27 2016 +0000 af_unix: Guard against other == sk in unix_dgram_sendmsg The unix_dgram_sendmsg routine use the following test if (unlikely(unix_peer(other) != sk && unix_recvq_full(other))) { to determine if sk and other are in an n:1 association (either established via connect or by using sendto to send messages to an unrelated socket identified by address). This isn't correct as the specified address could have been bound to the sending socket itself or because this socket could have been connected to itself by the time of the unix_peer_get but disconnected before the unix_state_lock(other). In both cases, the if-block would be entered despite other == sk which might either block the sender unintentionally or lead to trying to unlock the same spin lock twice for a non-blocking send. Add a other != sk check to guard against this. Fixes: 7d267278a9ec ("unix: avoid use-after-free in ep_remove_wait_queue") Reported-By: Philipp Hahn Signed-off-by: Rainer Weikusat Tested-by: Philipp Hahn Signed-off-by: David S. Miller net/unix/af_unix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c53d7a846ee7273c21ca317500480eb7dcdd2c5a Merge: c05235d 3c5b1d9 Author: Paolo Bonzini Date: Tue Feb 16 18:51:55 2016 +0100 Merge tag 'kvm-arm-for-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/ARM fixes for 4.5-rc4 - Fix for an unpleasant crash when the VM is created without a timer - Allow HYP mode to access the full PA space, and not only 40bit commit 1b92ee3d03af6643df395300ba7748f19ecdb0c5 Author: Rainer Weikusat Date: Mon Feb 8 18:47:19 2016 +0000 af_unix: Don't set err in unix_stream_read_generic unless there was an error The present unix_stream_read_generic contains various code sequences of the form err = -EDISASTER; if () goto out; This has the unfortunate side effect of possibly causing the error code to bleed through to the final out: return copied ? : err; and then to be wrongly returned if no data was copied because the caller didn't supply a data buffer, as demonstrated by the program available at http://pad.lv/1540731 Change it such that err is only set if an error condition was detected. Fixes: 3822b5c2fc62 ("af_unix: Revert 'lock_interruptible' in stream receive code") Reported-by: Joseph Salisbury Signed-off-by: Rainer Weikusat Signed-off-by: David S. Miller net/unix/af_unix.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 87bbcfdecc5579042459bb42ede81ed23e4b9a79 Merge: e5310a1 4692400 Author: Linus Torvalds Date: Tue Feb 16 08:04:06 2016 -0800 Merge tag 'for-linus-20160216' of git://git.infradead.org/intel-iommu Pull IOMMU SVM fixes from David Woodhouse: "Minor register size and interrupt acknowledgement fixes which only showed up in testing on newer hardware, but mostly a fix to the MM refcount handling to prevent a recursive refcount issue when mmap() is used on the file descriptor associated with a bound PASID" * tag 'for-linus-20160216' of git://git.infradead.org/intel-iommu: iommu/vt-d: Clear PPR bit to ensure we get more page request interrupts iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG iommu/vt-d: Fix mm refcounting to hold mm_count not mm_users commit c699404db182836498bd9d9a36ef044de2cab4fd Merge: fb724ed 20aa99b Author: Kalle Valo Date: Tue Feb 16 17:58:30 2016 +0200 Merge tag 'iwlwifi-for-kalle-2016-02-15' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes These are a few fixes for the current cycle. 3 out of the 5 patches fix a bugzilla. * fix a race that users reported when we try to load the firmware and the hardware rfkill interrupt triggers at the same time. * Luca fixes a very visible bug in scheduled scan: our firmware doesn't support scheduled scan with no profile configured and the supplicant sometimes requests such scheduled scans. * build system fix * firmware name update for 8265 * typo fix in return value commit 02a5f765c961ea778e30a8356f32528e65f34942 Merge: 4682c21 a680759 Author: Ingo Molnar Date: Tue Feb 16 16:46:40 2016 +0100 Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into x86/urgent Pull EFI bug fixes from Matt Fleming: * Fix bugs in our code that converts ucs2 strings to utf8 where we unintentionally drop bits from the original string (Jason Andryuk) * Add the efi-pstore variables to the variable whitelist so that users can continue to delete them via efivarfs without needing to manipulate the immutable flag (Matt Fleming) Signed-off-by: Ingo Molnar commit e5310a1cb4f56c54488ecaf29b1abf3b790cfddc Merge: 2a4be2c 4dd638f Author: Linus Torvalds Date: Tue Feb 16 07:15:20 2016 -0800 Merge tag 'spi-fix-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small clutch of driver specific fixes. The OMAP one is a bit worrying since it seems to be triggered by some changes in the runtime PM core code and I suspect there's other drivers across that are going to be using the same pattern outside of OMAP but nothing seems to be coming up in the testing people are doing" * tag 'spi-fix-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: omap2-mcspi: Fix PM regression with deferred probe for pm_runtime_reinit spi: bcm2835aux: fix bitmask defines spi: atmel: fix gpio chip-select in case of non-DT platform spi/fsl-espi: Correct the maximum transaction length spi: imx: fix spi resource leak with dma transfer spi: fix counting in spi-loopback-test code commit 2a4be2c52556ded8df08904f4032aed98654a017 Merge: 1926e54 daf670b Author: Linus Torvalds Date: Tue Feb 16 07:13:53 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k fixes from Geert Uytterhoeven: "Summary: - Wire up new copy_file_range syscall - Update defconfigs" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/defconfig: Update defconfigs for v4.5-rc1 m68k: Wire up copy_file_range commit bc3f5d8c4ca01555820617eb3b6c0857e4df710d Author: Rasmus Villemoes Date: Mon Feb 15 19:41:47 2016 +0100 drm/radeon: use post-decrement in error handling We need to use post-decrement to get the pci_map_page undone also for i==0, and to avoid some very unpleasant behaviour if pci_map_page failed already at i==0. Reviewed-by: Christian König Signed-off-by: Rasmus Villemoes Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09ccbb74b6718ad4d1290de3f5669212c0ac7d4b Author: Rasmus Villemoes Date: Mon Feb 15 19:41:45 2016 +0100 drm/amdgpu: use post-decrement in error handling We need to use post-decrement to get the pci_map_page undone also for i==0, and to avoid some very unpleasant behaviour if pci_map_page failed already at i==0. Reviewed-by: Christian König Signed-off-by: Rasmus Villemoes Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bc4e2b000e7fa9773d6623bc8850561ce10a4fb Author: Andrew Lunn Date: Thu Feb 11 22:15:57 2016 +0100 batman-adv: Avoid endless loop in bat-on-bat netdevice check batman-adv checks in different situation if a new device is already on top of a different batman-adv device. This is done by getting the iflink of a device and all its parent. It assumes that this iflink is always a parent device in an acyclic graph. But this assumption is broken by devices like veth which are actually a pair of two devices linked to each other. The recursive check would therefore get veth0 when calling dev_get_iflink on veth1. And it gets veth0 when calling dev_get_iflink with veth1. Creating a veth pair and loading batman-adv freezes parts of the system ip link add veth0 type veth peer name veth1 modprobe batman-adv An RCU stall will be detected on the system which cannot be fixed. INFO: rcu_sched self-detected stall on CPU 1: (5264 ticks this GP) idle=3e9/140000000000001/0 softirq=144683/144686 fqs=5249 (t=5250 jiffies g=46 c=45 q=43) Task dump for CPU 1: insmod R running task 0 247 245 0x00000008 ffffffff8151f140 ffffffff8107888e ffff88000fd141c0 ffffffff8151f140 0000000000000000 ffffffff81552df0 ffffffff8107b420 0000000000000001 ffff88000e3fa700 ffffffff81540b00 ffffffff8107d667 0000000000000001 Call Trace: [] ? rcu_dump_cpu_stacks+0x7e/0xd0 [] ? rcu_check_callbacks+0x3f0/0x6b0 [] ? hrtimer_run_queues+0x47/0x180 [] ? update_process_times+0x2d/0x50 [] ? tick_handle_periodic+0x1b/0x60 [] ? smp_trace_apic_timer_interrupt+0x5e/0x90 [] ? apic_timer_interrupt+0x82/0x90 [] ? __dev_get_by_index+0x37/0x40 [] ? batadv_hard_if_event+0xee/0x3a0 [batman_adv] [] ? register_netdevice_notifier+0x81/0x1a0 [...] This can be avoided by checking if two devices are each others parent and stopping the check in this situation. Fixes: b7eddd0b3950 ("batman-adv: prevent using any virtual device created on batman-adv as hard-interface") Signed-off-by: Andrew Lunn [sven@narfation.org: rewritten description, extracted fix] Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/hard-interface.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 13d5e5d4725c64ec06040d636832e78453f477b7 Author: Takashi Iwai Date: Tue Feb 16 14:15:59 2016 +0100 ALSA: seq: Fix double port list deletion The commit [7f0973e973cd: ALSA: seq: Fix lockdep warnings due to double mutex locks] split the management of two linked lists (source and destination) into two individual calls for avoiding the AB/BA deadlock. However, this may leave the possible double deletion of one of two lists when the counterpart is being deleted concurrently. It ends up with a list corruption, as revealed by syzkaller fuzzer. This patch fixes it by checking the list emptiness and skipping the deletion and the following process. BugLink: http://lkml.kernel.org/r/CACT4Y+bay9qsrz6dQu31EcGaH9XwfW7o3oBzSQUG9fMszoh=Sg@mail.gmail.com Fixes: 7f0973e973cd ('ALSA: seq: Fix lockdep warnings due to 'double mutex locks) Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_ports.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit a68075908a37850918ad96b056acc9ac4ce1bd90 Author: Jason Andryuk Date: Fri Feb 12 23:13:33 2016 +0000 lib/ucs2_string: Correct ucs2 -> utf8 conversion The comparisons should be >= since 0x800 and 0x80 require an additional bit to store. For the 3 byte case, the existing shift would drop off 2 more bits than intended. For the 2 byte case, there should be 5 bits bits in byte 1, and 6 bits in byte 2. Signed-off-by: Jason Andryuk Reviewed-by: Laszlo Ersek Cc: Peter Jones Cc: Matthew Garrett Cc: "Lee, Chun-Yi" Signed-off-by: Matt Fleming lib/ucs2_string.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e246eb568bc4cbbdd8a30a3c11151ff9b7ca7312 Author: Matt Fleming Date: Mon Feb 15 10:34:05 2016 +0000 efi: Add pstore variables to the deletion whitelist Laszlo explains why this is a good idea, 'This is because the pstore filesystem can be backed by UEFI variables, and (for example) a crash might dump the last kilobytes of the dmesg into a number of pstore entries, each entry backed by a separate UEFI variable in the above GUID namespace, and with a variable name according to the above pattern. Please see "drivers/firmware/efi/efi-pstore.c". While this patch series will not prevent the user from deleting those UEFI variables via the pstore filesystem (i.e., deleting a pstore fs entry will continue to delete the backing UEFI variable), I think it would be nice to preserve the possibility for the sysadmin to delete Linux-created UEFI variables that carry portions of the crash log, *without* having to mount the pstore filesystem.' There's also no chance of causing machines to become bricked by deleting these variables, which is the whole purpose of excluding things from the whitelist. Use the LINUX_EFI_CRASH_GUID guid and a wildcard '*' for the match so that we don't have to update the string in the future if new variable name formats are created for crash dump variables. Reported-by: Laszlo Ersek Acked-by: Peter Jones Tested-by: Peter Jones Cc: Matthew Garrett Cc: "Lee, Chun-Yi" Signed-off-by: Matt Fleming drivers/firmware/efi/vars.c | 1 + 1 file changed, 1 insertion(+) commit 4682c211a80ee93214b72d95f861b0f6e90e5445 Merge: 1926e54 ed8b0de Author: Ingo Molnar Date: Tue Feb 16 13:14:57 2016 +0100 Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into x86/urgent Pull EFI fixes from Matt Fleming: * Prevent accidental deletion of EFI variables through efivarfs that may brick machines. We use a whitelist of known-safe variables to allow things like installing distributions to work out of the box, and instead restrict vendor-specific variable deletion by making non-whitelist variables immutable (Peter Jones) Signed-off-by: Ingo Molnar commit 0ba4581c84cfb39fd527f6b3457f1c97f6356c04 Author: Hans Verkuil Date: Wed Feb 10 08:09:10 2016 -0200 [media] adv7604: fix tx 5v detect regression The 5 volt detect functionality broke in 3.14: the code reads IO register 0x70 again after it has already been cleared. Instead it should use the cached irq_reg_0x70 value and the io_write to 0x71 to clear 0x70 can be dropped since this has already been done. Signed-off-by: Hans Verkuil Cc: # for v3.14 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7604.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9727a9545adec59f4bccb83d1a709711f4acf242 Author: Mauro Carvalho Chehab Date: Fri Feb 12 15:44:31 2016 -0200 [media] media.h: get rid of MEDIA_ENT_F_CONN_TEST Defining it as a connector was a bad idea. Remove it while it is not too late. Signed-off-by: Mauro Carvalho Chehab Documentation/DocBook/media/v4l/media-types.xml | 4 ---- drivers/media/usb/au0828/au0828-video.c | 3 +-- include/uapi/linux/media.h | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) commit 1f4522400e7e49464da5e584a463bd315283790f Author: Hans Verkuil Date: Thu Feb 11 12:28:55 2016 -0200 [media] [for,v4.5] media.h: increase the spacing between function ranges Each function range is quite narrow and especially for connectors this will pose a problem. Increase the function ranges while we still can and move the connector range to the end so that range is practically limitless. [mchehab@osg.samsung.com: Rebased to apply at Linus tree] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 7f4e346263f59ff50b531dda94609fb13ca12401 Author: Thierry Reding Date: Tue Feb 16 11:16:31 2016 +0100 arm64/efi: Make strnlen() available to the EFI namespace Changes introduced in the upstream version of libfdt pulled in by commit 91feabc2e224 ("scripts/dtc: Update to upstream commit b06e55c88b9b") use the strnlen() function, which isn't currently available to the EFI name- space. Add it to the EFI namespace to avoid a linker error. Cc: Catalin Marinas Cc: Rob Herring Reviewed-by: Ard Biesheuvel Signed-off-by: Thierry Reding Signed-off-by: Will Deacon arch/arm64/kernel/image.h | 1 + arch/arm64/lib/strnlen.S | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 3db152093efb750bc47fd4d69355b90b18113105 Author: Sven Eckelmann Date: Sun Jan 31 13:28:00 2016 +0100 batman-adv: Only put orig_node_vlan list reference when removed The batadv_orig_node_vlan reference counter in batadv_tt_global_size_mod can only be reduced when the list entry was actually removed. Otherwise the reference counter may reach zero when batadv_tt_global_size_mod is called from two different contexts for the same orig_node_vlan but only one context is actually removing the entry from the list. The release function for this orig_node_vlan is not called inside the vlan_list_lock spinlock protected region because the function batadv_tt_global_size_mod still holds a orig_node_vlan reference for the object pointer on the stack. Thus the actual release function (when required) will be called only at the end of the function. Fixes: 7ea7b4a14275 ("batman-adv: make the TT CRC logic VLAN specific") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/translation-table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c18bdd018e8912ca73ad6c12120b7283b5038875 Author: Sven Eckelmann Date: Sun Jan 31 13:27:59 2016 +0100 batman-adv: Only put gw_node list reference when removed The batadv_gw_node reference counter in batadv_gw_node_update can only be reduced when the list entry was actually removed. Otherwise the reference counter may reach zero when batadv_gw_node_update is called from two different contexts for the same gw_node but only one context is actually removing the entry from the list. The release function for this gw_node is not called inside the list_lock spinlock protected region because the function batadv_gw_node_update still holds a gw_node reference for the object pointer on the stack. Thus the actual release function (when required) will be called only at the end of the function. Fixes: bd3524c14bd0 ("batman-adv: remove obsolete deleted attribute for gateway node") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/gateway_client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fb896c44f88a75843a072cd6961b1615732f7811 Author: Liad Kaufman Date: Sun Feb 14 15:32:58 2016 +0200 iwlwifi: mvm: inc pending frames counter also when txing non-sta Until this patch, when TXing non-sta the pending_frames counter wasn't increased, but it WAS decreased in iwl_mvm_rx_tx_cmd_single(), what makes it negative in certain conditions. This in turn caused much trouble when we need to remove the station since we won't be waiting forever until pending_frames gets 0. In certain cases, we were exhausting the station table even in BSS mode, because we had a lot of stale stations. Increase the counter also in iwl_mvm_tx_skb_non_sta() after a successful TX to avoid this outcome. CC: [3.18+] Signed-off-by: Liad Kaufman Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c906f38e8853cfd407b30d2f4756a93c1d8f698f Author: Kirill Tkhai Date: Tue Feb 16 00:20:19 2016 -0500 ext4: fix memleak in ext4_readdir() When ext4_bread() fails, fname_crypto_str remains allocated after return. Fix that. Signed-off-by: Kirill Tkhai Signed-off-by: Theodore Ts'o CC: Dmitry Monakhov fs/ext4/dir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1636d1d77ef4e01e57f706a4cae3371463896136 Author: Filipe Manana Date: Mon Feb 15 16:20:26 2016 +0000 Btrfs: fix direct IO requests not reporting IO error to user space If a bio for a direct IO request fails, we were not setting the error in the parent bio (the main DIO bio), making us not return the error to user space in btrfs_direct_IO(), that is, it made __blockdev_direct_IO() return the number of bytes issued for IO and not the error a bio created and submitted by btrfs_submit_direct() got from the block layer. This essentially happens because when we call: dio_end_io(dio_bio, bio->bi_error); It does not set dio_bio->bi_error to the value of the second argument. So just add this missing assignment in endio callbacks, just as we do in the error path at btrfs_submit_direct() when we fail to clone the dio bio or allocate its private object. This follows the convention of what is done with other similar APIs such as bio_endio() where the caller is responsible for setting the bi_error field in the bio it passes as an argument to bio_endio(). This was detected by the new generic test cases in xfstests: 271, 272, 276 and 278. Which essentially setup a dm error target, then load the error table, do a direct IO write and unload the error table. They expect the write to fail with -EIO, which was not getting reported when testing against btrfs. Cc: stable@vger.kernel.org # 4.3+ Fixes: 4246a0b63bd8 ("block: add a bi_error field to struct bio") Signed-off-by: Filipe Manana fs/btrfs/inode.c | 2 ++ 1 file changed, 2 insertions(+) commit d9ff0eb9ca4b00ce2fbf9ede1e99681f05c0bc91 Author: Youngmin Nam Date: Tue Feb 9 00:49:28 2016 +0900 pinctrl: samsung: fix SMP race condition Previously, samsung_gpio_drection_in/output function were not covered with a spinlock. For example, samsung_gpio_direction_output function consists of two functions. 1. samsung_gpio_set 2. samsung_gpio_set_direction When 2 CPUs try to control the same gpio pin heavily, (situation like i2c control with gpio emulation) This situation can cause below problem. CPU 0 | CPU1 | samsung_gpio_direction_output | samsung_gpio_set(pin A as 1) | samsung_gpio_direction_output | samsung_gpio_set(pin A as 0) samsung_gpio_set_direction | | samsung_gpio_set_direction The initial value of pin A will be set as 0 while we wanted to set pin A as 1. This patch modifies samsung_gpio_direction_in/output function to be done in one spinlock to fix race condition. Additionally, the new samsung_gpio_set_value was added to implement gpio set callback(samsung_gpio_set) with spinlock using this function. Cc: stable@vger.kernel.org Signed-off-by: Youngmin Nam Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 48 ++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 13 deletions(-) commit b33c8ff4431a343561e2319f17c14286f2aa52e2 Author: Arnd Bergmann Date: Fri Feb 12 22:26:42 2016 +0100 tracing: Fix freak link error caused by branch tracer In my randconfig tests, I came across a bug that involves several components: * gcc-4.9 through at least 5.3 * CONFIG_GCOV_PROFILE_ALL enabling -fprofile-arcs for all files * CONFIG_PROFILE_ALL_BRANCHES overriding every if() * The optimized implementation of do_div() that tries to replace a library call with an division by multiplication * code in drivers/media/dvb-frontends/zl10353.c doing u32 adc_clock = 450560; /* 45.056 MHz */ if (state->config.adc_clock) adc_clock = state->config.adc_clock; do_div(value, adc_clock); In this case, gcc fails to determine whether the divisor in do_div() is __builtin_constant_p(). In particular, it concludes that __builtin_constant_p(adc_clock) is false, while __builtin_constant_p(!!adc_clock) is true. That in turn throws off the logic in do_div() that also uses __builtin_constant_p(), and instead of picking either the constant- optimized division, and the code in ilog2() that uses __builtin_constant_p() to figure out whether it knows the answer at compile time. The result is a link error from failing to find multiple symbols that should never have been called based on the __builtin_constant_p(): dvb-frontends/zl10353.c:138: undefined reference to `____ilog2_NaN' dvb-frontends/zl10353.c:138: undefined reference to `__aeabi_uldivmod' ERROR: "____ilog2_NaN" [drivers/media/dvb-frontends/zl10353.ko] undefined! ERROR: "__aeabi_uldivmod" [drivers/media/dvb-frontends/zl10353.ko] undefined! This patch avoids the problem by changing __trace_if() to check whether the condition is known at compile-time to be nonzero, rather than checking whether it is actually a constant. I see this one link error in roughly one out of 1600 randconfig builds on ARM, and the patch fixes all known instances. Link: http://lkml.kernel.org/r/1455312410-1058841-1-git-send-email-arnd@arndb.de Acked-by: Nicolas Pitre Fixes: ab3c9c686e22 ("branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y") Cc: stable@vger.kernel.org # v2.6.30+ Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f37755490fe9bf76f6ba1d8c6591745d3574a6a6 Author: Steven Rostedt (Red Hat) Date: Mon Feb 15 12:36:14 2016 -0500 tracepoints: Do not trace when cpu is offline The tracepoint infrastructure uses RCU sched protection to enable and disable tracepoints safely. There are some instances where tracepoints are used in infrastructure code (like kfree()) that get called after a CPU is going offline, and perhaps when it is coming back online but hasn't been registered yet. This can probuce the following warning: [ INFO: suspicious RCU usage. ] 4.4.0-00006-g0fe53e8-dirty #34 Tainted: G S ------------------------------- include/trace/events/kmem.h:141 suspicious rcu_dereference_check() usage! other info that might help us debug this: RCU used illegally from offline CPU! rcu_scheduler_active = 1, debug_locks = 1 no locks held by swapper/8/0. stack backtrace: CPU: 8 PID: 0 Comm: swapper/8 Tainted: G S 4.4.0-00006-g0fe53e8-dirty #34 Call Trace: [c0000005b76c78d0] [c0000000008b9540] .dump_stack+0x98/0xd4 (unreliable) [c0000005b76c7950] [c00000000010c898] .lockdep_rcu_suspicious+0x108/0x170 [c0000005b76c79e0] [c00000000029adc0] .kfree+0x390/0x440 [c0000005b76c7a80] [c000000000055f74] .destroy_context+0x44/0x100 [c0000005b76c7b00] [c0000000000934a0] .__mmdrop+0x60/0x150 [c0000005b76c7b90] [c0000000000e3ff0] .idle_task_exit+0x130/0x140 [c0000005b76c7c20] [c000000000075804] .pseries_mach_cpu_die+0x64/0x310 [c0000005b76c7cd0] [c000000000043e7c] .cpu_die+0x3c/0x60 [c0000005b76c7d40] [c0000000000188d8] .arch_cpu_idle_dead+0x28/0x40 [c0000005b76c7db0] [c000000000101e6c] .cpu_startup_entry+0x50c/0x560 [c0000005b76c7ed0] [c000000000043bd8] .start_secondary+0x328/0x360 [c0000005b76c7f90] [c000000000008a6c] start_secondary_prolog+0x10/0x14 This warning is not a false positive either. RCU is not protecting code that is being executed while the CPU is offline. Instead of playing "whack-a-mole(TM)" and adding conditional statements to the tracepoints we find that are used in this instance, simply add a cpu_online() test to the tracepoint code where the tracepoint will be ignored if the CPU is offline. Use of raw_smp_processor_id() is fine, as there should never be a case where the tracepoint code goes from running on a CPU that is online and suddenly gets migrated to a CPU that is offline. Link: http://lkml.kernel.org/r/1455387773-4245-1-git-send-email-kda@linux-powerpc.org Reported-by: Denis Kirjanov Fixes: 97e1c18e8d17b ("tracing: Kernel Tracepoints") Cc: stable@vger.kernel.org # v2.6.28+ Signed-off-by: Steven Rostedt include/linux/tracepoint.h | 5 +++++ 1 file changed, 5 insertions(+) commit e0fa0d0189f6be61343dbff1f71bef20125576e7 Author: Trond Myklebust Date: Mon Feb 15 12:56:17 2016 -0500 pNFS: Always set NFS_LAYOUT_RETURN_REQUESTED with lo->plh_return_iomode When setting the layout return mode, we must always also set the NFS_LAYOUT_RETURN_REQUESTED flag to ensure that we send a layoutreturn. Otherwise pnfs_error_mark_layout_for_return() could set the mode, but fail to send the layoutreturn because another is already in flight. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2f21596882f4a0edc387051910d56f8732970080 Author: Trond Myklebust Date: Mon Feb 15 12:36:04 2016 -0500 pNFS: Fix pnfs_mark_matching_lsegs_return() We don't need to schedule a layoutreturn if the layout segment can be freed immediately. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit ee1cdcdae59563535485a5f56ee72c894ab7d7ad Author: Andy Shevchenko Date: Wed Feb 10 15:59:42 2016 +0200 dmaengine: dw: disable BLOCK IRQs for non-cyclic xfer The commit 2895b2cad6e7 ("dmaengine: dw: fix cyclic transfer callbacks") re-enabled BLOCK interrupts with regard to make cyclic transfers work. However, this change becomes a regression for non-cyclic transfers as interrupt counters under stress test had been grown enormously (approximately per 4-5 bytes in the UART loop back test). Taking into consideration above enable BLOCK interrupts if and only if channel is programmed to perform cyclic transfer. Fixes: 2895b2cad6e7 ("dmaengine: dw: fix cyclic transfer callbacks") Signed-off-by: Andy Shevchenko Acked-by: Mans Rullgard Tested-by: Mans Rullgard Acked-by: Viresh Kumar Cc: Signed-off-by: Vinod Koul drivers/dma/dw/core.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit bee038a4bd2efe8188cc80dfdad706a9abe568ad Author: Jeremy Linton Date: Fri Feb 12 09:47:52 2016 -0600 arm/arm64: crypto: assure that ECB modes don't require an IV ECB modes don't use an initialization vector. The kernel /proc/crypto interface doesn't reflect this properly. Acked-by: Ard Biesheuvel Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon arch/arm/crypto/aes-ce-glue.c | 4 ++-- arch/arm64/crypto/aes-glue.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0b8c82190c12e530eb6003720dac103bf63e146e Author: Takashi Iwai Date: Mon Feb 15 16:37:24 2016 +0100 ALSA: hda - Cancel probe work instead of flush at remove The commit [991f86d7ae4e: ALSA: hda - Flush the pending probe work at remove] introduced the sync of async probe work at remove for fixing the race. However, this may lead to another hangup when the module removal is performed quickly before starting the probe work, because it issues flush_work() and it's blocked forever. The workaround is to use cancel_work_sync() instead of flush_work() there. Fixes: 991f86d7ae4e ('ALSA: hda - Flush the pending probe work at remove') Cc: # v3.17+ Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d99a36f4728fcbcc501b78447f625bdcce15b842 Author: Takashi Iwai Date: Mon Feb 15 16:20:24 2016 +0100 ALSA: seq: Fix leak of pool buffer at concurrent writes When multiple concurrent writes happen on the ALSA sequencer device right after the open, it may try to allocate vmalloc buffer for each write and leak some of them. It's because the presence check and the assignment of the buffer is done outside the spinlock for the pool. The fix is to move the check and the assignment into the spinlock. (The current implementation is suboptimal, as there can be multiple unnecessary vmallocs because the allocation is done before the check in the spinlock. But the pool size is already checked beforehand, so this isn't a big problem; that is, the only possible path is the multiple writes before any pool assignment, and practically seen, the current coverage should be "good enough".) The issue was triggered by syzkaller fuzzer. BugLink: http://lkml.kernel.org/r/CACT4Y+bSzazpXNvtAr=WXaL8hptqjHwqEyFA+VN2AWEx=aurkg@mail.gmail.com Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_memory.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 4d8c8bd6f2062c9988817183a91fe2e623c8aa5e Author: Konrad Rzeszutek Wilk Date: Thu Feb 11 16:10:26 2016 -0500 xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. Occasionaly PV guests would crash with: pciback 0000:00:00.1: Xen PCI mapped GSI0 to IRQ16 BUG: unable to handle kernel paging request at 0000000d1a8c0be0 .. snip.. ] find_next_bit+0xb/0x10 [] cpumask_next_and+0x22/0x40 [] pci_device_probe+0xb8/0x120 [] ? driver_sysfs_add+0x77/0xa0 [] driver_probe_device+0x1a4/0x2d0 [] ? pci_match_device+0xdd/0x110 [] __device_attach_driver+0xa7/0xb0 [] ? __driver_attach+0xa0/0xa0 [] bus_for_each_drv+0x62/0x90 [] __device_attach+0xbd/0x110 [] device_attach+0xb/0x10 [] pci_bus_add_device+0x3c/0x70 [] pci_bus_add_devices+0x38/0x80 [] pcifront_scan_root+0x13e/0x1a0 [] pcifront_backend_changed+0x262/0x60b [] ? xenbus_gather+0xd6/0x160 [] ? put_object+0x2f/0x50 [] xenbus_otherend_changed+0x9d/0xa0 [] backend_changed+0xe/0x10 [] xenwatch_thread+0xc8/0x190 [] ? woken_wake_function+0x10/0x10 which was the result of two things: When we call pci_scan_root_bus we would pass in 'sd' (sysdata) pointer which was an 'pcifront_sd' structure. However in the pci_device_add it expects that the 'sd' is 'struct sysdata' and sets the dev->node to what is in sd->node (offset 4): set_dev_node(&dev->dev, pcibus_to_node(bus)); __pcibus_to_node(const struct pci_bus *bus) { const struct pci_sysdata *sd = bus->sysdata; return sd->node; } However our structure was pcifront_sd which had nothing at that offset: struct pcifront_sd { int domain; /* 0 4 */ /* XXX 4 bytes hole, try to pack */ struct pcifront_device * pdev; /* 8 8 */ } That is an hole - filled with garbage as we used kmalloc instead of kzalloc (the second problem). This patch fixes the issue by: 1) Use kzalloc to initialize to a well known state. 2) Put 'struct pci_sysdata' at the start of 'pcifront_sd'. That way access to the 'node' will access the right offset. Signed-off-by: Konrad Rzeszutek Wilk Cc: Reviewed-by: Boris Ostrovsky Signed-off-by: David Vrabel drivers/pci/xen-pcifront.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 00780f3b1a10d1be006b920505faf1d02f76f0e4 Author: Andrzej Hajda Date: Thu Feb 11 12:25:04 2016 +0100 drm/exynos/decon: fix disable clocks order Decon requires that clocks should be disabled in reverse order. Otherwise system hangs. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d380a1632c4e036d50c898e874a194fd4bf8bdee Author: Marek Szyprowski Date: Thu Feb 11 12:32:07 2016 +0100 drm/exynos: fix incorrect cpu address for dma_mmap_attrs() dma_mmap_attrs() should be called with cpu address returned by dma_alloc_attrs(). Existing code however passed pages array base as cpu address. This worked only by a pure luck on ARM architecture. This patch fixes this issue. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 74ebc70622c95b3e767f62b73a3ef624c913e5dd Author: Marek Szyprowski Date: Wed Feb 3 13:42:54 2016 +0100 drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable BIT_IRQS_ENABLED was never set because of incorrect test in decon_vlank_enable() function, what resulted in lack of enabling vblank support. This patch fixes this issue. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c90f950ce3b33a020292c7e7feca644a706265ca Author: Marek Szyprowski Date: Wed Feb 3 13:42:53 2016 +0100 drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable Patch ebf3fd403b79ba6561bd1a4bb5a7cacc99da08e5 ("drm/exynos: add pm_runtime to DECON 5433") removed some code from decon_enable() function, but it left set_bit(BIT_SUSPENDED, &ctx->flags) call, which was earlier called only in error path. This patch removes it, what finally lets driver to go out of suspended state. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 -- 1 file changed, 2 deletions(-) commit e7ad6606c000bf71df1ed0dcfca91227ce375db3 Author: Marek Szyprowski Date: Wed Feb 3 13:42:51 2016 +0100 drm/exynos: dsi: restore support for drm bridge This patch fixes issue introduced by commit cf67cc9a29ac19c98bc4fa0e6d14b0c1f592d322 ("drm/exynos: remove struct exynos_drm_display"), which removed assigning of drm bridge to drm encoder. Lack of it caused that no bridge callbacks were called on encoder enable/disable actions. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 + 1 file changed, 1 insertion(+) commit 8b0be57286642f87a968c00932c3f2ef936f6b7b Author: Marek Szyprowski Date: Wed Feb 3 13:42:50 2016 +0100 drm/exynos: mic: make all functions static There is no point exposing all internal functions to global kernel name space, so make all internals functions static. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 622688f36e9b98ab0c0a01a47c33635519e735cb Author: Marek Szyprowski Date: Wed Feb 3 13:42:49 2016 +0100 drm/exynos: mic: convert to component framework MIC is SoC component and important part of kms pipeline on Exynos5433, so convert it to use component framework like other KMS/CRTC drivers. MIC driver is already listed on KMS component driver list in Exynos DRM core, so without this conversion, initialization of Exynos DRM core fails on Exynos 5433 SoC. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 56 +++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 20 deletions(-) commit 38b5e5f4d76df1116b0b5a76fb9b7549a44efe6e Author: Marek Szyprowski Date: Wed Feb 3 13:42:48 2016 +0100 drm/exynos: mic: use devm_clk interface Drivers should use devm_clk* interface instead of of_clk* functions. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0f10c71a10d04e86fd842d621f678ee1fd233695 Author: Marek Szyprowski Date: Wed Feb 3 13:42:47 2016 +0100 drm/exynos: fix types for compilation on 64bit architectures This patch fixes compilation warnings (on 64bit architectures) and bugs related to casting pointers through 32bit integers. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 5 +++-- drivers/gpu/drm/exynos/exynos_drm_gem.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 +++++--- 3 files changed, 9 insertions(+), 6 deletions(-) commit 977b5067c232020c5e27842aa5bec3e93d336e60 Author: Marek Szyprowski Date: Wed Feb 3 13:42:46 2016 +0100 drm/exynos: ipp: fix incorrect format specifiers in debug messages Drivers should use %p for printing pointers instead of hardcoding them as hexadecimal integers. This patch fixes compilation warnings on 64bit architectures. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 32 ++++++++++++++--------------- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) commit c327cd635c5367d9d6b063dd2d8c78484d4e4fb3 Author: Joonyoung Shim Date: Wed Feb 3 13:42:45 2016 +0100 drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS Because PLAT_SAMSUNG isn't include exynos SoCs for arm64, but ARCH_EXYNOS can do it. And it also needs to add ARCH_S3C64XX instead of PLAT_SAMSUNG. Signed-off-by: Joonyoung Shim Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cfec6a2f989d5c921ba11a329ff8ea986702b9b Author: Konrad Rzeszutek Wilk Date: Thu Feb 11 16:10:25 2016 -0500 xen/pcifront: Report the errors better. The messages should be different depending on the type of error. Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: David Vrabel arch/x86/include/asm/xen/pci.h | 4 ++-- arch/x86/pci/xen.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) commit d159457b84395927b5a52adb72f748dd089ad5e5 Author: Konrad Rzeszutek Wilk Date: Thu Feb 11 16:10:24 2016 -0500 xen/pciback: Save the number of MSI-X entries to be copied later. Commit 8135cf8b092723dbfcc611fe6fdcb3a36c9951c5 (xen/pciback: Save xen_pci_op commands before processing it) broke enabling MSI-X because it would never copy the resulting vectors into the response. The number of vectors requested was being overwritten by the return value (typically zero for success). Save the number of vectors before processing the op, so the correct number of vectors are copied afterwards. Signed-off-by: Konrad Rzeszutek Wilk Cc: Reviewed-by: Jan Beulich Signed-off-by: David Vrabel drivers/xen/xen-pciback/pciback_ops.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8d47065f7d1980dde52abb874b301054f3013602 Author: Konrad Rzeszutek Wilk Date: Thu Feb 11 16:10:23 2016 -0500 xen/pciback: Check PF instead of VF for PCI_COMMAND_MEMORY Commit 408fb0e5aa7fda0059db282ff58c3b2a4278baa0 (xen/pciback: Don't allow MSI-X ops if PCI_COMMAND_MEMORY is not set) prevented enabling MSI-X on passed-through virtual functions, because it checked the VF for PCI_COMMAND_MEMORY but this is not a valid bit for VFs. Instead, check the physical function for PCI_COMMAND_MEMORY. Signed-off-by: Konrad Rzeszutek Wilk Cc: Reviewed-by: Jan Beulich Signed-off-by: David Vrabel drivers/xen/xen-pciback/pciback_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 85c0a87cd117e83361932b2b160c9af178fdb21a Author: Insu Yun Date: Mon Jan 18 11:54:43 2016 -0500 xen: fix potential integer overflow in queue_reply When len is greater than UINT_MAX - sizeof(*rb), in next allocation, it can overflow integer range and allocates small size of heap. After that, memcpy will overflow the allocated heap. Therefore, it needs to check the size of given length. Signed-off-by: Insu Yun Signed-off-by: David Vrabel drivers/xen/xenbus/xenbus_dev_frontend.c | 2 ++ 1 file changed, 2 insertions(+) commit 814a3c0c2a8dfad97089f6bdc71b374f6076490e Author: Tony Lindgren Date: Wed Feb 10 15:02:44 2016 -0800 mmc: omap_hsmmc: Fix PM regression with deferred probe for pm_runtime_reinit Commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") introduced pm_runtime_reinit() that is used to reinitialize PM runtime after -EPROBE_DEFER. This allows shutting down the device after a failed probe. However, for drivers using pm_runtime_use_autosuspend() this can cause a state where suspend callback is never called after -EPROBE_DEFER. On the following device driver probe, hardware state is different from the PM runtime state causing omap_device to produce the following error: omap_device_enable() called from invalid state 1 And with omap_device and omap hardware being picky for PM, this will block any deeper idle states in hardware. The solution is to fix the drivers to follow the PM runtime documentation: 1. For sections of code that needs the device disabled, use pm_runtime_put_sync_suspend() if pm_runtime_set_autosuspend() has been set. 2. For driver exit code, use pm_runtime_dont_use_autosuspend() before pm_runtime_put_sync() if pm_runtime_use_autosuspend() has been set. Fixes: 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") Cc: linux-mmc@vger.kernel.org Cc: Alan Stern Cc: Kevin Hilman Cc: Nishanth Menon Cc: Rafael J. Wysocki Cc: Ulf Hansson Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 2 ++ 1 file changed, 2 insertions(+) commit 46924008273ed03bd11dbb32136e3da4cfe056e1 Author: David Woodhouse Date: Mon Feb 15 12:42:38 2016 +0000 iommu/vt-d: Clear PPR bit to ensure we get more page request interrupts According to the VT-d specification we need to clear the PPR bit in the Page Request Status register when handling page requests, or the hardware won't generate any more interrupts. This wasn't actually necessary on SKL/KBL (which may well be the subject of a hardware erratum, although it's harmless enough). But other implementations do appear to get it right, and we only ever get one interrupt unless we clear the PPR bit. Reported-by: CQ Tang Signed-off-by: David Woodhouse Cc: stable@vger.kernel.org drivers/iommu/intel-svm.c | 4 ++++ include/linux/intel-iommu.h | 3 +++ 2 files changed, 7 insertions(+) commit 844c9f476a43db0bdf61df409026a026ce98ec1b Author: Shawn Lin Date: Mon Feb 15 16:28:12 2016 +0800 spi: rockchip: add missing spi_master_put Add missing spi_master_put for rockchip_spi_remove since it calls spi_master_get already. Signed-off-by: Shawn Lin Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) commit b8659adda9e295eca0b10a67f3b15a8644c8ed6f Author: Shawn Lin Date: Mon Feb 15 16:27:58 2016 +0800 spi: rockchip: disable runtime pm when in err case Before registering master, driver enables runtime pm. This patch pm_runtime_disable in err case while probing driver to balance pm reference count. Signed-off-by: Shawn Lin Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 1 + 1 file changed, 1 insertion(+) commit 20aa99bbddae74bded68338f9ba200ccae02858b Author: Anton Protopopov Date: Thu Feb 11 08:35:15 2016 +0200 iwlwifi: pcie: fix erroneous return value The iwl_trans_pcie_start_fw() function may return the positive value EIO instead of -EIO in case of error. Signed-off-by: Anton Protopopov Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6bd005fe92dc1cc808c4c6aa43e3b2a8272bbfa Author: Emmanuel Grumbach Date: Sun Jan 31 15:02:30 2016 +0200 iwlwifi: pcie: fix RF-Kill vs. firmware load race When we load the firmware, we hold trans_pcie->mutex to avoid nested flows. We also rely on the ISR to wake up the thread when the DMA has finished copying a chunk. During this flow, we enable the RF-Kill interrupt. The problem is that the RF-Kill interrupt handler can take the mutex and bring the device down. This means that if we load the firmware while the RF-Kill switch is enabled (which will happen when we load the INIT firmware to read the device's capabilities and register to mac80211), we may get an RF-Kill interrupt immediately and the ISR will be waiting for the mutex held by the thread that is currently loading the firmware. At this stage, the ISR won't be able to service the DMA's interrupt needed to wake up the thread that load the firmware. We are in a deadlock situation which ends when the thread that loads the firmware fails on timeout and releases the mutex. To fix this, take the mutex later in the flow, disable the interrupts and synchronize_irq() to give a chance to the RF-Kill interrupt to run and complete. After that, mask all the interrupts besides the DMA interrupt and proceed with firmware load. Make sure to check that there was no RF-Kill interrupt when the interrupts were disabled. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=111361 Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 9 + drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 8 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 188 ++++++++++++--------- 3 files changed, 123 insertions(+), 82 deletions(-) commit c777e2a8b65420b31dac28a453e35be984f5808b Author: Aneesh Kumar K.V Date: Tue Feb 9 06:50:31 2016 +0530 powerpc/mm: Fix Multi hit ERAT cause by recent THP update With ppc64 we use the deposited pgtable_t to store the hash pte slot information. We should not withdraw the deposited pgtable_t without marking the pmd none. This ensure that low level hash fault handling will skip this huge pte and we will handle them at upper levels. Recent change to pmd splitting changed the above in order to handle the race between pmd split and exit_mmap. The race is explained below. Consider following race: CPU0 CPU1 shrink_page_list() add_to_swap() split_huge_page_to_list() __split_huge_pmd_locked() pmdp_huge_clear_flush_notify() // pmd_none() == true exit_mmap() unmap_vmas() zap_pmd_range() // no action on pmd since pmd_none() == true pmd_populate() As result the THP will not be freed. The leak is detected by check_mm(): BUG: Bad rss-counter state mm:ffff880058d2e580 idx:1 val:512 The above required us to not mark pmd none during a pmd split. The fix for ppc is to clear the huge pte of _PAGE_USER, so that low level fault handling code skip this pte. At higher level we do take ptl lock. That should serialze us against the pmd split. Once the lock is acquired we do check the pmd again using pmd_same. That should always return false for us and hence we should retry the access. We do the pmd_same check in all case after taking plt with THP (do_huge_pmd_wp_page, do_huge_pmd_numa_page and huge_pmd_set_accessed) Also make sure we wait for irq disable section in other cpus to finish before flipping a huge pte entry with a regular pmd entry. Code paths like find_linux_pte_or_hugepte depend on irq disable to get a stable pte_t pointer. A parallel thp split need to make sure we don't convert a pmd pte to a regular pmd entry without waiting for the irq disable section to finish. Fixes: eef1b3ba053a ("thp: implement split_huge_pmd()") Acked-by: Kirill A. Shutemov Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ++++ arch/powerpc/mm/pgtable_64.c | 32 ++++++++++++++++++++++++++++ include/asm-generic/pgtable.h | 8 +++++++ mm/huge_memory.c | 1 + 4 files changed, 45 insertions(+) commit 1bc74f1ccd457832dc515fc1febe6655985fdcd2 Author: Gavin Shan Date: Tue Feb 9 15:50:22 2016 +1100 powerpc/powernv: Fix stale PE primary bus When PCI bus is unplugged during full hotplug for EEH recovery, the platform PE instance (struct pnv_ioda_pe) isn't released and it dereferences the stale PCI bus that has been released. It leads to kernel crash when referring to the stale PCI bus. This fixes the issue by correcting the PE's primary bus when it's oneline at plugging time, in pnv_pci_dma_bus_setup() which is to be called by pcibios_fixup_bus(). Cc: stable@vger.kernel.org # v4.1+ Reported-by: Andrew Donnellan Reported-by: Pradipta Ghosh Signed-off-by: Gavin Shan Tested-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 1 + arch/powerpc/platforms/powernv/pci.c | 20 ++++++++++++++++++++ arch/powerpc/platforms/powernv/pci.h | 1 + 3 files changed, 22 insertions(+) commit 05ba75f848647135f063199dc0e9f40fee769724 Author: Gavin Shan Date: Tue Feb 9 15:50:21 2016 +1100 powerpc/eeh: Fix stale cached primary bus When PE is created, its primary bus is cached to pe->bus. At later point, the cached primary bus is returned from eeh_pe_bus_get(). However, we could get stale cached primary bus and run into kernel crash in one case: full hotplug as part of fenced PHB error recovery releases all PCI busses under the PHB at unplugging time and recreate them at plugging time. pe->bus is still dereferencing the PCI bus that was released. This adds another PE flag (EEH_PE_PRI_BUS) to represent the validity of pe->bus. pe->bus is updated when its first child EEH device is online and the flag is set. Before unplugging in full hotplug for error recovery, the flag is cleared. Fixes: 8cdb2833 ("powerpc/eeh: Trace PCI bus from PE") Cc: stable@vger.kernel.org #v3.11+ Reported-by: Andrew Donnellan Reported-by: Pradipta Ghosh Signed-off-by: Gavin Shan Tested-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 1 + arch/powerpc/kernel/eeh_driver.c | 3 +++ arch/powerpc/kernel/eeh_pe.c | 2 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 5 ++++- 4 files changed, 9 insertions(+), 2 deletions(-) commit 126df08c52375817c237f38c3bcd01d78a60c090 Author: Denis Kirjanov Date: Mon Dec 14 23:18:06 2015 +0300 powerpc/pseries: Don't trace hcalls on offline CPUs If a cpu is hotplugged while the hcall trace points are active, it's possible to hit a warning from RCU due to the trace points calling into RCU from an offline cpu, eg: RCU used illegally from offline CPU! rcu_scheduler_active = 1, debug_locks = 1 Make the hypervisor tracepoints conditional by using TRACE_EVENT_FN_COND. Acked-by: Steven Rostedt Signed-off-by: Denis Kirjanov Signed-off-by: Michael Ellerman arch/powerpc/include/asm/trace.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5e56276e7555b34550d51459a801ff75eca8b907 Author: Luca Coelho Date: Tue Feb 2 15:11:15 2016 +0200 iwlwifi: mvm: don't allow sched scans without matches to be started The firmware can perform a scheduled scan with not matchsets passed, but it can't send notification that results were found. Since the userspace then cannot know when we got new results and the firmware wouldn't trigger a wake in case we are sleeping, it's better not to allow scans without matchsets. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=110831 Cc: [3.17+] Signed-off-by: Luca Coelho Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1926e54f115725a9248d0c4c65c22acaf94de4c4 Author: Simon Horman Date: Mon Feb 15 10:49:47 2016 +0900 MAINTAINERS: Update mailing list for Renesas ARM64 SoC Development Update the mailing list used for development of support for ARM64 Renesas SoCs. This is a follow-up for a similar change for other Renesas SoCs and drivers uses by Renesas SoCs. The ARM64 SoC entry was not updated in that patch as it was not yet present in mainline. The motivation for the mailing list update is that Renesas SoCs are now much wider than the SH architecture and there is some desire from some for the linux-sh list to refocus on discussion of the work on the SH architecture. Acked-by: Magnus Damm Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman Signed-off-by: Linus Torvalds MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 631c0e84d941a43c9477afbea6374a18b816f68e Merge: 18558ca bdbe58e Author: Linus Torvalds Date: Sun Feb 14 18:34:12 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull i915 drm fixes from Dave Airlie: "Jani sent a bunch of i915 display fixes as my weekend started, but hopefully you can fit them in" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/i915: fix error path in intel_setup_gmbus() drm/i915/skl: Fix typo in DPLL_CFGCR1 definition drm/i915/skl: Don't skip mst encoders in skl_ddi_pll_select() drm/i915: Pretend cursor is always on for ILK-style WM calculations (v2) drm/i915/dp: reduce missing TPS3 support errors to debug logging drm/i915/dp: abstract training pattern selection drm/i915/dsi: skip gpio element execution when not supported drm/i915/dsi: don't pass arbitrary data to sideband drm/i915/dsi: defend gpio table against out of bounds access drm/i915/bxt: Don't save/restore eDP panel power during suspend (v3) drm/i915: Allow i915_gem_object_get_page() on userptr as well commit 18558cae0272f8fd9647e69d3fec1565a7949865 Author: Linus Torvalds Date: Sun Feb 14 13:05:20 2016 -0800 Linux 4.5-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdbe58e6c60e49930d9c33e7d2b9a7789ed8c1a9 Merge: c92a428 ed3f9fd Author: Dave Airlie Date: Mon Feb 15 06:54:50 2016 +1000 Merge tag 'drm-intel-fixes-2016-02-12' of git://anongit.freedesktop.org/drm-intel into drm-fixes i915 display fixes mostly. * tag 'drm-intel-fixes-2016-02-12' of git://anongit.freedesktop.org/drm-intel: drm/i915: fix error path in intel_setup_gmbus() drm/i915/skl: Fix typo in DPLL_CFGCR1 definition drm/i915/skl: Don't skip mst encoders in skl_ddi_pll_select() drm/i915: Pretend cursor is always on for ILK-style WM calculations (v2) drm/i915/dp: reduce missing TPS3 support errors to debug logging drm/i915/dp: abstract training pattern selection drm/i915/dsi: skip gpio element execution when not supported drm/i915/dsi: don't pass arbitrary data to sideband drm/i915/dsi: defend gpio table against out of bounds access drm/i915/bxt: Don't save/restore eDP panel power during suspend (v3) drm/i915: Allow i915_gem_object_get_page() on userptr as well commit 58dd2b5be1db1c6b99450768f91886396583957c Merge: 60f4058 3b2b9ea Author: Linus Torvalds Date: Sun Feb 14 12:47:45 2016 -0800 Merge tag 'char-misc-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are 3 fixes for some reported issues. Two nvmem driver fixes, and one mei fix. All have been in linux-next just fine" * tag 'char-misc-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: nvmem: qfprom: Specify LE device endianness nvmem: core: return error for non word aligned access mei: validate request value in client notify request ioctl commit 60f40585c9c9c5c09af1b7854e1299a61fc95b21 Merge: 779ee19 00cd29b Author: Linus Torvalds Date: Sun Feb 14 12:34:53 2016 -0800 Merge tag 'driver-core-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "Here is one driver core, well klist, fix for 4.5-rc4. It fixes a problem found in the scsi device list traversal that probably also could be triggered by other subsystems. The fix has been in linux-next for a while with no reported problems" * tag 'driver-core-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: klist: fix starting point removed bug in klist iterators commit 779ee19da757d6bbf5504840f8b624f525de9797 Merge: 9db8cc1 c8053b5 Author: Linus Torvalds Date: Sun Feb 14 12:29:59 2016 -0800 Merge tag 'tty-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are a number of small tty and serial driver fixes for 4.5-rc4 that resolve some reported issues. One of them got reverted as it wasn't correct based on testing, and all have been in linux-next for a while" * tag 'tty-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "8250: uniphier: allow modular build with 8250 console" pty: make sure super_block is still valid in final /dev/tty close pty: fix possible use after free of tty->driver_data tty: Add support for PCIe WCH382 2S multi-IO card serial/omap: mark wait_for_xmitr as __maybe_unused serial: omap: Prevent DoS using unprivileged ioctl(TIOCSRS485) 8250: uniphier: allow modular build with 8250 console tty: Drop krefs for interrupted tty lock commit 9db8cc1ae5b0805230f710ddf4f2de0591db820a Merge: 102a92c 6b44d1e Author: Linus Torvalds Date: Sun Feb 14 12:24:28 2016 -0800 Merge tag 'usb-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull PHY fixes from Greg KH: "Here are a couple of PHY driver fixes for 4.5-rc4. A few small phy issues. All have been in linux-next with no reported issues" * tag 'usb-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload phy: twl4030-usb: Relase usb phy on unload phy: core: fix wrong err handle for phy_power_on phy: Restrict phy-hi6220-usb to HiSilicon arm64 commit 102a92ce28cc08176b7d748e0679f69d46a5a377 Merge: cb490d6 580df49 Author: Linus Torvalds Date: Sun Feb 14 12:07:55 2016 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Thomas Gleixner: "Another round of fixes for the perf tooling side: - Prevent a NULL pointer dereference in tracepoint error handling - Fix a thread handling bug in the intel_pt error handling code - Search both .eh_frame and .debug_frame sections as toolchains seem to have random choices of storing the CFI information - Fix the perf state interval output values, which got broken when fixing the overall output" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf stat: Fix interval output values perf probe: Search both .eh_frame and .debug_frame sections for probe location perf tools: Fix thread lifetime related segfaut in intel_pt perf tools: tracepoint_error() can receive e=NULL, robustify it commit cb490d632b9c7a3f08a9c73b88956132b6ad299c Merge: 6a81094 8a5fd56 Author: Linus Torvalds Date: Sun Feb 14 12:02:05 2016 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull lockdep fix from Thomas Gleixner: "A single fix for the stack trace caching logic in lockdep, where the duplicate avoidance managed to store no back trace at all" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/lockdep: Fix stack trace caching logic commit 6a810945ed23554aa71634ff0bf976da41de9045 Merge: 8ab54ed 0f26922 Author: Linus Torvalds Date: Sun Feb 14 11:57:24 2016 -0800 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single fix preventing a 32bit overflow in timespec/val to cputime conversions on 32bit machines" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cputime: Prevent 32bit overflow in time[val|spec]_to_cputime() commit 8ab54ed6412f42a1769cf64d4900f49a422d4292 Merge: 2d23e61 49b245e Author: Linus Torvalds Date: Sun Feb 14 11:49:30 2016 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irqchip fixes from Thomas Gleixner: "Another set of ARM SoC related irqchip fixes: - Plug a memory leak in gicv3-its - Limit features to the root gic interrupt controller - Add a missing barrier in the gic-v3 IAR access - Another compile test fix for sun4i" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is visible on redestributor irqchip/gic: Only set the EOImodeNS bit for the root controller irqchip/gic: Only populate set_affinity for the root controller irqchip/gicv3-its: Fix memory leak in its_free_tables() irqchip/sun4i: Fix compilation outside of arch/arm commit 2d23e61fa2ecef787c3d1198b8ce8333264b5b8e Merge: ab57a61 59fd121 Author: Linus Torvalds Date: Sun Feb 14 10:50:26 2016 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Two small fixlets for x86: - Prevent a KASAN false positive in thread_saved_pc() - Fix a 32-bit truncation problem in the x86 numa code" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/numa: Fix 32-bit memblock range truncation bug on 32-bit NUMA kernels x86: Fix KASAN false positives in thread_saved_pc() commit ab57a6111c987456f6848e20c55764d75f67ca2d Merge: be3f4e0 f4d3d50 Author: Linus Torvalds Date: Sun Feb 14 10:49:01 2016 -0800 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "Here's the first round of MIPS fixes after the merge window: - Detect Octeon III's PCI correctly. - Fix return value of the MT7620 probing function. - Wire up the copy_file_range syscall. - Fix 64k page support on 32 bit kernels. - Fix the early Coherency Manager probe. - Allow only hardware-supported page sizes to be selected for R6000. - Fix corner cases for the RDHWR nstruction emulation on old hardware. - Fix FPU handling corner cases. - Remove stale entry for BCM33xx from the MAINTAINERS file. - 32 and 64 bit ELF headers are different, handle them correctly" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: mips: Differentiate between 32 and 64 bit ELF header MIPS: Octeon: Update OCTEON_FEATURE_PCIE for Octeon III MIPS: pci-mt7620: Fix return value check in mt7620_pci_probe() MIPS: Fix early CM probing MIPS: Wire up copy_file_range syscall. MIPS: Fix 64k page support for 32 bit kernels. MIPS: R6000: Don't allow 64k pages for R6000. MIPS: traps.c: Correct microMIPS RDHWR emulation MIPS: traps.c: Don't emulate RDHWR in the CpU #0 exception handler MAINTAINERS: Remove stale entry for BCM33xx chips MIPS: Fix FPU disable with preemption MIPS: Properly disable FPU in start_thread() MIPS: Fix buffer overflow in syscall_get_arguments() commit be3f4e0fb3e1ba33c94c43c7cdab9e5165d508b4 Merge: 8b9f9eb e972c37 Author: Linus Torvalds Date: Sun Feb 14 10:46:47 2016 -0800 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "A couple of ARM fixes from Linus for the ICST clock generator code" [ "Linus" here is Linus Walleij. Name-stealer. Linus "there can be only one" Torvalds ] * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8519/1: ICST: try other dividends than 1 ARM: 8517/1: ICST: avoid arithmetic overflow in icst_hz() commit 8b9f9ebe07f4ff1340f44e40aa7ce517d55e1882 Merge: 7686e3c 8e7199c Author: Linus Torvalds Date: Sun Feb 14 10:40:21 2016 -0800 Merge branch 'component' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull component helper fixes from Russell King: "A few fixes for problems people have encountered with the recent update to the component helpers" * 'component' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: component: remove device from master match list on failed add component: Detach components when deleting master struct component: fix crash on x86_64 with hda audio drivers commit 7686e3c16c4a3669472298ecfc4636485658642b Merge: 2f2e9f2 75c1657 Author: Linus Torvalds Date: Sat Feb 13 17:35:23 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull more rdma fixes from Doug Ledford: "I think we are getting pretty close to done now. There are four one-off fixes in this update: - fix ipoib multicast joins - fix mlx4 error handling - fix mlx5 size computation - fix a thinko in core code" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/mlx5: Fix RC transport send queue overhead computation IB/ipoib: fix for rare multicast join race condition IB/core: Fix reading capability mask of the port info class net/mlx4: fix some error handling in mlx4_multi_func_init() commit 2f2e9f2dd1f454f3c4f751b6f83359bc48f21096 Merge: 4617c22 5327c7d Author: Linus Torvalds Date: Sat Feb 13 16:39:27 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target fixes from Nicholas Bellinger: "This includes the long awaited series to address a set of bugs around active I/O remote-port LUN_RESET, as well as properly handling this same case with concurrent fabric driver session disconnect -> reconnect. Note this set of LUN_RESET bug-fixes has been surviving extended testing on both v4.5-rc1 and v3.14.y code over the last weeks, and is CC'ed for stable as it's something folks using multiple ESX connected hosts with slow backends can certainly trigger. The highlights also include: - Fix WRITE_SAME/DISCARD emulation 4k sector conversion in target/iblock (Mike Christie) - Fix TMR abort interaction and AIO type TMR response in qla2xxx target (Quinn Tran + Swapnil Nagle) - Fix >= v3.17 stale descriptor pointer regression in qla2xxx target (Quinn Tran) - Fix >= v4.5-rc1 return regression with unmap_zeros_data_store new configfs store handler (nab) - Add CPU affinity flag + convert qla2xxx to use bit (Quinn + HCH + Bart)" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: qla2xxx: use TARGET_SCF_USE_CPUID flag to indiate CPU Affinity target/transport: add flag to indicate CPU Affinity is observed target: Fix incorrect unmap_zeroes_data_store return qla2xxx: Use ATIO type to send correct tmr response qla2xxx: Fix stale pointer access. target/user: Fix cast from pointer to phys_addr_t target: Drop legacy se_cmd->task_stop_comp + REQUEST_STOP usage target: Fix race with SCF_SEND_DELAYED_TAS handling target: Fix remote-port TMR ABORT + se_cmd fabric stop target: Fix TAS handling for multi-session se_node_acls target: Fix LUN_RESET active TMR descriptor handling target: Fix LUN_RESET active I/O handling for ACK_KREF qla2xxx: Fix TMR ABORT interaction issue between qla2xxx and TCM qla2xxx: Fix warning reported by static checker target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors commit 7864d92621b6897595fa698b27240828592ebd71 Author: Sebastian Hesselbarth Date: Mon Feb 1 23:48:23 2016 +0100 pinctrl: mvebu: fix num_settings in mpp group assignment When assigning mpp settings from static mpp modes to mpp groups, we do not want any groups that have no supported setting for a specific Kirkwood variant. However, when there is at least a single supported setting, we need to assign the number of all settings in this mode to grp->num_settings as we are reusing the static modes table. Fixes: 0581b16b1840 ("pinctrl: mvebu: complain about missing group after checking variant") Reported-by: Aaro Koskinen Tested-by: Aaro Koskinen Cc: Gregory Clement Cc: Andrew Lunn Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Sebastian Hesselbarth Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-mvebu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4617c2203fbc36f496e6d1060299ba27b8e4d01c Merge: b4e4334 a53b839 Author: Linus Torvalds Date: Sat Feb 13 13:05:56 2016 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal management fixes from Eduardo Valentin: "Specifics in this pull request: - Compilation fixes on SPEAR, and U8500 thermal drivers. - RCAR thermal driver now recognizes OF-thermal based thermal zones. - Small code rework on OF-thermal. - These change have been CI tested using KernelCI bot [1,2]. \o/ I am taking over on Rui's behalf while he is out. Happy New Chinese Year! [1] - https://kernelci.org/build/evalenti/kernel/v4.5-rc3-16-ga53b8394ec3c/ [2] - https://kernelci.org/boot/all/job/evalenti/kernel/v4.5-rc3-16-ga53b8394ec3c/" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: cpu_cooling: fix out of bounds access in time_in_idle thermal: allow u8500-thermal driver to be a module thermal: allow spear-thermal driver to be a module thermal: spear: use __maybe_unused for PM functions thermal: rcar: enable to use thermal-zone on DT thermal: of: use for_each_available_child_of_node for child iterator commit b4e4334d7bea8992bc8525763b5b4f34e89c520b Merge: e835a65 07d86ca Author: Linus Torvalds Date: Sat Feb 13 13:04:47 2016 -0800 Merge tag 'sound-fix-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull another sound fix from Takashi Iwai: "This contains a fix for the double-free of usb-audio MIDI device at probe failure" * tag 'sound-fix-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: avoid freeing umidi object twice commit e835a65f7ab143acf9aee6f9a98ef1c7afd2a835 Merge: 0cbb0b9 37eda9d Author: Linus Torvalds Date: Sat Feb 13 08:18:21 2016 -0800 Merge tag 'arc-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: "I've been sitting on some of these fixes for a while. - Corner case of returning to delay slot from interrupt - Changing default interrupt prioiry level - Kconfig'ize support for super pages - Other minor fixes" * tag 'arc-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: mm: Introduce explicit super page size support ARCv2: intc: Allow interruption by lowest priority interrupt ARCv2: Check for LL-SC livelock only if LLSC is enabled ARC: shrink cpuinfo by not saving full timer BCR ARCv2: clocksource: Rename GRTC -> GFRC ... ARCv2: STAR 9000950267: Handle return from intr to Delay Slot #2 commit db92ea5d4df00271b57d79c2d03dae5a5d60fcc1 Author: Michael McConville Date: Fri Feb 5 20:46:25 2016 -0500 dscc4: Undefined signed int shift My analysis in the below mail applies, although the second part is unnecessary because i isn't used in arithmetic operations here: https://marc.info/?l=openbsd-tech&m=145377854103866&w=2 Thanks for your time. Signed-off-by: Michael McConville Acked-by: Francois Romieu Signed-off-by: David S. Miller drivers/net/wan/dscc4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66d9cd0f5422bf35e3897b2022858dafd8c6abd2 Author: Vivien Didelot Date: Fri Feb 5 14:07:14 2016 -0500 net: dsa: mv88e6xxx: do not leave reserved VLANs BRIDGE_VLAN_FILTERING automatically adds a newly bridged port to the VLAN with the bridge's default_pvid. The mv88e6xxx driver currently reserves VLANs 4000+ for unbridged ports isolation. When a port joins a bridge, it leaves its reserved VLAN. When a port leaves a bridge, it joins again its reserved VLAN. But if the VLAN filtering is disabled, or if this hardware VLAN is already in use, the bridged port ends up with no default VLAN, and the communication with the CPU is thus broken. To fix this, make a port join its reserved VLAN once on setup, never leave it, and restore its PVID after another one was eventually used. Signed-off-by: Vivien Didelot Tested-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 3c06f08b657205489d408ee7cbbcbbb1d8a6bf85 Author: Vivien Didelot Date: Fri Feb 5 14:04:39 2016 -0500 net: dsa: mv88e6xxx: fix software VLAN deletion The current bridge code calls switchdev_port_obj_del on a VLAN port even if the corresponding switchdev_port_obj_add call returned -EOPNOTSUPP. If the DSA driver doesn't return -EOPNOTSUPP for a software port VLAN in its port_vlan_del function, the VLAN is not deleted. Unbridging the port also generates a stack trace for the same reason. This can be quickly tested on a VLAN filtering enabled system with: # brctl addbr br0 # brctl addif br0 lan0 # brctl addbr br1 # brctl addif br1 lan1 # brctl delif br1 lan1 Both bridges have a default default_pvid set to 1. lan0 uses the hardware VLAN 1 while lan1 falls back to the software VLAN 1. Unbridging lan1 does not delete its software VLAN, and thus generates the following stack trace: [ 2991.681705] device lan1 left promiscuous mode [ 2991.686237] br1: port 1(lan1) entered disabled state [ 2991.725094] ------------[ cut here ]------------ [ 2991.729761] WARNING: CPU: 0 PID: 869 at net/bridge/br_vlan.c:314 __vlan_group_free+0x4c/0x50() [ 2991.738437] Modules linked in: [ 2991.741546] CPU: 0 PID: 869 Comm: ip Not tainted 4.4.0 #16 [ 2991.747039] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree) [ 2991.753511] Backtrace: [ 2991.756008] [<80014450>] (dump_backtrace) from [<8001469c>] (show_stack+0x20/0x24) [ 2991.763604] r6:80512644 r5:00000009 r4:00000000 r3:00000000 [ 2991.769343] [<8001467c>] (show_stack) from [<80268e44>] (dump_stack+0x24/0x28) [ 2991.776618] [<80268e20>] (dump_stack) from [<80025568>] (warn_slowpath_common+0x98/0xc4) [ 2991.784750] [<800254d0>] (warn_slowpath_common) from [<80025650>] (warn_slowpath_null+0x2c/0x34) [ 2991.793557] r8:00000000 r7:9f786a8c r6:9f76c440 r5:9f786a00 r4:9f68ac00 [ 2991.800366] [<80025624>] (warn_slowpath_null) from [<80512644>] (__vlan_group_free+0x4c/0x50) [ 2991.808946] [<805125f8>] (__vlan_group_free) from [<80514488>] (nbp_vlan_flush+0x44/0x68) [ 2991.817147] r4:9f68ac00 r3:9ec70000 [ 2991.820772] [<80514444>] (nbp_vlan_flush) from [<80506f08>] (del_nbp+0xac/0x130) [ 2991.828201] r5:9f56f800 r4:9f786a00 [ 2991.831841] [<80506e5c>] (del_nbp) from [<8050774c>] (br_del_if+0x40/0xbc) [ 2991.838724] r7:80590f68 r6:00000000 r5:9ec71c38 r4:9f76c440 [ 2991.844475] [<8050770c>] (br_del_if) from [<80503dc0>] (br_del_slave+0x1c/0x20) [ 2991.851802] r5:9ec71c38 r4:9f56f800 [ 2991.855428] [<80503da4>] (br_del_slave) from [<80484a34>] (do_setlink+0x324/0x7b8) [ 2991.863043] [<80484710>] (do_setlink) from [<80485e90>] (rtnl_newlink+0x508/0x6f4) [ 2991.870616] r10:00000000 r9:9ec71ba8 r8:00000000 r7:00000000 r6:9f6b0400 r5:9f56f800 [ 2991.878548] r4:8076278c [ 2991.881110] [<80485988>] (rtnl_newlink) from [<80484048>] (rtnetlink_rcv_msg+0x18c/0x22c) [ 2991.889315] r10:9f7d4e40 r9:00000000 r8:00000000 r7:00000000 r6:9f7d4e40 r5:9f6b0400 [ 2991.897250] r4:00000000 [ 2991.899814] [<80483ebc>] (rtnetlink_rcv_msg) from [<80497c74>] (netlink_rcv_skb+0xb0/0xcc) [ 2991.908104] r8:00000000 r7:9f7d4e40 r6:9f7d4e40 r5:80483ebc r4:9f6b0400 [ 2991.914928] [<80497bc4>] (netlink_rcv_skb) from [<80483eb4>] (rtnetlink_rcv+0x34/0x3c) [ 2991.922874] r6:9f5ea000 r5:00000028 r4:9f7d4e40 r3:80483e80 [ 2991.928622] [<80483e80>] (rtnetlink_rcv) from [<80497604>] (netlink_unicast+0x180/0x200) [ 2991.936742] r4:9f4edc00 r3:80483e80 [ 2991.940362] [<80497484>] (netlink_unicast) from [<80497a88>] (netlink_sendmsg+0x33c/0x350) [ 2991.948648] r8:00000000 r7:00000028 r6:00000000 r5:9f5ea000 r4:9ec71f4c [ 2991.955481] [<8049774c>] (netlink_sendmsg) from [<80457ff0>] (sock_sendmsg+0x24/0x34) [ 2991.963342] r10:00000000 r9:9ec71e28 r8:00000000 r7:9f1e2140 r6:00000000 r5:00000000 [ 2991.971276] r4:9ec71f4c [ 2991.973849] [<80457fcc>] (sock_sendmsg) from [<80458af0>] (___sys_sendmsg+0x1fc/0x204) [ 2991.981809] [<804588f4>] (___sys_sendmsg) from [<804598d0>] (__sys_sendmsg+0x4c/0x7c) [ 2991.989640] r10:00000000 r9:9ec70000 r8:80010824 r7:00000128 r6:7ee946c4 r5:00000000 [ 2991.997572] r4:9f1e2140 [ 2992.000128] [<80459884>] (__sys_sendmsg) from [<80459918>] (SyS_sendmsg+0x18/0x1c) [ 2992.007725] r6:00000000 r5:7ee9c7b8 r4:7ee946e0 [ 2992.012430] [<80459900>] (SyS_sendmsg) from [<80010660>] (ret_fast_syscall+0x0/0x3c) [ 2992.020182] ---[ end trace 5d4bc29f4da04280 ]--- To fix this, return -EOPNOTSUPP in _mv88e6xxx_port_vlan_del instead of -ENOENT if the hardware VLAN doesn't exist or the port is not a member. Signed-off-by: Vivien Didelot Tested-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19a6d156a7bd080f3a855a40a4a08ab475e34b4a Author: Colin Ian King Date: Fri Feb 5 16:30:39 2016 +0000 net: cavium: liquidio: fix check for in progress flag smatch detected a suspicious looking bitop condition: drivers/net/ethernet/cavium/liquidio/lio_main.c:2529 handle_timestamp() warn: suspicious bitop condition (skb_shinfo(skb)->tx_flags | SKBTX_IN_PROGRESS is always non-zero, so the logic is definitely not correct. Use & to mask the correct bit. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14a03cf80edf3e19953bb744938e48bc9d496d30 Author: Vitaly Kuznetsov Date: Fri Feb 5 17:29:08 2016 +0100 hv_netvsc: Restore needed_headroom request Commit c0eb454034aa ("hv_netvsc: Don't ask for additional head room in the skb") got rid of needed_headroom setting for the driver. With the change I hit the following issue trying to use ptkgen module: [ 57.522021] kernel BUG at net/core/skbuff.c:1128! [ 57.522021] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC ... [ 58.721068] Call Trace: [ 58.721068] [] netvsc_start_xmit+0x4c6/0x8e0 [hv_netvsc] ... [ 58.721068] [] ? pktgen_finalize_skb+0x25c/0x2a0 [pktgen] [ 58.721068] [] ? __netdev_alloc_skb+0xc0/0x100 [ 58.721068] [] pktgen_thread_worker+0x257/0x1920 [pktgen] Basically, we're calling skb_cow_head(skb, RNDIS_AND_PPI_SIZE) and crash on if (skb_shared(skb)) BUG(); We probably need to restore needed_headroom setting (but shrunk to RNDIS_AND_PPI_SIZE as we don't need more) to request the required headroom space. In theory, it should not give us performance penalty. Signed-off-by: Vitaly Kuznetsov Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 3 +++ 1 file changed, 3 insertions(+) commit 603607de0c574e693e7cfda1aba64bf4439875b7 Merge: 5988818 120cfa5 Author: David S. Miller Date: Sat Feb 13 06:02:25 2016 -0500 Merge branch 'mvneta-fixes' Gregory CLEMENT says: ==================== mvneta fixes for SMP Following this bug report: http://thread.gmane.org/gmane.linux.ports.arm.kernel/468173 and the suggestions from Russell King, I reviewed all the code involving multi-CPU. It ended with this series of patches which should improve the stability of the driver. During my test I found another bug which is fixed by new patch (the second one of this new version of the series) The two first patches fix real bugs, the others fix potential issues in the driver. Changelog: v1 -> v2 Fix spinlock comment. Pointed by David Miller v2 -> v3 - Fix typos and mistake in the comments. Pointed by Sergei Shtylyov - Add a new patch fixing the CPU choice in mvneta_percpu_elect - Use lock in last patch to prevent remaining race condition. Pointed by Jisheng ==================== Signed-off-by: David S. Miller commit 120cfa502c7763f4a3758b9601f2c13d33083d64 Author: Gregory CLEMENT Date: Thu Feb 4 22:09:29 2016 +0100 net: mvneta: Fix race condition during stopping When stopping the port, the CPU notifier are still there whereas the mvneta_stop_dev function calls mvneta_percpu_disable() on each CPUs. It was possible to have a new CPU coming at this point which could be racy. This patch adds a flag preventing executing the code notifier for a new CPU when the port is stopping. It also uses the spinlock introduces previously. To avoid the deadlock, the lock has been moved outside the mvneta_percpu_elect function. Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 36 +++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit 5888511ea053fa8d6019252ad333e8a7cb7f9475 Author: Gregory CLEMENT Date: Thu Feb 4 22:09:28 2016 +0100 net: mvneta: The mvneta_percpu_elect function should be atomic Electing a CPU must be done in an atomic way: it should be done after or before the removal/insertion of a CPU and this function is not reentrant. During the loop of mvneta_percpu_elect we associates the queues to the CPUs, if there is a topology change during this loop, then the mapping between the CPUs and the queues could be wrong. During this loop the interrupt mask is also updating for each CPUs, It should not be changed in the same time by other part of the driver. This patch adds spinlock to create the needed critical sections. Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit db488c10f2a00dbd417b158db2b551e5e262e957 Author: Gregory CLEMENT Date: Thu Feb 4 22:09:27 2016 +0100 net: mvneta: Modify the queue related fields from each cpu In the MVNETA_INTR_* registers, the queues related fields are per cpu, according to the datasheet (comment in [] are added by me): "In a multi-CPU system, bits of RX[or TX] queues for which the access by the reading[or writing] CPU is disabled are read as 0, and cannot be cleared[or written]." That means that each time we want to manipulate these bits we had to do it on each cpu and not only on the current cpu. Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 100 ++++++++++++++++------------------ 1 file changed, 46 insertions(+), 54 deletions(-) commit cde4c0fec4e223727c24c2cd7e88ece57b48b70e Author: Gregory CLEMENT Date: Thu Feb 4 22:09:26 2016 +0100 net: mvneta: Remove unused code Since the commit 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU") all the percpu irq are used and disabled at initialization, so there is no point to disable them first. Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 8 -------- 1 file changed, 8 deletions(-) commit 6b125d63b7f6c30d36dad3d999bbb5d44f359ebd Author: Gregory CLEMENT Date: Thu Feb 4 22:09:25 2016 +0100 net: mvneta: Use on_each_cpu when possible Instead of using a for_each_* loop in which we just call the smp_call_function_single macro, it is more simple to directly use the on_each_cpu macro. Moreover, this macro ensures that the calls will be done all at once. Suggested-by: Russell King Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit cad5d847a093077b499a8b0bbfe6804b9226c03e Author: Gregory CLEMENT Date: Thu Feb 4 22:09:24 2016 +0100 net: mvneta: Fix the CPU choice in mvneta_percpu_elect When passing to the management of multiple RX queue, the mvneta_percpu_elect function was broken. The use of the modulo can lead to elect the wrong cpu. For example with rxq_def=2, if the CPU 2 goes offline and then online, we ended with the third RX queue activated in the same time on CPU 0 and CPU2, which lead to a kernel crash. With this fix, we don't try to get "the closer" CPU if the default CPU is gone, now we just use CPU 0 which always be there. Thanks to this, the code becomes more readable, easier to maintain and more predicable. Cc: stable@vger.kernel.org Fixes: 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU") Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 129219e4950a3fcf9323b3bbd8b224c7aa873985 Author: Gregory CLEMENT Date: Thu Feb 4 22:09:23 2016 +0100 net: mvneta: Fix for_each_present_cpu usage This patch convert the for_each_present in on_each_cpu, instead of applying on the present cpus it will be applied only on the online cpus. This fix a bug reported on http://thread.gmane.org/gmane.linux.ports.arm.kernel/468173. Using the macro on_each_cpu (instead of a for_each_* loop) also ensures that all the calls will be done all at once. Fixes: f86428854480 ("net: mvneta: Statically assign queues to CPUs") Reported-by: Stefan Roese Suggested-by: Jisheng Zhang Suggested-by: Russell King Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5988818008257ca42010d6b43a3e0e48afec9898 Author: Laura Abbott Date: Thu Feb 4 10:50:45 2016 -0800 vsock: Fix blocking ops call in prepare_to_wait We receoved a bug report from someone using vmware: WARNING: CPU: 3 PID: 660 at kernel/sched/core.c:7389 __might_sleep+0x7d/0x90() do not call blocking ops when !TASK_RUNNING; state=1 set at [] prepare_to_wait+0x2d/0x90 Modules linked in: vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event snd_ens1371 iosf_mbi gameport snd_rawmidi snd_ac97_codec ac97_bus snd_seq coretemp snd_seq_device snd_pcm snd_timer snd soundcore ppdev crct10dif_pclmul crc32_pclmul ghash_clmulni_intel vmw_vmci vmw_balloon i2c_piix4 shpchp parport_pc parport acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc btrfs xor raid6_pq 8021q garp stp llc mrp crc32c_intel serio_raw mptspi vmwgfx drm_kms_helper ttm drm scsi_transport_spi mptscsih e1000 ata_generic mptbase pata_acpi CPU: 3 PID: 660 Comm: vmtoolsd Not tainted 4.2.0-0.rc1.git3.1.fc23.x86_64 #1 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014 0000000000000000 0000000049e617f3 ffff88006ac37ac8 ffffffff818641f5 0000000000000000 ffff88006ac37b20 ffff88006ac37b08 ffffffff810ab446 ffff880068009f40 ffffffff81c63bc0 0000000000000061 0000000000000000 Call Trace: [] dump_stack+0x4c/0x65 [] warn_slowpath_common+0x86/0xc0 [] warn_slowpath_fmt+0x55/0x70 [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [] ? prepare_to_wait+0x2d/0x90 [] ? prepare_to_wait+0x2d/0x90 [] __might_sleep+0x7d/0x90 [] __might_fault+0x43/0xa0 [] copy_from_iter+0x87/0x2a0 [] __qp_memcpy_to_queue+0x9a/0x1b0 [vmw_vmci] [] ? qp_memcpy_to_queue+0x20/0x20 [vmw_vmci] [] qp_memcpy_to_queue_iov+0x17/0x20 [vmw_vmci] [] qp_enqueue_locked+0xa0/0x140 [vmw_vmci] [] vmci_qpair_enquev+0x4f/0xd0 [vmw_vmci] [] vmci_transport_stream_enqueue+0x1b/0x20 [vmw_vsock_vmci_transport] [] vsock_stream_sendmsg+0x2c5/0x320 [vsock] [] ? wake_atomic_t_function+0x70/0x70 [] sock_sendmsg+0x38/0x50 [] SYSC_sendto+0x104/0x190 [] ? vfs_read+0x8a/0x140 [] SyS_sendto+0xe/0x10 [] entry_SYSCALL_64_fastpath+0x12/0x76 transport->stream_enqueue may call copy_to_user so it should not be called inside a prepare_to_wait. Narrow the scope of the prepare_to_wait to avoid the bad call. This also applies to vsock_stream_recvmsg as well. Reported-by: Vinson Lee Tested-by: Vinson Lee Signed-off-by: Laura Abbott Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit a2cb7ec001559d649b09572a7a5e4f69222eb467 Author: Chun-Hao Lin Date: Fri Feb 5 02:28:00 2016 +0800 r8169:fix system hange problem. There are typos in setting RTL8168H hardware parameters. If system install another version driver that may cuase system hang. Signed-off-by: Chunhao Lin Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 919483096bfe75dda338e98d56da91a263746a0a Author: Eric Dumazet Date: Thu Feb 4 06:23:28 2016 -0800 ipv4: fix memory leaks in ip_cmsg_send() callers Dmitry reported memory leaks of IP options allocated in ip_cmsg_send() when/if this function returns an error. Callers are responsible for the freeing. Many thanks to Dmitry for the report and diagnostic. Reported-by: Dmitry Vyukov Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 2 ++ net/ipv4/ping.c | 4 +++- net/ipv4/raw.c | 4 +++- net/ipv4/udp.c | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) commit c2bb7bc5c007b7b55087eb05409edc2014f43ca8 Author: Amitoj Kaur Chawla Date: Thu Feb 4 19:25:26 2016 +0530 net: mvpp2: Return correct error codes The return value of kzalloc on failure of allocation of memory should be -ENOMEM and not -1. Found using Coccinelle. A simplified version of the semantic patch used is: // @@ expression *e; position p,q; @@ e@q = kzalloc(...); if@p (e == NULL) { ... return - -1 + -ENOMEM ; } // This function may also return -1 after calling mpp2_prs_tcam_port_map_get. So that the function consistently returns meaningful error values on failure, the -1 is changed to -EINVAL. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08a965ec93ad0495802462c32b73241d658e189d Author: Amitoj Kaur Chawla Date: Thu Feb 4 19:25:13 2016 +0530 net: cavium: liquidio: Return correct error code The return value of vmalloc on failure of allocation of memory should be -ENOMEM and not -1. Found using Coccinelle. A simplified version of the semantic patch used is: // @@ expression *e; identifier l1; position p,q; @@ e@q = vmalloc(...); if@p (e == NULL) { ... goto l1; } l1: ... return -1 + -ENOMEM ; // Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 21a75f0915dde8674708b39abfcda113911c49b1 Author: Jay Vosburgh Date: Tue Feb 2 13:35:56 2016 -0800 bonding: Fix ARP monitor validation The current logic in bond_arp_rcv will accept an incoming ARP for validation if (a) the receiving slave is either "active" (which includes the currently active slave, or the current ARP slave) or, (b) there is a currently active slave, and it has received an ARP since it became active. For case (b), the receiving slave isn't the currently active slave, and is receiving the original broadcast ARP request, not an ARP reply from the target. This logic can fail if there is no currently active slave. In this situation, the ARP probe logic cycles through all slaves, assigning each in turn as the "current_arp_slave" for one arp_interval, then setting that one as "active," and sending an ARP probe from that slave. The current logic expects the ARP reply to arrive on the sending current_arp_slave, however, due to switch FDB updating delays, the reply may be directed to another slave. This can arise if the bonding slaves and switch are working, but the ARP target is not responding. When the ARP target recovers, a condition may result wherein the ARP target host replies faster than the switch can update its forwarding table, causing each ARP reply to be sent to the previous current_arp_slave. This will never pass the logic in bond_arp_rcv, as neither of the above conditions (a) or (b) are met. Some experimentation on a LAN shows ARP reply round trips in the 200 usec range, but my available switches never update their FDB in less than 4000 usec. This patch changes the logic in bond_arp_rcv to additionally accept an ARP reply for validation on any slave if there is a current ARP slave and it sent an ARP probe during the previous arp_interval. Fixes: aeea64ac717a ("bonding: don't trust arp requests unless active slave really works") Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: Jay Vosburgh Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit 07d86ca93db7e5cdf4743564d98292042ec21af7 Author: Andrey Konovalov Date: Sat Feb 13 11:08:06 2016 +0300 ALSA: usb-audio: avoid freeing umidi object twice The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface. Found by KASAN. Signed-off-by: Andrey Konovalov Acked-by: Clemens Ladisch Cc: Signed-off-by: Takashi Iwai sound/usb/midi.c | 1 - 1 file changed, 1 deletion(-) commit 0cbb0b92689a1c4e0ac55f6188be563a813ac808 Merge: 29f1bf3 0cf1337 Author: Linus Torvalds Date: Fri Feb 12 15:31:22 2016 -0800 Merge tag 'pci-v4.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "These are some Renesas binding updates for PCI host controllers, a Broadcom fix for a regression we added in v4.5-rc1, and a fix for an AER use-after-free problem that can cause memory corruption. Summary: AER: Flush workqueue on device remove to avoid use-after-free (Sebastian Andrzej Siewior) Broadcom iProc host bridge driver: Allow multiple devices except on PAXC (Ray Jui) Renesas R-Car host bridge driver: Add gen2 device tree support for r8a7793 (Simon Horman) Add device tree support for r8a7793 (Simon Horman)" * tag 'pci-v4.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: rcar: Add device tree support for r8a7793 PCI: rcar: Add gen2 device tree support for r8a7793 PCI: iproc: Allow multiple devices except on PAXC PCI/AER: Flush workqueue on device remove to avoid use-after-free commit 4dd638f8ac6b4ed020297b5d994d9346b84f2009 Merge: 388f7b1 70f340d fe0e230 5cfa1e4 f8efca2 ebea7c0 0e6f357 Author: Mark Brown Date: Fri Feb 12 23:04:41 2016 +0000 Merge remote-tracking branches 'spi/fix/atmel', 'spi/fix/bcm2835aux', 'spi/fix/fsl-espi', 'spi/fix/imx', 'spi/fix/loopback' and 'spi/fix/omap2-mcspi' into spi-linus commit 0e6f357a5deba4b81b1a65acabaa51f2cbd2e2cd Author: Tony Lindgren Date: Wed Feb 10 15:02:46 2016 -0800 spi: omap2-mcspi: Fix PM regression with deferred probe for pm_runtime_reinit Commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") introduced pm_runtime_reinit() that is used to reinitialize PM runtime after -EPROBE_DEFER. This allows shutting down the device after a failed probe. However, for drivers using pm_runtime_use_autosuspend() this can cause a state where suspend callback is never called after -EPROBE_DEFER. On the following device driver probe, hardware state is different from the PM runtime state causing omap_device to produce the following error: omap_device_enable() called from invalid state 1 And with omap_device and omap hardware being picky for PM, this will block any deeper idle states in hardware. The solution is to fix the drivers to follow the PM runtime documentation: 1. For sections of code that needs the device disabled, use pm_runtime_put_sync_suspend() if pm_runtime_set_autosuspend() has been set. 2. For driver exit code, use pm_runtime_dont_use_autosuspend() before pm_runtime_put_sync() if pm_runtime_use_autosuspend() has been set. Fixes: 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") Cc: linux-spi@vger.kernel.org Cc: Alan Stern Cc: Kevin Hilman Cc: Mark Brown Cc: Nishanth Menon Cc: Rafael J. Wysocki Cc: Ulf Hansson Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Mark Brown drivers/spi/spi-omap2-mcspi.c | 3 +++ 1 file changed, 3 insertions(+) commit c430daf951c56e1eaf47c1825dcd5574f95ed29a Author: Stephen Boyd Date: Fri Feb 12 09:21:13 2016 -0800 Revert "clk: qcom: Specify LE device endianness" This reverts commit 329cabcecf94d8d7821e729dda284ba9dec44c87. The commit that caused us to specify LE device endianness here, 29bb45f25ff3 (regmap-mmio: Use native endianness for read/write, 2015-10-29), has been reverted in mainline so now when we specify LE it actively breaks big endian kernels because the byte swapping in regmap-mmio is incorrect. Let's revert this change because it will 1) fix the big endian kernels and 2) be redundant to specify LE because that will become the default soon. Cc: Kevin Hilman Tested-by: Kevin Hilman Cc: Mark Brown Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-apq8084.c | 1 - drivers/clk/qcom/gcc-ipq806x.c | 1 - drivers/clk/qcom/gcc-msm8660.c | 1 - drivers/clk/qcom/gcc-msm8916.c | 1 - drivers/clk/qcom/gcc-msm8960.c | 2 -- drivers/clk/qcom/gcc-msm8974.c | 1 - drivers/clk/qcom/lcc-ipq806x.c | 1 - drivers/clk/qcom/lcc-msm8960.c | 1 - drivers/clk/qcom/mmcc-apq8084.c | 1 - drivers/clk/qcom/mmcc-msm8960.c | 2 -- drivers/clk/qcom/mmcc-msm8974.c | 1 - 11 files changed, 13 deletions(-) commit a947b724069a25eae86d8dfed905374d04c3f93c Author: Stephen Boyd Date: Fri Feb 12 09:30:17 2016 -0800 ASoC: qcom: Don't specify LE device endianness This reverts commit 18560a4e3 (ASoC: qcom: Specify LE device endianness). The commit that caused us to specify LE device endianness here, 29bb45f25ff3 (regmap-mmio: Use native endianness for read/write, 2015-10-29), has been reverted in mainline so now when we specify LE it actively breaks big endian kernels because the byte swapping in regmap-mmio is incorrect. Let's revert this change because it will 1) fix the big endian kernels and 2) be redundant to specify LE because that will become the default soon. Signed-off-by: Stephen Boyd Signed-off-by: Mark Brown sound/soc/qcom/lpass-cpu.c | 1 - 1 file changed, 1 deletion(-) commit 43f3408261a2fd5054ada359efa15f0b78faf0a7 Author: Javier Martinez Canillas Date: Tue Feb 9 14:23:52 2016 -0300 rtc: s3c: Document required clocks in the DT binding The S3C Real Time Clock driver requires the clock and source clock to be defined in the device node but that requirement is not documented. Signed-off-by: Javier Martinez Canillas Signed-off-by: Rob Herring Documentation/devicetree/bindings/rtc/s3c-rtc.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 32e593b9c7be1a14d42ed288ab68a8e7b41ad873 Author: Fabio Estevam Date: Fri Feb 5 17:44:22 2016 -0200 serial: fsl-imx-uart: Fix typo in fsl,dte-mode description We should say "The uart works in DCE mode". Signed-off-by: Fabio Estevam Signed-off-by: Rob Herring Documentation/devicetree/bindings/serial/fsl-imx-uart.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aff7b854611d91c5fefb1553eb4c328123095ae Author: Will Deacon Date: Wed Feb 3 18:00:58 2016 +0000 dt-bindings: arm, gic-v3: require that reserved cells are always 0 The arm,gic-v3 binding was written with good intentions and doesn't enforce interrupt-cells to be 3, therefore making it easy to extend the irq description in future if necessary: > Cells 4 and beyond are reserved for future use. Unfortunately, this sentence is immediately followed up with: > When the 1st cell has a value of 0 or 1, cells 4 and beyond act as > padding, and may be ignored. It is recommended that padding cells > have a value of 0. Consequently, any extensions to the PPI or SPI interrupt specifiers must be able to work with random crap from legacy DTs, effectively necessitating a new interrupt type in the first cell. Sigh. This patch fixes the text so that additional, reserved cells are required to be zero. This looks like a reasonable thing to require and is already satisifed by the .dts files in-tree. Cc: Mark Rutland Cc: Marc Zyngier Signed-off-by: Will Deacon Acked-by: Marc Zyngier Acked-by: Mark Rutland Signed-off-by: Rob Herring .../devicetree/bindings/interrupt-controller/arm,gic-v3.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 29f1bf34ed38222372365657b9498af2e3f8c208 Merge: 5952cc7 1ecb4ae Author: Linus Torvalds Date: Fri Feb 12 13:12:27 2016 -0800 Merge branch 'akpm'(patches from Andrew) Merge fixes from Andrew Morton: "10 fixes" The lockdep hlist conversion is in the locking tree too, waiting for the next merge window. Andrew thought it should go in now. I'll take it, since it fixes a real problem and looks trivially correct (famous last words). * emailed patches from Andrew Morton : arch/x86/Kconfig: CONFIG_X86_UV should depend on CONFIG_EFI mm: fix pfn_t vs highmem kernel/locking/lockdep.c: convert hash tables to hlists mm,thp: fix spellos in describing __HAVE_ARCH_FLUSH_PMD_TLB_RANGE mm,thp: khugepaged: call pte flush at the time of collapse mm/backing-dev.c: fix error path in wb_init() mm, dax: check for pmd_none() after split_huge_pmd() vsprintf: kptr_restrict is okay in IRQ when 2 mm: fix filemap.c kernel doc warning ubsan: cosmetic fix to Kconfig text commit 75c1657e1d50730dc0130a67977f7831a4e241f4 Author: Leon Romanovsky Date: Thu Feb 11 21:09:57 2016 +0200 IB/mlx5: Fix RC transport send queue overhead computation Fix the RC QPs send queue overhead computation to take into account two additional segments in the WQE which are needed for registration operations. The ATOMIC and UMR segments can't coexist together, so chose maximum out of them. The commit 9e65dc371b5c ("IB/mlx5: Fix RC transport send queue overhead computation") was intended to update RC transport as commit messages states, but added the code to UC transport. Fixes: 9e65dc371b5c ("IB/mlx5: Fix RC transport send queue overhead computation") Signed-off-by: Kamal Heib Signed-off-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 08bc327629cbd63bb2f66677e4b33b643695097c Author: Alex Estrin Date: Thu Feb 11 16:30:51 2016 -0500 IB/ipoib: fix for rare multicast join race condition A narrow window for race condition still exist between multicast join thread and *dev_flush workers. A kernel crash caused by prolong erratic link state changes was observed (most likely a faulty cabling): [167275.656270] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 [167275.665973] IP: [] ipoib_mcast_join+0xae/0x1d0 [ib_ipoib] [167275.674443] PGD 0 [167275.677373] Oops: 0000 [#1] SMP ... [167275.977530] Call Trace: [167275.982225] [] ? ipoib_mcast_free+0x200/0x200 [ib_ipoib] [167275.992024] [] ipoib_mcast_join_task+0x2a7/0x490 [ib_ipoib] [167276.002149] [] process_one_work+0x17b/0x470 [167276.010754] [] worker_thread+0x11b/0x400 [167276.019088] [] ? rescuer_thread+0x400/0x400 [167276.027737] [] kthread+0xcf/0xe0 Here was a hit spot: ipoib_mcast_join() { .............. rec.qkey = priv->broadcast->mcmember.qkey; ^^^^^^^ ..... } Proposed patch should prevent multicast join task to continue if link state change is detected. Signed-off-by: Alex Estrin Changes from v4: - as suggested by Doug Ledford, optimized spinlock usage, i.e. ipoib_mcast_join() is called with lock held. Changes from v3: - sync with priv->lock before flag check. Chages from v2: - Move check for OPER_UP flag state to mcast_join() to ensure no event worker is in progress. - minor style fixes. Changes from v1: - No need to lock again if error detected. Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit bca71ba0343d28d953d74149d9161ab65a520dd6 Author: Masahiro Yamada Date: Tue Jan 26 18:09:21 2016 +0900 i2c: uniphier: fix typos in error messages Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-uniphier-f.c | 2 +- drivers/i2c/busses/i2c-uniphier.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e6244deed843bc001697f37e5beb1c0daf4f46a4 Author: Tony Lindgren Date: Wed Feb 10 15:02:45 2016 -0800 i2c: omap: Fix PM regression with deferred probe for pm_runtime_reinit Commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") introduced pm_runtime_reinit() that is used to reinitialize PM runtime after -EPROBE_DEFER. This allows shutting down the device after a failed probe. However, for drivers using pm_runtime_use_autosuspend() this can cause a state where suspend callback is never called after -EPROBE_DEFER. On the following device driver probe, hardware state is different from the PM runtime state causing omap_device to produce the following error: omap_device_enable() called from invalid state 1 And with omap_device and omap hardware being picky for PM, this will block any deeper idle states in hardware. The solution is to fix the drivers to follow the PM runtime documentation: 1. For sections of code that needs the device disabled, use pm_runtime_put_sync_suspend() if pm_runtime_set_autosuspend() has been set. 2. For driver exit code, use pm_runtime_dont_use_autosuspend() before pm_runtime_put_sync() if pm_runtime_use_autosuspend() has been set. Fixes: 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") Signed-off-by: Tony Lindgren Acked-by: Ulf Hansson Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-omap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 38714fbd299f992080a11b977f609136ec8530c2 Author: Han Xu Date: Fri Feb 12 05:13:25 2016 +0000 MAINTAINERS: update Han's email Update my email address from freescale to nxp. Signed-off-by: Han Xu Signed-off-by: Brian Norris MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5952cc779eba58e9c3e0280cb646683e6de4b799 Merge: 0df34ad a5ebb87d Author: Linus Torvalds Date: Fri Feb 12 09:48:55 2016 -0800 Merge tag 'mmc-v4.5-rc2' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fixes from Ulf Hansson: "Here are some mmc fixes intended for v4.5 rc4. MMC core: - Fix an sysfs ABI regression - Return an error in a specific error path dealing with mmc ioctls MMC host: - sdhci-pci|acpi: Fix card detect race for Intel BXT/APL - sh_mmcif: Correct TX DMA channel allocation - mmc_spi: Fix error handling for dma mapping errors - sdhci-of-at91: Fix an unbalance issue for the runtime PM usage count - pxamci: Fix the device-tree probe deferral path - pxamci: Fix read-only GPIO polarity" * tag 'mmc-v4.5-rc2' of git://git.linaro.org/people/ulf.hansson/mmc: Revert "mmc: block: don't use parameter prefix if built as module" mmc: sdhci-acpi: Fix card detect race for Intel BXT/APL mmc: sdhci-pci: Fix card detect race for Intel BXT/APL mmc: sdhci: Allow override of get_cd() called from sdhci_request() mmc: sdhci: Allow override of mmc host operations mmc: sh_mmcif: Correct TX DMA channel allocation mmc: block: return error on failed mmc_blk_get() mmc: pxamci: fix the device-tree probe deferral path mmc: mmc_spi: add checks for dma mapping error mmc: sdhci-of-at91: fix pm runtime unbalanced issue in error path mmc: pxamci: fix again read-only gpio detection polarity commit 0df34ad9b703222ead899465b054070758b317f1 Merge: 14379cd 86c2ee1 Author: Linus Torvalds Date: Fri Feb 12 09:42:05 2016 -0800 Merge tag 'sound-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "In this rc, we've got more volume than previous rc, unsurprisingly; the majority of updates in ASoC are about Intel drivers, and another major changes are the continued plumbing of ALSA timer bugs revealed by syzkaller fuzzer. Hopefully both settle down now. Other than that, HD-audio received a couple of code fixes as well as the usual quirks, and various small fixes are found for FireWire devices, ASoC codecs and drivers" * tag 'sound-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (50 commits) ASoC: arizona: fref must be limited in pseudo-fractional mode ASoC: sigmadsp: Fix missleading return value ALSA: timer: Fix race at concurrent reads ALSA: firewire-digi00x: Drop bogus const type qualifier on dot_scrt() ALSA: hda - Fix bad dereference of jack object ALSA: timer: Fix race between stop and interrupt ALSA: timer: Fix wrong instance passed to slave callbacks ASoC: Intel: Add module tags for common match module ASoC: Intel: Load the atom DPCM driver only ASoC: Intel: Create independent acpi match module ASoC: Intel: Revert "ASoC: Intel: fix ACPI probe regression with Atom DPCM driver" ALSA: dummy: Implement timer backend switching more safely ALSA: hda - Fix speaker output from VAIO AiO machines Revert "ALSA: hda - Fix noise on Gigabyte Z170X mobo" ALSA: firewire-tascam: remove needless member for control and status message ALSA: firewire-tascam: remove a flag for controller ALSA: firewire-tascam: add support for FW-1804 ALSA: firewire-tascam: fix NULL pointer dereference when model identification fails ALSA: hda - Fix static checker warning in patch_hdmi.c ASoC: Intel: Skylake: Remove autosuspend delay ... commit 14379cdc763dee2b92276ee15e9c1644df1f017a Merge: 4c05121 b82fe6d Author: Linus Torvalds Date: Fri Feb 12 09:39:34 2016 -0800 Merge tag 'fbdev-fixes-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev fixes from Tomi Valkeinen: - fix omap2plus_defconfig to enable omapfb as it was in v4.4 - ocfb: fix timings for margins - s6e8ax0, da8xx-fb: fix compile warnings - mmp: fix build failure caused by bad printk parameters - imxfb: fix clock issue which kept the display off * tag 'fbdev-fixes-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: video: fbdev: imxfb: Provide a reset mechanism fbdev: mmp: print IRQ resource using %pR format string fbdev: da8xx-fb: remove incorrect type cast fbdev: s6e8ax0: avoid unused function warnings ocfb: fix tgdel and tvdel timing parameters ARM: omap2plus_defconfig: update display configs commit 4c05121e253beaf9f03cb31480f4aa676835404b Merge: c747f97 12ffbbe Author: Linus Torvalds Date: Fri Feb 12 09:32:37 2016 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "A set of seven fixes: Two regressions in the new hisi_sas arm driver, a blacklist entry for the marvell console which was causing a reset cascade without it, a race fix in the WRITE_SAME/DISCARD routines, a retry fix for the rdac driver, without which, it would prematurely return EIO and a couple of fixes for the hyper-v storvsc driver" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled SCSI: Add Marvell Console to VPD blacklist scsi_dh_rdac: always retry MODE SELECT on command lock violation storvsc: Use the specified target ID in device lookup storvsc: Install the storvsc specific timeout handler for FC devices hisi_sas: fix v1 hw check for slot error hisi_sas: add dependency for HAS_IOMEM commit c747f97c36c2fcc63768684eea89654855c83ecd Merge: df8c272 c92a428 Author: Linus Torvalds Date: Fri Feb 12 09:27:31 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm amd fixes from Dave Airlie: "Been pretty quiet. This is an amdgpu fixes pull from AMD, a bunch of powerplay stability fixes, race fix, hibernate fix, and a possible circular locking fix" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (21 commits) drm/amdgpu: fix issue with overlapping userptrs drm/radeon: hold reference to fences in radeon_sa_bo_new drm/amdgpu: remove unnecessary forward declaration drm/amdgpu: hold reference to fences in amdgpu_sa_bo_new (v2) drm/amdgpu: fix s4 resume drm/amdgpu/cz: plumb pg flags through to powerplay drm/amdgpu/tonga: plumb pg flags through to powerplay drma/dmgpu: move cg and pg flags into shared headers drm/amdgpu: remove unused cg defines drm/amdgpu: add a cgs interface to fetch cg and pg flags drm/amd/powerplay/tonga: disable vce pg drm/amd/powerplay/tonga: disable uvd pg drm/amd/powerplay/cz: disable vce pg drm/amd/powerplay/cz: disable uvd pg drm/amdgpu: be consistent with uvd cg flags drm/amdgpu: clean up vce pg flags for cz/st drm/amdgpu: handle vce pg flags properly drm/amdgpu: handle uvd pg flags properly drm/amdgpu/dpm/ci: switch over to the common pcie caps interface drm/amdgpu/cik: don't mess with aspm if gpu is root bus ... commit df8c2723a1eb568d42ebca806bec17377ae7e84c Merge: 27c9d77 613317b Author: Linus Torvalds Date: Fri Feb 12 09:24:48 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull crypto fix from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: EVM: Use crypto_memneq() for digest comparisons commit 27c9d772e50731dfd682b4ea9459eccec2071c49 Merge: dfc8528 bc4ef75 Author: Linus Torvalds Date: Fri Feb 12 09:21:28 2016 -0800 Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "This has a few fixes from Filipe, along with a readdir fix from Dave that we've been testing for some time" * 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: btrfs: properly set the termination value of ctx->pos in readdir Btrfs: fix hang on extent buffer lock caused by the inode_paths ioctl Btrfs: remove no longer used function extent_read_full_page_nolock() Btrfs: fix page reading in extent_same ioctl leading to csum errors Btrfs: fix invalid page accesses in extent_same (dedup) ioctl commit dfc852864d747289d7ed393aab337637eda007be Merge: c05235d 8e0bd49 Author: Linus Torvalds Date: Fri Feb 12 09:17:03 2016 -0800 Merge tag 'xfs-fixes-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull xfs fix from Dve Chinner: "This contains a fix for an endian conversion issue in new CRC validation in log recovery that was discovered on a ppc64 platform" * tag 'xfs-fixes-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: fix endianness error when checking log block crc on big endian platforms commit cf26f1137333251f3515dea31f95775b99df0fd5 Author: Tony Lindgren Date: Fri Feb 12 08:56:52 2016 -0800 ARM: OMAP2+: Fix omap_device for module reload on PM runtime forbid If a driver PM runtime is disabled via sysfs, and the module is unloaded, PM runtime can't do anything to disable the device. Let's let the interconnect disable the device on BUS_NOTIFY_UNBOUND_DRIVER. Otherwise omap_device will produce and error on the following module reload. This can be easily tested with something like: # modprobe omap_hsmmc # echo on > /sys/devices/platform/68000000.ocp/4809c000.mmc/power/control # rmmod omap_hsmmc # modprobe omap_hsmmc Cc: Alan Stern Cc: Nishanth Menon Cc: Rafael J. Wysocki Cc: Tero Kristo Reported-by: Ulf Hansson Acked-by: Kevin Hilman Acked-by: Ulf Hansson Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 08c78e9d61a857c9077240e7ddb67550c6f96d06 Author: Tony Lindgren Date: Fri Feb 12 08:56:52 2016 -0800 ARM: OMAP2+: Improve omap_device error for driver writers Drivers using pm_runtime_use_autosuspend() may not get disabled after -EPROBE_DEFER. On the following device driver probe, hardware state is different from the PM runtime state causing omap_device to produce the following error: omap_device_enable() called from invalid state 1 And with omap_device and omap hardware being picky for PM, this will block any deeper idle states in hardware. Let's add a proper error message so driver writers can easily fix their drivers for PM. In general, the solution is to fix the drivers to follow the PM runtime documentation: 1. For sections of code that needs the device disabled, use pm_runtime_put_sync_suspend() if pm_runtime_set_autosuspend() has been set. 2. For driver exit code, use pm_runtime_dont_use_autosuspend() before pm_runtime_put_sync() if pm_runtime_use_autosuspend() has been set. Let's not return with 0 from _od_runtime_resume() as that will eventually lead into new drivers with broken PM runtime that will block deeper idle states on omaps. Cc: Alan Stern Cc: Nishanth Menon Cc: Rafael J. Wysocki Cc: Tero Kristo Acked-by: Kevin Hilman Acked-by: Ulf Hansson Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a80a0eb70c358f8c7dda4bb62b2278dc6285217b Author: Yang Shi Date: Thu Feb 11 13:53:10 2016 -0800 arm64: make irq_stack_ptr more robust Switching between stacks is only valid if we are tracing ourselves while on the irq_stack, so it is only valid when in current and non-preemptible context, otherwise is is just zeroed off. Fixes: 132cd887b5c5 ("arm64: Modify stack trace and dump for use with irq_stack") Acked-by: James Morse Tested-by: James Morse Signed-off-by: Yang Shi Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 13 ++++++------- arch/arm64/kernel/traps.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 8 deletions(-) commit 2d99b55d378c996b9692a0c93dd25f4ed5d58934 Author: Hannes Reinecke Date: Fri Feb 12 09:39:15 2016 +0100 bio: return EINTR if copying to user space got interrupted Commit 35dc248383bbab0a7203fca4d722875bc81ef091 introduced a check for current->mm to see if we have a user space context and only copies data if we do. Now if an IO gets interrupted by a signal data isn't copied into user space any more (as we don't have a user space context) but user space isn't notified about it. This patch modifies the behaviour to return -EINTR from bio_uncopy_user() to notify userland that a signal has interrupted the syscall, otherwise it could lead to a situation where the caller may get a buffer with no data returned. This can be reproduced by issuing SG_IO ioctl()s in one thread while constantly sending signals to it. Fixes: 35dc248 [SCSI] sg: Fix user memory corruption when SG_IO is interrupted by a signal Signed-off-by: Johannes Thumshirn Signed-off-by: Hannes Reinecke Cc: stable@vger.kernel.org # v.3.11+ Signed-off-by: Jens Axboe block/bio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f8e68a7c9af5f8047f7f8295874bedf306063709 Author: Keith Busch Date: Thu Feb 11 13:05:47 2016 -0700 NVMe: Rate limit nvme IO warnings We don't need to spam the kernel logs with thousands of IO cancelling messages. We can infer all IO's are being cancelled with fewer, or even none at all. This patch rate limits the message and uses the debug log level as it is mainly used for testing purposes. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff23a2a15a2117245b4599c1352343c8b8fb4c43 Author: Keith Busch Date: Thu Feb 11 13:05:43 2016 -0700 NVMe: Poll device while still active during remove A device failure or link down wouldn't have been detected during namespace removal. This patch keeps the device in the list for polling so that the thread may see such failure and initiate a reset. The device is removed from the list after disable, so we can safely flush the reset work as it can't be requeued when disable completes. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit ae1fba20015bca7401db2422fe18c9c049184163 Author: Keith Busch Date: Thu Feb 11 13:05:42 2016 -0700 NVMe: Requeue requests on suspended queues It's possible a request may get to the driver after the nvme queue was disabled. This has the request requeue if that happens. Note the request is still "started" by the driver, but requeuing will clear the start state for timeout handling. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit fb724ed5c6175a2407b256d506c9e703c6bb62d4 Author: Emil Goode Date: Wed Feb 10 02:22:16 2016 +0100 wlcore: Fix regression in wlcore_set_partition() The commit 3719c17e1816 ("wlcore/wl18xx: fw logger over sdio") introduced a regression causing the wlcore to time out and go into recovery. Reverting the changes regarding write of the last partition size brings the module back to it's functional state. Fixes: 3719c17e1816 ("wlcore/wl18xx: fw logger over sdio") Reported-by: Ross Green Signed-off-by: Emil Goode [kvalo@codeaurora.org: improved commit log] Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/io.c | 8 ++++---- drivers/net/wireless/ti/wlcore/io.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 86c2ee16704522a546c0ee1e8238096e3c391468 Merge: 397da2d f11aec0 Author: Takashi Iwai Date: Fri Feb 12 09:48:51 2016 +0100 Merge tag 'asoc-fix-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.5 A rather large batch of fixes here, almost all in the Intel driver. The changes that got merged in this merge window for Skylake were rather large and as well as issues that you'd expect in a large block of new code there were some problems created for older processors which needed fixing up. Things are largely settling down now hopefully. commit 613317bd212c585c20796c10afe5daaa95d4b0a1 Author: Ryan Ware Date: Thu Feb 11 15:58:44 2016 -0800 EVM: Use crypto_memneq() for digest comparisons This patch fixes vulnerability CVE-2016-2085. The problem exists because the vm_verify_hmac() function includes a use of memcmp(). Unfortunately, this allows timing side channel attacks; specifically a MAC forgery complexity drop from 2^128 to 2^12. This patch changes the memcmp() to the cryptographically safe crypto_memneq(). Reported-by: Xiaofei Rex Guo Signed-off-by: Ryan Ware Cc: stable@vger.kernel.org Signed-off-by: Mimi Zohar Signed-off-by: James Morris security/integrity/evm/evm_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 37eda9df5bd8444263418495632ea6ec750f03f9 Author: Vineet Gupta Date: Wed Feb 10 06:52:07 2016 +0530 ARC: mm: Introduce explicit super page size support MMUv4 supports 2 concurrent page sizes: Normal and Super [4K to 16M] So far Linux supported a single super page size for a given Normal page, depending on the software page walking address split. e.g. we had 11:8:13 address split for 8K page, which meant super page was 2 ^(8+13) = 2M (given that THP size has to be PMD_SHIFT) Now we turn this around, by allowing multiple Super Pages in Kconfig (currently 2M and 16M only) and forcing page walker address split to PGDIR_SHIFT and PAGE_SHIFT For configs without Super page, things are same as before and PGDIR_SHIFT can be hacked to get non default address split The motivation for this change is a customer who needs 16M super page and a 8K Normal page combo. Signed-off-by: Vineet Gupta arch/arc/Kconfig | 19 ++++++++++++++++++ arch/arc/include/asm/pgtable.h | 45 ++++++++++++++++++++++++------------------ 2 files changed, 45 insertions(+), 19 deletions(-) commit 56263b4ceba90b1db77a6b31e22726f101bca807 Author: Eryu Guan Date: Fri Feb 12 01:23:00 2016 -0500 ext4: remove unused parameter "newblock" in convert_initialized_extent() The "newblock" parameter is not used in convert_initialized_extent(), remove it. Signed-off-by: Eryu Guan Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcff24887d00bce102e0857d7b0a8c44a40f53d1 Author: Eryu Guan Date: Fri Feb 12 01:20:43 2016 -0500 ext4: don't read blocks from disk after extents being swapped I notice ext4/307 fails occasionally on ppc64 host, reporting md5 checksum mismatch after moving data from original file to donor file. The reason is that move_extent_per_page() calls __block_write_begin() and block_commit_write() to write saved data from original inode blocks to donor inode blocks, but __block_write_begin() not only maps buffer heads but also reads block content from disk if the size is not block size aligned. At this time the physical block number in mapped buffer head is pointing to the donor file not the original file, and that results in reading wrong data to page, which get written to disk in following block_commit_write call. This also can be reproduced by the following script on 1k block size ext4 on x86_64 host: mnt=/mnt/ext4 donorfile=$mnt/donor testfile=$mnt/testfile e4compact=~/xfstests/src/e4compact rm -f $donorfile $testfile # reserve space for donor file, written by 0xaa and sync to disk to # avoid EBUSY on EXT4_IOC_MOVE_EXT xfs_io -fc "pwrite -S 0xaa 0 1m" -c "fsync" $donorfile # create test file written by 0xbb xfs_io -fc "pwrite -S 0xbb 0 1023" -c "fsync" $testfile # compute initial md5sum md5sum $testfile | tee md5sum.txt # drop cache, force e4compact to read data from disk echo 3 > /proc/sys/vm/drop_caches # test defrag echo "$testfile" | $e4compact -i -v -f $donorfile # check md5sum md5sum -c md5sum.txt Fix it by creating & mapping buffer heads only but not reading blocks from disk, because all the data in page is guaranteed to be up-to-date in mext_page_mkuptodate(). Cc: stable@vger.kernel.org Signed-off-by: Eryu Guan Signed-off-by: Theodore Ts'o fs/ext4/move_extent.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 46901760b46064964b41015d00c140c83aa05bcf Author: Insu Yun Date: Fri Feb 12 01:15:59 2016 -0500 ext4: fix potential integer overflow Since sizeof(ext_new_group_data) > sizeof(ext_new_flex_group_data), integer overflow could be happened. Therefore, need to fix integer overflow sanitization. Cc: stable@vger.kernel.org Signed-off-by: Insu Yun Signed-off-by: Theodore Ts'o fs/ext4/resize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a8d9cdcfee67469dc2a993f59a47467a5eb4adf Merge: 90a88d6 fb2d65d Author: James Bottomley Date: Thu Feb 11 21:50:48 2016 -0800 Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes commit 90a88d6ef88edcfc4f644dddc7eef4ea41bccf8b Author: James Bottomley Date: Wed Feb 10 08:03:26 2016 -0800 scsi: fix soft lockup in scsi_remove_target() on module removal This softlockup is currently happening: [ 444.088002] NMI watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [kworker/1:1:29] [ 444.088002] Modules linked in: lpfc(-) qla2x00tgt(O) qla2xxx_scst(O) scst_vdisk(O) scsi_transport_fc libcrc32c scst(O) dlm configfs nfsd lockd grace nfs_acl auth_rpcgss sunrpc ed d snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device dm_mod iTCO_wdt snd_hda_codec_realtek snd_hda_codec_generic gpio_ich iTCO_vendor_support ppdev snd_hda_intel snd_hda_codec snd_hda _core snd_hwdep tg3 snd_pcm snd_timer libphy lpc_ich parport_pc ptp acpi_cpufreq snd pps_core fjes parport i2c_i801 ehci_pci tpm_tis tpm sr_mod cdrom soundcore floppy hwmon sg 8250_ fintek pcspkr i915 drm_kms_helper uhci_hcd ehci_hcd drm fb_sys_fops sysimgblt sysfillrect syscopyarea i2c_algo_bit usbcore button video usb_common fan ata_generic ata_piix libata th ermal [ 444.088002] CPU: 1 PID: 29 Comm: kworker/1:1 Tainted: G O 4.4.0-rc5-2.g1e923a3-default #1 [ 444.088002] Hardware name: FUJITSU SIEMENS ESPRIMO E /D2164-A1, BIOS 5.00 R1.10.2164.A1 05/08/2006 [ 444.088002] Workqueue: fc_wq_4 fc_rport_final_delete [scsi_transport_fc] [ 444.088002] task: f6266ec0 ti: f6268000 task.ti: f6268000 [ 444.088002] EIP: 0060:[] EFLAGS: 00000286 CPU: 1 [ 444.088002] EIP is at _raw_spin_unlock_irqrestore+0x14/0x20 [ 444.088002] EAX: 00000286 EBX: f20d3800 ECX: 00000002 EDX: 00000286 [ 444.088002] ESI: f50ba800 EDI: f2146848 EBP: f6269ec8 ESP: f6269ec8 [ 444.088002] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 444.088002] CR0: 8005003b CR2: 08f96600 CR3: 363ae000 CR4: 000006d0 [ 444.088002] Stack: [ 444.088002] f6269eec c066b0f7 00000286 f2146848 f50ba808 f50ba800 f50ba800 f2146a90 [ 444.088002] f2146848 f6269f08 f8f0a4ed f3141000 f2146800 f2146a90 f619fa00 00000040 [ 444.088002] f6269f40 c026cb25 00000001 166c6392 00000061 f6757140 f6136340 00000004 [ 444.088002] Call Trace: [ 444.088002] [] scsi_remove_target+0x167/0x1c0 [ 444.088002] [] fc_rport_final_delete+0x9d/0x1e0 [scsi_transport_fc] [ 444.088002] [] process_one_work+0x155/0x3e0 [ 444.088002] [] worker_thread+0x37/0x490 [ 444.088002] [] kthread+0x9b/0xb0 [ 444.088002] [] ret_from_kernel_thread+0x21/0x40 What appears to be happening is that something has pinned the target so it can't go into STARGET_DEL via final release and the loop in scsi_remove_target spins endlessly until that happens. The fix for this soft lockup is to not keep looping over a device that we've called remove on but which hasn't gone into DEL state. This patch will retain a simplistic memory of the last target and not keep looping over it. Reported-by: Sebastian Herbszt Tested-by: Sebastian Herbszt Fixes: 40998193560dab6c3ce8d25f4fa58a23e252ef38 Cc: stable@vger.kernel.org Signed-off-by: James Bottomley drivers/scsi/scsi_sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 802cf1f9f504e09f7118c9acc69ab3e825449e52 Author: Huaitong Han Date: Fri Feb 12 00:17:16 2016 -0500 ext4: add a line break for proc mb_groups display This patch adds a line break for proc mb_groups display. Signed-off-by: Huaitong Han Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdde368e7c2963e319f919fa57908537060847fc Author: Anton Protopopov Date: Thu Feb 11 23:57:21 2016 -0500 ext4: ioctl: fix erroneous return value The ext4_ioctl_setflags() function which is used in the ioctls EXT4_IOC_SETFLAGS and EXT4_IOC_FSSETXATTR may return the positive value EPERM instead of -EPERM in case of error. This bug was introduced by a recent commit 9b7365fc. The following program can be used to illustrate the wrong behavior: #include #include #include #include #include #define FS_IOC_GETFLAGS _IOR('f', 1, long) #define FS_IOC_SETFLAGS _IOW('f', 2, long) #define FS_IMMUTABLE_FL 0x00000010 int main(void) { int fd; long flags; fd = open("file", O_RDWR|O_CREAT, 0600); if (fd < 0) err(1, "open"); if (ioctl(fd, FS_IOC_GETFLAGS, &flags) < 0) err(1, "ioctl: FS_IOC_GETFLAGS"); flags |= FS_IMMUTABLE_FL; if (ioctl(fd, FS_IOC_SETFLAGS, &flags) < 0) err(1, "ioctl: FS_IOC_SETFLAGS"); warnx("ioctl returned no error"); return 0; } Running it gives the following result: $ strace -e ioctl ./test ioctl(3, FS_IOC_GETFLAGS, 0x7ffdbd8bfd38) = 0 ioctl(3, FS_IOC_SETFLAGS, 0x7ffdbd8bfd38) = 1 test: ioctl returned no error +++ exited with 0 +++ Running the program on a kernel with the bug fixed gives the proper result: $ strace -e ioctl ./test ioctl(3, FS_IOC_GETFLAGS, 0x7ffdd2768258) = 0 ioctl(3, FS_IOC_SETFLAGS, 0x7ffdd2768258) = -1 EPERM (Operation not permitted) test: ioctl: FS_IOC_SETFLAGS: Operation not permitted +++ exited with 1 +++ Signed-off-by: Anton Protopopov Signed-off-by: Theodore Ts'o fs/ext4/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05145bd799e498ce4e3b5145894174ee881f02b0 Author: Jan Kara Date: Thu Feb 11 23:15:12 2016 -0500 ext4: fix scheduling in atomic on group checksum failure When block group checksum is wrong, we call ext4_error() while holding group spinlock from ext4_init_block_bitmap() or ext4_init_inode_bitmap() which results in scheduling while in atomic. Fix the issue by calling ext4_error() later after dropping the spinlock. CC: stable@vger.kernel.org Reported-by: Dmitry Vyukov Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Reviewed-by: Darrick J. Wong fs/ext4/balloc.c | 7 ++++--- fs/ext4/ialloc.c | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) commit 6b44d1e9bf3b850b433694d654709b4cbc9bc00e Merge: 89140fd 58a66db Author: Greg Kroah-Hartman Date: Thu Feb 11 20:10:58 2016 -0800 Merge tag 'phy-for-4.5-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.5-rc *) Fix error handling code in phy core [phy_power_on()] *) phy-twl4030-usb fixes for unloading the module *) Restrict phy-hi6220-usb to HiSilicon arm64 Signed-off-by: Kishon Vijay Abraham I commit 1ecb4ae5f0aaf48b538b9e90b7b360215a2cf9ed Author: Andrew Morton Date: Thu Feb 11 16:13:20 2016 -0800 arch/x86/Kconfig: CONFIG_X86_UV should depend on CONFIG_EFI arch/x86/built-in.o: In function `uv_bios_call': (.text+0xeba00): undefined reference to `efi_call' Reported-by: kbuild test robot Suggested-by: "H. Peter Anvin" Cc: Ingo Molnar Reviewed-by: Matt Fleming Acked-by: Alex Thorlton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) commit db78c22230d0bcc8b27b81f05b39f104f08232c5 Author: Dan Williams Date: Thu Feb 11 16:13:17 2016 -0800 mm: fix pfn_t vs highmem The pfn_t type uses an unsigned long to store a pfn + flags value. On a 64-bit platform the upper 12 bits of an unsigned long are never used for storing the value of a pfn. However, this is not true on highmem platforms, all 32-bits of a pfn value are used to address a 44-bit physical address space. A pfn_t needs to store a 64-bit value. Link: https://bugzilla.kernel.org/show_bug.cgi?id=112211 Fixes: 01c8f1c44b83 ("mm, dax, gpu: convert vm_insert_mixed to pfn_t") Signed-off-by: Dan Williams Reported-by: Stuart Foster Reported-by: Julian Margetson Tested-by: Julian Margetson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pfn.h | 2 +- include/linux/pfn_t.h | 19 +++++++++---------- kernel/memremap.c | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) commit 4a389810bc3cb0e73443104f0827e81e23cb1e12 Author: Andrew Morton Date: Thu Feb 11 16:13:14 2016 -0800 kernel/locking/lockdep.c: convert hash tables to hlists Mike said: : CONFIG_UBSAN_ALIGNMENT breaks x86-64 kernel with lockdep enabled, i. e : kernel with CONFIG_UBSAN_ALIGNMENT fails to load without even any error : message. : : The problem is that ubsan callbacks use spinlocks and might be called : before lockdep is initialized. Particularly this line in the : reserve_ebda_region function causes problem: : : lowmem = *(unsigned short *)__va(BIOS_LOWMEM_KILOBYTES); : : If i put lockdep_init() before reserve_ebda_region call in : x86_64_start_reservations kernel loads well. Fix this ordering issue permanently: change lockdep so that it uses hlists for the hash tables. Unlike a list_head, an hlist_head is in its initialized state when it is all-zeroes, so lockdep is ready for operation immediately upon boot - lockdep_init() need not have run. The patch will also save some memory. lockdep_init() and lockdep_initialized can be done away with now - a 4.6 patch has been prepared to do this. Reported-by: Mike Krinkin Suggested-by: Mike Krinkin Cc: Andrey Ryabinin Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/lockdep.h | 4 ++-- kernel/locking/lockdep.c | 42 +++++++++++++++++++----------------------- 2 files changed, 21 insertions(+), 25 deletions(-) commit 6b75d14912f2d89a3539c0b3a100519e1eec9a63 Author: Vineet Gupta Date: Thu Feb 11 16:13:11 2016 -0800 mm,thp: fix spellos in describing __HAVE_ARCH_FLUSH_PMD_TLB_RANGE [akpm@linux-foundation.org: s/threshhold/threshold/] Signed-off-by: Vineet Gupta Cc: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/pgtable-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a6ac72fd6ea32594b316513e1826c3f6db4cc93 Author: Vineet Gupta Date: Thu Feb 11 16:13:09 2016 -0800 mm,thp: khugepaged: call pte flush at the time of collapse This showed up on ARC when running LMBench bw_mem tests as Overlapping TLB Machine Check Exception triggered due to STLB entry (2M pages) overlapping some NTLB entry (regular 8K page). bw_mem 2m touches a large chunk of vaddr creating NTLB entries. In the interim khugepaged kicks in, collapsing the contiguous ptes into a single pmd. pmdp_collapse_flush()->flush_pmd_tlb_range() is called to flush out NTLB entries for the ptes. This for ARC (by design) can only shootdown STLB entries (for pmd). The stray NTLB entries cause the overlap with the subsequent STLB entry for collapsed page. So make pmdp_collapse_flush() call pte flush interface not pmd flush. Note that originally all thp flush call sites in generic code called flush_tlb_range() leaving it to architecture to implement the flush for pte and/or pmd. Commit 12ebc1581ad11454 changed this by calling a new opt-in API flush_pmd_tlb_range() which made the semantics more explicit but failed to distinguish the pte vs pmd flush in generic code, which is what this patch fixes. Note that ARC can fixed w/o touching the generic pmdp_collapse_flush() by defining a ARC version, but that defeats the purpose of generic version, plus sementically this is the right thing to do. Fixes STAR 9000961194: LMBench on AXS103 triggering duplicate TLB exceptions with super pages Fixes: 12ebc1581ad11454 ("mm,thp: introduce flush_pmd_tlb_range") Signed-off-by: Vineet Gupta Reviewed-by: Aneesh Kumar K.V Acked-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: [4.4] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/pgtable-generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 078c6c3a5e7dc53a9a23408cc32c83954abb5d0d Author: Rasmus Villemoes Date: Thu Feb 11 16:13:06 2016 -0800 mm/backing-dev.c: fix error path in wb_init() We need to use post-decrement to get percpu_counter_destroy() called on &wb->stat[0]. Moreover, the pre-decremebt would cause infinite out-of-bounds accesses if the setup code failed at i==0. Signed-off-by: Rasmus Villemoes Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b9116a652bd9e0e2994505cfaaa5f66deaa2a05 Author: Kirill A. Shutemov Date: Thu Feb 11 16:13:03 2016 -0800 mm, dax: check for pmd_none() after split_huge_pmd() DAX implements split_huge_pmd() by clearing pmd. This simple approach reduces memory overhead, as we don't need to deposit page table on huge page mapping to make split_huge_pmd() never-fail. PTE table can be allocated and populated later on page fault from backing store. But one side effect is that have to check if pmd is pmd_none() after split_huge_pmd(). In most places we do this already to deal with parallel MADV_DONTNEED. But I found two call sites which is not affected by MADV_DONTNEED (due down_write(mmap_sem)), but need to have the check to work with DAX properly. Signed-off-by: Kirill A. Shutemov Cc: Dan Williams Cc: Matthew Wilcox Cc: Andrea Arcangeli Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mprotect.c | 6 ++++-- mm/mremap.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 7eb391299419a03cbe0fa5ab0e6b0932e42c7a36 Author: Jason A. Donenfeld Date: Thu Feb 11 16:13:00 2016 -0800 vsprintf: kptr_restrict is okay in IRQ when 2 The kptr_restrict flag, when set to 1, only prints the kernel address when the user has CAP_SYSLOG. When it is set to 2, the kernel address is always printed as zero. When set to 1, this needs to check whether or not we're in IRQ. However, when set to 2, this check is unneccessary, and produces confusing results in dmesg. Thus, only make sure we're not in IRQ when mode 1 is used, but not mode 2. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jason A. Donenfeld Cc: Rasmus Villemoes Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 62eb320ab077890dbbcc28343fa6432a82a10c35 Author: Randy Dunlap Date: Thu Feb 11 16:12:58 2016 -0800 mm: fix filemap.c kernel doc warning Add missing kernel-doc notation for function parameter 'gfp_mask' to fix kernel-doc warning. mm/filemap.c:1898: warning: No description found for parameter 'gfp_mask' Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 1 + 1 file changed, 1 insertion(+) commit 7707535ab95e2231b6d7f2bfb4f27558e83c4dc2 Author: Yang Shi Date: Thu Feb 11 16:12:55 2016 -0800 ubsan: cosmetic fix to Kconfig text When enabling UBSAN_SANITIZE_ALL, the kernel image size gets increased significantly (~3x). So, it sounds better to have some note in Kconfig. And, fixed a typo. Signed-off-by: Yang Shi Acked-by: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.ubsan | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5d589d81acf974d23af98044aac56c6339d659f8 Author: Robin Murphy Date: Tue Feb 9 11:04:45 2016 +0000 of/irq: Fix msi-map calculation for nonzero rid-base The existing msi-map code is fine for shifting the entire RID space upwards, but attempting finer-grained remapping reveals a bug. It turns out that we are mistakenly treating the msi-base part as an offset, not as a new base to remap onto, so things get squiffy when rid-base is nonzero. Fix this, and at the same time add a sanity check against having msi-map-mask clash with a nonzero rid-base, as that's another thing one can easily get wrong. CC: Signed-off-by: Robin Murphy Reviewed-by: Marc Zyngier Tested-by: Stuart Yoder Acked-by: Mark Rutland Acked-by: David Daney Signed-off-by: Rob Herring drivers/of/irq.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit ef2d4615c59efb312e531a5e949970f37ca1c841 Author: Keith Busch Date: Thu Feb 11 13:05:40 2016 -0700 NVMe: Allow request merges It is generally more efficient to submit larger IO. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 1 - 1 file changed, 1 deletion(-) commit 4f76d0e49835d3da33aa54811157421f7061805e Author: Keith Busch Date: Thu Feb 11 13:05:39 2016 -0700 NVMe: Fix io incapable return values The function returns true when the controller can't handle IO. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Acked-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/nvme.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a59e0f5795fe52dad42a99c00287e3766153b312 Author: Keith Busch Date: Thu Feb 11 13:05:38 2016 -0700 blk-mq: End unstarted requests on dying queue Go directly to ending a request if it wasn't started. Previously, completing a request may invoke a driver callback for a request it didn't initialize. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Acked-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5f009d3f8e6685fe8c6215082c1696a08b411220 Author: Keith Busch Date: Wed Feb 10 16:52:47 2016 -0700 block: Initialize max_dev_sectors to 0 The new queue limit is not used by the majority of block drivers, and should be initialized to 0 for the driver's requested settings to be used. Signed-off-by: Keith Busch Acked-by: Martin K. Petersen Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-settings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c05235d50f681bf685e7290cae05ab3b4fa493f3 Merge: da2f912 6ec9249a Author: Linus Torvalds Date: Thu Feb 11 11:25:55 2016 -0800 Merge tag 'gpio-v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: - Probe errorpath fix for the Altera - irqchip ofnode pointer added to the DaVinci driver - controller instance number correction for DaVinci * tag 'gpio-v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: davinci: Fix the number of controllers allocated gpio: davinci: Add the missing of-node pointer gpio: gpio-altera: Remove gpiochip on probe failure. commit da2f912aef1106144c43b75f8719807dfad121b3 Merge: 5de6ac7 b1d353a Author: Linus Torvalds Date: Thu Feb 11 11:17:19 2016 -0800 Merge tag 'platform-drivers-x86-v4.5-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "Just two small fixes for the 4.5-rc cycle: intel_scu_ipcutil: - underflow in scu_reg_access() intel-hid: - fix incorrect entries in intel_hid_keymap" * tag 'platform-drivers-x86-v4.5-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: intel_scu_ipcutil: underflow in scu_reg_access() intel-hid: fix incorrect entries in intel_hid_keymap commit 5de6ac75d928358063f37c874a91ca1ef28ac308 Merge: 721675f a1b14d2 Author: Linus Torvalds Date: Thu Feb 11 11:00:34 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix BPF handling of branch offset adjustmnets on backjumps, from Daniel Borkmann. 2) Make sure selinux knows about SOCK_DESTROY netlink messages, from Lorenzo Colitti. 3) Fix openvswitch tunnel mtu regression, from David Wragg. 4) Fix ICMP handling of TCP sockets in syn_recv state, from Eric Dumazet. 5) Fix SCTP user hmacid byte ordering bug, from Xin Long. 6) Fix recursive locking in ipv6 addrconf, from Subash Abhinov Kasiviswanathan. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: bpf: fix branch offset adjustment on backjumps after patching ctx expansion vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices geneve: Relax MTU constraints vxlan: Relax MTU constraints flow_dissector: Fix unaligned access in __skb_flow_dissector when used by eth_get_headlen of: of_mdio: Add marvell, 88e1145 to whitelist of PHY compatibilities. selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables sctp: translate network order to host order when users get a hmacid enic: increment devcmd2 result ring in case of timeout tg3: Fix for tg3 transmit queue 0 timed out when too many gso_segs net:Add sysctl_max_skb_frags tcp: do not drop syn_recv on all icmp reports ipv6: fix a lockdep splat unix: correctly track in-flight fds in sending process user_struct update be2net maintainers' email addresses dwc_eth_qos: Reset hardware before PHY start ipv6: addrconf: Fix recursive spin lock call commit ee50aeac60ba5c4c7e072fbc0c9aa2043c8896e6 Author: Eran Ben Elisha Date: Thu Feb 11 10:24:42 2016 +0200 IB/core: Fix reading capability mask of the port info class When checking specific attribute from a bit mask, need to use bitwise AND and not logical AND, fixed that. Fixes: 145d9c541032 ('IB/core: Display extended counter set if available') Signed-off-by: Eran Ben Elisha Signed-off-by: Matan Barak Reviewed-by: Or Gerlitz Reviewed-by: Christoph Lameter Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fa51b247d67b521e1a1103cad75eb7a666fc9ff9 Author: Rasmus Villemoes Date: Tue Feb 9 21:11:14 2016 +0100 net/mlx4: fix some error handling in mlx4_multi_func_init() The while loop after err_slaves should use post-decrement; otherwise we'll fail to do the kfrees for i==0, and will run into out-of-bounds accesses if the setup above failed already at i==0. [I'm not sure why one even bothers populating the ->vlan_filter array: mlx4.h isn't #included by anything outside drivers/net/ethernet/mellanox/mlx4/, and "git grep -C2 -w vlan_filter drivers/net/ethernet/mellanox/mlx4/" seems to suggest that the vlan_filter elements aren't used at all.] Signed-off-by: Rasmus Villemoes Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 004fa08d7aba2a13974446bf212a48c0b3b0d9fd Author: Ashok Kumar Date: Thu Feb 11 05:38:53 2016 -0800 irqchip/gic-v3-its: Fix double ICC_EOIR write for LPI in EOImode==1 When the GIC is using EOImode==1, the EOI is done immediately, leaving the deactivation to be performed when the EOI was previously done. Unfortunately, the ITS is not aware of the EOImode at all, and blindly EOIs the interrupt again. On most systems, this is ignored (despite being a programming error), but some others do raise a SError exception as there is no priority drop to perform for this interrupt. The fix is to stop trying to be clever, and always call into the underlying GIC to perform the right access, irrespective of the more we're in. [Marc: Reworked commit message] Fixes: 0b996fd35957a ("irqchip/GICv3: Convert to EOImode == 1") Cc: stable@vger.kernel.org Acked-by: Marc Zyngier Signed-off-by: Ashok Kumar Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit a514379b0c77085074abf01c525a850f6d99926e Author: Matias Bjørling Date: Thu Feb 11 14:49:13 2016 +0100 null_blk: oops when initializing without lightnvm If the LightNVM subsystem is not compiled into the kernel, and the null_blk device driver requests lightnvm to be initialized. The call to nvm_register fails and the null_add_dev function cleans up the initialization. However, at this point the null block device has already been added to the nullb_list and thus a second cleanup will occur when the function has returned, that leads to a double call to blk_cleanup_queue. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/block/null_blk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a5ebb87db84392edfd3142c3a6a78431d820a789 Author: Ulf Hansson Date: Thu Feb 11 16:42:58 2016 +0100 Revert "mmc: block: don't use parameter prefix if built as module" This reverts commit 829b6962f7e3cfc06f7c5c26269fd47ad48cf503. Revert this change as it causes a sysfs path to change and therefore introduces and ABI regression. More precisely Android's vold is not being able to access /sys/module/mmcblk/parameters/perdev_minors any more, since the path becomes changed to: "/sys/module/mmc_block/..." Fixes: 829b6962f7e3 ("mmc: block: don't use parameter prefix if built as module") Reported-by: John Stultz Cc: Andy Shevchenko Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 3 --- 1 file changed, 3 deletions(-) commit a53b8394ec3c67255928df6ee9cc99dd1cd452e3 Author: Javi Merino Date: Thu Feb 11 12:00:51 2016 +0000 thermal: cpu_cooling: fix out of bounds access in time_in_idle In __cpufreq_cooling_register() we allocate the arrays for time_in_idle and time_in_idle_timestamp to be as big as the number of cpus in this cpufreq device. However, in get_load() we access this array using the cpu number as index, which can result in an out of bound access. Index time_in_idle{,_timestamp} using the index in the cpufreq_device's allowed_cpus mask, as we do for the load_cpu array in cpufreq_get_requested_power() Reported-by: Nicolas Boichat Cc: Amit Daniel Kachhap Cc: Zhang Rui Cc: Eduardo Valentin Tested-by: Nicolas Boichat Acked-by: Viresh Kumar Signed-off-by: Javi Merino Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 287e6611ab1eac76c2c5ebf6e345e04c80ca9c61 Author: Arnd Bergmann Date: Thu Feb 11 14:16:27 2016 +0100 libata: fix HDIO_GET_32BIT ioctl As reported by Soohoon Lee, the HDIO_GET_32BIT ioctl does not work correctly in compat mode with libata. I have investigated the issue further and found multiple problems that all appeared with the same commit that originally introduced HDIO_GET_32BIT handling in libata back in linux-2.6.8 and presumably also linux-2.4, as the code uses "copy_to_user(arg, &val, 1)" to copy a 'long' variable containing either 0 or 1 to user space. The problems with this are: * On big-endian machines, this will always write a zero because it stores the wrong byte into user space. * In compat mode, the upper three bytes of the variable are updated by the compat_hdio_ioctl() function, but they now contain uninitialized stack data. * The hdparm tool calling this ioctl uses a 'static long' variable to store the result. This means at least the upper bytes are initialized to zero, but calling another ioctl like HDIO_GET_MULTCOUNT would fill them with data that remains stale when the low byte is overwritten. Fortunately libata doesn't implement any of the affected ioctl commands, so this would only happen when we query both an IDE and an ATA device in the same command such as "hdparm -N -c /dev/hda /dev/sda" * The libata code for unknown reasons started using ATA_IOC_GET_IO32 and ATA_IOC_SET_IO32 as aliases for HDIO_GET_32BIT and HDIO_SET_32BIT, while the ioctl commands that were added later use the normal HDIO_* names. This is harmless but rather confusing. This addresses all four issues by changing the code to use put_user() on an 'unsigned long' variable in HDIO_GET_32BIT, like the IDE subsystem does, and by clarifying the names of the ioctl commands. Signed-off-by: Arnd Bergmann Reported-by: Soohoon Lee Tested-by: Soohoon Lee Cc: stable@vger.kernel.org Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 11 +++++------ include/linux/ata.h | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) commit bc4ef7592f657ae81b017207a1098817126ad4cb Author: David Sterba Date: Fri Nov 13 13:44:28 2015 +0100 btrfs: properly set the termination value of ctx->pos in readdir The value of ctx->pos in the last readdir call is supposed to be set to INT_MAX due to 32bit compatibility, unless 'pos' is intentially set to a larger value, then it's LLONG_MAX. There's a report from PaX SIZE_OVERFLOW plugin that "ctx->pos++" overflows (https://forums.grsecurity.net/viewtopic.php?f=1&t=4284), on a 64bit arch, where the value is 0x7fffffffffffffff ie. LLONG_MAX before the increment. We can get to that situation like that: * emit all regular readdir entries * still in the same call to readdir, bump the last pos to INT_MAX * next call to readdir will not emit any entries, but will reach the bump code again, finds pos to be INT_MAX and sets it to LLONG_MAX Normally this is not a problem, but if we call readdir again, we'll find 'pos' set to LLONG_MAX and the unconditional increment will overflow. The report from Victor at (http://thread.gmane.org/gmane.comp.file-systems.btrfs/49500) with debugging print shows that pattern: Overflow: e Overflow: 7fffffff Overflow: 7fffffffffffffff PAX: size overflow detected in function btrfs_real_readdir fs/btrfs/inode.c:5760 cicus.935_282 max, count: 9, decl: pos; num: 0; context: dir_context; CPU: 0 PID: 2630 Comm: polkitd Not tainted 4.2.3-grsec #1 Hardware name: Gigabyte Technology Co., Ltd. H81ND2H/H81ND2H, BIOS F3 08/11/2015 ffffffff81901608 0000000000000000 ffffffff819015e6 ffffc90004973d48 ffffffff81742f0f 0000000000000007 ffffffff81901608 ffffc90004973d78 ffffffff811cb706 0000000000000000 ffff8800d47359e0 ffffc90004973ed8 Call Trace: [] dump_stack+0x4c/0x7f [] report_size_overflow+0x36/0x40 [] btrfs_real_readdir+0x69c/0x6d0 [] iterate_dir+0xa8/0x150 [] ? __fget_light+0x2d/0x70 [] SyS_getdents+0xba/0x1c0 Overflow: 1a [] ? iterate_dir+0x150/0x150 [] entry_SYSCALL_64_fastpath+0x12/0x83 The jump from 7fffffff to 7fffffffffffffff happens when new dir entries are not yet synced and are processed from the delayed list. Then the code could go to the bump section again even though it might not emit any new dir entries from the delayed list. The fix avoids entering the "bump" section again once we've finished emitting the entries, both for synced and delayed entries. References: https://forums.grsecurity.net/viewtopic.php?f=1&t=4284 Reported-by: Victor CC: stable@vger.kernel.org Signed-off-by: David Sterba Tested-by: Holger Hoffstätte Signed-off-by: Chris Mason fs/btrfs/delayed-inode.c | 3 ++- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 14 +++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) commit 32aea2680de01f539d928112150279fdeeabca00 Author: Suman Tripathi Date: Sat Feb 6 11:25:24 2016 +0530 ahci_xgene: Implement the workaround to fix the missing of the edge interrupt for the HOST_IRQ_STAT. Due to H/W errata, the HOST_IRQ_STAT register misses the edge interrupt when clearing the HOST_IRQ_STAT register and hardware reporting the PORT_IRQ_STAT register happens to be at the same clock cycle. Signed-off-by: Suman Tripathi Signed-off-by: Tejun Heo drivers/ata/ahci_xgene.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit d867b95f965457b9e85fb061ef8e3fdc029116ed Author: Suman Tripathi Date: Sat Feb 6 11:25:23 2016 +0530 ata: Remove the AHCI_HFLAG_EDGE_IRQ support from libahci. The flexibility to override the irq handles in the LLD's are already present, so controllers implementing a edge trigger latch can implement their own interrupt handler inside the driver. This patch removes the AHCI_HFLAG_EDGE_IRQ support from libahci and moves edge irq handling to ahci_xgene. tj: Minor update to description. Signed-off-by: Suman Tripathi Signed-off-by: Tejun Heo drivers/ata/ahci.h | 3 +-- drivers/ata/ahci_xgene.c | 40 +++++++++++++++++++++++++++++++++++++++- drivers/ata/libahci.c | 43 +------------------------------------------ 3 files changed, 41 insertions(+), 45 deletions(-) commit f070d6715509dafc0af223577c896fe3d204ca88 Author: Suman Tripathi Date: Sat Feb 6 11:25:22 2016 +0530 libahci: Implement the capability to override the generic ahci interrupt handler. This patch implements the capability to override the generic AHCI interrupt handler so that specific ahci drivers can implement their own custom interrupt handler routines. It also exports ahci_handle_port_intr so that custom irq_handler implementations can use it. tj: s/ahci_irq_handler/irq_handler/ and updated description. Signed-off-by: Suman Tripathi Signed-off-by: Tejun Heo drivers/ata/ahci.h | 2 ++ drivers/ata/libahci.c | 27 ++++++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) commit e972c37459c813190461dabfeaac228e00aae259 Author: Linus Walleij Date: Wed Feb 10 09:25:17 2016 +0100 ARM: 8519/1: ICST: try other dividends than 1 Since the dawn of time the ICST code has only supported divide by one or hang in an eternal loop. Luckily we were always dividing by one because the reference frequency for the systems using the ICSTs is 24MHz and the [min,max] values for the PLL input if [10,320] MHz for ICST307 and [6,200] for ICST525, so the loop will always terminate immediately without assigning any divisor for the reference frequency. But for the code to make sense, let's insert the missing i++ Reported-by: David Binderman Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Russell King arch/arm/common/icst.c | 1 + 1 file changed, 1 insertion(+) commit 111f2b87326199a736c3469265763a6be6e5528f Author: Krzysztof Adamski Date: Wed Feb 3 08:57:14 2016 +0100 pinctrl: sunxi: H3 requires irq_read_needs_mux It seems that on H3, just like on A10, when GPIOs are configured as external interrupt data registers does not contain their value. When value is read, GPIO function must be temporary switched to input for reads. Signed-off-by: Krzysztof Adamski Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 1 + 1 file changed, 1 insertion(+) commit 3c5b1d92b3b02be07873d611a27950addff544d3 Author: Tirumalesh Chalamarla Date: Wed Feb 10 10:46:53 2016 -0800 arm64: KVM: Configure TCR_EL2.PS at runtime Setting TCR_EL2.PS to 40 bits is wrong on systems with less that less than 40 bits of physical addresses. and breaks KVM on systems where the RAM is above 40 bits. This patch uses ID_AA64MMFR0_EL1.PARange to set TCR_EL2.PS dynamically, just like we already do for VTCR_EL2.PS. [Marc: rewrote commit message, patch tidy up] Reviewed-by: Marc Zyngier Signed-off-by: Tirumalesh Chalamarla Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_arm.h | 2 -- arch/arm64/kvm/hyp-init.S | 12 +++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit f6c9b160233f9b5afe926b91b55589b706076640 Author: Heiko Carstens Date: Wed Feb 10 14:13:24 2016 +0100 s390/diag: avoid lockdep recursion The diagnose tracer will indirectly call back into the lockdep code when lockdep does not expect it (arch_spinlock). This causes lockdep to disable itself and therefore we don't have a working lock dependency validator anymore. This patch effectively disables tracing of diag 0x9c and 0x44 if lockdep is enabled. If however lockdep is enabled spinlocks are mainly implemented using a trylock variant, which will not issue any diag 0x9c or 0x44. So this change has hardly any effect on tracing except when arch_spinlock and friends are explicitly used. Reported-and-Tested-by: David Hildenbrand Signed-off-by: Heiko Carstens Reviewed-by: David Hildenbrand Acked-by: Martin Schwidefsky Signed-off-by: Martin Schwidefsky arch/s390/kernel/trace.c | 3 +++ 1 file changed, 3 insertions(+) commit 9d862ababb609439c5d6987f6d3ddd09e703aa0b Author: Stefan Haberland Date: Tue Dec 15 10:45:05 2015 +0100 s390/dasd: fix refcount for PAV reassignment Add refcount to the DASD device when a summary unit check worker is scheduled. This prevents that the device is set offline with worker in place. Cc: stable@vger.kernel.org Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_alias.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 020bf042e5b397479c1174081b935d0ff15d1a64 Author: Stefan Haberland Date: Tue Dec 15 10:16:43 2015 +0100 s390/dasd: prevent incorrect length error under z/VM after PAV changes The channel checks the specified length and the provided amount of data for CCWs and provides an incorrect length error if the size does not match. Under z/VM with simulation activated the length may get changed. Having the suppress length indication bit set is stated as good CCW coding practice and avoids errors under z/VM. Cc: stable@vger.kernel.org Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_alias.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0986d97741150b307775d56f587a73ea873a4f4d Author: Christian Borntraeger Date: Tue Feb 9 16:23:39 2016 +0100 s390: fix DAT off memory access, e.g. on kdump commit 204ee2c56431 ("s390/irqflags: optimize irq restore") optimized irqrestore to really only care about interrupts and adapted the remaining low level users. One spot (memcpy_real) was not touched, though - fix it. Otherwise a kdump kernel will fail while reading the old kernel. As we re-enable irqs with a non-standard function we have to tell lockdep about that. Fixes: 204ee2c56431 ("s390/irqflags: optimize irq restore") Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/mm/maccess.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 49b245efab4498575379a36cfab9d7373df3b69a Merge: 1a485f4 1a1ebd5 Author: Thomas Gleixner Date: Thu Feb 11 11:47:55 2016 +0100 Merge tag 'gic-fixes-4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull GIC fixes from Marc for 4.5-rc4: - Two fixes addressing cascaded GICv1/GICv2 (affinity setting, EOImode) - One fix addressing possible missed interrupts on GICv3 commit 6a645dd87a5a506779810d7d9935c25fc2ef4687 Author: Adrian Hunter Date: Tue Feb 9 16:12:38 2016 +0200 mmc: sdhci-acpi: Fix card detect race for Intel BXT/APL Intel BXT/APL use a card detect GPIO however the host controller will not enable bus power unless it's card detect also reflects the presence of a card. Unfortunately those 2 things race which can result in commands not starting, after which the controller does nothing and there is a 10 second wait for the driver's 10-second timer to timeout. That is fixed by having the driver look also at the present state register to determine if the card is present. Consequently, provide a 'get_cd' mmc host operation for BXT/APL that does that. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 163cbe31e5163459908a41a2b4e0d33a28fd557a Author: Adrian Hunter Date: Tue Feb 9 16:12:37 2016 +0200 mmc: sdhci-pci: Fix card detect race for Intel BXT/APL Intel BXT/APL use a card detect GPIO however the host controller will not enable bus power unless it's card detect also reflects the presence of a card. Unfortunately those 2 things race which can result in commands not starting, after which the controller does nothing and there is a 10 second wait for the driver's 10-second timer to timeout. That is fixed by having the driver look also at the present state register to determine if the card is present. Consequently, provide a 'get_cd' mmc host operation for BXT/APL that does that. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 8d28b7a72fe18bcdcdb047243ba8fec36b149955 Author: Adrian Hunter Date: Tue Feb 9 16:12:36 2016 +0200 mmc: sdhci: Allow override of get_cd() called from sdhci_request() Drivers may need to provide their own get_cd() mmc host op, but currently the internals of the current op (sdhci_get_cd()) are provided by sdhci_do_get_cd() which is also called from sdhci_request(). To allow override of the get_cd functionality, change sdhci_request() to call ->get_cd() instead of sdhci_do_get_cd(). Note, in the future the call to ->get_cd() will likely be removed from sdhci_request() since most drivers don't need actually it. However this change is being done now to facilitate a subsequent bug fix. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf60e592a1af4d6f65dd54593250183f14360eed Author: Adrian Hunter Date: Tue Feb 9 16:12:35 2016 +0200 mmc: sdhci: Allow override of mmc host operations In the past, fixes for specific hardware devices were implemented in sdhci using quirks. That approach is no longer accepted because the growing number of quirks was starting to make the code difficult to understand and maintain. One alternative to quirks, is to allow drivers to override the default mmc host operations. This patch makes it easy to do that, and it is needed for a subsequent bug fix, for which separate patches are provided. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit f4d3d504198d464e406171cfa554a59bd4773d79 Author: Daniel Wagner Date: Wed Feb 10 10:21:21 2016 +0100 mips: Differentiate between 32 and 64 bit ELF header Depending on the configuration either the 32 or 64 bit version of elf_check_arch() is defined. parse_crash_elf{32|64}_headers() does some basic verification of the ELF header via vmcore_elf{32|64}_check_arch() which happen to map to elf_check_arch(). Since the implementation 32 and 64 bit version of elf_check_arch() differ, we use the wrong type: In file included from include/linux/elf.h:4:0, from fs/proc/vmcore.c:13: fs/proc/vmcore.c: In function 'parse_crash_elf64_headers': >> arch/mips/include/asm/elf.h:228:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] struct elfhdr *__h = (hdr); \ ^ include/linux/crash_dump.h:41:37: note: in expansion of macro 'elf_check_arch' #define vmcore_elf64_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) ^ fs/proc/vmcore.c:1015:4: note: in expansion of macro 'vmcore_elf64_check_arch' !vmcore_elf64_check_arch(&ehdr) || ^ Therefore, we rather define vmcore_elf{32|64}_check_arch() as a basic machine check and use it also in binfm_elf?32.c as well. Signed-off-by: Daniel Wagner Suggested-by: Maciej W. Rozycki Reviewed-by: Maciej W. Rozycki Reported-by: Fengguang Wu Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12529/ Signed-off-by: Ralf Baechle arch/mips/include/asm/elf.h | 9 +++++++-- arch/mips/kernel/binfmt_elfn32.c | 2 +- arch/mips/kernel/binfmt_elfo32.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) commit 1a1ebd5fb1e203ee8cc73508cc7a38ac4b804596 Author: Tirumalesh Chalamarla Date: Thu Feb 4 10:45:25 2016 -0800 irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is visible on redestributor The ARM GICv3 specification mentions the need for dsb after a read from the ICC_IAR1_EL1 register: 4.1.1 Physical CPU Interface: The effects of reading ICC_IAR0_EL1 and ICC_IAR1_EL1 on the state of a returned INTID are not guaranteed to be visible until after the execution of a DSB. Not having this could result in missed interrupts, so let's add the required barrier. [Marc: fixed commit message] Acked-by: Marc Zyngier Signed-off-by: Tirumalesh Chalamarla Signed-off-by: Marc Zyngier arch/arm64/include/asm/arch_gicv3.h | 1 + 1 file changed, 1 insertion(+) commit 389a00d3ad02a06b5d6d692cce76fed6a3dae8b4 Author: Jon Hunter Date: Tue Feb 9 15:24:57 2016 +0000 irqchip/gic: Only set the EOImodeNS bit for the root controller EOImode1 is only used for the root controller and hence only the root controller uses the eoimode1 functions for handling interrupts. However, if the root controller supports EOImode1, then the EOImodeNS bit will be set for all GICs, enabling EOImode1. This is not what we want and this causes interrupts on non-root GICs to only be dropped in priority but never deactivated. Therefore, only set the EOImodeNS bit for the root controller. Acked-by: Marc Zyngier Signed-off-by: Jon Hunter Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bf29d3af6807d2a97a8b7d4627104a8da9bcdcb Author: Jon Hunter Date: Tue Feb 9 15:24:56 2016 +0000 irqchip/gic: Only populate set_affinity for the root controller Setting the affinity of an IRQ, it only applicable for the root interrupt controller and so only populate this operator for the root controller. Acked-by: Marc Zyngier Signed-off-by: Jon Hunter Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8e7199c2c50fff1969302643171eaa33f1ca148f Author: Daniel Stone Date: Mon Feb 8 21:12:58 2016 +0000 component: remove device from master match list on failed add Calling component_add() may result in the completion of a set of devices, which will try to bring up a master. In bringing the master up, we populate its match array with the current set of children. If binding any of the devices fails, component_add() itself will fail, free the struct component entry, and return to the caller. The now-freed entry is never removed from the master's match array, and will later be used in a futile attempt to bind to freed memory. Bring component_add's behaviour on failure to bring up a master into line with component_del by removing the (to-be-freed) component from the master's match array. The specific case which broke was: - rockchip_drm_drv adds a component master - dwhdmi_rockchip adds a child component in probe (master incomplete) - rockchip_drm_vop adds two children in probe, which completes the set - inside component_add, we try to bring up the master, having populated the master's match array, and fail with EPROBE_DEFER from dwhdmi_rockchip; we delete the putative component - rockchip_drm_vop's probe fails and returns EPROBE_DEFER - we later re-probe rockchip_drm_vop and add the component; the master is complete, so we attempt to bring it up again - walking the match array, we find the previous child, whose master pointer doesn't match (as it has been freed in the meantime) - rockchip_drm_vop probe fails, and will never be attempted again Fixes: ffc30b74fd6d01588bd3fdebc3b1acc0857e6fc8 Signed-off-by: Daniel Stone Cc: Russell King Cc: Thierry Reding Cc: Laurent Pinchart Signed-off-by: Russell King drivers/base/component.c | 2 ++ 1 file changed, 2 insertions(+) commit 5327c7dbd1a7fd980608f44789076a636e5ee5fc Author: Quinn Tran Date: Wed Feb 10 18:59:14 2016 -0500 qla2xxx: use TARGET_SCF_USE_CPUID flag to indiate CPU Affinity Signed-off-by: Quinn Tran Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Fixes: fb3269b ("qla2xxx: Add selective command queuing") Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 4 ++-- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 9095adaab8c1d82707e4e9961b6ad79b62f3361b Author: Quinn Tran Date: Wed Feb 10 18:59:13 2016 -0500 target/transport: add flag to indicate CPU Affinity is observed Signed-off-by: Quinn Tran Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Fixes: fb3269b ("qla2xxx: Add selective command queuing") Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 12 +++++++++--- include/target/target_core_base.h | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) commit 2e498f25b0daa9dec761e3e880024ff7417f2445 Author: Nicholas Bellinger Date: Wed Feb 10 20:34:56 2016 -0800 target: Fix incorrect unmap_zeroes_data_store return This patch fixes an incorrect return of zero from the new unmap_zeroes_data_store() configfs store attribute handler introduced in v4.5-rc1, to use the correct 'count' bytes return value. Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43d871f029dadfff1bab1ebe24c4268b86801ca5 Merge: e410e34 0c0fe3b Author: Chris Mason Date: Wed Feb 10 16:51:38 2016 -0800 Merge branch 'integration-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.5 commit bf26927b2c0780609e6e5361d177cf10107065f3 Author: Peter Ujfalusi Date: Tue Feb 9 13:46:57 2016 +0200 ARM: DTS: am57xx-beagle-x15: Select SYS_CLK2 for audio clocks The tlv320aic3104 codec's master clock is coming from the SoC's CLKOUT2. Select the SYS_CLK2 (via divider) as parent clock for CLKOUT2 and select the same clock (SYS_CLK2) for McASP3 AHCLKX clock as well. SYS_CLK2 is sourced from an external oscillator running 22.5792MHz and it is coming in to the SoC via the X1_OSC1. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-beagle-x15.dts | 4 ++++ 1 file changed, 4 insertions(+) commit a5b87513119248c87b9df938025d066af8ec8856 Author: Sudeep Holla Date: Mon Feb 8 21:55:53 2016 +0000 ARM: dts: am335x/am57xx: replace gpio-key,wakeup with wakeup-source property Commit 3efda00129bd ("ARM: dts: am335x: replace gpio-key,wakeup with wakeup-source property") replaces all the legacy "gpio-key,wakeup" with the unified "wakeup-source" property to prevent any further copy-paste duplication. However couple of use of these legacy property sneaked in during the merge window. This patch replaces them too. Cc: "Benoît Cousson" Cc: linux-omap@vger.kernel.org Signed-off-by: Sudeep Holla Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-shc.dts | 4 ++-- arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4b550af519854421dfec9f7732cdddeb057134b2 Author: Anton Protopopov Date: Wed Feb 10 12:50:21 2016 -0500 cifs: fix erroneous return value The setup_ntlmv2_rsp() function may return positive value ENOMEM instead of -ENOMEM in case of kmalloc failure. Signed-off-by: Anton Protopopov CC: Stable Signed-off-by: Steve French fs/cifs/cifsencrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f35dc47c1744110d4119c4aa2a00872e8a1217b Author: Ivaylo Dimitrov Date: Wed Feb 10 20:23:02 2016 +0200 ARM: OMAP2+: Set system_rev from ATAGS for n900 This fixed a regression with DT boot compared to legacy boot. Reviewed-by: Pali Rohár Tested-by: Pali Rohár Signed-off-by: Ivaylo Dimitrov [tony@atomide.com: edited patch subject to follow standard] Signed-off-by: Tony Lindgren arch/arm/mach-omap2/board-generic.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit f34d69c3e54908c97708d0d65075f7c6074fc87e Author: Insu Yun Date: Mon Feb 1 11:34:58 2016 -0500 cifs: fix potential overflow in cifs_compose_mount_options In worst case, "ip=" + sb_mountdata + ipv6 can be copied into mountdata. Therefore, for safe, it is better to add more size when allocating memory. Signed-off-by: Insu Yun Signed-off-by: Steve French fs/cifs/cifs_dfs_ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 997152f62751b7d16f1b864121c912fd19032bdf Author: Colin Ian King Date: Mon Jan 25 16:25:54 2016 +0000 cifs: remove redundant check for null string pointer server_RFC1001_name is declared as a RFC1001_NAME_LEN_WITH_NULL sized char array in struct TCP_Server_Info so the null pointer check on server_RFC1001_name is redundant and can be removed. Detected with smatch: fs/cifs/connect.c:2982 ip_rfc1001_connect() warn: this array is probably non-NULL. 'server->server_RFC1001_name' Signed-off-by: Colin Ian King Signed-off-by: Steve French fs/cifs/connect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 721675fcf277cfd345117d3abae1c5590c5fdfd4 Merge: 74c7b2a 7425f41 Author: Linus Torvalds Date: Wed Feb 10 15:11:08 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "A few more minor fixes for rc3: - One fix to ipoib - One fix to core sysfs code - Four patches that resolve an oops found in testing of ocrdma and a couple other ocrdma issues" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: RDMA/ocrdma: Fixing ocrdma debugfs directory remove RDMA/ocrdma: Fix pkey_index returned by driver in rq work completion RDMA/ocrdma: populate max_sge_rd in device attributes RDMA/ocrdma: Initialize stats resources in the driver before ib device registration. IB/sysfs: remove unused va_list args IB/IPoIB: Do not set skb truesize since using one linearskb commit c92a428f408b23215d1a27f652742094bfc50577 Merge: 388f7b1 cc1de6e Author: Dave Airlie Date: Thu Feb 11 08:39:07 2016 +1000 Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-fixes radeon and amdgpu fixes for 4.5. Highlights: - powerplay fixes for amdgpu - race fixes in the sub-allocator in radeon and amdgpu - hibernate fix for amdgpu - fix a possible circular locking in userptr handling in amdgpu * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: (21 commits) drm/amdgpu: fix issue with overlapping userptrs drm/radeon: hold reference to fences in radeon_sa_bo_new drm/amdgpu: remove unnecessary forward declaration drm/amdgpu: hold reference to fences in amdgpu_sa_bo_new (v2) drm/amdgpu: fix s4 resume drm/amdgpu/cz: plumb pg flags through to powerplay drm/amdgpu/tonga: plumb pg flags through to powerplay drma/dmgpu: move cg and pg flags into shared headers drm/amdgpu: remove unused cg defines drm/amdgpu: add a cgs interface to fetch cg and pg flags drm/amd/powerplay/tonga: disable vce pg drm/amd/powerplay/tonga: disable uvd pg drm/amd/powerplay/cz: disable vce pg drm/amd/powerplay/cz: disable uvd pg drm/amdgpu: be consistent with uvd cg flags drm/amdgpu: clean up vce pg flags for cz/st drm/amdgpu: handle vce pg flags properly drm/amdgpu: handle uvd pg flags properly drm/amdgpu/dpm/ci: switch over to the common pcie caps interface drm/amdgpu/cik: don't mess with aspm if gpu is root bus ... commit a1b14d27ed0965838350f1377ff97c93ee383492 Author: Daniel Borkmann Date: Wed Feb 10 16:47:11 2016 +0100 bpf: fix branch offset adjustment on backjumps after patching ctx expansion When ctx access is used, the kernel often needs to expand/rewrite instructions, so after that patching, branch offsets have to be adjusted for both forward and backward jumps in the new eBPF program, but for backward jumps it fails to account the delta. Meaning, for example, if the expansion happens exactly on the insn that sits at the jump target, it doesn't fix up the back jump offset. Analysis on what the check in adjust_branches() is currently doing: /* adjust offset of jmps if necessary */ if (i < pos && i + insn->off + 1 > pos) insn->off += delta; else if (i > pos && i + insn->off + 1 < pos) insn->off -= delta; First condition (forward jumps): Before: After: insns[0] insns[0] insns[1] <--- i/insn insns[1] <--- i/insn insns[2] <--- pos insns[P] <--- pos insns[3] insns[P] `------| delta insns[4] <--- target_X insns[P] `-----| insns[5] insns[3] insns[4] <--- target_X insns[5] First case is if we cross pos-boundary and the jump instruction was before pos. This is handeled correctly. I.e. if i == pos, then this would mean our jump that we currently check was the patchlet itself that we just injected. Since such patchlets are self-contained and have no awareness of any insns before or after the patched one, the delta is correctly not adjusted. Also, for the second condition in case of i + insn->off + 1 == pos, means we jump to that newly patched instruction, so no offset adjustment are needed. That part is correct. Second condition (backward jumps): Before: After: insns[0] insns[0] insns[1] <--- target_X insns[1] <--- target_X insns[2] <--- pos <-- target_Y insns[P] <--- pos <-- target_Y insns[3] insns[P] `------| delta insns[4] <--- i/insn insns[P] `-----| insns[5] insns[3] insns[4] <--- i/insn insns[5] Second interesting case is where we cross pos-boundary and the jump instruction was after pos. Backward jump with i == pos would be impossible and pose a bug somewhere in the patchlet, so the first condition checking i > pos is okay only by itself. However, i + insn->off + 1 < pos does not always work as intended to trigger the adjustment. It works when jump targets would be far off where the delta wouldn't matter. But, for example, where the fixed insn->off before pointed to pos (target_Y), it now points to pos + delta, so that additional room needs to be taken into account for the check. This means that i) both tests here need to be adjusted into pos + delta, and ii) for the second condition, the test needs to be <= as pos itself can be a target in the backjump, too. Fixes: 9bac3d6d548e ("bpf: allow extended BPF programs access skb fields") Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74c7b2af37ad431c3b69961a5cdbd0a92292c92a Merge: 4e54169 ff84dab Author: Linus Torvalds Date: Wed Feb 10 12:21:57 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "Just small driver fixups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: colibri-vf50-ts - add missing #include Input: adp5589 - fix row 5 handling for adp5589 Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree Input: vmmouse - fix absolute device registration Input: serio - drop warnings in case of EPROBE_DEFER from serio_find_driver() Input: cap11xx - add missing of_node_put Input: sirfsoc-onkey - allow modular build Input: xpad - remove unused function commit 4e54169986d5197cc51ee1069922364c9a92d1be Merge: fb0dc5f 342decf Author: Linus Torvalds Date: Wed Feb 10 12:04:59 2016 -0800 Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: - PORTS_IMPL workaround for very early ahci controllers is misbehaving on new systems. Disabled on recent ahci versions. - Old-style PIO state machine had a horrible locking problem. Don't know how we've been getting away this far. Fixed. - Other device specific updates. * 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ahci: Intel DNV device IDs SATA libata: fix sff host state machine locking while polling libata-sff: use WARN instead of BUG on illegal host state machine state libata: disable forced PORTS_IMPL for >= AHCI 1.3 libata: blacklist a Viking flash model for MWDMA corruption drivers: ata: wake port before DMA stop for ALPM commit fb0dc5f129bc2d4763bdc237b8df0e1708c03e1e Merge: 9aece75 9a2ddda Author: Linus Torvalds Date: Wed Feb 10 11:36:19 2016 -0800 Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: - The destruction path of cgroup objects are asynchronous and multi-staged and some of them ended up destroying parents before children leading to failures in cpu and memory controllers. Ensure that parents are always destroyed after children. - cpuset mm node migration was performed synchronously while holding threadgroup and cgroup mutexes and the recent threadgroup locking update resulted in a possible deadlock. The migration is best effort and shouldn't have been performed under those locks to begin with. Made asynchronous. - Minor documentation fix. * 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: Documentation: cgroup: Fix 'cgroup-legacy' -> 'cgroup-v1' cgroup: make sure a parent css isn't freed before its children cgroup: make sure a parent css isn't offlined before its children cpuset: make mm migration asynchronous commit f11aec0d7c835c3b83e74e3fd60d2e48a850c857 Merge: 733f4c7 2256b8d 61c4a1a ee43a1a f5ede8d 6bb7451 Author: Mark Brown Date: Wed Feb 10 19:23:09 2016 +0000 Merge remote-tracking branches 'asoc/fix/rt5659', 'asoc/fix/sigmadsp', 'asoc/fix/simple', 'asoc/fix/wm5110' and 'asoc/fix/wm8960' into asoc-linus commit 733f4c79deac86d5a509f130638a2a5a18a943ea Merge: cf0d6dd 9954859 ec3995d f212c6d f5f76ea 6d514c7 Author: Mark Brown Date: Wed Feb 10 19:23:07 2016 +0000 Merge remote-tracking branches 'asoc/fix/imx-spdif', 'asoc/fix/mtk', 'asoc/fix/mxs-saif', 'asoc/fix/qcom' and 'asoc/fix/rt286' into asoc-linus commit cf0d6dd9d3b48ac91c6eff472877ea961692aa19 Merge: 97b0d5c cde6bcd 01582a8 5e82d2b d2f916a 2935bf4 5c408fe Author: Mark Brown Date: Wed Feb 10 19:23:04 2016 +0000 Merge remote-tracking branches 'asoc/fix/amd', 'asoc/fix/arizona', 'asoc/fix/dpcm', 'asoc/fix/dwc', 'asoc/fix/fsl' and 'asoc/fix/fsl-ssi' into asoc-linus commit 97b0d5c9b22dd1531139538a3c0b2f6102f3237e Merge: 6719f65 b28785f Author: Mark Brown Date: Wed Feb 10 19:23:03 2016 +0000 Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus commit 6719f657e420600443f1a78dcd987c82ece1f473 Merge: 7ff60f5 8ceffd2 Author: Mark Brown Date: Wed Feb 10 19:23:02 2016 +0000 Merge remote-tracking branch 'asoc/fix/intel-kconfig' into asoc-linus commit 7ff60f58e244a4f74589f5c5af1a1f5d4db227c3 Merge: 2022d24 38c079e Author: Mark Brown Date: Wed Feb 10 19:23:02 2016 +0000 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 2022d24e2bc03639da2630b7299d723bf88fc487 Merge: 388f7b1 41d8002 Author: Mark Brown Date: Wed Feb 10 19:23:01 2016 +0000 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus commit 01582a841493f28caf1688b2af4dafbcbee8135e Author: Richard Fitzgerald Date: Wed Feb 10 11:56:13 2016 +0000 ASoC: arizona: fref must be limited in pseudo-fractional mode When the FLL is in pseudo-fractional mode there is an additional limit on fref based on the fratio, to prevent aliasing around the Nyquist frequency. If fref exceeds this limit the refclk divider must be increased and the calculation tried again until a suitable combination of fref and fratio is found or we have to fall back to integer mode. This patch also adds some debug log prints around this code. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit cc1de6e800c253172334f8774c419dc64401cd2e Author: Christian König Date: Mon Feb 8 10:57:22 2016 +0100 drm/amdgpu: fix issue with overlapping userptrs Otherwise we could try to evict overlapping userptr BOs in get_user_pages(), leading to a possible circular locking dependency. Signed-off-by: Christian König Acked-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) commit f6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb Author: Nicolai Hähnle Date: Fri Feb 5 14:35:53 2016 -0500 drm/radeon: hold reference to fences in radeon_sa_bo_new An arbitrary amount of time can pass between spin_unlock and radeon_fence_wait_any, so we need to ensure that nobody frees the fences from under us. Based on the analogous fix for amdgpu. Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_sa.c | 5 +++++ 1 file changed, 5 insertions(+) commit b19763d0d867eb863953500a5c87f2fd663863b8 Author: Nicolai Hähnle Date: Fri Feb 5 10:49:50 2016 -0500 drm/amdgpu: remove unnecessary forward declaration Signed-off-by: Nicolai Hähnle Reviewed-by: Alex Deucher Reviewed-by: Christian König Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- 1 file changed, 2 deletions(-) commit a8d81b36267366603771431747438d18f32ae2d5 Author: Nicolai Hähnle Date: Fri Feb 5 10:59:43 2016 -0500 drm/amdgpu: hold reference to fences in amdgpu_sa_bo_new (v2) An arbitrary amount of time can pass between spin_unlock and fence_wait_any_timeout, so we need to ensure that nobody frees the fences from under us. A stress test (rapidly starting and killing hundreds of glxgears instances) ran into a deadlock in fence_wait_any_timeout after about an hour, and this race condition appears to be a plausible cause. v2: agd: rebase on upstream Signed-off-by: Nicolai Hähnle Reviewed-by: Alex Deucher Reviewed-by: Christian König Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ca19852884c8937eed89560f924f5a34cfcc22af Author: Flora Cui Date: Thu Feb 4 15:10:08 2016 +0800 drm/amdgpu: fix s4 resume No need to re-init asic if it's already been initialized. Skip IB tests since kernel processes are frozen in thaw. Signed-off-by: Flora Cui Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 9aece75c138d93bde79a2baeb9187a1109b4e952 Merge: 2178cbc d6e022f Author: Linus Torvalds Date: Wed Feb 10 11:04:05 2016 -0800 Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fixes from Tejun Heo: "Workqueue fixes for v4.5-rc3. - Remove a spurious triggering of flush dependency warning. - Officially break local execution guarantee of unbound work items and add a debug feature to flush out usages which depend on it. - Work around CPU -> NODE mapping becoming invalid on CPU offline. The branch is young but pushing out early as stable kernels are being affected" * 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup workqueue: implement "workqueue.debug_force_rr_cpu" debug feature workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs Revert "workqueue: make sure delayed work run in local cpu" workqueue: skip flush dependency checks for legacy workqueues commit 61c4a1ac4d900e743af0b363fe520405939eab47 Author: Pascal Huerst Date: Wed Feb 10 15:59:28 2016 +0100 ASoC: sigmadsp: Fix missleading return value Forwarding the return value of i2c_master_send, leads to errors later on, since i2c_master_send returns the number of bytes transmittet. Check for ret < 0 instead and return 0 otherwise. Signed-off-by: Pascal Huerst Acked-by: Lars-Peter Clausen Signed-off-by: Mark Brown sound/soc/codecs/sigmadsp-i2c.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit df9cd56421635433ee42798fdf09138367039732 Author: Linus Walleij Date: Wed Feb 3 14:47:08 2016 +0100 clk: versatile: mask VCO bits before writing The Versatile syscon ICST driver OR:s the bits into place but forgets to mask the previous value, making the code only work if the register is zero or giving haphazard results. Mask the 19 bits used by the Versatile syscon interface register. Regression caused and now fixed by yours truly. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Fixes: 179c8fb3c2a6 ("clk: versatile-icst: convert to use regmap") Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-icst.c | 3 +++ 1 file changed, 3 insertions(+) commit d6e022f1d207a161cd88e08ef0371554680ffc46 Author: Tejun Heo Date: Wed Feb 3 13:54:25 2016 -0500 workqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup When looking up the pool_workqueue to use for an unbound workqueue, workqueue assumes that the target CPU is always bound to a valid NUMA node. However, currently, when a CPU goes offline, the mapping is destroyed and cpu_to_node() returns NUMA_NO_NODE. This has always been broken but hasn't triggered often enough before 874bbfe600a6 ("workqueue: make sure delayed work run in local cpu"). After the commit, workqueue forcifully assigns the local CPU for delayed work items without explicit target CPU to fix a different issue. This widens the window where CPU can go offline while a delayed work item is pending causing delayed work items dispatched with target CPU set to an already offlined CPU. The resulting NUMA_NO_NODE mapping makes workqueue try to queue the work item on a NULL pool_workqueue and thus crash. While 874bbfe600a6 has been reverted for a different reason making the bug less visible again, it can still happen. Fix it by mapping NUMA_NO_NODE to the default pool_workqueue from unbound_pwq_by_node(). This is a temporary workaround. The long term solution is keeping CPU -> NODE mapping stable across CPU off/online cycles which is being worked on. Signed-off-by: Tejun Heo Reported-by: Mike Galbraith Cc: Tang Chen Cc: Rafael J. Wysocki Cc: Len Brown Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/g/1454424264.11183.46.camel@gmail.com Link: http://lkml.kernel.org/g/1453702100-2597-1-git-send-email-tangchen@cn.fujitsu.com kernel/workqueue.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 342decff2b846b46fa61eb5ee40986fab79a9a32 Author: Alexandra Yates Date: Fri Feb 5 15:27:49 2016 -0800 ahci: Intel DNV device IDs SATA Adding Intel codename DNV platform device IDs for SATA. Signed-off-by: Alexandra Yates Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org drivers/ata/ahci.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ed8b0de5a33d2a2557dce7f9429dca8cb5bc5879 Author: Peter Jones Date: Mon Feb 8 14:48:15 2016 -0500 efi: Make efivarfs entries immutable by default "rm -rf" is bricking some peoples' laptops because of variables being used to store non-reinitializable firmware driver data that's required to POST the hardware. These are 100% bugs, and they need to be fixed, but in the mean time it shouldn't be easy to *accidentally* brick machines. We have to have delete working, and picking which variables do and don't work for deletion is quite intractable, so instead make everything immutable by default (except for a whitelist), and make tools that aren't quite so broad-spectrum unset the immutable flag. Signed-off-by: Peter Jones Tested-by: Lee, Chun-Yi Acked-by: Matthew Garrett Signed-off-by: Matt Fleming Documentation/filesystems/efivarfs.txt | 7 +++ drivers/firmware/efi/vars.c | 87 +++++++++++++++++++------- fs/efivarfs/file.c | 70 +++++++++++++++++++++ fs/efivarfs/inode.c | 30 +++++---- fs/efivarfs/internal.h | 3 +- fs/efivarfs/super.c | 9 ++- include/linux/efi.h | 2 + tools/testing/selftests/efivarfs/efivarfs.sh | 19 +++++- tools/testing/selftests/efivarfs/open-unlink.c | 72 ++++++++++++++++++++- 9 files changed, 258 insertions(+), 41 deletions(-) commit 8282f5d9c17fe15a9e658c06e3f343efae1a2a2f Author: Peter Jones Date: Mon Feb 8 14:48:14 2016 -0500 efi: Make our variable validation list include the guid All the variables in this list so far are defined to be in the global namespace in the UEFI spec, so this just further ensures we're validating the variables we think we are. Including the guid for entries will become more important in future patches when we decide whether or not to allow deletion of variables based on presence in this list. Signed-off-by: Peter Jones Tested-by: Lee, Chun-Yi Acked-by: Matthew Garrett Signed-off-by: Matt Fleming drivers/firmware/efi/efivars.c | 5 ++-- drivers/firmware/efi/vars.c | 52 +++++++++++++++++++++++++++--------------- include/linux/efi.h | 3 ++- 3 files changed, 38 insertions(+), 22 deletions(-) commit 0ad4ece5bbd4d2104564c7dbd477ae0c729d4fcc Author: Emmanuel Grumbach Date: Wed Feb 10 18:13:30 2016 +0200 iwlwifi: dvm: remove a wrong dependency on m This was wronly added when the dependency on IWLWIFI was removed. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=112201 Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ed3f9fd1e865975ceefdb2a43b453e090b1fd787 Author: Rasmus Villemoes Date: Tue Feb 9 21:11:13 2016 +0100 drm/i915: fix error path in intel_setup_gmbus() This fails to undo the setup for pin==0; moreover, something interesting happens if the setup failed already at pin==0. Signed-off-by: Rasmus Villemoes Fixes: f899fc64cda8 ("drm/i915: use GMBUS to manage i2c links") Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1455048677-19882-3-git-send-email-linux@rasmusvillemoes.dk (cherry picked from commit 2417c8c03f508841b85bf61acc91836b7b0e2560) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e04a28d45ff343b47a4ffc4dee3a3e279e76ddfa Author: Will Deacon Date: Wed Feb 10 16:05:28 2016 +0000 arm64: debug: re-enable irqs before sending breakpoint SIGTRAP force_sig_info can sleep under an -rt kernel, so attempting to send a breakpoint SIGTRAP with interrupts disabled yields the following BUG: BUG: sleeping function called from invalid context at /kernel-source/kernel/locking/rtmutex.c:917 in_atomic(): 0, irqs_disabled(): 128, pid: 551, name: test.sh CPU: 5 PID: 551 Comm: test.sh Not tainted 4.1.13-rt13 #7 Hardware name: Freescale Layerscape 2085a RDB Board (DT) Call trace: dump_backtrace+0x0/0x128 show_stack+0x24/0x30 dump_stack+0x80/0xa0 ___might_sleep+0x128/0x1a0 rt_spin_lock+0x2c/0x40 force_sig_info+0xcc/0x210 brk_handler.part.2+0x6c/0x80 brk_handler+0xd8/0xe8 do_debug_exception+0x58/0xb8 This patch fixes the problem by ensuring that interrupts are enabled prior to sending the SIGTRAP if they were already enabled in the user context. Reported-by: Yang Shi Signed-off-by: Will Deacon arch/arm64/kernel/debug-monitors.c | 48 +++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 26 deletions(-) commit 39748841a719c9b4ca41cedc299ca7605a22051c Author: Lyude Date: Thu Feb 4 10:43:21 2016 -0500 drm/i915/skl: Fix typo in DPLL_CFGCR1 definition We accidentally point both cfgcr registers for the second shared DPLL to the same location in i915_reg.h. This results in a lot of hw pipe state mismatches whenever we try to do a modeset that requires allocating the DPLL to a CRTC: [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.cfgcr1 (expected 0x80000168, found 0x000004a5) [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in base.adjusted_mode.crtc_clock (expected 108000, found 49500) [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in port_clock (expected 108000, found 49500) This usually ends up causing blank monitors, since the DPLL never can get set to the right clock. Fixes: 086f8e84a085 ("drm/i915: Prefix raw register defines with underscore") Signed-off-by: Lyude Cc: drm-intel-fixes@lists.freedesktop.org Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1454600601-21900-1-git-send-email-cpaul@redhat.com (cherry picked from commit da3b891b0fb88605bb2d16adaf1ef2a1f16403ba) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a32ef81c9889c9554a3c4b465c4ee7b2d26c6b10 Author: Chris Paterson Date: Wed Feb 10 14:07:01 2016 +0000 mmc: sh_mmcif: Correct TX DMA channel allocation Commit 27cbd7e815a8 ("mmc: sh_mmcif: rework dma channel handling") introduced a typo causing the TX DMA channel allocation to be overwritten by the requested RX DMA channel. Fixes: 27cbd7e815a8 ("mmc: sh_mmcif: rework dma channel handling") Signed-off-by: Chris Paterson Acked-by: Laurent Pinchart Acked-by: Arnd Bergmann Signed-off-by: Ulf Hansson drivers/mmc/host/sh_mmcif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d849b02336be103d312c1574d6f7314d5c0bc9f Author: Lyude Date: Tue Feb 2 10:49:43 2016 -0500 drm/i915/skl: Don't skip mst encoders in skl_ddi_pll_select() We don't actually check for INTEL_OUTPUT_DP_MST at all in here, as a result we skip assigning a DPLL to any DP MST ports, which makes link training fail: [ 1442.933896] [drm:intel_power_well_enable] enabling DDI D power well [ 1442.933905] [drm:skl_set_power_well] Enabling DDI D power well [ 1442.933957] [drm:intel_mst_pre_enable_dp] 0 [ 1442.935474] [drm:intel_dp_set_signal_levels] Using signal levels 00000000 [ 1442.935477] [drm:intel_dp_set_signal_levels] Using vswing level 0 [ 1442.935480] [drm:intel_dp_set_signal_levels] Using pre-emphasis level 0 [ 1442.936190] [drm:intel_dp_set_signal_levels] Using signal levels 05000000 [ 1442.936193] [drm:intel_dp_set_signal_levels] Using vswing level 1 [ 1442.936195] [drm:intel_dp_set_signal_levels] Using pre-emphasis level 1 [ 1442.936858] [drm:intel_dp_set_signal_levels] Using signal levels 08000000 [ 1442.936862] [drm:intel_dp_set_signal_levels] Using vswing level 2 … [ 1442.998253] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many full retries, give up [ 1442.998512] [drm:intel_dp_start_link_train [i915]] *ERROR* failed to train DP, aborting After which the pipe state goes completely out of sync: [ 70.075596] [drm:check_crtc_state] [CRTC:25] [ 70.075696] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in ddi_pll_sel (expected 0x00000000, found 0x00000001) [ 70.075747] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in shared_dpll (expected -1, found 0) [ 70.075798] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.ctrl1 (expected 0x00000000, found 0x00000021) [ 70.075840] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.cfgcr1 (expected 0x00000000, found 0x80400173) [ 70.075884] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.cfgcr2 (expected 0x00000000, found 0x000003a5) [ 70.075954] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in base.adjusted_mode.crtc_clock (expected 262750, found 72256) [ 70.075999] [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in port_clock (expected 540000, found 148500) And if you're especially lucky, it keeps going downhill: [ 83.309256] Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler [ 83.309265] [ 83.309265] ================================= [ 83.309266] [ INFO: inconsistent lock state ] [ 83.309267] 4.5.0-rc1Lyude-Test #265 Not tainted [ 83.309267] --------------------------------- [ 83.309268] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. [ 83.309270] Xorg/1194 [HC0[1]:SC0[0]:HE1:SE1] takes: [ 83.309293] (&(&dev_priv->uncore.lock)->rlock){?.-...}, at: [] gen9_write32+0x63/0x400 [i915] [ 83.309293] {IN-HARDIRQ-W} state was registered at: [ 83.309297] [] __lock_acquire+0x9c4/0x1d00 [ 83.309299] [] lock_acquire+0xce/0x1c0 [ 83.309302] [] _raw_spin_lock_irqsave+0x56/0x90 [ 83.309321] [] gen9_read32+0x52/0x3d0 [i915] [ 83.309332] [] gen8_irq_handler+0x27a/0x6a0 [i915] [ 83.309337] [] handle_irq_event_percpu+0x41/0x300 [ 83.309339] [] handle_irq_event+0x39/0x60 [ 83.309341] [] handle_edge_irq+0x74/0x130 [ 83.309344] [] handle_irq+0x73/0x120 [ 83.309346] [] do_IRQ+0x61/0x120 [ 83.309348] [] ret_from_intr+0x0/0x20 [ 83.309351] [] cpuidle_enter_state+0x105/0x330 [ 83.309353] [] cpuidle_enter+0x17/0x20 [ 83.309356] [] call_cpuidle+0x2a/0x50 [ 83.309358] [] cpu_startup_entry+0x26d/0x3a0 [ 83.309360] [] rest_init+0x13a/0x140 [ 83.309363] [] start_kernel+0x475/0x482 [ 83.309365] [] x86_64_start_reservations+0x2a/0x2c [ 83.309367] [] x86_64_start_kernel+0x13b/0x14a Fixes: 82d354370189 ("drm/i915/skl: Implementation of SKL DPLL programming") Signed-off-by: Lyude Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1454428183-994-1-git-send-email-cpaul@redhat.com (cherry picked from commit 78385cb398748debb7ea2e36d6d2001830c172bc) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b96d6a80c95815fd01e99a239cd515fc05e5f867 Author: Zubair Lutfullah Kakakhel Date: Wed Feb 10 13:56:25 2016 +0000 MIPS: Octeon: Update OCTEON_FEATURE_PCIE for Octeon III Currently the driver tries to probe the pci driver and oops. Add CN7XXX to case so that driver probes the pcie driver. Signed-off-by: Zubair Lutfullah Kakakhel Cc: david.daney@cavium.com Cc: matt.redfearn@imgtec.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12530/ Signed-off-by: Ralf Baechle arch/mips/include/asm/octeon/octeon-feature.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 33bee520cbaee22118fb96ab500ba4cd4e8cb749 Author: Enrico Jorns Date: Tue Nov 24 16:29:22 2015 +0100 drm/imx: Add missing DRM_FORMAT_RGB565 to ipu_plane_formats DRM_FORMAT_RGB565 is missing from ipu_plane_formats. The support is there, just need to make it available to userspace. Signed-off-by: Enrico Jorns Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 1 + 1 file changed, 1 insertion(+) commit 6c8b66ed0aaf888bfa2545796bf769c1c4593d58 Author: Lucas Stach Date: Tue Nov 3 12:02:17 2015 +0100 drm/imx: notify DRM core about CRTC vblank state Make sure the DRM core is aware that there will be no vblank interrupts incoming if the CRTC is disabled. That way the core will reject any attempts from userspace to wait on a vblank event on a disabled CRTC. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-crtc.c | 2 ++ 1 file changed, 2 insertions(+) commit 596a65d152fdc777ee7a2c7cbea9a7916350bed1 Author: David Jander Date: Thu Jul 2 16:21:57 2015 +0200 gpu: ipu-v3: Reset IPU before activating IRQ If we don't come out of a clean reset, make sure no IRQ is fired before everything is setup by resetting the IPU before activating the interrupt handlers. Signed-off-by: David Jander Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 17e0521750399205f432966e602e125294879cdd Author: Philipp Zabel Date: Mon Jan 4 17:32:26 2016 +0100 gpu: ipu-v3: Do not bail out on missing optional port nodes The port nodes are documented as optional, treat them accordingly. Reported-by: Martin Fuzzey Reported-by: Chris Healy Signed-off-by: Philipp Zabel Fixes: 304e6be652e2 ("gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports") drivers/gpu/ipu-v3/ipu-common.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 3dcb1f55dfc7631695e69df4a0d589ce5274bd07 Author: Peter Jones Date: Mon Feb 8 14:48:13 2016 -0500 efi: Do variable name validation tests in utf8 Actually translate from ucs2 to utf8 before doing the test, and then test against our other utf8 data, instead of fudging it. Signed-off-by: Peter Jones Acked-by: Matthew Garrett Tested-by: Lee, Chun-Yi Signed-off-by: Matt Fleming drivers/firmware/efi/vars.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit e0d64e6a880e64545ad7d55786aa84ab76bac475 Author: Peter Jones Date: Mon Feb 8 14:48:12 2016 -0500 efi: Use ucs2_as_utf8 in efivarfs instead of open coding a bad version Translate EFI's UCS-2 variable names to UTF-8 instead of just assuming all variable names fit in ASCII. Signed-off-by: Peter Jones Acked-by: Matthew Garrett Tested-by: Lee, Chun-Yi Signed-off-by: Matt Fleming drivers/firmware/efi/efivars.c | 30 +++++++++++------------------- fs/efivarfs/super.c | 7 +++---- 2 files changed, 14 insertions(+), 23 deletions(-) commit 73500267c930baadadb0d02284909731baf151f7 Author: Peter Jones Date: Mon Feb 8 14:48:11 2016 -0500 lib/ucs2_string: Add ucs2 -> utf8 helper functions This adds ucs2_utf8size(), which tells us how big our ucs2 string is in bytes, and ucs2_as_utf8, which translates from ucs2 to utf8.. Signed-off-by: Peter Jones Tested-by: Lee, Chun-Yi Acked-by: Matthew Garrett Signed-off-by: Matt Fleming include/linux/ucs2_string.h | 4 +++ lib/ucs2_string.c | 62 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit b888d232142c0ac111c7e82d1731c6fbd56fc1fe Author: Anton Protopopov Date: Sun Feb 7 02:27:32 2016 -0200 [media] media: i2c/adp1653: probe: fix erroneous return value The adp1653_probe() function may return positive value EINVAL which is obviously wrong. Signed-off-by: Anton Protopopov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adp1653.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f388a9210e2a2c1cd83a5580b74aa13876dbf14 Author: Wei Yongjun Date: Fri Feb 5 11:52:00 2016 -0200 [media] media: davinci_vpfe: fix missing unlock on error in vpfe_prepare_pipeline() Add the missing unlock before return from function vpfe_prepare_pipeline() in the error handling case. video->lock is lock/unlock in function vpfe_open(), and no need to unlock it here, so remove unlock video->lock. Signed-off-by: Wei Yongjun Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1902750b50757804775d56a1cfc9f827f734e755 Merge: 461547f 7e05915 Author: David S. Miller Date: Wed Feb 10 05:50:16 2016 -0500 Merge branch 'ovs-tunnel-mtu' David Wragg says: ==================== Set a large MTU on ovs-created tunnel devices Prior to 4.3, openvswitch tunnel vports (vxlan, gre and geneve) could transmit vxlan packets of any size, constrained only by the ability to send out the resulting packets. 4.3 introduced netdevs corresponding to tunnel vports. These netdevs have an MTU, which limits the size of a packet that can be successfully encapsulated. The default MTU values are low (1500 or less), which is awkwardly small in the context of physical networks supporting jumbo frames, and leads to a conspicuous change in behaviour for userspace. This patch series sets the MTU on openvswitch-created netdevs to be the relevant maximum (i.e. the maximum IP packet size minus any relevant overhead), effectively restoring the behaviour prior to 4.3. Where relevant, the limits on MTU values that can be directly set on the netdevs are also relaxed. Changes in v2: * Extend to all openvswitch tunnel types, i.e. gre and geneve as well * Use IP_MAX_MTU Changes in v3: * Fix block comment style ==================== Signed-off-by: David S. Miller commit 7e059158d57b79159eaf1f504825d19866ef2c42 Author: David Wragg Date: Wed Feb 10 00:05:58 2016 +0000 vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices Prior to 4.3, openvswitch tunnel vports (vxlan, gre and geneve) could transmit vxlan packets of any size, constrained only by the ability to send out the resulting packets. 4.3 introduced netdevs corresponding to tunnel vports. These netdevs have an MTU, which limits the size of a packet that can be successfully encapsulated. The default MTU values are low (1500 or less), which is awkwardly small in the context of physical networks supporting jumbo frames, and leads to a conspicuous change in behaviour for userspace. Instead, set the MTU on openvswitch-created netdevs to be the relevant maximum (i.e. the maximum IP packet size minus any relevant overhead), effectively restoring the behaviour prior to 4.3. Signed-off-by: David Wragg Signed-off-by: David S. Miller drivers/net/geneve.c | 18 ++++++++++++++---- drivers/net/vxlan.c | 11 ++++++++--- include/net/ip_tunnels.h | 1 + net/ipv4/ip_gre.c | 8 ++++++++ net/ipv4/ip_tunnel.c | 20 +++++++++++++++++--- net/openvswitch/vport-vxlan.c | 2 ++ 6 files changed, 50 insertions(+), 10 deletions(-) commit 55e5bfb53cff286c1c1ff49f51325dc15c7fea63 Author: David Wragg Date: Wed Feb 10 00:05:57 2016 +0000 geneve: Relax MTU constraints Allow the MTU of geneve devices to be set to large values, in order to exploit underlying networks with larger frame sizes. GENEVE does not have a fixed encapsulation overhead (an openvswitch rule can add variable length options), so there is no relevant maximum MTU to enforce. A maximum of IP_MAX_MTU is used instead. Encapsulated packets that are too big for the underlying network will get dropped on the floor. Signed-off-by: David Wragg Signed-off-by: David S. Miller drivers/net/geneve.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 72564b59ffc438ea103b0727a921aaddce766728 Author: David Wragg Date: Wed Feb 10 00:05:55 2016 +0000 vxlan: Relax MTU constraints Allow the MTU of vxlan devices without an underlying device to be set to larger values (up to a maximum based on IP packet limits and vxlan overhead). Previously, their MTUs could not be set to higher than the conventional ethernet value of 1500. This is a very arbitrary value in the context of vxlan, and prevented vxlan devices from being able to take advantage of jumbo frames etc. The default MTU remains 1500, for compatibility. Signed-off-by: David Wragg Acked-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 6ec9249a83b00a754af435ed57ad02ffed105d93 Author: Lokesh Vutla Date: Thu Jan 28 19:08:51 2016 +0530 gpio: davinci: Fix the number of controllers allocated Driver only needs to allocate for [ngpio / 32] controllers, as each controller handles 32 gpios. But the current driver allocates for ngpio of which the extra allocated are unused. Fix it be registering only the required number of controllers. Signed-off-by: Lokesh Vutla Signed-off-by: Keerthy Reviewed-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 310a7e60435151ccab6dc4bc64b4b3a93b89c0d1 Author: Keerthy Date: Thu Jan 28 19:08:50 2016 +0530 gpio: davinci: Add the missing of-node pointer Currently the first parameter of irq_domain_add_legacy is NULL. irq_find_host function returns NULL when we do not populate the of_node and hence irq_of_parse_and_map call fails whenever we want to request a gpio irq. This fixes the request_irq failures for gpio interrupts. Signed-off-by: Keerthy Reviewed-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaa0bf22cb84c7b29c814f3fcf3951c747b904d6 Author: Wei Yongjun Date: Sat Feb 6 22:24:19 2016 +0800 MIPS: pci-mt7620: Fix return value check in mt7620_pci_probe() In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Acked-by: John Crispin Cc: Matthias Brugger Cc: linux-mips@linux-mips.org Cc: linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12451/ Signed-off-by: Ralf Baechle arch/mips/pci/pci-mt7620.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 232f5dd78586a684a7364a486b934e19384189dc Author: Heiko Carstens Date: Tue Feb 9 12:03:31 2016 +0100 s390/oprofile: fix address range for asynchronous stack git commit dc7ee00d4771 ("s390: lowcore stack pointer offsets") introduced a regression in regard to s390_backtrace(). The stack pointer for the asynchronous stack in the lowcore now has an additional offset applied. This offset needs to be taken into account in the calculation for the low and high address for the stack. This bug was already partially fixed with commit 9cc5c206d9b4 ("s390/dumpstack: fix address ranges for asynchronous and panic stack"). This patch fixes it also for the oprofile code. Fixes: dc7ee00d4771 ("s390: lowcore stack pointer offsets") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/oprofile/backtrace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1f8cbb9c8365061d8b866e9b4f4403e029d57989 Author: Heiko Carstens Date: Tue Feb 9 12:00:16 2016 +0100 s390/perf_event: fix address range for asynchronous stack git commit dc7ee00d4771 ("s390: lowcore stack pointer offsets") introduced a regression in regard to perf_callchain_kernel(). The stack pointer for the asynchronous stack in the lowcore now has an additional offset applied. This offset needs to be taken into account in the calculation for the low and high address for the stack. This bug was already partially fixed with 9cc5c206d9b4 ("s390/dumpstack: fix address ranges for asynchronous and panic stack"). This patch fixes it also for the perf_event code. Fixes: dc7ee00d4771 ("s390: lowcore stack pointer offsets") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_event.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e0115875c04548255212ebd7dbd90bdbe1257f48 Author: Pratyush Anand Date: Fri Jan 29 10:50:28 2016 +0530 s390/stacktrace: add save_stack_trace_regs() Implement save_stack_trace_regs, so that a stack trace of a kprobe event can be obtained. Without this we see following warning: "save_stack_trace_regs() not implemented yet." when we execute: echo stacktrace > /sys/kernel/debug/tracing/trace_options echo "p kfree" >> /sys/kernel/debug/tracing/kprobe_events echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable Reported-by: Chunyu Hu Signed-off-by: Pratyush Anand [heiko.carstens@de.ibm.com]: changed patch to use __save_stack_trace() Signed-off-by: Heiko Carstens Tested-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky arch/s390/kernel/stacktrace.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 66adce8f1f9f3bcd743a0e72c10aa850df8c5fa7 Author: Heiko Carstens Date: Mon Feb 1 14:14:04 2016 +0100 s390/stacktrace: save full stack traces save_stack_trace() only saves the stack trace of the current context (interrupt or process context). This is different to what other architectures like x86 do, which save the full stack trace across different contexts. Also extract a __save_stack_trace() helper function which will be used by a follow on patch. Signed-off-by: Heiko Carstens Tested-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky arch/s390/kernel/stacktrace.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit f6331aaccbd980a49bff1559d66abcbd46af5b0a Author: Heiko Carstens Date: Mon Feb 1 14:06:57 2016 +0100 s390/stacktrace: add missing end marker save_stack_trace() did not write the ULONG_MAX end marker if there is enough space left. So simply follow x86 and arm64. Signed-off-by: Heiko Carstens Tested-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky arch/s390/kernel/stacktrace.c | 2 ++ 1 file changed, 2 insertions(+) commit 9900c48c46d8bcf497972024c5fe366e6d9771f3 Author: Heiko Carstens Date: Mon Feb 1 10:13:05 2016 +0100 s390/stacktrace: fix address ranges for asynchronous and panic stack git commit dc7ee00d4771 ("s390: lowcore stack pointer offsets") introduced a regression in regard to save_stack_trace(). The stack pointer for the asynchronous and the panic stack in the lowcore now have an additional offset applied to them. This offset needs to be taken into account in the calculation for the low and high address for the stacks. This bug was already partially fixed with 9cc5c206d9b4 ("s390/dumpstack: fix address ranges for asynchronous and panic stack"). This patch fixes it also for the stacktrace code. Fixes: dc7ee00d4771 ("s390: lowcore stack pointer offsets") Signed-off-by: Heiko Carstens Tested-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky arch/s390/kernel/stacktrace.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 665ca9187c4087736fa57b0e00bcf33ea601fb6f Author: Heiko Carstens Date: Sun Jan 31 14:23:30 2016 +0100 s390/stacktrace: fix save_stack_trace_tsk() for current task The function save_stack_trace_tsk() did not consider that it can be used for tsk == current, for which the current stack pointer obviously cannot be found in the thread structure. Fix this and get the stack pointer with an inline assembly. This fixes e.g. the output of "cat /proc/self/stack". Before: [<0000000000000000>] (null) [] 0xffffffffffffffff After: [<000000000011b3ee>] save_stack_trace_tsk+0x56/0x98 [<0000000000366cde>] proc_pid_stack+0xae/0x108 [<00000000003636f0>] proc_single_show+0x70/0xc0 [<0000000000311fbc>] seq_read+0xcc/0x448 [<00000000002e7716>] __vfs_read+0x36/0x100 [<00000000002e872e>] vfs_read+0x76/0x130 [<00000000002e975e>] SyS_read+0x66/0xd8 [<000000000089490e>] system_call+0xd6/0x264 [] 0xffffffffffffffff Signed-off-by: Heiko Carstens Tested-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky arch/s390/kernel/stacktrace.c | 4 ++++ 1 file changed, 4 insertions(+) commit f00ab14c252ac459e86194747a1f580ab503c954 Author: Olof Johansson Date: Tue Feb 9 09:34:30 2016 -0800 mmc: block: return error on failed mmc_blk_get() This used to return -EFAULT, but the function above returns -EINVAL on the same condition so let's stick to that. The removal of error return on this path was introduced with b093410c9aef ('mmc: block: copy resp[] data on err for MMC_IOC_MULTI_CMD'). Fixes: b093410c9aef ('mmc: block: copy resp[] data on err for MMC_IOC_MULTI_CMD'). Signed-off-by: Olof Johansson Cc: Grant Grundler Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fe0e2304f560f81c1673711ac3f9a8c7c3cbb8be Author: Stephan Olbrich Date: Tue Feb 9 19:10:32 2016 +0100 spi: bcm2835aux: fix bitmask defines The bitmasks for txempty and idle interrupts were interchanged. Signed-off-by: Stephan Olbrich Reviewed-by: Eric Anholt Signed-off-by: Mark Brown drivers/spi/spi-bcm2835aux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58a66dba1beac2121d931cda4682ae4d40816af5 Author: Tony Lindgren Date: Mon Nov 30 21:39:54 2015 -0800 phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload If we reload phy-twl4030-usb, we get a warning about unbalanced pm_runtime_enable. Let's fix the issue and also fix idling of the device on unload before we attempt to shut it down. If we don't properly idle the PHY before shutting it down on removal, the twl4030 ends up consuming about 62mW of extra power compared to running idle with the module loaded. Cc: stable@vger.kernel.org Cc: Bin Liu Cc: Felipe Balbi Cc: Kishon Vijay Abraham I Cc: NeilBrown Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-twl4030-usb.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit b241d31ef2f6a289d33dcaa004714b26e06f476f Author: Tony Lindgren Date: Mon Nov 30 21:39:53 2015 -0800 phy: twl4030-usb: Relase usb phy on unload Otherwise rmmod omap2430; rmmod phy-twl4030-usb; modprobe omap2430 will try to use a non-existing phy and oops: Unable to handle kernel paging request at virtual address b6f7c1f0 ... [] (devm_usb_get_phy_by_node) from [] (omap2430_musb_init+0x44/0x2b4 [omap2430]) [] (omap2430_musb_init [omap2430]) from [] (musb_init_controller+0x194/0x878 [musb_hdrc]) Cc: stable@vger.kernel.org Cc: Bin Liu Cc: Felipe Balbi Cc: Kishon Vijay Abraham I Cc: NeilBrown Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-twl4030-usb.c | 1 + 1 file changed, 1 insertion(+) commit b82fcabe212a11698fd4b3e604d2f81d929d22f6 Author: Shawn Lin Date: Thu Jan 28 16:14:18 2016 +0800 phy: core: fix wrong err handle for phy_power_on If phy_pm_runtime_get_sync failed but we already enable regulator, current code return directly without doing regulator_disable. This patch fix this problem and cleanup err handle of phy_power_on to be more readable. Fixes: 3be88125d85d ("phy: core: Support regulator ...") Cc: # v3.18+ Cc: Roger Quadros Cc: Axel Lin Signed-off-by: Shawn Lin Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-core.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit fb2d65d28918ef4f0caa1de3d8c7416949c28b41 Author: Todd Fujinaka Date: Tue Feb 9 21:02:07 2016 -0500 SCSI: Add Marvell configuration device to VPD blacklist The Marvell 91xx configuration device also needs to be on the VPD blacklist. [mkp: Match all revisions] Signed-off-by: Todd Fujinaka Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 1 + 1 file changed, 1 insertion(+) commit dec2b2849cfccf09822d6ce3f9bc84b8c8611152 Author: Vineet Gupta Date: Sun Feb 7 12:54:35 2016 +0530 ARCv2: intc: Allow interruption by lowest priority interrupt ARC HS Cores support configurable multiple interrupt priorities of upto 16 levels. There is processor "interrupt preemption threshhold" in STATUS32.E[4:1] And several places need to set this up: 1. seed value as kernel is booting 2. seed value for user space programs 3. Arg to SLEEP instruction in idle task (what interrupt prio can wake) 4. Per-IRQ line prioirty (i.e. what is the priority of interrupt raised by a peripheral or timer or perf counter... Currently above sites use the highest priority 0. This can be potential problem when multiple priorities are supported. e.g. user space could only be interrupted by P0 interrupt, not others... So turn this over and instead make default interruption level to be the lowest priority possible 15. This should be fine even if there are fewer priority levels configured (say two: P0 HIGH, P1 LOW) This feature also effectively disables FIRQ feature if present in hardware config. With old code, a P0 interrupt would be FIRQ, needing special handling (ISR or Register Banks) which is NOT supported yet. Now it not be P0 (P15 or whatever is lowest prio) so FIRQ is not triggered. Signed-off-by: Vineet Gupta arch/arc/include/asm/irqflags-arcv2.h | 7 ++++-- arch/arc/kernel/intc-arcv2.c | 41 ++++++++++++++++++++--------------- 2 files changed, 29 insertions(+), 19 deletions(-) commit 2178cbc68f3602dc0b5949b9be2c8383ad3d93ef Merge: 7cf91ad 8244062 Author: Linus Torvalds Date: Tue Feb 9 16:40:59 2016 -0800 Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module fixes from Rusty Russell: "Fix for async_probe module param added in 4.3 (clearly not widely used yet), and a much more interesting kallsyms race which has been around approximately forever. This fix is more invasive, and will require some care in backporting, but I hated all the bandaids I could think of, so... There are some more coming, which are only for breakages introduced this cycle (livepatch), but wanted these in now" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: modules: fix longstanding /proc/kallsyms vs module insertion race. module: wrapper for symbol name. modules: fix modparam async_probe request commit ff84dabe3c6ebba517086e1161145d70ff129665 Author: Geert Uytterhoeven Date: Tue Feb 9 10:32:53 2016 -0800 Input: colibri-vf50-ts - add missing #include drivers/input/touchscreen/colibri-vf50-ts.c: In function ‘vf50_ts_probe’: drivers/input/touchscreen/colibri-vf50-ts.c:302: error: implicit declaration of function ‘of_property_read_u32’ Signed-off-by: Geert Uytterhoeven Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/colibri-vf50-ts.c | 1 + 1 file changed, 1 insertion(+) commit 7008dafb02c858411d70b82c3aeb40f93b93c67a Author: Lars-Peter Clausen Date: Tue Feb 9 09:35:33 2016 -0800 Input: adp5589 - fix row 5 handling for adp5589 The adp5589 has row 5, don't skip it when creating the GPIO mapping. Otherwise the pin gets reserved as used and it is not possible to use it as a GPIO. Signed-off-by: Lars-Peter Clausen Acked-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5589-keys.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit dc262dfaaeda7617ae0b15b5ce1252a6cd102b19 Author: Philipp Zabel Date: Tue Feb 9 09:32:42 2016 -0800 Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree A recent patch broke parsing the gain, offset, and threshold parameters from device tree. Instead of setting the cached values and writing them to the correct registers during probe, it would write the values from DT into the register address variables and never write them to the chip during normal operation. Fixes: 2e23b7a96372 ("Input: edt-ft5x06 - use generic properties API") Signed-off-by: Philipp Zabel Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit f303fccb82928790ec58eea82722bd5c54d300b3 Author: Tejun Heo Date: Tue Feb 9 17:59:38 2016 -0500 workqueue: implement "workqueue.debug_force_rr_cpu" debug feature Workqueue used to guarantee local execution for work items queued without explicit target CPU. The guarantee is gone now which can break some usages in subtle ways. To flush out those cases, this patch implements a debug feature which forces round-robin CPU selection for all such work items. The debug feature defaults to off and can be enabled with a kernel parameter. The default can be flipped with a debug config option. If you hit this commit during bisection, please refer to 041bd12e272c ("Revert "workqueue: make sure delayed work run in local cpu"") for more information and ping me. Signed-off-by: Tejun Heo Documentation/kernel-parameters.txt | 11 +++++++++++ kernel/workqueue.c | 23 +++++++++++++++++++++-- lib/Kconfig.debug | 15 +++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) commit ef557180447fa9a7a0affd3abb21ecceb4b5e125 Author: Mike Galbraith Date: Tue Feb 9 17:59:38 2016 -0500 workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs WORK_CPU_UNBOUND work items queued to a bound workqueue always run locally. This is a good thing normally, but not when the user has asked us to keep unbound work away from certain CPUs. Round robin these to wq_unbound_cpumask CPUs instead, as perturbation avoidance trumps performance. tj: Cosmetic and comment changes. WARN_ON_ONCE() dropped from empty (wq_unbound_cpumask AND cpu_online_mask). If we want that, it should be done when config changes. Signed-off-by: Mike Galbraith Signed-off-by: Tejun Heo kernel/workqueue.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) commit 26716ce124fce88f288f07738ef685d5dfe5c13f Author: Arnd Bergmann Date: Mon Jan 25 17:44:12 2016 +0100 thermal: allow u8500-thermal driver to be a module When the thermal subsystem is a loadable module, the u8500 driver fails to build: drivers/thermal/built-in.o: In function `db8500_thermal_probe': db8500_thermal.c:(.text+0x96c): undefined reference to `thermal_zone_device_register' drivers/thermal/built-in.o: In function `db8500_thermal_work': db8500_thermal.c:(.text+0xab4): undefined reference to `thermal_zone_device_update' This changes the symbol to a tristate, so Kconfig can track the dependency correctly. Signed-off-by: Arnd Bergmann Signed-off-by: Eduardo Valentin drivers/mfd/db8500-prcmu.c | 3 +++ drivers/thermal/Kconfig | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 4d2f1794c07aae55b8f25f4d8aebcafc0d3e501d Author: Arnd Bergmann Date: Mon Jan 25 17:44:11 2016 +0100 thermal: allow spear-thermal driver to be a module When the thermal subsystem is a loadable module, the spear driver fails to build: drivers/thermal/built-in.o: In function `spear_thermal_exit': spear_thermal.c:(.text+0xf8): undefined reference to `thermal_zone_device_unregister' drivers/thermal/built-in.o: In function `spear_thermal_probe': spear_thermal.c:(.text+0x230): undefined reference to `thermal_zone_device_register' This changes the symbol to a tristate, so Kconfig can track the dependency correctly. Signed-off-by: Arnd Bergmann Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d612c64d1f4d6b2464993dfeafd9ec319f774188 Author: Arnd Bergmann Date: Mon Jan 25 17:44:10 2016 +0100 thermal: spear: use __maybe_unused for PM functions The spear thermal driver hides its suspend/resume function conditionally based on CONFIG_PM, but references them based on CONFIG_PM_SLEEP, so we get a warning if the former is set but the latter is not: thermal/spear_thermal.c:58:12: warning: 'spear_thermal_suspend' defined but not used [-Wunused-function] thermal/spear_thermal.c:75:12: warning: 'spear_thermal_resume' defined but not used [-Wunused-function] This removes the #ifdef and instead uses a __maybe_uninitialized annotation to avoid the warning and improve compile-time coverage. Signed-off-by: Arnd Bergmann Signed-off-by: Eduardo Valentin drivers/thermal/spear_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 397da2d0ab0d1398242622d80a74df7245395c63 Merge: b8cb375 4dff5c7 Author: Takashi Iwai Date: Tue Feb 9 23:08:37 2016 +0100 Merge branch 'topic/core-fixes' into for-linus commit 8b477ea56383dc8b838f1f8b506e4571c14ceb30 Author: Kuninori Morimoto Date: Thu Jan 28 02:45:08 2016 +0000 thermal: rcar: enable to use thermal-zone on DT This patch enables to use thermal-zone on DT if it was calles as "renesas,rcar-thermal-gen2". Previous style (= non thermal-zone) is still supported by "renesas,rcar-thermal" to keep compatibility for "git bisect". Signed-off-by: Kuninori Morimoto Signed-off-by: Eduardo Valentin .../devicetree/bindings/thermal/rcar-thermal.txt | 37 +++++++++++++++++- drivers/thermal/rcar_thermal.c | 45 +++++++++++++++++++--- 2 files changed, 75 insertions(+), 7 deletions(-) commit 42bbe400fbef6283a28227ea262a1145b27e957f Author: Laxman Dewangan Date: Mon Feb 8 18:58:34 2016 +0530 thermal: of: use for_each_available_child_of_node for child iterator Use for_each_available_child_of_node() for iterating over each available child instead of iterating over each child and then checking their status. Signed-off-by: Laxman Dewangan Signed-off-by: Eduardo Valentin drivers/thermal/of-thermal.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 041bd12e272c53a35c54c13875839bcb98c999ce Author: Tejun Heo Date: Tue Feb 9 16:11:26 2016 -0500 Revert "workqueue: make sure delayed work run in local cpu" This reverts commit 874bbfe600a660cba9c776b3957b1ce393151b76. Workqueue used to implicity guarantee that work items queued without explicit CPU specified are put on the local CPU. Recent changes in timer broke the guarantee and led to vmstat breakage which was fixed by 176bed1de5bf ("vmstat: explicitly schedule per-cpu work on the CPU we need it to run on"). vmstat is the most likely to expose the issue and it's quite possible that there are other similar problems which are a lot more difficult to trigger. As a preventive measure, 874bbfe600a6 ("workqueue: make sure delayed work run in local cpu") was applied to restore the local CPU guarnatee. Unfortunately, the change exposed a bug in timer code which got fixed by 22b886dd1018 ("timers: Use proper base migration in add_timer_on()"). Due to code restructuring, the commit couldn't be backported beyond certain point and stable kernels which only had 874bbfe600a6 started crashing. The local CPU guarantee was accidental more than anything else and we want to get rid of it anyway. As, with the vmstat case fixed, 874bbfe600a6 is causing more problems than it's fixing, it has been decided to take the chance and officially break the guarantee by reverting the commit. A debug feature will be added to force foreign CPU assignment to expose cases relying on the guarantee and fixes for the individual cases will be backported to stable as necessary. Signed-off-by: Tejun Heo Fixes: 874bbfe600a6 ("workqueue: make sure delayed work run in local cpu") Link: http://lkml.kernel.org/g/20160120211926.GJ10810@quack.suse.cz Cc: stable@vger.kernel.org Cc: Mike Galbraith Cc: Henrique de Moraes Holschuh Cc: Daniel Bilik Cc: Jan Kara Cc: Shaohua Li Cc: Sasha Levin Cc: Ben Hutchings Cc: Thomas Gleixner Cc: Daniel Bilik Cc: Jiri Slaby Cc: Michal Hocko kernel/workqueue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 39a169b62b415390398291080dafe63aec751e0a Author: Roman Pen Date: Tue Feb 9 12:33:35 2016 -0700 block: fix module reference leak on put_disk() call for cgroups throttle get_disk(),get_gendisk() calls have non explicit side effect: they increase the reference on the disk owner module. The following is the correct sequence how to get a disk reference and to put it: disk = get_gendisk(...); /* use disk */ owner = disk->fops->owner; put_disk(disk); module_put(owner); fs/block_dev.c is aware of this required module_put() call, but f.e. blkg_conf_finish(), which is located in block/blk-cgroup.c, does not put a module reference. To see a leakage in action cgroups throttle config can be used. In the following script I'm removing throttle for /dev/ram0 (actually this is NOP, because throttle was never set for this device): # lsmod | grep brd brd 5175 0 # i=100; while [ $i -gt 0 ]; do echo "1:0 0" > \ /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device; i=$(($i - 1)); \ done # lsmod | grep brd brd 5175 100 Now brd module has 100 references. The issue is fixed by calling module_put() just right away put_disk(). Signed-off-by: Roman Pen Cc: Gi-Oh Kim Cc: Tejun Heo Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jens Axboe block/blk-cgroup.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7cf91adc0d38eb6cc8517ae45126ca7440177e61 Merge: b64e86c 8a3978a Author: Linus Torvalds Date: Tue Feb 9 10:15:16 2016 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes the following issues: API: - Fix async algif_skcipher, it was broken by recent fixes. - Fix potential race condition in algif_skcipher with ctx. - Fix potential memory corruption in algif_skcipher. - Add missing lock to crypto_user when doing an alg dump. Drivers: - marvell/cesa was testing the wrong variable for NULL after allocation. - Fix potential double-free in atmel-sha. - Fix illegal call to sleepin function from atomic context in atmel-sha" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init() crypto: atmel-sha - remove calls of clk_prepare() from atomic contexts crypto: atmel-sha - fix atmel_sha_remove() crypto: algif_skcipher - Do not set MAY_BACKLOG on the async path crypto: algif_skcipher - Do not dereference ctx without socket lock crypto: algif_skcipher - Do not assume that req is unchanged crypto: user - lock crypto_alg_list on alg dump commit b64e86cdf6a9d772c47b8e594dd173b86270fd1b Author: J. Bruce Fields Date: Wed Jul 10 16:54:34 2013 -0400 scripts: add "prune-kernel" script to clean up old kernel images Long ago, Dave Jones complained about CONFIG_LOCALVERSION_AUTO: "I don't use the auto config, because I end up filling up /boot unless I go through and clean them out by hand every time I install a new one (which I do probably a dozen or so times a day). Is there some easy way to prune old builds I'm missing?" To which Bruce replied: "I run this by hand every now and then. I'm probably doing it all wrong" And if he is running it wrong, then so am I - because I've been using this script ever since. It is true that CONFIG_LOCALVERSION_AUTO easily ends up filling your /boot partition if you don't clean up old versions regularly, and this script helps make that easier. Checked with Bruce to see that it's fine to add this to the kernel scripts. Maybe people will come up with enhancements, but more importantly, this way I won't misplace this script whenever I install a new machine and start doing custom kernels for it. Signed-off-by: Linus Torvalds scripts/prune-kernel | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit bcaf669b4bdbad09888df086d266a34e293ace85 Author: Yang Shi Date: Mon Feb 8 09:13:09 2016 -0800 arm64: disable kasan when accessing frame->fp in unwind_frame When boot arm64 kernel with KASAN enabled, the below error is reported by kasan: BUG: KASAN: out-of-bounds in unwind_frame+0xec/0x260 at addr ffffffc064d57ba0 Read of size 8 by task pidof/499 page:ffffffbdc39355c0 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x0() page dumped because: kasan: bad access detected CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119 Hardware name: Freescale Layerscape 2085a RDB Board (DT) Call trace: [] dump_backtrace+0x0/0x290 [] show_stack+0x24/0x30 [] dump_stack+0x8c/0xd8 [] kasan_report_error+0x558/0x588 [] kasan_report+0x60/0x70 [] __asan_load8+0x60/0x78 [] unwind_frame+0xec/0x260 [] get_wchan+0x110/0x160 [] do_task_stat+0xb44/0xb68 [] proc_tgid_stat+0x40/0x50 [] proc_single_show+0x88/0xd8 [] seq_read+0x370/0x770 [] __vfs_read+0xc8/0x1d8 [] vfs_read+0x94/0x168 [] SyS_read+0xb8/0x128 [] el0_svc_naked+0x24/0x28 Memory state around the buggy address: ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4 ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffffc064d57c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Since the shadow byte pointed by the report is 0, so it may mean it is just hit oob in non-current task. So, disable the instrumentation to silence these warnings. Acked-by: Andrey Ryabinin Signed-off-by: Yang Shi Signed-off-by: Will Deacon arch/arm64/kernel/stacktrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21d147880e4895e645f890904784b079f1ba76f4 Author: Christoph Hellwig Date: Tue Feb 9 10:21:22 2016 -0700 nvme: fix Kconfig description for BLK_DEV_NVME_SCSI Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d57d611505d911c6f9f81cd9bd6dbd293d66dd9f Author: Stephane Gasparini Date: Tue Feb 9 17:07:38 2016 +0100 kernel/fs: fix I/O wait not accounted for RW O_DSYNC When a process is doing Random Write with O_DSYNC flag the I/O wait are not accounted in the kernel (get_cpu_iowait_time_us). This is preventing the governor or the cpufreq driver to account for I/O wait and thus use the right pstate Signed-off-by: Stephane Gasparini Signed-off-by: Philippe Longepe Signed-off-by: Jens Axboe block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3af5a67c86a30f8cd8bfd6202709be21cedd2756 Author: Paul Burton Date: Mon Feb 8 09:46:31 2016 -0800 MIPS: Fix early CM probing Commit c014d164f21d ("MIPS: Add platform callback before initializing the L2 cache") added a platform_early_l2_init function in order to allow platforms to probe for the CM before L2 initialisation is performed, so that CM GCRs are available to mips_sc_probe. That commit actually fails to do anything useful, since it checks mips_cm_revision to determine whether it should call mips_cm_probe but the result of mips_cm_revision will always be 0 until mips_cm_probe has been called. Thus the "early" mips_cm_probe call never occurs. Fix this & drop the useless weak platform_early_l2_init function by simply calling mips_cm_probe from setup_arch. For platforms that don't select CONFIG_MIPS_CM this will be a no-op, and for those that do it removes the requirement for them to call mips_cm_probe manually (although doing so isn't harmful for now). Signed-off-by: Paul Burton Reviewed-by: Alexander Sverdlin Cc: Andrzej Hajda Cc: Aaro Koskinen Cc: Masahiro Yamada Cc: Rob Herring Cc: Peter Hurley Cc: Leonid Yegoshin Cc: Jaedon Shin Cc: James Hogan Cc: Jonas Gorski Cc: Markos Chandras Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12475/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 1 + arch/mips/mm/sc-mips.c | 10 ---------- arch/mips/mti-malta/malta-init.c | 8 -------- 3 files changed, 1 insertion(+), 18 deletions(-) commit 461547f3158978c180d74484d58e82be9b8e7357 Author: Alexander Duyck Date: Tue Feb 9 02:49:54 2016 -0800 flow_dissector: Fix unaligned access in __skb_flow_dissector when used by eth_get_headlen This patch fixes an issue with unaligned accesses when using eth_get_headlen on a page that was DMA aligned instead of being IP aligned. The fact is when trying to check the length we don't need to be looking at the flow label so we can reorder the checks to first check if we are supposed to gather the flow label and then make the call to actually get it. v2: Updated path so that either STOP_AT_FLOW_LABEL or KEY_FLOW_LABEL can cause us to check for the flow label. Reported-by: Sowmini Varadhan Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller net/core/flow_dissector.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4dff5c7b7093b19c19d3a100f8a3ad87cb7cd9e7 Author: Takashi Iwai Date: Mon Feb 8 17:26:58 2016 +0100 ALSA: timer: Fix race at concurrent reads snd_timer_user_read() has a potential race among parallel reads, as qhead and qused are updated outside the critical section due to copy_to_user() calls. Move them into the critical section, and also sanitize the relevant code a bit. Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit b8cb3750ce94d7610934465263850dcf40736bca Author: Geert Uytterhoeven Date: Sun Feb 7 15:14:15 2016 +0100 ALSA: firewire-digi00x: Drop bogus const type qualifier on dot_scrt() sound/firewire/digi00x/amdtp-dot.c:67: warning: type qualifiers ignored on function return type Drop the bogus "const" type qualifier on the return type of dot_scrt() to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/amdtp-dot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ebab40eb74a0225d5dfba72bfae317dd948fa2d Author: Takashi Iwai Date: Tue Feb 9 10:23:52 2016 +0100 ALSA: hda - Fix bad dereference of jack object The hda_jack_tbl entries are managed by snd_array for allowing multiple jacks. It's good per se, but the problem is that struct hda_jack_callback keeps the hda_jack_tbl pointer. Since snd_array doesn't preserve each pointer at resizing the array, we can't keep the original pointer but have to deduce the pointer at each time via snd_array_entry() instead. Actually, this resulted in the deference to the wrong pointer on codecs that have many pins such as CS4208. This patch replaces the pointer to the NID value as the search key. As an unexpected good side effect, this even simplifies the code, as only NID is needed in most cases. Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_generic.c | 4 ++-- sound/pci/hda/hda_jack.c | 2 +- sound/pci/hda/hda_jack.h | 2 +- sound/pci/hda/patch_ca0132.c | 5 ++++- sound/pci/hda/patch_hdmi.c | 2 +- sound/pci/hda/patch_realtek.c | 2 +- sound/pci/hda/patch_sigmatel.c | 6 +++--- 7 files changed, 13 insertions(+), 10 deletions(-) commit ed8b1d6d2c741ab26d60d499d7fbb7ac801f0f51 Author: Takashi Iwai Date: Tue Feb 9 12:02:32 2016 +0100 ALSA: timer: Fix race between stop and interrupt A slave timer element also unlinks at snd_timer_stop() but it takes only slave_active_lock. When a slave is assigned to a master, however, this may become a race against the master's interrupt handling, eventually resulting in a list corruption. The actual bug could be seen with a syzkaller fuzzer test case in BugLink below. As a fix, we need to take timeri->timer->lock when timer isn't NULL, i.e. assigned to a master, while the assignment to a master itself is protected by slave_active_lock. BugLink: http://lkml.kernel.org/r/CACT4Y+Y_Bm+7epAb=8Wi=AaWd+DYS7qawX52qxdCfOfY49vozQ@mail.gmail.com Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 4 ++++ 1 file changed, 4 insertions(+) commit f5a952c08e842cb06eb5c65947ced9b5128a62ee Author: Aaro Koskinen Date: Wed Feb 3 21:35:29 2016 +0200 of: of_mdio: Add marvell, 88e1145 to whitelist of PHY compatibilities. Commit ae461131960b ("of: of_mdio: Add a whitelist of PHY compatibilities.") missed one compatible string used in in-tree DTBs: in OCTEON, for selected boards, the kernel DTB pruning code will overwrite the DTB compatible string with "marvell,88e1145", which is missing from the whitelist. Add it. The patch fixes broken networking on EdgeRouter Lite. Fixes: ae461131960b ("of: of_mdio: Add a whitelist of PHY compatibilities.") Signed-off-by: Aaro Koskinen Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/of/of_mdio.c | 1 + 1 file changed, 1 insertion(+) commit 44361a2cc13493fc41216d33bb9a562ec3a9cc4e Author: Roger Shimizu Date: Sat Feb 6 14:59:51 2016 +0900 ARM: dts: orion5x: fix the missing mtd flash on linkstation lswtgl MTD flash stores u-boot and u-boot environment on linkstation lswtgl. The latter one can be easily read/write by u-boot-tools package in Debian. Fixes: dc57844a736f ("ARM: dts: orion5x: add buffalo linkstation ls-wtgl") Signed-off-by: Roger Shimizu Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 9d021c9d1b4b774a35d8a03d58dbf029544debda Author: Heinrich Schuchardt Date: Sun Feb 7 19:34:26 2016 +0100 ARM: dts: kirkwood: use unique machine name for ds112 Downstream packages like Debian flash-kernel use /proc/device-tree/model to determine which dtb file to install. Hence each dts in the Linux kernel should provide a unique model identifier. Commit 2d0a7addbd10 ("ARM: Kirkwood: Add support for many Synology NAS devices") created the new files kirkwood-ds111.dts and kirkwood-ds112.dts using the same model identifier. This patch provides a unique model identifier for the Synology DiskStation DS112. Fixes: 2d0a7addbd10 ("ARM: Kirkwood: Add support for many Synology NAS devices") Signed-off-by: Heinrich Schuchardt Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-ds112.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a5fd56431fe1682e870bd6ab0c276e74befbeb9 Author: Dmitry Vyukov Date: Thu Feb 4 14:40:40 2016 +0100 locking/lockdep: Fix stack trace caching logic check_prev_add() caches saved stack trace in static trace variable to avoid duplicate save_trace() calls in dependencies involving trylocks. But that caching logic contains a bug. We may not save trace on first iteration due to early return from check_prev_add(). Then on the second iteration when we actually need the trace we don't save it because we think that we've already saved it. Let check_prev_add() itself control when stack is saved. There is another bug. Trace variable is protected by graph lock. But we can temporary release graph lock during printing. Fix this by invalidating cached stack trace when we release graph lock. Signed-off-by: Dmitry Vyukov Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: glider@google.com Cc: kcc@google.com Cc: peter@hurleysoftware.com Cc: sasha.levin@oracle.com Link: http://lkml.kernel.org/r/1454593240-121647-1-git-send-email-dvyukov@google.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 08ff924e7fa7b826396f5ef1cb15656db7fb6545 Author: Lorenzo Colitti Date: Thu Feb 4 01:17:12 2016 +0900 selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables Without this, using SOCK_DESTROY in enforcing mode results in: SELinux: unrecognized netlink message type=21 for sclass=32 Signed-off-by: Lorenzo Colitti Signed-off-by: David S. Miller security/selinux/nlmsgtab.c | 1 + 1 file changed, 1 insertion(+) commit 7a84bd46647ff181eb2659fdc99590e6f16e501d Author: Xin Long Date: Wed Feb 3 23:33:30 2016 +0800 sctp: translate network order to host order when users get a hmacid Commit ed5a377d87dc ("sctp: translate host order to network order when setting a hmacid") corrected the hmacid byte-order when setting a hmacid. but the same issue also exists on getting a hmacid. We fix it by changing hmacids to host order when users get them with getsockopt. Fixes: Commit ed5a377d87dc ("sctp: translate host order to network order when setting a hmacid") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ca7f41a4957b872577807169bd7464b36aae9b9c Author: Sandeep Pillai Date: Wed Feb 3 14:40:44 2016 +0530 enic: increment devcmd2 result ring in case of timeout Firmware posts the devcmd result in result ring. In case of timeout, driver does not increment the current result pointer and firmware could post the result after timeout has occurred. During next devcmd, driver would be reading the result of previous devcmd. Fix this by incrementing result even in case of timeout. Fixes: 373fb0873d43 ("enic: add devcmd2") Signed-off-by: Sandeep Pillai Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic.h | 2 +- drivers/net/ethernet/cisco/enic/vnic_dev.c | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) commit b7d987295c74500b733a0ba07f9a9bcc4074fa83 Author: Siva Reddy Kallam Date: Wed Feb 3 14:09:38 2016 +0530 tg3: Fix for tg3 transmit queue 0 timed out when too many gso_segs tg3_tso_bug() can hit a condition where the entire tx ring is not big enough to segment the GSO packet. For example, if MSS is very small, gso_segs can exceed the tx ring size. When we hit the condition, it will cause tx timeout. tg3_tso_bug() is called to handle TSO and DMA hardware bugs. For TSO bugs, if tg3_tso_bug() cannot succeed, we have to drop the packet. For DMA bugs, we can still fall back to linearize the SKB and let the hardware transmit the TSO packet. This patch adds a function tg3_tso_bug_gso_check() to check if there are enough tx descriptors for GSO before calling tg3_tso_bug(). The caller will then handle the error appropriately - drop or lineraize the SKB. v2: Corrected patch description to avoid confusion. Signed-off-by: Siva Reddy Kallam Signed-off-by: Michael Chan Acked-by: Prashant Sreedharan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 5f74f82ea34c0da80ea0b49192bb5ea06e063593 Author: Hans Westgaard Ry Date: Wed Feb 3 09:26:57 2016 +0100 net:Add sysctl_max_skb_frags Devices may have limits on the number of fragments in an skb they support. Current codebase uses a constant as maximum for number of fragments one skb can hold and use. When enabling scatter/gather and running traffic with many small messages the codebase uses the maximum number of fragments and may thereby violate the max for certain devices. The patch introduces a global variable as max number of fragments. Signed-off-by: Hans Westgaard Ry Reviewed-by: Håkon Bugge Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/core/skbuff.c | 2 ++ net/core/sysctl_net_core.c | 10 ++++++++++ net/ipv4/tcp.c | 4 ++-- 4 files changed, 15 insertions(+), 2 deletions(-) commit e2e407dc093f530b771ee8bf8fe1be41e3cea8b3 Author: Matt Roper Date: Mon Feb 8 11:05:28 2016 -0800 drm/i915: Pretend cursor is always on for ILK-style WM calculations (v2) Due to our lack of two-step watermark programming, our driver has historically pretended that the cursor plane is always on for the purpose of watermark calculations; this helps avoid serious flickering when the cursor turns off/on (e.g., when the user moves the mouse pointer to a different screen). That workaround was accidentally dropped as we started working toward atomic watermark updates. Since we still aren't quite there yet with two-stage updates, we need to resurrect the workaround and treat the cursor as always active. v2: Tweak cursor width calculations slightly to more closely match the logic we used before the atomic overhaul began. (Ville) Cc: simdev11@outlook.com Cc: manfred.kitzbichler@gmail.com Cc: drm-intel-fixes@lists.freedesktop.org Reported-by: simdev11@outlook.com Reported-by: manfred.kitzbichler@gmail.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93892 Fixes: 43d59eda1 ("drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code (v2)") Signed-off-by: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/1454479611-6804-1-git-send-email-matthew.d.roper@intel.com (cherry picked from commit b2435692dbb709d4c8ff3b2f2815c9b8423b72bb) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1454958328-30129-1-git-send-email-matthew.d.roper@intel.com drivers/gpu/drm/i915/intel_pm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 9cf7490360bf2c46a16b7525f899e4970c5fc144 Author: Eric Dumazet Date: Tue Feb 2 19:31:12 2016 -0800 tcp: do not drop syn_recv on all icmp reports Petr Novopashenniy reported that ICMP redirects on SYN_RECV sockets were leading to RST. This is of course incorrect. A specific list of ICMP messages should be able to drop a SYN_RECV. For instance, a REDIRECT on SYN_RECV shall be ignored, as we do not hold a dst per SYN_RECV pseudo request. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111751 Fixes: 079096f103fa ("tcp/dccp: install syn_recv requests into ehash table") Reported-by: Petr Novopashenniy Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 2 +- net/ipv4/tcp_ipv4.c | 11 ++++++++--- net/ipv6/tcp_ipv6.c | 5 +++-- 3 files changed, 12 insertions(+), 6 deletions(-) commit 0e954fea5be056d13945a124bdf2b7e358d1554d Merge: 60c7e2d 5a1d5ef Author: Stephen Boyd Date: Mon Feb 8 13:50:32 2016 -0800 Merge tag 'tegra-for-4.5-clk-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-fixes Pull tegra fixes from Thierry Reding: clk: tegra: Fixes for v4.5-rc3 This set contains a bunch of miscellaneous fixes that have accumulated over the past couple of weeks, primarily for the Tegra210 support added in v4.5-rc1. * tag 'tegra-for-4.5-clk-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: super: Fix sparse warnings for functions not declared as static clk: tegra: Fix sparse warnings for functions not declared as static clk: tegra: Fix sparse warning for pll_m clk: tegra: Use definition for pll_u override bit clk: tegra: Fix warning caused by pll_u failing to lock clk: tegra: Fix clock sources for Tegra210 EMC clk: tegra: Add the APB2APE audio clock on Tegra210 clk: tegra: Add missing of_node_put() clk: tegra: Fix PLLE SS coefficients clk: tegra: Fix typos around clearing PLLE bits during enable clk: tegra: Do not disable PLLE when under hardware control clk: tegra: Fix pllx dyn step calculation clk: tegra: pll: Fix potential sleeping-while-atomic clk: tegra: Fix the misnaming of nvenc from msenc clk: tegra: Fix naming of MISC registers clk: tegra: Remove improper flags for lock_enable clk: tegra: Fix divider on VI_I2C commit 50ab8ec74a153eb30db26529088bc57dd700b24c Author: Christoph Hellwig Date: Mon Feb 8 21:11:50 2016 +0100 nfs: fix nfs_size_to_loff_t See http: //www.infradead.org/rpr.html X-Evolution-Source: 1451162204.2173.11@leira.trondhjem.org Content-Transfer-Encoding: 8bit Mime-Version: 1.0 We support OFFSET_MAX just fine, so don't round down below it. Also switch to using min_t to make the helper more readable. Signed-off-by: Christoph Hellwig Fixes: 433c92379d9c ("NFS: Clean up nfs_size_to_loff_t()") Cc: stable@vger.kernel.org # 2.6.23+ Signed-off-by: Trond Myklebust include/linux/nfs_fs.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 765bdb406de4b6132e349c5d4e077866536a9cc0 Merge: 92e6edd afc6074 Author: Linus Torvalds Date: Mon Feb 8 10:32:30 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "KVM-ARM fixes, mostly coming from the PMU work" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: arm64: KVM: Fix guest dead loop when register accessor returns false arm64: KVM: Fix comments of the CP handler arm64: KVM: Fix wrong use of the CPSR MODE mask for 32bit guests arm64: KVM: Obey RES0/1 reserved bits when setting CPTR_EL2 arm64: KVM: Fix AArch64 guest userspace exception injection commit 92e6edd685a83f8fa922f3274c362a583deea784 Merge: 4ba6a2b 320549a Author: Linus Torvalds Date: Mon Feb 8 10:20:06 2016 -0800 Merge tag 'regmap-fix-v4.5-big-endian' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fix from Mark Brown: "A single revert back to v4.4 endianness handling. Commit 29bb45f25ff3 ("regmap-mmio: Use native endianness for read/write") attempted to fix some long standing bugs in the MMIO implementation for big endian systems caused by duplicate byte swapping in both regmap and readl()/writel(). Sadly the fix makes things worse rather than better, so revert it for now" * tag 'regmap-fix-v4.5-big-endian' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: mmio: Revert to v4.4 endianness handling commit 4ba6a2b28f111e4c9621487612056d10f3f4a6ca Author: Masahiro Yamada Date: Mon Feb 8 16:09:08 2016 +0900 scatterlist: fix a typo in comment block of sg_miter_stop() Fix the doubled "started" and tidy up the following sentences. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Torvalds lib/scatterlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 52ba0746b3b44c86aee121babf3b2fd9b8f84090 Author: Ian Campbell Date: Mon Feb 8 16:02:06 2016 +0000 xen/arm: correctly handle DMA mapping of compound pages Currently xen_dma_map_page concludes that DMA to anything other than the head page of a compound page must be foreign, since the PFN of the page is that of the head. Fix the check to instead consider the whole of a compound page to be local if the PFN of the head passes the 1:1 check. We can never see a compound page which is a mixture of foreign and local sub-pages. The comment already correctly described the intention, but fixup the spelling and some grammar. This fixes the various SSH protocol errors which we have been seeing on the cubietrucks in our automated test infrastructure. This has been broken since commit 3567258d281b ("xen/arm: use hypercall to flush caches in map_page"), which was in v3.19-rc1. NB arch/arm64/.../xen/page-coherent.h also includes this file. Signed-off-by: Ian Campbell Reviewed-by: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Cc: linux-arm-kernel@lists.infradead.org Cc: stable@vger.kernel.org # v3.19+ arch/arm/include/asm/xen/page-coherent.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit c9e2f531be000af652927ee0af3a0f24f8e9e046 Author: Juergen Gross Date: Mon Feb 8 15:30:19 2016 +0100 xen/scsiback: avoid warnings when adding multiple LUNs to a domain When adding more than one LUN to a frontend a warning for a failed assignment is issued in dom0 for each already existing LUN. Avoid this warning by checking for a LUN already existing when existence is allowed (scsiback_do_add_lun() called with try == 1). As the LUN existence check is needed now for a third time, factor it out into a function. This in turn leads to a more or less complete rewrite of scsiback_del_translation_entry() which will now return a proper error code in case of failure. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: David Vrabel drivers/xen/xen-scsiback.c | 70 +++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 29 deletions(-) commit f285aa8db7cc4432c1a03f8b55ff34fe96317c11 Author: Juergen Gross Date: Mon Feb 8 15:30:18 2016 +0100 xen/scsiback: correct frontend counting When adding a new frontend to xen-scsiback don't decrement the number of active frontends in case of no error. Doing so results in a failure when trying to remove the xen-pvscsi nexus even if no domain is using it. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Cc: stable@vger.kernel.org Signed-off-by: David Vrabel drivers/xen/xen-scsiback.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5070fb14a0154f075c8b418e5bc58a620ae85a45 Author: Linus Walleij Date: Mon Feb 8 09:14:37 2016 +0100 ARM: 8517/1: ICST: avoid arithmetic overflow in icst_hz() When trying to set the ICST 307 clock to 25174000 Hz I ran into this arithmetic error: the icst_hz_to_vco() correctly figure out DIVIDE=2, RDW=100 and VDW=99 yielding a frequency of 25174000 Hz out of the VCO. (I replicated the icst_hz() function in a spreadsheet to verify this.) However, when I called icst_hz() on these VCO settings it would instead return 4122709 Hz. This causes an error in the common clock driver for ICST as the common clock framework will call .round_rate() on the clock which will utilize icst_hz_to_vco() followed by icst_hz() suggesting the erroneous frequency, and then the clock gets set to this. The error did not manifest in the old clock framework since this high frequency was only used by the CLCD, which calls clk_set_rate() without first calling clk_round_rate() and since the old clock framework would not call clk_round_rate() before setting the frequency, the correct values propagated into the VCO. After some experimenting I figured out that it was due to a simple arithmetic overflow: the divisor for 24Mhz reference frequency as reference becomes 24000000*2*(99+8)=0x132212400 and the "1" in bit 32 overflows and is lost. But introducing an explicit 64-by-32 bit do_div() and casting the divisor into (u64) we get the right frequency back, and the right frequency gets set. Tested on the ARM Versatile. Cc: stable@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: Pawel Moll Signed-off-by: Linus Walleij Signed-off-by: Russell King arch/arm/common/icst.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 117159f0b9d392fb433a7871426fad50317f06f7 Author: Takashi Iwai Date: Mon Feb 8 17:36:25 2016 +0100 ALSA: timer: Fix wrong instance passed to slave callbacks In snd_timer_notify1(), the wrong timer instance was passed for slave ccallback function. This leads to the access to the wrong data when an incompatible master is handled (e.g. the master is the sequencer timer and the slave is a user timer), as spotted by syzkaller fuzzer. This patch fixes that wrong assignment. BugLink: http://lkml.kernel.org/r/CACT4Y+Y_Bm+7epAb=8Wi=AaWd+DYS7qawX52qxdCfOfY49vozQ@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db5cffcd2bca5fafc4912446605101ec368d4d5f Author: Alex Deucher Date: Fri Feb 5 11:23:28 2016 -0500 drm/amdgpu/cz: plumb pg flags through to powerplay Enable vce and uvd pg based on single set of pg flags. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 52b52a87814b4016bb324c0d1b45eb6e6f4cea3b Author: Alex Deucher Date: Fri Feb 5 11:11:51 2016 -0500 drm/amdgpu/tonga: plumb pg flags through to powerplay Enable vce and uvd pg based on single set of pg flags. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e3b04bc790ecd6d08d4699bc60b4f5a76f7f7b6b Author: Alex Deucher Date: Fri Feb 5 10:56:22 2016 -0500 drma/dmgpu: move cg and pg flags into shared headers So they can be used by powerplay. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 32 ------- drivers/gpu/drm/amd/amdgpu/cik.c | 154 +++++++++++++++---------------- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4 +- drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 6 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 70 +++++++------- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 8 +- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 6 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +- drivers/gpu/drm/amd/include/amd_shared.h | 32 +++++++ 13 files changed, 171 insertions(+), 171 deletions(-) commit b118af7012f9bd4bdbda12681ce66f91aabffd3f Author: Alex Deucher Date: Fri Feb 5 10:37:29 2016 -0500 drm/amdgpu: remove unused cg defines Leftover from radeon. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 9 --------- 1 file changed, 9 deletions(-) commit 08d334087617ed9662d40db776c5d2c0a614315a Author: Alex Deucher Date: Fri Feb 5 10:34:28 2016 -0500 drm/amdgpu: add a cgs interface to fetch cg and pg flags Needed to pass the cg and pg info to powerplay. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 6 ++++++ drivers/gpu/drm/amd/include/cgs_common.h | 2 ++ 2 files changed, 8 insertions(+) commit f997e6f21308f0627c46caed0315ee005ef4775a Author: Alex Deucher Date: Thu Feb 4 23:48:51 2016 -0500 drm/amd/powerplay/tonga: disable vce pg Not working reliably yet. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d5afb41f82f55e6912678ea24d637b84c160d65 Author: Alex Deucher Date: Thu Feb 4 23:47:38 2016 -0500 drm/amd/powerplay/tonga: disable uvd pg Not working reliably yet. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 3 +++ 1 file changed, 3 insertions(+) commit 67a0a0fd11524bd9943635168f8380b9906fb389 Author: Alex Deucher Date: Thu Feb 4 23:42:24 2016 -0500 drm/amd/powerplay/cz: disable vce pg Not working reliably yet. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 +++ 1 file changed, 3 insertions(+) commit d4fdc08e251316e2e0710d02e65b4576ce7963d2 Author: Alex Deucher Date: Thu Feb 4 23:40:32 2016 -0500 drm/amd/powerplay/cz: disable uvd pg Not working reliably yet. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 ++ 1 file changed, 2 insertions(+) commit 35e5912d0801184b57119383da003263a21eeed1 Author: Alex Deucher Date: Thu Feb 4 23:33:56 2016 -0500 drm/amdgpu: be consistent with uvd cg flags Don't do anything if the uvd cg flags are not set. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 3 +++ drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 5 +++++ 2 files changed, 8 insertions(+) commit 0fd4af9e328c0f694d21a646232a7a62da7ec4ae Author: Alex Deucher Date: Thu Feb 4 23:31:32 2016 -0500 drm/amdgpu: clean up vce pg flags for cz/st It was already disabled elsewhere, make it offical. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 808a934fd47c1c4a1670069cbe2fae7c23068b14 Author: Alex Deucher Date: Thu Feb 4 23:29:45 2016 -0500 drm/amdgpu: handle vce pg flags properly Don't attempt to start/stop the vce block if pg is disabled. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 +++ 2 files changed, 6 insertions(+) commit b6df77fc5c42041a11ff094e5595d1e7379c917f Author: Alex Deucher Date: Thu Feb 4 23:26:56 2016 -0500 drm/amdgpu: handle uvd pg flags properly Don't attempt to start/stop the uvd block if pg is disabled. Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) commit 50171ebecf87521056db2b3d5654c4348f32c9bd Author: Alex Deucher Date: Thu Feb 4 10:44:04 2016 -0500 drm/amdgpu/dpm/ci: switch over to the common pcie caps interface We already query this at driver init, so use that info. Also handles virtualization cases. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 76ecb2c75bc772050f2e0462b9cf0163cc43046e Author: Alex Deucher Date: Thu Feb 4 10:33:59 2016 -0500 drm/amdgpu/cik: don't mess with aspm if gpu is root bus Pcie registers may not be available in a virtualized environment. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik.c | 3 +++ 1 file changed, 3 insertions(+) commit cd474ba0d6048aeefe6f1066a6bfb5eac36a2a81 Author: Alex Deucher Date: Thu Feb 4 10:21:23 2016 -0500 drm/amdgpu: add pcie cap module parameters (v2) Allows the user to force the supported pcie gen and lane config on both the asic and the chipset. Useful for debugging pcie problems and for virtualization where we may not be able to query the pcie bridge caps. Default to: gen: chipset 1/2, asic 1/2/3 lanes: 1/2/4/8/16 v2: fix bare metal case Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 147 ++++++++++++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++ 3 files changed, 92 insertions(+), 65 deletions(-) commit 44c3d0c1c0a880354e9de5d94175742e2c7c9683 Author: Eric Dumazet Date: Tue Feb 2 17:55:01 2016 -0800 ipv6: fix a lockdep splat Silence lockdep false positive about rcu_dereference() being used in the wrong context. First one should use rcu_dereference_protected() as we own the spinlock. Second one should be a normal assignation, as no barrier is needed. Fixes: 18367681a10bd ("ipv6 flowlabel: Convert np->ipv6_fl_list to RCU.") Reported-by: Dave Jones Signed-off-by: Eric Dumazet Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/ip6_flowlabel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 415e3d3e90ce9e18727e8843ae343eda5a58fad6 Author: Hannes Frederic Sowa Date: Wed Feb 3 02:11:03 2016 +0100 unix: correctly track in-flight fds in sending process user_struct The commit referenced in the Fixes tag incorrectly accounted the number of in-flight fds over a unix domain socket to the original opener of the file-descriptor. This allows another process to arbitrary deplete the original file-openers resource limit for the maximum of open files. Instead the sending processes and its struct cred should be credited. To do so, we add a reference counted struct user_struct pointer to the scm_fp_list and use it to account for the number of inflight unix fds. Fixes: 712f4aad406bb1 ("unix: properly account for FDs passed over unix sockets") Reported-by: David Herrmann Cc: David Herrmann Cc: Willy Tarreau Cc: Linus Torvalds Suggested-by: Linus Torvalds Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller include/net/af_unix.h | 4 ++-- include/net/scm.h | 1 + net/core/scm.c | 7 +++++++ net/unix/af_unix.c | 4 ++-- net/unix/garbage.c | 8 ++++---- 5 files changed, 16 insertions(+), 8 deletions(-) commit b3aff6ccbb1d25e506b60ccd9c559013903f3464 Author: Andre Przywara Date: Wed Feb 3 16:56:51 2016 +0000 KVM: arm/arm64: Fix reference to uninitialised VGIC Commit 4b4b4512da2a ("arm/arm64: KVM: Rework the arch timer to use level-triggered semantics") brought the virtual architected timer closer to the VGIC. There is one occasion were we don't properly check for the VGIC actually having been initialized before, but instead go on to check the active state of some IRQ number. If userland hasn't instantiated a virtual GIC, we end up with a kernel NULL pointer dereference: ========= Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = ffffffc9745c5000 [00000000] *pgd=00000009f631e003, *pud=00000009f631e003, *pmd=0000000000000000 Internal error: Oops: 96000006 [#2] PREEMPT SMP Modules linked in: CPU: 0 PID: 2144 Comm: kvm_simplest-ar Tainted: G D 4.5.0-rc2+ #1300 Hardware name: ARM Juno development board (r1) (DT) task: ffffffc976da8000 ti: ffffffc976e28000 task.ti: ffffffc976e28000 PC is at vgic_bitmap_get_irq_val+0x78/0x90 LR is at kvm_vgic_map_is_active+0xac/0xc8 pc : [] lr : [] pstate: 20000145 .... ========= Fix this by bailing out early of kvm_timer_flush_hwstate() if we don't have a VGIC at all. Reported-by: Cosmin Gorgovan Acked-by: Marc Zyngier Signed-off-by: Andre Przywara Signed-off-by: Marc Zyngier Cc: # 4.4.x virt/kvm/arm/arch_timer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit afc60743811828dfccc7aff94ac527c857630d4b Merge: 388f7b1 6327f35 Author: Paolo Bonzini Date: Mon Feb 8 16:20:51 2016 +0100 Merge tag 'kvm-arm-for-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/ARM fixes for v4.5-rc2 A few random fixes, mostly coming from the PMU work by Shannon: - fix for injecting faults coming from the guest's userspace - cleanup for our CPTR_EL2 accessors (reserved bits) - fix for a bug impacting perf (user/kernel discrimination) - fix for a 32bit sysreg handling bug commit 8ceffd229f0ef130530c79654e95b5fa007ae639 Author: Vinod Koul Date: Mon Feb 8 10:45:39 2016 +0530 ASoC: Intel: Add module tags for common match module The match module lacked module license and description, so add it Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/common/sst-match-acpi.c | 3 +++ 1 file changed, 3 insertions(+) commit cfffcc66a89ab6d9961b2cde6cdab2ba056451ad Author: Pierre-Louis Bossart Date: Mon Feb 8 10:45:38 2016 +0530 ASoC: Intel: Load the atom DPCM driver only DPCM driver is recommended for BYT, CHT based platforms, so if CONFIG_SND_SST_IPC_ACPI is selected then don't compile the BYT Device IDs in common ACPI driver to avoid probe conflicts. Signed-off-by: Pierre-Louis Bossart Acked-by: Jie Yang Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 4 ++-- sound/soc/intel/common/sst-acpi.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 2dcffcee23a2bd491a8c4041db3a8041b23fa4eb Author: Vinod Koul Date: Mon Feb 8 10:45:37 2016 +0530 ASoC: Intel: Create independent acpi match module The ACPI match module is common to all three drivers, HSW, SKL and Atom-DPCM driver. But Atom-DPCM driver does not use common sst code so we cannot include the common SST module in Atom-DPCM driver. So the solution is to have a independent sst-match-acpi module which helps in matching for all the three drivers. Now all driver can be inbuilt in a single image This patch really fixes the regression introduced by the commit 95f098014815 ("ASoC: Intel: Move apci find machine routines") Acked-by: Jie Yang Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 9 +++++++++ sound/soc/intel/common/Makefile | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 902c136fe4f72dfc2a616ad755c72f1ee407f79a Author: Vinod Koul Date: Mon Feb 8 10:45:36 2016 +0530 ASoC: Intel: Revert "ASoC: Intel: fix ACPI probe regression with Atom DPCM driver" This reverts commit dc901a354171 ("ASoC: Intel: fix ACPI probe regression with Atom DPCM driver") as the fix prevented the probe on HSW/BDW if Atom-DPCM was selected Acked-by: Jie Yang Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/common/Makefile | 5 ----- 1 file changed, 5 deletions(-) commit 07e7716c746dd4e43211903eac954a18192d3d14 Author: Robert Jarzmik Date: Mon Feb 8 15:17:57 2016 +0100 mmc: pxamci: fix the device-tree probe deferral path When the gpio driver is probed after the mmc one, the read/write gpio and card detection one return -EPROBE_DEFER. Unfortunately, the memory region remains requested, and upon the next probe, the probe will fail anyway with -EBUSY. Fix this by releasing the memory resource upon probe failure. More broadly, this patch uses devm_*() primitives whenever possible in the probe function. Signed-off-by: Robert Jarzmik Signed-off-by: Ulf Hansson drivers/mmc/host/pxamci.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) commit b00663124c76f69e71d118d778842471e85c6f11 Author: Alexey Khoroshilov Date: Sat Feb 6 02:36:35 2016 +0300 mmc: mmc_spi: add checks for dma mapping error There is no checks for dma mapping errors in mmc_spi. Tha patch fixes that and by the way it adds dma_unmap_single(ones_dma) that was left on a failure path mmc_spi_probe(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Ulf Hansson drivers/mmc/host/mmc_spi.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 5cc6ce9ff27565949a1001a2889a8dd9fd09e772 Author: Anton Protopopov Date: Sat Feb 6 23:31:19 2016 -0500 netfilter: nft_counter: fix erroneous return values The nft_counter_init() and nft_counter_clone() functions should return negative error value -ENOMEM instead of positive ENOMEM. Signed-off-by: Anton Protopopov Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_counter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08a7f5d3f5c38ed745c3e99ee91975f20562d272 Author: Arnd Bergmann Date: Fri Feb 5 10:20:21 2016 +0100 netfilter: tee: select NF_DUP_IPV6 unconditionally The NETFILTER_XT_TARGET_TEE option selects NF_DUP_IPV6 whenever IP6_NF_IPTABLES is enabled, and it ensures that it cannot be builtin itself if NF_CONNTRACK is a loadable module, as that is a dependency for NF_DUP_IPV6. However, NF_DUP_IPV6 can be enabled even if IP6_NF_IPTABLES is turned off, and it only really depends on IPV6. With the current check in tee_tg6, we call nf_dup_ipv6() whenever NF_DUP_IPV6 is enabled. This can however be a loadable module which is unreachable from a built-in xt_TEE: net/built-in.o: In function `tee_tg6': :(.text+0x67728): undefined reference to `nf_dup_ipv6' The bug was originally introduced in the split of the xt_TEE module into separate modules for ipv4 and ipv6, and two patches tried to fix it unsuccessfully afterwards. This is a revert of the the first incorrect attempt to fix it, going back to depending on IPV6 as the dependency, and we adapt the 'select' condition accordingly. Signed-off-by: Arnd Bergmann Fixes: bbde9fc1824a ("netfilter: factor out packet duplication for IPv4/IPv6") Fixes: 116984a316c3 ("netfilter: xt_TEE: use IS_ENABLED(CONFIG_NF_DUP_IPV6)") Fixes: 74ec4d55c4d2 ("netfilter: fix xt_TEE and xt_TPROXY dependencies") Signed-off-by: Pablo Neira Ayuso net/netfilter/Kconfig | 2 +- net/netfilter/xt_TEE.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c58d6c93680f28ac58984af61d0a7ebf4319c241 Author: Phil Turnbull Date: Tue Feb 2 13:36:45 2016 -0500 netfilter: nfnetlink: correctly validate length of batch messages If nlh->nlmsg_len is zero then an infinite loop is triggered because 'skb_pull(skb, msglen);' pulls zero bytes. The calculation in nlmsg_len() underflows if 'nlh->nlmsg_len < NLMSG_HDRLEN' which bypasses the length validation and will later trigger an out-of-bound read. If the length validation does fail then the malformed batch message is copied back to userspace. However, we cannot do this because the nlh->nlmsg_len can be invalid. This leads to an out-of-bounds read in netlink_ack: [ 41.455421] ================================================================== [ 41.456431] BUG: KASAN: slab-out-of-bounds in memcpy+0x1d/0x40 at addr ffff880119e79340 [ 41.456431] Read of size 4294967280 by task a.out/987 [ 41.456431] ============================================================================= [ 41.456431] BUG kmalloc-512 (Not tainted): kasan: bad access detected [ 41.456431] ----------------------------------------------------------------------------- ... [ 41.456431] Bytes b4 ffff880119e79310: 00 00 00 00 d5 03 00 00 b0 fb fe ff 00 00 00 00 ................ [ 41.456431] Object ffff880119e79320: 20 00 00 00 10 00 05 00 00 00 00 00 00 00 00 00 ............... [ 41.456431] Object ffff880119e79330: 14 00 0a 00 01 03 fc 40 45 56 11 22 33 10 00 05 .......@EV."3... [ 41.456431] Object ffff880119e79340: f0 ff ff ff 88 99 aa bb 00 14 00 0a 00 06 fe fb ................ ^^ start of batch nlmsg with nlmsg_len=4294967280 ... [ 41.456431] Memory state around the buggy address: [ 41.456431] ffff880119e79400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 41.456431] ffff880119e79480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 41.456431] >ffff880119e79500: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc [ 41.456431] ^ [ 41.456431] ffff880119e79580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 41.456431] ffff880119e79600: fc fc fc fc fc fc fc fc fc fc fb fb fb fb fb fb [ 41.456431] ================================================================== Fix this with better validation of nlh->nlmsg_len and by setting NFNL_BATCH_FAILURE if any batch message fails length validation. CAP_NET_ADMIN is required to trigger the bugs. Fixes: 9ea2aa8b7dba ("netfilter: nfnetlink: validate nfnetlink header from batch") Signed-off-by: Phil Turnbull Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 59fd1214561921343305a0e9dc218bf3d40068f3 Author: Ingo Molnar Date: Mon Feb 8 08:47:48 2016 +0100 x86/mm/numa: Fix 32-bit memblock range truncation bug on 32-bit NUMA kernels The following commit: a0acda917284 ("acpi, numa, mem_hotplug: mark all nodes the kernel resides un-hotpluggable") Introduced numa_clear_kernel_node_hotplug(), which function is executed during early bootup, and which marks all currently reserved memblock regions as hot-memory-unswappable as well. y14sg1 reported that when running 32-bit NUMA kernels, the grsecurity/PAX kernel patch flagged a size overflow in this function: PAX: size overflow detected in function x86_numa_init arch/x86/mm/numa.c:691 [...] ... the reason for the overflow is that memblock_clear_hotplug() takes physical addresses as arguments, while the start/end variables used by numa_clear_kernel_node_hotplug() are 'unsigned long', which is 32-bit on PAE kernels, but which has 64-bit physical addresses. So on 32-bit PAE kernels that have physical memory above the 4GB boundary, we truncate a 64-bit physical address range to 32 bits and pass it to memblock_clear_hotplug(), which at minimum prevents the original memory-hotplug bugfix from working, but might have other side effects as well. The fix is to use the proper type to handle physical addresses, phys_addr_t. Reported-by: y14sg1 Cc: Andrew Morton Cc: Brad Spengler Cc: Chen Tang Cc: "H. Peter Anvin" Cc: Lai Jiangshan Cc: Linus Torvalds Cc: PaX Team Cc: Taku Izumi Cc: Tang Chen Cc: Thomas Gleixner Cc: Wen Congyang Cc: Yasuaki Ishimatsu Cc: Zhang Yanfei Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f15838e9cac8f78f0cc506529bb9d3b9fa589c1f Author: Andreas Schwab Date: Fri Feb 5 19:50:03 2016 +0100 powerpc: Fix dedotify for binutils >= 2.26 Since binutils 2.26 BFD is doing suffix merging on STRTAB sections. But dedotify modifies the symbol names in place, which can also modify unrelated symbols with a name that matches a suffix of a dotted name. To remove the leading dot of a symbol name we can just increment the pointer into the STRTAB section instead. Backport to all stables to avoid breakage when people update their binutils - mpe. Cc: stable@vger.kernel.org Signed-off-by: Andreas Schwab Signed-off-by: Michael Ellerman arch/powerpc/kernel/module_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fd64e8213772829788309f269e15bcb28c34195 Author: Jani Nikula Date: Fri Feb 5 12:16:10 2016 +0200 drm/i915/dp: reduce missing TPS3 support errors to debug logging Per spec, TPS3 support is mandatory for downstream devices that support HBR2. We've therefore logged errors on HBR2 without TPS3 since commit 1da7d7131c35cde83f1bab8ec732b57b69bef814 Author: Jani Nikula Date: Thu Sep 3 11:16:08 2015 +0300 drm/i915: ignore link rate in TPS3 selection However, it seems there are real world devices out there that just aren't spec compliant, and still work at HBR2 using TPS2. So reduce the error message to debug logging. Cc: Ander Conselvan de Oliveira Cc: Sivakumar Thulasimani Reviewed-by: Sivakumar Thulasimani Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92932 Fixes: 1da7d7131c35 ("drm/i915: ignore link rate in TPS3 selection") Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1454667370-8001-2-git-send-email-jani.nikula@intel.com (cherry picked from commit bfcef5d2135ea1200ac1ea44661619ab8785c9f0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp_link_training.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit bf039fa9357bdd26b3f115efd8af527523212069 Author: Jani Nikula Date: Fri Feb 5 12:16:09 2016 +0200 drm/i915/dp: abstract training pattern selection Make it cleaner to add more checks in the function. No functional changes. Cc: Ander Conselvan de Oliveira Cc: Sivakumar Thulasimani Reviewed-by: Sivakumar Thulasimani Cc: drm-intel-fixes@lists.freedesktop.org # dependency on the next patch Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1454667370-8001-1-git-send-email-jani.nikula@intel.com (cherry picked from commit 23a5110dc619073b57d90c36eae383f51df03aac) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp_link_training.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit bfadcded516b121546a2d7bbfea1abe3ce946517 Author: Jani Nikula Date: Thu Feb 4 18:52:47 2016 +0200 drm/i915/dsi: skip gpio element execution when not supported Skip v3 gpio element because the support is not there, and skip gpio element on non-vlv because the sideband code is vlv specific. v2: the gpio stuff is currently only supported on vlv (Ville) Cc: drm-intel-fixes@lists.freedesktop.org Fixes: 2a33d93486f2 ("drm/i915/bios: add support for MIPI sequence block v3") Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1454604767-2440-1-git-send-email-jani.nikula@intel.com (cherry picked from commit 96afef1d5adee8722549c8c2b788d656ea2ecf21) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 26f6f2d301c1fb46acb1138ee155125815239b0d Author: Jani Nikula Date: Thu Feb 4 12:50:50 2016 +0200 drm/i915/dsi: don't pass arbitrary data to sideband Since sequence block v2 the second byte contains flags other than just pull up/down. Don't pass arbitrary data to the sideband interface. The rest may or may not work for sequence block v2, but there should be no harm done. Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/ebe3c2eee623afc4b3a134533b01f8d591d13f32.1454582914.git.jani.nikula@intel.com (cherry picked from commit 4e1c63e3761b84ec7d87c75b58bbc8bcf18e98ee) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4db3a2448ec8902310acb78de39b6227a9a56ac8 Author: Jani Nikula Date: Thu Feb 4 12:50:49 2016 +0200 drm/i915/dsi: defend gpio table against out of bounds access Do not blindly trust the VBT data used for indexing. Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/cc32d40c2b47f2d2151811855ac2c3dabab1d57d.1454582914.git.jani.nikula@intel.com (cherry picked from commit 5d2d0a12d3d08bf50434f0b5947bb73bac04b941) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 949d0b51bebce8e26cf9b57dbb59178ad3dc9832 Author: Matt Roper Date: Wed Jan 6 09:53:41 2016 -0800 drm/i915/bxt: Don't save/restore eDP panel power during suspend (v3) Our attempts save/restore panel power state in i915_suspend.c are causing unclaimed register warnings on BXT since the registers for this platform differ from older platforms. The big hammer suspend/resume shouldn't be necessary for PP since the connector/encoder hooks should already handle this. In theory we could remove this for all platforms, but in practice it's likely that would cause some regressions since older platforms with LVDS may have incomplete PP handling. For now we'll leave the PCH save/restore alone and change the non-PCH branch to only operate on gen <= 4 so that BXT and future platforms aren't included. v2: Typo fix: s/||/&&/ v3: Change non-PCH condition to a gen <= 4 test rather than listing VLV/CHV/BXT as specific platforms to exclude; should be more future-proof as we add new platforms. (Daniel) Cc: Vandana Kannan Cc: Jani Nikula Cc: Daniel Vetter Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Matt Roper Reviewed-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1452102821-17190-1-git-send-email-matthew.d.roper@intel.com (cherry picked from commit e1ea07542352be468e901173c7a1beeee404d696) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_suspend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93232aeb304bc22d1bbd2b3ff2ebb485a408cb8d Author: Chris Wilson Date: Fri Jan 22 18:32:31 2016 +0000 drm/i915: Allow i915_gem_object_get_page() on userptr as well commit 033908aed5a596f6202c848c6bbc8a40fb1a8490 Author: Dave Gordon Date: Thu Dec 10 18:51:23 2015 +0000 drm/i915: mark GEM object pages dirty when mapped & written by the CPU introduced a check into i915_gem_object_get_dirty_pages() that returned a NULL pointer when called with a bad object, one that was not backed by shmemfs. This WARN was too strict as we can work on all struct page backed objects, and resulted in a WARN + GPF for existing userspace. In order to differentiate the various types of objects, add a new flags field to the i915_gem_object_ops struct to describe their capabilities, with the first flag being whether the object has struct pages. v2: Drop silly const before an integer in the structure declaration. Testcase: igt/gem_userptr_blits/relocations Reported-and-tested-by: Kristian Høgsberg Kristensen Signed-off-by: Chris Wilson Cc: Dave Gordon Cc: Kristian Høgsberg Kristensen Cc: Daniel Vetter Reviewed-by: Dave Gordon Reviewed-by: Kristian Høgsberg Kristensen Tested-by: Michal Winiarski Signed-off-by: Rodrigo Vivi Fixes: 033908aed5a5 ("drm/i915: mark GEM object pages dirty when mapped & written by the CPU") Link: http://patchwork.freedesktop.org/patch/msgid/1453487551-16799-1-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit de4726649b6b1d7f3f02b2031ee99e067cb71e2d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/i915_gem.c | 3 ++- drivers/gpu/drm/i915/i915_gem_userptr.c | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) commit ddce57a6f0a2d8d1bfacfa77f06043bc760403c2 Author: Takashi Iwai Date: Tue Feb 2 15:27:36 2016 +0100 ALSA: dummy: Implement timer backend switching more safely Currently the selected timer backend is referred at any moment from the running PCM callbacks. When the backend is switched, it's possible to lead to inconsistency from the running backend. This was pointed by syzkaller fuzzer, and the commit [7ee96216c31a: ALSA: dummy: Disable switching timer backend via sysfs] disabled the dynamic switching for avoiding the crash. This patch improves the handling of timer backend switching. It keeps the reference to the selected backend during the whole operation of an opened stream so that it won't be changed by other streams. Together with this change, the hrtimer parameter is reenabled as writable now. NOTE: this patch also turned out to fix the still remaining race. Namely, ops was still replaced dynamically at dummy_pcm_open: static int dummy_pcm_open(struct snd_pcm_substream *substream) { .... dummy->timer_ops = &dummy_systimer_ops; if (hrtimer) dummy->timer_ops = &dummy_hrtimer_ops; Since dummy->timer_ops is common among all streams, and when the replacement happens during accesses of other streams, it may lead to a crash. This was actually triggered by syzkaller fuzzer and KASAN. This patch rewrites the code not to use the ops shared by all streams any longer, too. BugLink: http://lkml.kernel.org/r/CACT4Y+aZ+xisrpuM6cOXbL21DuM0yVxPYXf4cD4Md9uw0C3dBQ@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/drivers/dummy.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 3b2b9ead32142b4cf55ea2793e5e4f7b63c04818 Author: Stephen Boyd Date: Mon Dec 14 09:42:57 2015 +0000 nvmem: qfprom: Specify LE device endianness The qfprom is a little endian device, but so far we've been relying on the regmap mmio bus handling this for us without explicitly stating that fact. After commit 4a98da2164cf (regmap-mmio: Use native endianness for read/write, 2015-10-29), the regmap mmio bus will read/write with the __raw_*() IO accessors, instead of using the readl/writel() APIs that do proper byte swapping for little endian devices. So if we're running on a big endian processor and haven't specified the endianness explicitly in the regmap config or in DT, we're going to switch from doing little endian byte swapping to big endian accesses without byte swapping, leading to some confusing results. Specify the endianness explicitly so that the regmap core properly byte swaps the accesses for us. Cc: Rajendra Nayak Cc: Kevin Hilman Cc: Tyler Baker Cc: Simon Arlott Cc: Mark Brown Signed-off-by: Stephen Boyd Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/qfprom.c | 1 + 1 file changed, 1 insertion(+) commit 2f9ba5b2f8420e0e5712080dafc773f7dd47c3df Author: Srinivas Kandagatla Date: Mon Dec 14 09:42:38 2015 +0000 nvmem: core: return error for non word aligned access nvmem providers have restrictions on register strides, so return error when users attempt to read/write buffers with sizes which are less than word size. Without this patch the userspace would continue to try as it does not get any error from the nvmem core, resulting in a hang or endless loop in userspace. Reported-by: Ariel D'Alessandro Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 00cd29b799e3449f0c68b1cc77cd4a5f95b42d17 Author: James Bottomley Date: Wed Jan 13 08:10:31 2016 -0800 klist: fix starting point removed bug in klist iterators The starting node for a klist iteration is often passed in from somewhere way above the klist infrastructure, meaning there's no guarantee the node is still on the list. We've seen this in SCSI where we use bus_find_device() to iterate through a list of devices. In the face of heavy hotplug activity, the last device returned by bus_find_device() can be removed before the next call. This leads to Dec 3 13:22:02 localhost kernel: WARNING: CPU: 2 PID: 28073 at include/linux/kref.h:47 klist_iter_init_node+0x3d/0x50() Dec 3 13:22:02 localhost kernel: Modules linked in: scsi_debug x86_pkg_temp_thermal kvm_intel kvm irqbypass crc32c_intel joydev iTCO_wdt dcdbas ipmi_devintf acpi_power_meter iTCO_vendor_support ipmi_si imsghandler pcspkr wmi acpi_cpufreq tpm_tis tpm shpchp lpc_ich mfd_core nfsd nfs_acl lockd grace sunrpc tg3 ptp pps_core Dec 3 13:22:02 localhost kernel: CPU: 2 PID: 28073 Comm: cat Not tainted 4.4.0-rc1+ #2 Dec 3 13:22:02 localhost kernel: Hardware name: Dell Inc. PowerEdge R320/08VT7V, BIOS 2.0.22 11/19/2013 Dec 3 13:22:02 localhost kernel: ffffffff81a20e77 ffff880613acfd18 ffffffff81321eef 0000000000000000 Dec 3 13:22:02 localhost kernel: ffff880613acfd50 ffffffff8107ca52 ffff88061176b198 0000000000000000 Dec 3 13:22:02 localhost kernel: ffffffff814542b0 ffff880610cfb100 ffff88061176b198 ffff880613acfd60 Dec 3 13:22:02 localhost kernel: Call Trace: Dec 3 13:22:02 localhost kernel: [] dump_stack+0x44/0x55 Dec 3 13:22:02 localhost kernel: [] warn_slowpath_common+0x82/0xc0 Dec 3 13:22:02 localhost kernel: [] ? proc_scsi_show+0x20/0x20 Dec 3 13:22:02 localhost kernel: [] warn_slowpath_null+0x1a/0x20 Dec 3 13:22:02 localhost kernel: [] klist_iter_init_node+0x3d/0x50 Dec 3 13:22:02 localhost kernel: [] bus_find_device+0x51/0xb0 Dec 3 13:22:02 localhost kernel: [] scsi_seq_next+0x2d/0x40 [...] And an eventual crash. It can actually occur in any hotplug system which has a device finder and a starting device. We can fix this globally by making sure the starting node for klist_iter_init_node() is actually a member of the list before using it (and by starting from the beginning if it isn't). Reported-by: Ewan D. Milne Tested-by: Ewan D. Milne Cc: stable@vger.kernel.org Signed-off-by: James Bottomley Signed-off-by: Greg Kroah-Hartman lib/klist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ff978b09f973db0d0597704eba350a994d7729e6 Author: Theodore Ts'o Date: Mon Feb 8 00:54:26 2016 -0500 ext4 crypto: move context consistency check to ext4_file_open() In the case where the per-file key for the directory is cached, but root does not have access to the key needed to derive the per-file key for the files in the directory, we allow the lookup to succeed, so that lstat(2) and unlink(2) can suceed. However, if a program tries to open the file, it will get an ENOKEY error. Signed-off-by: Theodore Ts'o fs/ext4/file.c | 9 +++++++++ fs/ext4/namei.c | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 4ac31d18e4125eb2970e69069a15308cbb8e4486 Author: John Ogness Date: Thu Jan 28 11:29:08 2016 +0100 dmaengine: edma: fix residue race for cyclic When retrieving the residue value, the SRC/DST fields of the active PaRAM are read to determine the current position of the DMA engine. However, the AM335x Technical Reference Manual states: 11.3.3.6 Parameter Set Updates After the TR is read from the PaRAM (and is in the process of being submitted to the EDMA3TC), the following fields are updated as needed: ... SRC DST This means SRC/DST is incremented even though the DMA transfer may not have started yet or is in progress. Thus if the reader of the residue accesses the DMA buffer too quickly, the CPU is misinformed about the data that has been successfully processed. The CCSTAT.ACTV register is a boolean that is set if any TR is being processed by either the EMDA3CC or EDMA3TC. By polling this register it is possible to ensure that the residue value returned is valid for immediate processing. However, since the DMA engine may be active, polling may never hit a moment where no TR is being processed. To handle this, the SRC/DST is also polled to see if it changes. And as a last resort, a max loop count for the busy waiting exists to avoid an infinite loop. Signed-off-by: John Ogness Acked-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/edma.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 3efaf2a9a053bce452cec8d4c14f7ad6912215c9 Author: Andy Shevchenko Date: Fri Jan 29 16:27:07 2016 +0200 dmaengine: dw: pci: add ID for WildcatPoint PCH WildcatPoint PCH as seen on MacBook 12-inch (Early 2015) has PCI enabled DesignWare DMA controller. Enable it by adding its ID to the corresponding driver. Reported-by: Leif Liddy BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=110901 Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/dw/pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit c8053b58762745d93930826b60a4073854a15ce5 Author: Greg Kroah-Hartman Date: Sun Feb 7 18:22:54 2016 -0800 Revert "8250: uniphier: allow modular build with 8250 console" This reverts commit d56edd7ed0ed46a8043ee3040ededbd190818ccf, it shouldn't have been applied, it was fixed properly with commit 71f50c6d9a2276f3ec85384bffe2aee1962f4669 ("of: drop symbols declared by _OF_DECLARE() from modules") Reported-by: Masahiro Yamada Cc: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_uniphier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28b4c263961c47da84ed8b5be0b5116bad1133eb Author: Theodore Ts'o Date: Sun Feb 7 19:35:05 2016 -0500 ext4 crypto: revalidate dentry after adding or removing the key Add a validation check for dentries for encrypted directory to make sure we're not caching stale data after a key has been added or removed. Also check to make sure that status of the encryption key is updated when readdir(2) is executed. Signed-off-by: Theodore Ts'o fs/ext4/crypto.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ext4/dir.c | 6 ++++++ fs/ext4/ext4.h | 1 + fs/ext4/namei.c | 18 ++++++++++++++++++ 4 files changed, 81 insertions(+) commit 8e0bd4925bf693520295de403483efad4dc5cc16 Author: Darrick J. Wong Date: Mon Feb 8 11:03:58 2016 +1100 xfs: fix endianness error when checking log block crc on big endian platforms Since the checksum function and the field are both __le32, don't perform endian conversion when comparing the two. This fixes mount failures on ppc64. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 388f7b1d6e8ca06762e2454d28d6c3c55ad0fe95 Author: Linus Torvalds Date: Sun Feb 7 15:38:30 2016 -0800 Linux 4.5-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c17dfb019d52d933a595778d085f83d2b3b34edb Merge: 63fee12 381a65c Author: Linus Torvalds Date: Sun Feb 7 15:23:20 2016 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "The first real batch of fixes for this release cycle, so there are a few more than usual. Most of these are fixes and tweaks to board support (DT bugfixes, etc). I've also picked up a couple of small cleanups that seemed innocent enough that there was little reason to wait (const/ __initconst and Kconfig deps). Quite a bit of the changes on OMAP were due to fixes to no longer write to rodata from assembly when ARM_KERNMEM_PERMS was enabled, but there were also other fixes. Kirkwood had a bunch of gpio fixes for some boards. OMAP had RTC fixes on OMAP5, and Nomadik had changes to MMC parameters in DT. All in all, mostly the usual mix of various fixes" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (46 commits) ARM: multi_v7_defconfig: enable DW_WATCHDOG ARM: nomadik: fix up SD/MMC DT settings ARM64: tegra: Add chosen node for tegra132 norrin ARM: realview: use "depends on" instead of "if" after prompt ARM: tango: use "depends on" instead of "if" after prompt ARM: tango: use const and __initconst for smp_operations ARM: realview: use const and __initconst for smp_operations bus: uniphier-system-bus: revive tristate prompt arm64: dts: Add missing DMA Abort interrupt to Juno bus: vexpress-config: Add missing of_node_put ARM: dts: am57xx: sbc-am57x: correct Eth PHY settings ARM: dts: am57xx: cl-som-am57x: fix CPSW EMAC pinmux ARM: dts: am57xx: sbc-am57x: fix UART3 pinmux ARM: dts: am57xx: cl-som-am57x: update SPI Flash frequency ARM: dts: am57xx: cl-som-am57x: set HOST mode for USB2 ARM: dts: am57xx: sbc-am57x: fix SB-SOM EEPROM I2C address ARM: dts: LogicPD Torpedo: Revert Duplicative Entries ARM: dts: am437x: pixcir_tangoc: use correct flags for irq types ARM: dts: am4372: fix irq type for arm twd and global timer ARM: dts: at91: sama5d4 xplained: fix phy0 IRQ type ... commit 63fee123da6a05b48695599c4349ab5de97da5e2 Merge: 46df55c 65d3b04 Author: Linus Torvalds Date: Sun Feb 7 15:17:47 2016 -0800 Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox fixes from Jassi Brar: - fix getting element from the pcc-channels array by simply indexing into it - prevent building mailbox-test driver for archs that don't have IOMEM * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: Fix dependencies for !HAS_IOMEM archs mailbox: pcc: fix channel calculation in get_pcc_channel() commit aa7b45378059a3eba1529d76f6d0b367ba614646 Author: Sathya Perla Date: Tue Feb 2 08:10:10 2016 -0500 update be2net maintainers' email addresses be2net maintainers' email addresses changed from avagotech.com to broadcom.com starting today. While updating the list, I'm also adding Somnath's name to the list. Signed-off-by: Sathya Perla Signed-off-by: David S. Miller MAINTAINERS | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c44d9b1181cf34e0860c72cc8a00e0c47417aac0 Author: Takashi Iwai Date: Sun Feb 7 09:38:26 2016 +0100 ALSA: hda - Fix speaker output from VAIO AiO machines Some Sony VAIO AiO models (VGC-JS4EF and VGC-JS25G, both with PCI SSID 104d:9044) need the same quirk to make the speaker working properly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112031 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 1f55c718c290616889c04946864a13ef30f64929 Author: Herton R. Krzesinski Date: Thu Jan 14 17:56:58 2016 -0200 pty: make sure super_block is still valid in final /dev/tty close Considering current pty code and multiple devpts instances, it's possible to umount a devpts file system while a program still has /dev/tty opened pointing to a previosuly closed pty pair in that instance. In the case all ptmx and pts/N files are closed, umount can be done. If the program closes /dev/tty after umount is done, devpts_kill_index will use now an invalid super_block, which was already destroyed in the umount operation after running ->kill_sb. This is another "use after free" type of issue, but now related to the allocated super_block instance. To avoid the problem (warning at ida_remove and potential crashes) for this specific case, I added two functions in devpts which grabs additional references to the super_block, which pty code now uses so it makes sure the super block structure is still valid until pty shutdown is done. I also moved the additional inode references to the same functions, which also covered similar case with inode being freed before /dev/tty final close/shutdown. Signed-off-by: Herton R. Krzesinski Cc: stable@vger.kernel.org # 2.6.29+ Reviewed-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/pty.c | 9 ++++++--- fs/devpts/inode.c | 20 ++++++++++++++++++++ include/linux/devpts_fs.h | 4 ++++ 3 files changed, 30 insertions(+), 3 deletions(-) commit 2831c89f42dcde440cfdccb9fee9f42d54bbc1ef Author: Herton R. Krzesinski Date: Mon Jan 11 12:07:43 2016 -0200 pty: fix possible use after free of tty->driver_data This change fixes a bug for a corner case where we have the the last release from a pty master/slave coming from a previously opened /dev/tty file. When this happens, the tty->driver_data can be stale, due to all ptmx or pts/N files having already been closed before (and thus the inode related to these files, which tty->driver_data points to, being already freed/destroyed). The fix here is to keep a reference on the opened master ptmx inode. We maintain the inode referenced until the final pty_unix98_shutdown, and only pass this inode to devpts_kill_index. Signed-off-by: Herton R. Krzesinski Cc: # 2.6.29+ Reviewed-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/pty.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 7dde55787b43a8f2b4021916db38d90c03a2ec64 Author: Jeremy McNicoll Date: Tue Feb 2 13:00:45 2016 -0800 tty: Add support for PCIe WCH382 2S multi-IO card WCH382 2S board is a PCIe card with 2 DB9 COM ports detected as Serial controller: Device 1c00:3253 (rev 10) (prog-if 05 [16850]) Signed-off-by: Jeremy McNicoll Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit b4a512b8bf7185787e291cddad3b6457b2367120 Author: Arnd Bergmann Date: Wed Jan 13 21:59:23 2016 +0100 serial/omap: mark wait_for_xmitr as __maybe_unused The wait_for_xmitr() function is only used if CONFIG_CONSOLE_POLL or CONFIG_SERIAL_OMAP_CONSOLE are set, but when both are disabled, the compiler warns about it being unused: drivers/tty/serial/omap-serial.c:1168:13: warning: 'wait_for_xmitr' defined but not used [-Wunused-func We could add more #ifdefs to work around it, but adding __maybe_unused seems nicer. Signed-off-by: Arnd Bergmann Fixes: 2172076d2399 ("serial/omap-serial: Deinline wait_for_xmitr, save 165 bytes") Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 308bbc9ab838d0ace0298268c7970ba9513e2c65 Author: Peter Hurley Date: Tue Jan 12 15:14:46 2016 -0800 serial: omap: Prevent DoS using unprivileged ioctl(TIOCSRS485) The omap-serial driver emulates RS485 delays using software timers, but neglects to clamp the input values from the unprivileged ioctl(TIOCSRS485). Because the software implementation busy-waits, malicious userspace could stall the cpu for ~49 days. Clamp the input values to < 100ms. Fixes: 4a0ac0f55b18 ("OMAP: add RS485 support") Cc: # 3.12+ Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d56edd7ed0ed46a8043ee3040ededbd190818ccf Author: Arnd Bergmann Date: Wed Jan 13 23:33:59 2016 +0100 8250: uniphier: allow modular build with 8250 console The recently added uniphier 8250 port driver supports early console probing, and it supports being built as a module, but the combination of the two fails to link: ERROR: "early_serial8250_setup" [drivers/tty/serial/8250/8250_uniphier.ko] undefined! Given that earlycon support in a loadable module makes no sense, making that code conditional on 'MODULE' is a correct solution. Signed-off-by: Arnd Bergmann Fixes: b8d20e06eaad ("serial: 8250_uniphier: add earlycon support") Acked-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_uniphier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46df55ceeaf3d28689242de2dd722857b7ea341f Merge: dacd53c 89140fd Author: Linus Torvalds Date: Sat Feb 6 22:14:46 2016 -0800 Merge tag 'usb-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB fixes for 4.5-rc3. The usual, xhci fixes for reported issues, combined with some small gadget driver fixes, and a MAINTAINERS file update. All have been in linux-next with no reported issues" * tag 'usb-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: xhci: harden xhci_find_next_ext_cap against device removal xhci: Fix list corruption in urb dequeue at host removal usb: host: xhci-plat: fix NULL pointer in probe for device tree case usb: xhci-mtk: fix AHB bus hang up caused by roothubs polling usb: xhci-mtk: fix bpkts value of LS/HS periodic eps not behind TT usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms usb: xhci: set SSIC port unused only if xhci_suspend succeeds usb: xhci: add a quirk bit for ssic port unused usb: xhci: handle both SSIC ports in PME stuck quirk usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver. Revert "xhci: don't finish a TD if we get a short-transfer event mid TD" MAINTAINERS: fix my email address usb: dwc2: Fix probe problem on bcm2835 Revert "usb: dwc2: Move reset into dwc2_get_hwparams()" usb: musb: ux500: Fix NULL pointer dereference at system PM usb: phy: mxs: declare variable with initialized value usb: phy: msm: fix error handling in probe. commit dacd53c80525809cc9ce85e3a4ad409d15209f2a Merge: 5af9c2e 5982557 Author: Linus Torvalds Date: Sat Feb 6 22:13:16 2016 -0800 Merge tag 'staging-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver fixes from Greg KH: "Here are some IIO and staging driver fixes for 4.5-rc3. All of them, except one, are for IIO drivers, and one is for a speakup driver fix caused by some earlier patches, to resolve a reported build failure" * tag 'staging-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: Staging: speakup: Fix allyesconfig build on mn10300 iio: dht11: Use boottime iio: ade7753: avoid uninitialized data iio: pressure: mpl115: fix temperature offset sign iio: imu: Fix dependencies for !HAS_IOMEM archs staging: iio: Fix dependencies for !HAS_IOMEM archs iio: adc: Fix dependencies for !HAS_IOMEM archs iio: inkern: fix a NULL dereference on error iio:adc:ti_am335x_adc Fix buffered mode by identifying as software buffer. iio: light: acpi-als: Report data as processed iio: dac: mcp4725: set iio name property in sysfs iio: add HAS_IOMEM dependency to VF610_ADC iio: add IIO_TRIGGER dependency to STK8BA50 iio: proximity: lidar: correct return value iio-light: Use a signed return type for ltr501_match_samp_freq() commit 7326fffb712f09a315bc73cc1ee63843f59b8bd4 Author: Alexander Usyskin Date: Sun Jan 17 12:25:01 2016 +0200 mei: validate request value in client notify request ioctl This patch address a possible security issue: The request field in client notify request ioctl comes from user space as u32 and is downcasted to u8 with out validation. Check request field to have approved values MEI_HBM_NOTIFICATION_STAR/STOP Cc: #4.3+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d7236ac368212bd6fc8b45f050136ee53e6a6f2d Author: Swapnil Nagle Date: Thu Feb 4 11:45:17 2016 -0500 qla2xxx: Use ATIO type to send correct tmr response The function value inside se_cmd can change if the TMR is cancelled. Use original ATIO Type to correctly determine CTIO response. Signed-off-by: Swapnil Nagle Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb43285ff7039fe3c4b0bc476e6d6569c31104f3 Author: Quinn Tran Date: Thu Feb 4 11:45:16 2016 -0500 qla2xxx: Fix stale pointer access. [ Upstream Commit 84e32a06f4f8756ce9ec3c8dc7e97896575f0771 ] Commit 84e32a0 ("qla2xxx: Use pci_enable_msix_range() instead of pci_enable_msix()") introduced a regression when target mode is enabled. In qla24xx_enable_msix(), ha->max_rsp_queues was incorrectly set to a value higher than the number of response queues allocated causing an invalid dereference. Specifically here in qla2x00_init_rings(): *rsp->in_ptr = 0; Add additional check to make sure the pointer is valid. following call stack will be seen ---- 8< ---- RIP: 0010:[] [] qla2x00_init_rings+0xdc/0x320 [qla2xxx] RSP: 0018:ffff880429447dd8 EFLAGS: 00010082 .... Call Trace: [] qla2x00_abort_isp+0x170/0x6b0 [qla2xxx] [] qla2x00_do_dpc+0x357/0x7f0 [qla2xxx] [] ? qla2x00_relogin+0x260/0x260 [qla2xxx] [] kthread+0xc9/0xe0 [] ? flush_kthread_worker+0x90/0x90 [] ret_from_fork+0x3f/0x70 [] ? flush_kthread_worker+0x90/0x90 ---- 8< ---- Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_init.c | 10 +++++----- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- drivers/scsi/qla2xxx/qla_mid.c | 4 ++-- drivers/scsi/qla2xxx/qla_os.c | 6 ++++++ drivers/scsi/qla2xxx/qla_tmpl.c | 16 ++++++++++++++++ 5 files changed, 31 insertions(+), 9 deletions(-) commit e9036d0662360cd4c79578565ce422ed5872f301 Author: Peter Hurley Date: Fri Feb 5 10:49:36 2016 -0800 tty: Drop krefs for interrupted tty lock When the tty lock is interrupted on attempted re-open, 2 tty krefs are still held. Drop extra kref before returning failure from tty_lock_interruptible(), and drop lookup kref before returning failure from tty_open(). Fixes: 0bfd464d3fdd ("tty: Wait interruptibly for tty lock on reopen") Reported-by: Dmitry Vyukov Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 3 +-- drivers/tty/tty_mutex.c | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 0633e123465b61a12a262b742bebf2a9945f7964 Author: Arnd Bergmann Date: Mon Feb 1 17:29:45 2016 +0100 target/user: Fix cast from pointer to phys_addr_t The uio_mem structure has a member that is a phys_addr_t, but can be a number of other types too. The target core driver attempts to assign a pointer from vmalloc() to it, by casting it to phys_addr_t, but that causes a warning when phys_addr_t is longer than a pointer: drivers/target/target_core_user.c: In function 'tcmu_configure_device': drivers/target/target_core_user.c:906:22: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] This adds another cast to uintptr_t to shut up the warning. A nicer fix might be to have additional fields in uio_mem for the different purposes, so we can assign a pointer directly. Signed-off-by: Arnd Bergmann Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57dae19065bde296dfdf08b8e46c102a671ff741 Author: Nicholas Bellinger Date: Fri Jan 29 00:07:25 2016 -0800 target: Drop legacy se_cmd->task_stop_comp + REQUEST_STOP usage With CMD_T_FABRIC_STOP + se_cmd->cmd_wait_set usage in place, go ahead and drop left-over CMD_T_REQUEST_STOP checks in target_complete_cmd() and unused target_stop_cmd(). Reviewed-by: Christoph Hellwig Cc: Quinn Tran Cc: Himanshu Madhani Cc: Sagi Grimberg Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_internal.h | 1 - drivers/target/target_core_transport.c | 37 ---------------------------------- include/target/target_core_base.h | 4 ---- 3 files changed, 42 deletions(-) commit 310d3d314be7f0a84011ebdc4bdccbcae9755a87 Author: Nicholas Bellinger Date: Fri Feb 5 14:51:36 2016 -0800 target: Fix race with SCF_SEND_DELAYED_TAS handling This patch fixes a race between setting of SCF_SEND_DELAYED_TAS in transport_send_task_abort(), and check of the same bit in transport_check_aborted_status(). It adds a __transport_check_aborted_status() version that is used by target_execute_cmd() when se_cmd->t_state_lock is held, and a transport_check_aborted_status() wrapper for all other existing callers. Also, it handles the case where the check happens before transport_send_task_abort() gets called. For this, go ahead and set SCF_SEND_DELAYED_TAS early when necessary, and have transport_send_task_abort() send the abort. Cc: Quinn Tran Cc: Himanshu Madhani Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 53 ++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 12 deletions(-) commit 09954bad448791ef01202351d437abdd9497a804 Author: Jiri Kosina Date: Sat Feb 6 23:00:22 2016 +0100 floppy: refactor open() flags handling In case /dev/fdX is open with O_NDELAY / O_NONBLOCK, floppy_open() immediately succeeds, without performing any further media / controller preparations. That's "correct" wrt. the NODELAY flag, but is hardly correct wrt. the rest of the floppy driver, that is not really O_NONBLOCK ready, at all. Therefore it's not too surprising, that subsequent attempts to work with the filedescriptor produce bad results. Namely, syzkaller tool has been able to livelock mmap() on the returned fd to keep waiting on the page unlock bit forever. Quite frankly, I have trouble defining what non-blocking behavior would be for floppies. Is waiting ages for the driver to actually succeed reading a sector blocking operation? Is waiting for drive motor to start blocking operation? How about in case of virtualized floppies? One option would be returning EWOULDBLOCK in case O_NDLEAY / O_NONBLOCK is being passed to open(). That has a theoretical potential of breaking some arcane and archaic userspace though. Let's take a more conservative aproach, and accept the O_NDLEAY flag, and let the driver behave as usual. While at it, clean up a bit handling of !(mode & (FMODE_READ|FMODE_WRITE)) case and return EINVAL instead of succeeding as well. Spotted by syzkaller tool. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Signed-off-by: Jiri Kosina drivers/block/floppy.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit d76d65fd26951498144029c24852c4d54ee512d9 Author: Larry Finger Date: Mon Feb 1 12:58:54 2016 -0600 rtlwifi: fix broken VHT support When using a 5G-capable device with VHT (802.11ac) rates enabled was not working (packets were not delivered) and the following mac80211 warning was printed: WARNING: CPU: 3 PID: 2253 at net/mac80211/rate.c:625 ieee80211_get_tx_rates+0x22e/0x620 [mac80211]() Modules linked in: rtl8821ae btcoexist rtl_pci rtlwifi fuse drbg ansi_cprng ctr ccm bnep bluetooth af_packet nfs fscache vboxpci(O) vboxnetadp(O) vboxne tflt(O) vboxdrv(O) arc4 snd_hda_codec_generic x86_pkg_temp_thermal rtsx_pci_sdmmc mmc_core rtsx_pci_ms kvm_intel memstick iwlmvm kvm mac80211 snd_hda_intel snd_hda_cod ec snd_hwdep snd_hda_core irqbypass snd_pcm iwlwifi crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 snd_timer lrw gf128mul glue_h elper ablk_helper cryptd snd cfg80211 pcspkr serio_raw e1000e rtsx_pci lpc_ich ptp xhci_pci mfd_core pps_core xhci_hcd soundcore toshiba_acpi thermal sparse_keymap wmi toshiba_bluetooth rfkill acpi_cpufreq battery ac processor dm_mod i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm sr_mod cdrom video button sg autofs4 [last unloaded: rtlwifi] CPU: 3 PID: 2253 Comm: Timer Tainted: G W O 4.5.0-rc1-wl+ #79 Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.20 04/17/2014 ffffffffa05c4be6 ffff8802262036d8 ffffffff813d7912 0000000000000000 ffff880226203710 ffffffff8106bcb6 ffff8800c6831300 ffff8800c6831330 0000000000000000 ffff8800c683133c ffff880065923638 ffff880226203720 Call Trace: [] dump_stack+0x4b/0x79 [] warn_slowpath_common+0x86/0xc0 [] warn_slowpath_null+0x1a/0x20 [] ieee80211_get_tx_rates+0x22e/0x620 [mac80211] [] ? rtl_is_special_data+0x32/0x240 [rtlwifi] [] ? rate_control_get_rate+0xce/0x150 [mac80211] [] ? trace_hardirqs_on+0xd/0x10 [] ? __local_bh_enable_ip+0x65/0xd0 Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3647bc35bd427610a70eb83c58c5e834262badfa Author: Rabin Vincent Date: Tue Feb 2 09:39:02 2016 +0100 dwc_eth_qos: Reset hardware before PHY start The hardware reset is currently done after phy_start() is called, leading to a race where we can lose the link status if the phy state machine calls dwceqos_adjust_link() before we reset the MAC registers. Acked-by: Lars Persson Signed-off-by: Rabin Vincent Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16186a82de1fdd868255448274e64ae2616e2640 Author: subashab@codeaurora.org Date: Tue Feb 2 02:11:10 2016 +0000 ipv6: addrconf: Fix recursive spin lock call A rcu stall with the following backtrace was seen on a system with forwarding, optimistic_dad and use_optimistic set. To reproduce, set these flags and allow ipv6 autoconf. This occurs because the device write_lock is acquired while already holding the read_lock. Back trace below - INFO: rcu_preempt self-detected stall on CPU { 1} (t=2100 jiffies g=3992 c=3991 q=4471) <6> Task dump for CPU 1: <2> kworker/1:0 R running task 12168 15 2 0x00000002 <2> Workqueue: ipv6_addrconf addrconf_dad_work <6> Call trace: <2> [] el1_irq+0x68/0xdc <2> [] _raw_write_lock_bh+0x20/0x30 <2> [] __ipv6_dev_ac_inc+0x64/0x1b4 <2> [] addrconf_join_anycast+0x9c/0xc4 <2> [] __ipv6_ifa_notify+0x160/0x29c <2> [] ipv6_ifa_notify+0x50/0x70 <2> [] addrconf_dad_work+0x314/0x334 <2> [] process_one_work+0x244/0x3fc <2> [] worker_thread+0x2f8/0x418 <2> [] kthread+0xe0/0xec v2: do addrconf_dad_kick inside read lock and then acquire write lock for ipv6_ifa_notify as suggested by Eric Fixes: 7fd2561e4ebdd ("net: ipv6: Add a sysctl to make optimistic addresses useful candidates") Cc: Eric Dumazet Cc: Erik Kline Cc: Hannes Frederic Sowa Signed-off-by: Subash Abhinov Kasiviswanathan Acked-by: Hannes Frederic Sowa Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8a3978ad55fb4c0564d285fb2f6cdee2313fce01 Author: Boris BREZILLON Date: Fri Feb 5 17:45:48 2016 +0100 crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init() We are checking twice if dma->cache_pool is not NULL but are never testing dma->padding_pool value. Cc: stable@vger.kernel.org Signed-off-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c033042aa8f69894df37dabcaa0231594834a4e4 Author: Cyrille Pitchen Date: Fri Feb 5 13:45:13 2016 +0100 crypto: atmel-sha - remove calls of clk_prepare() from atomic contexts clk_prepare()/clk_unprepare() must not be called within atomic context. This patch calls clk_prepare() once for all from atmel_sha_probe() and clk_unprepare() from atmel_sha_remove(). Then calls of clk_prepare_enable()/clk_disable_unprepare() were replaced by calls of clk_enable()/clk_disable(). Cc: stable@vger.kernel.org Signed-off-by: Cyrille Pitchen Reported-by: Matthias Mayr Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit d961436c11482e974b702c8324426208f00cd7c4 Author: Cyrille Pitchen Date: Fri Feb 5 13:45:12 2016 +0100 crypto: atmel-sha - fix atmel_sha_remove() Since atmel_sha_probe() uses devm_xxx functions to allocate resources, atmel_sha_remove() should no longer explicitly release them. Cc: stable@vger.kernel.org Signed-off-by: Cyrille Pitchen Fixes: b0e8b3417a62 ("crypto: atmel - use devm_xxx() managed function") Signed-off-by: Herbert Xu drivers/crypto/atmel-sha.c | 7 ------- 1 file changed, 7 deletions(-) commit dad41997063723eaf5f77bc2015606a5a9bce320 Author: Herbert Xu Date: Wed Feb 3 21:39:27 2016 +0800 crypto: algif_skcipher - Do not set MAY_BACKLOG on the async path The async path cannot use MAY_BACKLOG because it is not meant to block, which is what MAY_BACKLOG does. On the other hand, both the sync and async paths can make use of MAY_SLEEP. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_skcipher.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6454c2b83f719057069777132b13949e4c6b6350 Author: Herbert Xu Date: Wed Feb 3 21:39:26 2016 +0800 crypto: algif_skcipher - Do not dereference ctx without socket lock Any access to non-constant bits of the private context must be done under the socket lock, in particular, this includes ctx->req. This patch moves such accesses under the lock, and fetches the tfm from the parent socket which is guaranteed to be constant, rather than from ctx->req. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_skcipher.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit ec69bbfb9902c32a5c1492f2b1b8ad032a66d724 Author: Herbert Xu Date: Wed Feb 3 21:39:24 2016 +0800 crypto: algif_skcipher - Do not assume that req is unchanged The async path in algif_skcipher assumes that the crypto completion function will be called with the original request. This is not necessarily the case. In fact there is no need for this anyway since we already embed information into the request with struct skcipher_async_req. This patch adds a pointer to that struct and then passes it as the data to the callback function. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu Tested-by: Tadeusz Struk crypto/algif_skcipher.c | 60 +++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 32 deletions(-) commit 63e41ebc6630f39422d87f8a4bade1e793f37a01 Author: Mathias Krause Date: Mon Feb 1 14:27:30 2016 +0100 crypto: user - lock crypto_alg_list on alg dump We miss to take the crypto_alg_sem semaphore when traversing the crypto_alg_list for CRYPTO_MSG_GETALG dumps. This allows a race with crypto_unregister_alg() removing algorithms from the list while we're still traversing it, thereby leading to a use-after-free as show below: [ 3482.071639] general protection fault: 0000 [#1] SMP [ 3482.075639] Modules linked in: aes_x86_64 glue_helper lrw ablk_helper cryptd gf128mul ipv6 pcspkr serio_raw virtio_net microcode virtio_pci virtio_ring virtio sr_mod cdrom [last unloaded: aesni_intel] [ 3482.075639] CPU: 1 PID: 11065 Comm: crconf Not tainted 4.3.4-grsec+ #126 [ 3482.075639] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 3482.075639] task: ffff88001cd41a40 ti: ffff88001cd422c8 task.ti: ffff88001cd422c8 [ 3482.075639] RIP: 0010:[] [] strncpy+0x13/0x30 [ 3482.075639] RSP: 0018:ffff88001f713b60 EFLAGS: 00010202 [ 3482.075639] RAX: ffff88001f6c4430 RBX: ffff88001f6c43a0 RCX: ffff88001f6c4430 [ 3482.075639] RDX: 0000000000000040 RSI: fefefefefefeff16 RDI: ffff88001f6c4430 [ 3482.075639] RBP: ffff88001f713b60 R08: ffff88001f6c4470 R09: ffff88001f6c4480 [ 3482.075639] R10: 0000000000000002 R11: 0000000000000246 R12: ffff88001ce2aa28 [ 3482.075639] R13: ffff880000093700 R14: ffff88001f5e4bf8 R15: 0000000000003b20 [ 3482.075639] FS: 0000033826fa2700(0000) GS:ffff88001e900000(0000) knlGS:0000000000000000 [ 3482.075639] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3482.075639] CR2: ffffffffff600400 CR3: 00000000139ec000 CR4: 00000000001606f0 [ 3482.075639] Stack: [ 3482.075639] ffff88001f713bd8 ffffffff936ccd00 ffff88001e5c4200 ffff880000093700 [ 3482.075639] ffff88001f713bd0 ffffffff938ef4bf 0000000000000000 0000000000003b20 [ 3482.075639] ffff88001f5e4bf8 ffff88001f5e4848 0000000000000000 0000000000003b20 [ 3482.075639] Call Trace: [ 3482.075639] [] crypto_report_alg+0xc0/0x3e0 [ 3482.075639] [] ? __alloc_skb+0x16f/0x300 [ 3482.075639] [] crypto_dump_report+0x6a/0x90 [ 3482.075639] [] netlink_dump+0x147/0x2e0 [ 3482.075639] [] __netlink_dump_start+0x159/0x190 [ 3482.075639] [] crypto_user_rcv_msg+0xc3/0x130 [ 3482.075639] [] ? crypto_report_alg+0x3e0/0x3e0 [ 3482.075639] [] ? alg_test_crc32c+0x120/0x120 [ 3482.075639] [] ? __netlink_lookup+0xd5/0x120 [ 3482.075639] [] ? crypto_add_alg+0x1d0/0x1d0 [ 3482.075639] [] netlink_rcv_skb+0xe1/0x130 [ 3482.075639] [] crypto_netlink_rcv+0x28/0x40 [ 3482.075639] [] netlink_unicast+0x108/0x180 [ 3482.075639] [] netlink_sendmsg+0x541/0x770 [ 3482.075639] [] sock_sendmsg+0x21/0x40 [ 3482.075639] [] SyS_sendto+0xf3/0x130 [ 3482.075639] [] ? bad_area_nosemaphore+0x13/0x20 [ 3482.075639] [] ? __do_page_fault+0x80/0x3a0 [ 3482.075639] [] entry_SYSCALL_64_fastpath+0x12/0x6e [ 3482.075639] Code: 88 4a ff 75 ed 5d 48 0f ba 2c 24 3f c3 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 85 d2 48 89 f8 48 89 f9 4c 8d 04 17 48 89 e5 74 15 <0f> b6 16 80 fa 01 88 11 48 83 de ff 48 83 c1 01 4c 39 c1 75 eb [ 3482.075639] RIP [] strncpy+0x13/0x30 To trigger the race run the following loops simultaneously for a while: $ while : ; do modprobe aesni-intel; rmmod aesni-intel; done $ while : ; do crconf show all > /dev/null; done Fix the race by taking the crypto_alg_sem read lock, thereby preventing crypto_unregister_alg() from modifying the algorithm list during the dump. This bug has been detected by the PaX memory sanitize feature. Cc: stable@vger.kernel.org Signed-off-by: Mathias Krause Cc: Steffen Klassert Cc: PaX Team Signed-off-by: Herbert Xu crypto/crypto_user.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5af9c2e19da6514a1a50b07d97d93b74a7711873 Merge: 5d6a6a7 b6a515c Author: Linus Torvalds Date: Fri Feb 5 20:20:07 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "22 fixes" * emailed patches from Andrew Morton : (22 commits) epoll: restrict EPOLLEXCLUSIVE to POLLIN and POLLOUT radix-tree: fix oops after radix_tree_iter_retry MAINTAINERS: trim the file triggers for ABI/API dax: dirty inode only if required thp: make deferred_split_scan() work again mm: replace vma_lock_anon_vma with anon_vma_lock_read/write ocfs2/dlm: clear refmap bit of recovery lock while doing local recovery cleanup um: asm/page.h: remove the pte_high member from struct pte_t mm, hugetlb: don't require CMA for runtime gigantic pages mm/hugetlb: fix gigantic page initialization/allocation mm: downgrade VM_BUG in isolate_lru_page() to warning mempolicy: do not try to queue pages from !vma_migratable() mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any progress vmstat: make vmstat_update deferrable mm, vmstat: make quiet_vmstat lighter mm/Kconfig: correct description of DEFERRED_STRUCT_PAGE_INIT memblock: don't mark memblock_phys_mem_size() as __init dump_stack: avoid potential deadlocks mm: validate_mm browse_rb SMP race condition m32r: fix build failure due to SMP and MMU ... commit 5d6a6a75e0036a88ac17a844686e4a9ef926e493 Merge: 9b10882 b0b31a8 Author: Linus Torvalds Date: Fri Feb 5 19:52:57 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull Ceph fixes from Sage Weil: "We have a few wire protocol compatibility fixes, ports of a few recent CRUSH mapping changes, and a couple error path fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: libceph: MOSDOpReply v7 encoding libceph: advertise support for TUNABLES5 crush: decode and initialize chooseleaf_stable crush: add chooseleaf_stable tunable crush: ensure take bucket value is valid crush: ensure bucket id is valid before indexing buckets array ceph: fix snap context leak in error path ceph: checking for IS_ERR instead of NULL commit 9b108828ed25aff1239304437ec5fa8b9977a306 Merge: 22f6070 6739b3d Author: Linus Torvalds Date: Fri Feb 5 19:38:15 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Fixes all over the place: - amdkfd: two static checker fixes - mst: a bunch of static checker and spec/hw interaction fixes - amdgpu: fix Iceland hw properly, and some fiji bugs, along with some write-combining fixes. - exynos: some regression fixes - adv7511: fix some EDID reading issues" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (38 commits) drm/dp/mst: deallocate payload on port destruction drm/dp/mst: Reverse order of MST enable and clearing VC payload table. drm/dp/mst: move GUID storage from mgr, port to only mst branch drm/dp/mst: change MST detection scheme drm/dp/mst: Calculate MST PBN with 31.32 fixed point drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil drm/mst: Add range check for max_payloads during init drm/mst: Don't ignore the MST PBN self-test result drm: fix missing reference counting decrease drm/amdgpu: disable uvd and vce clockgating on Fiji drm/amdgpu: remove exp hardware support from iceland drm/amdgpu: load MEC ucode manually on iceland drm/amdgpu: don't load MEC2 on topaz drm/amdgpu: drop topaz support from gmc8 module drm/amdgpu: pull topaz gmc bits into gmc_v7 drm/amdgpu: The VI specific EXE bit should only apply to GMC v8.0 above drm/amdgpu: iceland use CI based MC IP drm/amdgpu: move gmc7 support out of CIK dependency drm/amdgpu/gfx7: enable cp inst/reg error interrupts drm/amdgpu/gfx8: enable cp inst/reg error interrupts ... commit 22f60701d5527cd8a07e0651bc12e226cf38da79 Merge: dd6f86a 79e2f8d Author: Linus Torvalds Date: Fri Feb 5 18:11:23 2016 -0800 Merge tag 'pm+acpi-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: "These are: a fix for a recently introduced false-positive warnings about PM domain pointers being changed inappropriately (harmless but annoying), an MCH size workaround quirk for one more platform, a compiler warning fix (generic power domains framework), an ACPI LPSS (Intel SoCs) driver fixup and a cleanup of the ACPI CPPC core code. Specifics: - PM core fix to avoid false-positive warnings generated when the pm_domain field is cleared for a device that appears to be bound to a driver (Rafael Wysocki). - New MCH size workaround quirk for Intel Haswell-ULT (Josh Boyer). - Fix for an "unused function" compiler warning in the generic power domains framework (Ulf Hansson). - Fixup for the ACPI driver for Intel SoCs (acpi-lpss) to set the PM domain pointer of a device properly in one place that was overlooked by a recent PM core update (Andy Shevchenko). - Removal of a redundant function declaration in the ACPI CPPC core code (Timur Tabi)" * tag 'pm+acpi-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: Avoid false-positive warnings in dev_pm_domain_set() PM / Domains: Silence compiler warning for an unused function ACPI / CPPC: remove redundant mbox_send_message() declaration ACPI / LPSS: set PM domain via helper setter PNP: Add Haswell-ULT to Intel MCH size workaround commit b6a515c8a0f6c2010a52793b43a79520bc95f994 Author: Jason Baron Date: Fri Feb 5 15:37:04 2016 -0800 epoll: restrict EPOLLEXCLUSIVE to POLLIN and POLLOUT In the current implementation of the EPOLLEXCLUSIVE flag (added for 4.5-rc1), if epoll waiters create different POLL* sets and register them as exclusive against the same target fd, the current implementation will stop waking any further waiters once it finds the first idle waiter. This means that waiters could miss wakeups in certain cases. For example, when we wake up a pipe for reading we do: wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM); So if one epoll set or epfd is added to pipe p with POLLIN and a second set epfd2 is added to pipe p with POLLRDNORM, only epfd may receive the wakeup since the current implementation will stop after it finds any intersection of events with a waiter that is blocked in epoll_wait(). We could potentially address this by requiring all epoll waiters that are added to p be required to pass the same set of POLL* events. IE the first EPOLL_CTL_ADD that passes EPOLLEXCLUSIVE establishes the set POLL* flags to be used by any other epfds that are added as EPOLLEXCLUSIVE. However, I think it might be somewhat confusing interface as we would have to reference count the number of users for that set, and so userspace would have to keep track of that count, or we would need a more involved interface. It also adds some shared state that we'd have store somewhere. I don't think anybody will want to bloat __wait_queue_head for this. I think what we could do instead, is to simply restrict EPOLLEXCLUSIVE such that it can only be specified with EPOLLIN and/or EPOLLOUT. So that way if the wakeup includes 'POLLIN' and not 'POLLOUT', we can stop once we hit the first idle waiter that specifies the EPOLLIN bit, since any remaining waiters that only have 'POLLOUT' set wouldn't need to be woken. Likewise, we can do the same thing if 'POLLOUT' is in the wakeup bit set and not 'POLLIN'. If both 'POLLOUT' and 'POLLIN' are set in the wake bit set (there is at least one example of this I saw in fs/pipe.c), then we just wake the entire exclusive list. Having both 'POLLOUT' and 'POLLIN' both set should not be on any performance critical path, so I think that's ok (in fs/pipe.c its in pipe_release()). We also continue to include EPOLLERR and EPOLLHUP by default in any exclusive set. Thus, the user can specify EPOLLERR and/or EPOLLHUP but is not required to do so. Since epoll waiters may be interested in other events as well besides EPOLLIN, EPOLLOUT, EPOLLERR and EPOLLHUP, these can still be added by doing a 'dup' call on the target fd and adding that as one normally would with EPOLL_CTL_ADD. Since I think that the POLLIN and POLLOUT events are what we are interest in balancing, I think that the 'dup' thing could perhaps be added to only one of the waiter threads. However, I think that EPOLLIN, EPOLLOUT, EPOLLERR and EPOLLHUP should be sufficient for the majority of use-cases. Since EPOLLEXCLUSIVE is intended to be used with a target fd shared among multiple epfds, where between 1 and n of the epfds may receive an event, it does not satisfy the semantics of EPOLLONESHOT where only 1 epfd would get an event. Thus, it is not allowed to be specified in conjunction with EPOLLEXCLUSIVE. EPOLL_CTL_MOD is also not allowed if the fd was previously added as EPOLLEXCLUSIVE. It seems with the limited number of flags to not be as interesting, but this could be relaxed at some further point. Signed-off-by: Jason Baron Tested-by: Madars Vitolins Cc: Michael Kerrisk Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Al Viro Cc: Eric Wong Cc: Jonathan Corbet Cc: Andy Lutomirski Cc: Hagen Paul Pfeifer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) commit 732042821cfa106b3c20b9780e4c60fee9d68900 Author: Konstantin Khlebnikov Date: Fri Feb 5 15:37:01 2016 -0800 radix-tree: fix oops after radix_tree_iter_retry Helper radix_tree_iter_retry() resets next_index to the current index. In following radix_tree_next_slot current chunk size becomes zero. This isn't checked and it tries to dereference null pointer in slot. Tagged iterator is fine because retry happens only at slot 0 where tag bitmask in iter->tags is filled with single bit. Fixes: 46437f9a554f ("radix-tree: fix race in gang lookup") Signed-off-by: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: Hugh Dickins Cc: Ohad Ben-Cohen Cc: Jeremiah Mahler Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b14fd334ff3dc47b31c3592c166af5ea42b204d3 Author: Michael Kerrisk (man-pages) Date: Fri Feb 5 15:36:58 2016 -0800 MAINTAINERS: trim the file triggers for ABI/API Commit ea8f8fc8631 ("MAINTAINERS: add linux-api for review of API/ABI changes") added file triggers for various paths that likely indicated API/ABI changes. However, catching all changes in Documentation/ABI/ and include/uapi/ produces a large volume of mail to linux-api, rather than only API/ABI changes. Drop those two entries, but leave include/linux/syscalls.h and kernel/sys_ni.c to catch syscall-related changes. [josh@joshtriplett.org: redid changelog] Signed-off-by: Michael Kerrisk Acked-by: Shuah khan Cc: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit d2b2a28e640489df64cc50123f4c3c47d9ad7d13 Author: Dmitry Monakhov Date: Fri Feb 5 15:36:55 2016 -0800 dax: dirty inode only if required Signed-off-by: Dmitry Monakhov Reviewed-by: Jan Kara Reviewed-by: Ross Zwisler Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae026204a2b9060817503408906b35cefd824420 Author: Kirill A. Shutemov Date: Fri Feb 5 15:36:53 2016 -0800 thp: make deferred_split_scan() work again We need to iterate over split_queue, not local empty list to get anything split from the shrinker. Fixes: e3ae19535c66 ("thp: limit number of object to scan on deferred_split_scan()") Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12352d3cae2cebe18805a91fab34b534d7444231 Author: Konstantin Khlebnikov Date: Fri Feb 5 15:36:50 2016 -0800 mm: replace vma_lock_anon_vma with anon_vma_lock_read/write Sequence vma_lock_anon_vma() - vma_unlock_anon_vma() isn't safe if anon_vma appeared between lock and unlock. We have to check anon_vma first or call anon_vma_prepare() to be sure that it's here. There are only few users of these legacy helpers. Let's get rid of them. This patch fixes anon_vma lock imbalance in validate_mm(). Write lock isn't required here, read lock is enough. And reorders expand_downwards/expand_upwards: security_mmap_addr() and wrapping-around check don't have to be under anon vma lock. Link: https://lkml.kernel.org/r/CACT4Y+Y908EjM2z=706dv4rV6dWtxTLK9nFg9_7DhRMLppBo2g@mail.gmail.com Signed-off-by: Konstantin Khlebnikov Reported-by: Dmitry Vyukov Acked-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 14 ------------- mm/mmap.c | 55 ++++++++++++++++++++++++---------------------------- 2 files changed, 25 insertions(+), 44 deletions(-) commit c95a51807b730e4681e2ecbdfd669ca52601959e Author: xuejiufei Date: Fri Feb 5 15:36:47 2016 -0800 ocfs2/dlm: clear refmap bit of recovery lock while doing local recovery cleanup When recovery master down, dlm_do_local_recovery_cleanup() only remove the $RECOVERY lock owned by dead node, but do not clear the refmap bit. Which will make umount thread falling in dead loop migrating $RECOVERY to the dead node. Signed-off-by: xuejiufei Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 2 ++ 1 file changed, 2 insertions(+) commit 012a4163be4559d406ed2d7f2aa459538eb8b686 Author: Nicolai Stange Date: Fri Feb 5 15:36:44 2016 -0800 um: asm/page.h: remove the pte_high member from struct pte_t Commit 16da306849d0 ("um: kill pfn_t") introduced a compile warning for defconfig (SUBARCH=i386): arch/um/kernel/skas/mmu.c:38:206: warning: right shift count >= width of type [-Wshift-count-overflow] Aforementioned patch changes the definition of the phys_to_pfn() macro from ((pfn_t) ((p) >> PAGE_SHIFT)) to ((p) >> PAGE_SHIFT) This effectively changes the phys_to_pfn() expansion's type from unsigned long long to unsigned long. Through the callchain init_stub_pte() => mk_pte(), the expansion of phys_to_pfn() is (indirectly) fed into the 'phys' argument of the pte_set_val(pte, phys, prot) macro, eventually leading to (pte).pte_high = (phys) >> 32; This results in the warning from above. Since UML only deals with 32 bit addresses, the upper 32 bits from 'phys' used to be always zero anyway. Also, all page protection flags defined by UML don't use any bits beyond bit 9. Since the contents of a PTE are defined within architecture scope only, the ->pte_high member can be safely removed. Remove the ->pte_high member from struct pte_t. Rename ->pte_low to ->pte. Adapt the pte helper macros in arch/um/include/asm/page.h. Noteworthy is the pte_copy() macro where a smp_wmb() gets dropped. This write barrier doesn't seem to be paired with any read barrier though and thus, was useless anyway. Fixes: 16da306849d0 ("um: kill pfn_t") Signed-off-by: Nicolai Stange Cc: Dan Williams Cc: Richard Weinberger Cc: Nicolai Stange Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/um/include/asm/page.h | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 080fe2068e1c7f19f565b30b78baf78edf16a980 Author: Vlastimil Babka Date: Fri Feb 5 15:36:41 2016 -0800 mm, hugetlb: don't require CMA for runtime gigantic pages Commit 944d9fec8d7a ("hugetlb: add support for gigantic page allocation at runtime") has added the runtime gigantic page allocation via alloc_contig_range(), making this support available only when CONFIG_CMA is enabled. Because it doesn't depend on MIGRATE_CMA pageblocks and the associated infrastructure, it is possible with few simple adjustments to require only CONFIG_MEMORY_ISOLATION instead of full CONFIG_CMA. After this patch, alloc_contig_range() and related functions are available and used for gigantic pages with just CONFIG_MEMORY_ISOLATION enabled. Note CONFIG_CMA selects CONFIG_MEMORY_ISOLATION. This allows supporting runtime gigantic pages without the CMA-specific checks in page allocator fastpaths. Signed-off-by: Vlastimil Babka Cc: Luiz Capitulino Cc: Kirill A. Shutemov Cc: Zhang Yanfei Cc: Yasuaki Ishimatsu Cc: Joonsoo Kim Cc: Naoya Horiguchi Cc: Mel Gorman Cc: Davidlohr Bueso Cc: Hillf Danton Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/hugetlbpage.c | 4 ++-- include/linux/gfp.h | 6 +++--- mm/hugetlb.c | 2 +- mm/page_alloc.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit b4330afbed0cdceeba33c4945158c55771047e81 Author: Mike Kravetz Date: Fri Feb 5 15:36:38 2016 -0800 mm/hugetlb: fix gigantic page initialization/allocation Attempting to preallocate 1G gigantic huge pages at boot time with "hugepagesz=1G hugepages=1" on the kernel command line will prevent booting with the following: kernel BUG at mm/hugetlb.c:1218! When mapcount accounting was reworked, the setting of compound_mapcount_ptr in prep_compound_gigantic_page was overlooked. As a result, the validation of mapcount in free_huge_page fails. The "BUG_ON" checks in free_huge_page were also changed to "VM_BUG_ON_PAGE" to assist with debugging. Fixes: 53f9263baba69 ("mm: rework mapcount accounting to enable 4k mapping of THPs") Signed-off-by: Mike Kravetz Signed-off-by: Naoya Horiguchi Acked-by: Kirill A. Shutemov Acked-by: David Rientjes Tested-by: Vlastimil Babka Cc: "Aneesh Kumar K.V" Cc: Jerome Marchand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cf2a82ee432730ab25c21d054c67f296af4fc4bd Author: Kirill A. Shutemov Date: Fri Feb 5 15:36:36 2016 -0800 mm: downgrade VM_BUG in isolate_lru_page() to warning Calling isolate_lru_page() is wrong and shouldn't happen, but it not nessesary fatal: the page just will not be isolated if it's not on LRU. Let's downgrade the VM_BUG_ON_PAGE() to WARN_RATELIMIT(). Signed-off-by: Kirill A. Shutemov Cc: Dmitry Vyukov Cc: Vlastimil Babka Cc: David Rientjes Cc: Naoya Horiguchi Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77bf45e78050790d8f7fc30b87a0ca674bf6265a Author: Kirill A. Shutemov Date: Fri Feb 5 15:36:33 2016 -0800 mempolicy: do not try to queue pages from !vma_migratable() Maybe I miss some point, but I don't see a reason why we try to queue pages from non migratable VMAs. This testcase steps on VM_BUG_ON_PAGE() in isolate_lru_page(): #include #include #include #include #include #define SIZE 0x2000 int foo; int main() { int fd; char *p; unsigned long mask = 2; fd = open("/dev/sg0", O_RDWR); p = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); /* Faultin pages */ foo = p[0] + p[0x1000]; mbind(p, SIZE, MPOL_BIND, &mask, 4, MPOL_MF_MOVE | MPOL_MF_STRICT); return 0; } The only case when we can queue pages from such VMA is MPOL_MF_STRICT plus MPOL_MF_MOVE or MPOL_MF_MOVE_ALL for VMA which has pages on LRU, but gfp mask is not sutable for migaration (see mapping_gfp_mask() check in vma_migratable()). That's looks like a bug to me. Let's filter out non-migratable vma at start of queue_pages_test_walk() and go to queue_pages_pte_range() only if MPOL_MF_MOVE or MPOL_MF_MOVE_ALL flag is set. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dmitry Vyukov Cc: Vlastimil Babka Cc: David Rientjes Cc: Naoya Horiguchi Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 564e81a57f9788b1475127012e0fd44e9049e342 Author: Tetsuo Handa Date: Fri Feb 5 15:36:30 2016 -0800 mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any progress Jan Stancek has reported that system occasionally hanging after "oom01" testcase from LTP triggers OOM. Guessing from a result that there is a kworker thread doing memory allocation and the values between "Node 0 Normal free:" and "Node 0 Normal:" differs when hanging, vmstat is not up-to-date for some reason. According to commit 373ccbe59270 ("mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress"), it meant to force the kworker thread to take a short sleep, but it by error used schedule_timeout(1). We missed that schedule_timeout() in state TASK_RUNNING doesn't do anything. Fix it by using schedule_timeout_uninterruptible(1) which forces the kworker thread to take a short sleep in order to make sure that vmstat is up-to-date. Fixes: 373ccbe59270 ("mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress") Signed-off-by: Tetsuo Handa Reported-by: Jan Stancek Acked-by: Michal Hocko Cc: Tejun Heo Cc: Cristopher Lameter Cc: Joonsoo Kim Cc: Arkadiusz Miskiewicz Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccde8bd4014eb2f01102f7a64f0fad3df193b758 Author: Michal Hocko Date: Fri Feb 5 15:36:27 2016 -0800 vmstat: make vmstat_update deferrable Commit 0eb77e988032 ("vmstat: make vmstat_updater deferrable again and shut down on idle") made vmstat_shepherd deferrable. vmstat_update itself is still useing standard timer which might interrupt idle task. This is possible because "mm, vmstat: make quiet_vmstat lighter" removed cancel_delayed_work from the quiet_vmstat. Change vmstat_work to use DEFERRABLE_WORK to prevent from pointless wakeups from the idle context. Acked-by: Christoph Lameter Signed-off-by: Michal Hocko Cc: Mike Galbraith Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f01f17d3705bb6081c9e5728078f64067982be36 Author: Michal Hocko Date: Fri Feb 5 15:36:24 2016 -0800 mm, vmstat: make quiet_vmstat lighter Mike has reported a considerable overhead of refresh_cpu_vm_stats from the idle entry during pipe test: 12.89% [kernel] [k] refresh_cpu_vm_stats.isra.12 4.75% [kernel] [k] __schedule 4.70% [kernel] [k] mutex_unlock 3.14% [kernel] [k] __switch_to This is caused by commit 0eb77e988032 ("vmstat: make vmstat_updater deferrable again and shut down on idle") which has placed quiet_vmstat into cpu_idle_loop. The main reason here seems to be that the idle entry has to get over all zones and perform atomic operations for each vmstat entry even though there might be no per cpu diffs. This is a pointless overhead for _each_ idle entry. Make sure that quiet_vmstat is as light as possible. First of all it doesn't make any sense to do any local sync if the current cpu is already set in oncpu_stat_off because vmstat_update puts itself there only if there is nothing to do. Then we can check need_update which should be a cheap way to check for potential per-cpu diffs and only then do refresh_cpu_vm_stats. The original patch also did cancel_delayed_work which we are not doing here. There are two reasons for that. Firstly cancel_delayed_work from idle context will blow up on RT kernels (reported by Mike): CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.5.0-rt3 #7 Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.20C 09/23/2013 Call Trace: dump_stack+0x49/0x67 ___might_sleep+0xf5/0x180 rt_spin_lock+0x20/0x50 try_to_grab_pending+0x69/0x240 cancel_delayed_work+0x26/0xe0 quiet_vmstat+0x75/0xa0 cpu_idle_loop+0x38/0x3e0 cpu_startup_entry+0x13/0x20 start_secondary+0x114/0x140 And secondly, even on !RT kernels it might add some non trivial overhead which is not necessary. Even if the vmstat worker wakes up and preempts idle then it will be most likely a single shot noop because the stats were already synced and so it would end up on the oncpu_stat_off anyway. We just need to teach both vmstat_shepherd and vmstat_update to stop scheduling the worker if there is nothing to do. [mgalbraith@suse.de: cancel pending work of the cpu_stat_off CPU] Signed-off-by: Michal Hocko Reported-by: Mike Galbraith Acked-by: Christoph Lameter Signed-off-by: Mike Galbraith Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 68 +++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 22 deletions(-) commit 1ce221036b83288358d8d5d5ff1784657b3ab4e9 Author: Vlastimil Babka Date: Fri Feb 5 15:36:21 2016 -0800 mm/Kconfig: correct description of DEFERRED_STRUCT_PAGE_INIT The description mentions kswapd threads, while the deferred struct page initialization is actually done by one-off "pgdatinitX" threads. Fix the description so that potentially users are not confused about pgdatinit threads using CPU after boot instead of kswapd. Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1f1ffb8a151e8c59899c78019f76cb8f64be13f5 Author: David Gibson Date: Fri Feb 5 15:36:19 2016 -0800 memblock: don't mark memblock_phys_mem_size() as __init At the moment memblock_phys_mem_size() is marked as __init, and so is discarded after boot. This is different from most of the memblock functions which are marked __init_memblock, and are only discarded after boot if memory hotplug is not configured. To allow for upcoming code which will need memblock_phys_mem_size() in the hotplug path, change it from __init to __init_memblock. Signed-off-by: David Gibson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7ce36924344ace0dbdc855b1206cacc46b36d45 Author: Eric Dumazet Date: Fri Feb 5 15:36:16 2016 -0800 dump_stack: avoid potential deadlocks Some servers experienced fatal deadlocks because of a combination of bugs, leading to multiple cpus calling dump_stack(). The checksumming bug was fixed in commit 34ae6a1aa054 ("ipv6: update skb->csum when CE mark is propagated"). The second problem is a faulty locking in dump_stack() CPU1 runs in process context and calls dump_stack(), grabs dump_lock. CPU2 receives a TCP packet under softirq, grabs socket spinlock, and call dump_stack() from netdev_rx_csum_fault(). dump_stack() spins on atomic_cmpxchg(&dump_lock, -1, 2), since dump_lock is owned by CPU1 While dumping its stack, CPU1 is interrupted by a softirq, and happens to process a packet for the TCP socket locked by CPU2. CPU1 spins forever in spin_lock() : deadlock Stack trace on CPU1 looked like : NMI backtrace for cpu 1 RIP: _raw_spin_lock+0x25/0x30 ... Call Trace: tcp_v6_rcv+0x243/0x620 ip6_input_finish+0x11f/0x330 ip6_input+0x38/0x40 ip6_rcv_finish+0x3c/0x90 ipv6_rcv+0x2a9/0x500 process_backlog+0x461/0xaa0 net_rx_action+0x147/0x430 __do_softirq+0x167/0x2d0 call_softirq+0x1c/0x30 do_softirq+0x3f/0x80 irq_exit+0x6e/0xc0 smp_call_function_single_interrupt+0x35/0x40 call_function_single_interrupt+0x6a/0x70 printk+0x4d/0x4f printk_address+0x31/0x33 print_trace_address+0x33/0x3c print_context_stack+0x7f/0x119 dump_trace+0x26b/0x28e show_trace_log_lvl+0x4f/0x5c show_stack_log_lvl+0x104/0x113 show_stack+0x42/0x44 dump_stack+0x46/0x58 netdev_rx_csum_fault+0x38/0x3c __skb_checksum_complete_head+0x6e/0x80 __skb_checksum_complete+0x11/0x20 tcp_rcv_established+0x2bd5/0x2fd0 tcp_v6_do_rcv+0x13c/0x620 sk_backlog_rcv+0x15/0x30 release_sock+0xd2/0x150 tcp_recvmsg+0x1c1/0xfc0 inet_recvmsg+0x7d/0x90 sock_recvmsg+0xaf/0xe0 ___sys_recvmsg+0x111/0x3b0 SyS_recvmsg+0x5c/0xb0 system_call_fastpath+0x16/0x1b Fixes: b58d977432c8 ("dump_stack: serialize the output from dump_stack()") Signed-off-by: Eric Dumazet Cc: Alex Thorlton Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/dump_stack.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit acf128d048c76aeaa99646bce3488d73be215f70 Author: Andrea Arcangeli Date: Fri Feb 5 15:36:13 2016 -0800 mm: validate_mm browse_rb SMP race condition The mmap_sem for reading in validate_mm called from expand_stack is not enough to prevent the argumented rbtree rb_subtree_gap information to change from under us because expand_stack may be running from other threads concurrently which will hold the mmap_sem for reading too. The argumented rbtree is updated with vma_gap_update under the page_table_lock so use it in browse_rb() too to avoid false positives. Signed-off-by: Andrea Arcangeli Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Konstantin Khlebnikov Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit af1ddcb5c63cfb9744c29e88db0bab6bb25ad76b Author: Sudip Mukherjee Date: Fri Feb 5 15:36:10 2016 -0800 m32r: fix build failure due to SMP and MMU One of the randconfig build failed with the error: arch/m32r/kernel/smp.c: In function 'smp_flush_tlb_mm': arch/m32r/kernel/smp.c:283:20: error: subscripted value is neither array nor pointer nor vector mmc = &mm->context[cpu_id]; ^ arch/m32r/kernel/smp.c: In function 'smp_flush_tlb_page': arch/m32r/kernel/smp.c:353:20: error: subscripted value is neither array nor pointer nor vector mmc = &mm->context[cpu_id]; ^ arch/m32r/kernel/smp.c: In function 'smp_invalidate_interrupt': arch/m32r/kernel/smp.c:479:41: error: subscripted value is neither array nor pointer nor vector unsigned long *mmc = &flush_mm->context[cpu_id]; It turned out that CONFIG_SMP was defined but CONFIG_MMU was not defined. But arch/m32r/include/asm/mmu.h only defines mm_context_t as an array when both CONFIG_SMP and CONFIG_MMU are defined. And arch/m32r/kernel/smp.c is always using context as an array. So without MMU SMP can not work. Signed-off-by: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m32r/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9c5a05bc350c29285a89d6e1f3b68c8c7f308207 Author: Ross Zwisler Date: Fri Feb 5 15:36:08 2016 -0800 block: fix pfn_mkwrite() DAX fault handler Previously the pfn_mkwrite() fault handler for raw block devices called bldev_dax_fault() -> __dax_fault() to do a full DAX page fault. Really what the pfn_mkwrite() fault handler needs to do is call dax_pfn_mkwrite() to make sure that the radix tree entry for the given PTE is marked as dirty so that a follow-up fsync or msync call will flush it durably to media. Fixes: 5a023cdba50c ("block: enable dax for raw block devices") Signed-off-by: Ross Zwisler Cc: Alexander Viro Cc: Dan Williams Cc: Dave Chinner Reviewed-by: Jan Kara Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 823dd3224a07f618d652a7743c9603222d019de3 Author: Sasha Levin Date: Fri Feb 5 15:36:05 2016 -0800 signals: avoid random wakeups in sigsuspend() A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING being set. Avoid that by making sure we were signaled, like sys_pause() does. Signed-off-by: Sasha Levin Acked-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Cc: Dmitry Vyukov Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/signal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0f4a943168f31d29a1701908931acaba518b131a Author: Nicholas Bellinger Date: Tue Jan 19 15:23:02 2016 -0800 target: Fix remote-port TMR ABORT + se_cmd fabric stop To address the bug where fabric driver level shutdown of se_cmd occurs at the same time when TMR CMD_T_ABORTED is happening resulting in a -1 ->cmd_kref, this patch adds a CMD_T_FABRIC_STOP bit that is used to determine when TMR + driver I_T nexus shutdown is happening concurrently. It changes target_sess_cmd_list_set_waiting() to obtain se_cmd->cmd_kref + set CMD_T_FABRIC_STOP, and drop local reference in target_wait_for_sess_cmds() and invoke extra target_put_sess_cmd() during Task Aborted Status (TAS) when necessary. Also, it adds a new target_wait_free_cmd() wrapper around transport_wait_for_tasks() for the special case within transport_generic_free_cmd() to set CMD_T_FABRIC_STOP, and is now aware of CMD_T_ABORTED + CMD_T_TAS status bits to know when an extra transport_put_cmd() during TAS is required. Note transport_generic_free_cmd() is expected to block on cmd->cmd_wait_comp in order to follow what iscsi-target expects during iscsi_conn context se_cmd shutdown. Cc: Quinn Tran Cc: Himanshu Madhani Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 54 ++++++++---- drivers/target/target_core_transport.c | 145 +++++++++++++++++++++++++-------- include/target/target_core_base.h | 2 + 3 files changed, 150 insertions(+), 51 deletions(-) commit 79e2f8dd522873614eb31001745af487451a10de Merge: 9298230 e79aee4 53af16f Author: Rafael J. Wysocki Date: Sat Feb 6 00:34:01 2016 +0100 Merge branches 'pm-core' and 'pm-domains' * pm-core: PM: Avoid false-positive warnings in dev_pm_domain_set() ACPI / LPSS: set PM domain via helper setter * pm-domains: PM / Domains: Silence compiler warning for an unused function commit 929823040ab8609e88ae4acf32914dde0d063896 Merge: ed1f0ee 2db8f9a Author: Rafael J. Wysocki Date: Sat Feb 6 00:33:52 2016 +0100 Merge branches 'pnp' and 'acpi-cppc' * pnp: PNP: Add Haswell-ULT to Intel MCH size workaround * acpi-cppc: ACPI / CPPC: remove redundant mbox_send_message() declaration commit dd6f86af394160f01f8b6c5349752b63b9e95fcb Merge: ea5a273 ac75fe5 Author: Linus Torvalds Date: Fri Feb 5 12:46:38 2016 -0800 Merge tag 'media/v4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - vb2: fix a vb2_thread regression and DVB read() breakages - vsp1: fix compilation and links creation - s5k6a3: Fix VIDIOC_SUBDEV_G_FMT ioctl for TRY format - exynos4-is: fix a build issue, format negotiation and sensor detection - Fix a regression with pvrusb2 and ir-kbd-i2c - atmel-isi: fix debug message which only show the first format - tda1004x: fix a tuning bug if G_PROPERTY is called too early - saa7134-alsa: fix a bug at device unbinding/driver removal - Fix build of one driver if !HAS_DMA - soc_camera: cleanup control device on async_unbind * tag 'media/v4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] saa7134-alsa: Only frees registered sound cards [media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR [media] vb2: fix nasty vb2_thread regression [media] tda1004x: only update the frontend properties if locked [media] media: i2c: Don't export ir-kbd-i2c module alias [media] exynos4-is: make VIDEO_SAMSUNG_EXYNOS4_IS tristate [media] media: Kconfig: add dependency of HAS_DMA [media] exynos4-is: Wait for 100us before opening sensor [media] exynos4-is: Open shouldn't fail when sensor entity is not linked [media] s5k6a3: Fix VIDIOC_SUBDEV_G_FMT ioctl for TRY format [media] exynos4-is: fix a format string bug [media] drivers/media: vsp1_video: fix compile error [media] atmel-isi: fix debug message which only show the first format [media] soc_camera: cleanup control device on async_unbind [media] v4l: vsp1: Fix wrong entities links creation commit ea5a273c76f8ba3569705362b00c7d94fb92468e Merge: ed1741b 094fd3b Author: Linus Torvalds Date: Fri Feb 5 12:34:44 2016 -0800 Merge tag 'sound-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This was a busy week and I had to prepare a pile of duct tapes for the bugs reported by syzkaller fuzzer in wide range of ALSA core APIs: timer, rawmidi, sequencer, and PCM OSS emulation. Let's see how many other holes we need to plug. Besides that, a few usual boring stuff, HD- and USB-audio quirks, have been added" * tag 'sound-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: timer: Fix leftover link at closing ALSA: seq: Fix lockdep warnings due to double mutex locks ALSA: rawmidi: Fix race at copying & updating the position ALSA: rawmidi: Make snd_rawmidi_transmit() race-free ALSA: hda - Add fixup for Mac Mini 7,1 model ALSA: hda/realtek - Support headset mode for ALC225 ALSA: hda/realtek - Support Dell headset mode for ALC225 ALSA: hda/realtek - New codec support of ALC225 ALSA: timer: Sync timer deletion at closing the system timer ALSA: timer: Fix link corruption due to double start or stop ALSA: seq: Fix yet another races among ALSA timer accesses ALSA: pcm: Fix potential deadlock in OSS emulation ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check ALSA: seq: Fix race at closing in virmidi driver ALSA: emu10k1: correctly handling failed thread creation ALSA: usb-audio: Add quirk for Microsoft LifeCam HD-6000 ALSA: usb-audio: Add native DSD support for PS Audio NuWave DAC ALSA: usb-audio: Fix OPPO HA-1 vendor ID commit 7425f410ca6cffe81400906286f80e8e15d9b301 Author: Selvin Xavier Date: Fri Feb 5 20:06:40 2016 +0530 RDMA/ocrdma: Fixing ocrdma debugfs directory remove During the ocrdma device remove sequence, the debugfs directory tree of each ocrdma device needs to be removed. Use debugfs_remove_recursive instead of debugfs_remove. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aff3ead9fa25b2a472d1a894365f66b28e1e2787 Author: Selvin Xavier Date: Fri Feb 5 20:06:39 2016 +0530 RDMA/ocrdma: Fix pkey_index returned by driver in rq work completion Currently returning the pkey value instead of pkey index. pkey index is always zero since ocrdma supports only default pkey. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7d82df1663e8a66961954258f3a99701f0126e73 Author: Selvin Xavier Date: Fri Feb 5 20:06:38 2016 +0530 RDMA/ocrdma: populate max_sge_rd in device attributes max_sge_rd is used by some of the ULPs to calculate the maximum number of SGEs that can be used for RDMA READ. Populating this value in the response of query_device verb. Also, avoid checking the max_srq_sge while populating max_sge. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd98d89698855f6cf5650c014e5d3fca38783c8b Author: Selvin Xavier Date: Fri Feb 5 20:06:37 2016 +0530 RDMA/ocrdma: Initialize stats resources in the driver before ib device registration. In the latest kernel, process_mad hook of the driver can be invoked as soon as device is registered. In this hook, ocrdma driver is issuing a command to get the stats counters from the HW. This is triggering system crash since the statistics command resources are not allocated by the driver. Changing the sequence of initialization to avoid this crash. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_main.c | 6 ++++++ drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 14 ++++---------- drivers/infiniband/hw/ocrdma/ocrdma_stats.h | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) commit 0cf1337e0b83c16de4e7e98dad3a6afce6043fea Author: Simon Horman Date: Fri Feb 5 14:10:13 2016 -0600 PCI: rcar: Add device tree support for r8a7793 Add "renesas,pcie-r8a7793" as a compatibility string for "renesas,pcie-rcar-gen2". This doesn't change the driver, so it does nothing by itself. But it does mean that checkpatch won't complain about a future patch that adds "renesas,pci-r8a7793" to a DT, which helps ensure that shipped DTs use documented compatibility strings. [bhelgaas: changelog] Signed-off-by: Simon Horman Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Documentation/devicetree/bindings/pci/rcar-pci.txt | 1 + 1 file changed, 1 insertion(+) commit a176cd304a8a07d6d9191126fd9bece4f67358c3 Author: Simon Horman Date: Fri Feb 5 14:10:04 2016 -0600 PCI: rcar: Add gen2 device tree support for r8a7793 Add "renesas,pci-r8a7793" as a compatibility string for "renesas,pci-rcar-gen2". This doesn't change the driver, so it does nothing by itself. But it does mean that checkpatch won't complain about a future patch that adds "renesas,pci-r8a7793" to a DT, which helps ensure that shipped DTs use documented compatibility strings. [bhelgaas: changelog] Signed-off-by: Simon Horman Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt | 1 + 1 file changed, 1 insertion(+) commit ed1741b77c162ad7087949fda39af4ec8c33e663 Merge: df48ab3 d42d610 Author: Linus Torvalds Date: Fri Feb 5 11:20:15 2016 -0800 Merge git://www.linux-watchdog.org/linux-watchdog Pull watchdog fixes from Wim Van Sebroeck: "This fixes several Kconfig dependencies, a compilation warning in pcwd_usb, a failure to abort the sp805 wdt after a ping and the max63xx wdt's MODULE_LICENSE" * git://www.linux-watchdog.org/linux-watchdog: watchdog: Fix dependencies for !HAS_IOMEM archs watchdog: imgdpc: select WATCHDOG_CORE watchdog: tango: rename ARCH_TANGOX to ARCH_TANGO watchdog: pcwd_usb: fix compilation warning watchdog: sp805: ping fails to abort wdt reset watchdog: max63xx: make module's license marker match the header commit 6c361d10e0eb859233c71954abcd20d2d8700587 Author: Takashi Iwai Date: Fri Feb 5 20:12:24 2016 +0100 Revert "ALSA: hda - Fix noise on Gigabyte Z170X mobo" This reverts commit 0c25ad80408e95e0a4fbaf0056950206e95f726f. The original commit disabled the aamixer path due to the noise problem, but it turned out that some mobo with the same PCI SSID doesn't suffer from the issue, and the disabled function (analog loopback) is still demanded by users. Since the recent commit [e7fdd52779a6: ALSA: hda - Implement loopback control switch for Realtek and other codecs], we have the dynamic mixer switch to enable/disable the aamix path, and we don't have to disable the path statically any longer. So, let's revert the disablement, so that only the user suffering from the noise problem can turn off the aamix on the fly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=108301 Reported-by: Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 -------- 1 file changed, 8 deletions(-) commit e6c058f9b2700a720d3fad0f6caad1d030c533ee Author: Ralf Baechle Date: Fri Feb 5 17:15:42 2016 +0100 MIPS: Wire up copy_file_range syscall. Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/unistd.h | 15 +++++++++------ arch/mips/kernel/scall32-o32.S | 1 + arch/mips/kernel/scall64-64.S | 1 + arch/mips/kernel/scall64-n32.S | 1 + arch/mips/kernel/scall64-o32.S | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) commit eceb3e61c74356590f37cec89708770b333162c4 Author: Biao Huang Date: Wed Feb 3 09:24:45 2016 +0800 pinctrl: mediatek: fix direction control issue Since input-enable/disable and input-schmitt-enable/disable are workable when gpio direction is input, so add direction setting when do input-enable/disable and input-schmitt-enable/disable properties. Signed-off-by: Biao Huang Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 ++ 1 file changed, 2 insertions(+) commit 56661a2ed5348f3d7a3ac8788656654dd50904cd Author: Takashi Sakamoto Date: Fri Feb 5 09:56:08 2016 +0900 ALSA: firewire-tascam: remove needless member for control and status message Commit 3beab0f844fa added a member for control and status message, while it's planned and not implemented yet. This commit removes it. Fixes: 3beab0f844fa('ALSA: firewire-tascam: add support for outgoing MIDI messages by asynchronous transaction') Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam.h | 3 --- 1 file changed, 3 deletions(-) commit 61ebe499643703af517a8253662982f6f4764c92 Author: Takashi Sakamoto Date: Fri Feb 5 09:56:07 2016 +0900 ALSA: firewire-tascam: remove a flag for controller Currently, 'struct snd_tscm_spec' has a member named as 'is_controller' to identify MIDI controller. This member was originally added to skip parse control and status messages in isochronous packets for non-controller model. As long as I investigate, FW-1804 (non-controller) also transfers the control and status message, thus it becomes meaningless. This commit removes it. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam.c | 3 --- sound/firewire/tascam/tascam.h | 1 - 2 files changed, 4 deletions(-) commit 3e78e1518e129407fae75c867e48828262b3ea6d Author: Takashi Sakamoto Date: Fri Feb 5 09:56:06 2016 +0900 ALSA: firewire-tascam: add support for FW-1804 This model supports: * maximum 12 PCM channels for PCM playback * maximum 18 PCM channels for PCM capture * 4 ports for MIDI playback * 4 ports for MIDI capture * control and status messages in tx isochronous packets * up to 96.0 kHz This commit adds support for the model. As the other supported models, all of available PCM channels are always enabled. As I described in commit c0949b278515da94, Ilya Zimnovich had investigated TASCAM FireWire series in 2011 with his FW-1804. In his report, this model has internal multiplexer and any software implementation can control it. Following to the design of ALSA firewire stack, this commit won't implement it. It should be in userspace via Linux fw character device. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 5d2560a427fc7c4050a320be62c4994705ca81b1 Author: Takashi Sakamoto Date: Fri Feb 5 09:56:05 2016 +0900 ALSA: firewire-tascam: fix NULL pointer dereference when model identification fails When unsupported models are connected, snd-firewire-tascam module causes NULL pointer dereference in fw_core_remove_address_handler() (due to list_del_rcu()). This commit prevents this bug. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-transaction.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 360a8245680053619205a3ae10e6bfe624a5da1d Author: David Henningsson Date: Fri Feb 5 09:05:41 2016 +0100 ALSA: hda - Fix static checker warning in patch_hdmi.c The static checker warning is: sound/pci/hda/patch_hdmi.c:460 hdmi_eld_ctl_get() error: __memcpy() 'eld->eld_buffer' too small (256 vs 512) I have a hard time figuring out if this can ever cause an information leak (I don't think so), but nonetheless it does not hurt to increase the robustness of the code. Fixes: 68e03de98507 ('ALSA: hda - hdmi: Do not expose eld data when eld is invalid') Reported-by: Dan Carpenter Signed-off-by: David Henningsson Cc: # v3.9+ Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 320549a22484952d88d4e0320218765b16cd2174 Author: Mark Brown Date: Fri Feb 5 11:22:04 2016 +0000 regmap: mmio: Revert to v4.4 endianness handling Commit 29bb45f25ff3 (regmap-mmio: Use native endianness for read/write) attempted to fix some long standing bugs in the MMIO implementation for big endian systems caused by duplicate byte swapping in both regmap and readl()/writel() which affected MIPS systems as when they are in big endian mode they flip the endianness of all registers in the system, not just the CPU. MIPS systems had worked around this by declaring regmap using IPs as little endian which is inaccurate, unfortunately the issue had not been reported. Sadly the fix makes things worse rather than better. By changing the behaviour to match the documentation it caused behaviour changes for other IPs which broke them and by using the __raw I/O accessors to avoid the endianness swapping in readl()/writel() it removed some memory ordering guarantees and could potentially generate unvirtualisable instructions on some architectures. Unfortunately sorting out all this mess in any half way sensible fashion was far too invasive to go in during an -rc cycle so instead let's go back to the old broken behaviour for v4.5, the better fixes are already queued for v4.6. This does mean that we keep the broken MIPS DTs for another release but that seems the least bad way of handling the situation. Reported-by: Johannes Berg Signed-off-by: Mark Brown arch/mips/boot/dts/brcm/bcm6328.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7125.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7346.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7358.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7360.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7362.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7420.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7425.dtsi | 1 + arch/mips/boot/dts/brcm/bcm7435.dtsi | 1 + drivers/base/regmap/regmap-mmio.c | 16 ++++++++-------- 10 files changed, 17 insertions(+), 8 deletions(-) commit 75edb54a1dea5ea1c8d3d82e27dc9ee3070f5935 Author: Dmitry Vyukov Date: Thu Feb 4 16:27:50 2016 +0100 x86: Fix KASAN false positives in thread_saved_pc() thread_saved_pc() reads stack of a potentially running task. This can cause false KASAN stack-out-of-bounds reports, because the running task concurrently poisons and unpoisons own stack. The same happens in get_wchan(), and get get_wchan() was fixed by using READ_ONCE_NOCHECK(). Do the same here. Example KASAN report triggered by sysrq-t: BUG: KASAN: out-of-bounds in sched_show_task+0x306/0x3b0 at addr ffff880043c97c18 Read of size 8 by task syz-executor/23839 [...] page dumped because: kasan: bad access detected [...] Call Trace: [] __asan_report_load8_noabort+0x3e/0x40 [] sched_show_task+0x306/0x3b0 [] show_state_filter+0x124/0x1a0 [] fn_show_state+0x10/0x20 [] k_spec+0xa8/0xe0 [] kbd_event+0xb9f/0x4000 [] input_to_handler+0x3a7/0x4b0 [] input_pass_values.part.5+0x554/0x6b0 [] input_handle_event+0x2ac/0x1070 [] input_inject_event+0x237/0x280 [] evdev_write+0x478/0x680 [] __vfs_write+0x113/0x480 [] vfs_write+0x167/0x4a0 [] SyS_write+0x111/0x220 Signed-off-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: glider@google.com Cc: kasan-dev@googlegroups.com Cc: kcc@google.com Cc: linux-kernel@vger.kernel.org Cc: ryabinin.a.a@gmail.com Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12ffbbe94d8c0186daccc2e61d5ff87b15aa7bc6 Merge: 6344a5c 0fb5b1f Author: James Bottomley Date: Thu Feb 4 21:37:52 2016 -0800 Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes commit 6739b3d7bc18a5373efd863b11831e8f515fffe1 Merge: c745884 91a25e4 Author: Dave Airlie Date: Fri Feb 5 15:24:17 2016 +1000 Merge branch 'drm-fixes-mst' of git://people.freedesktop.org/~airlied/linux into drm-fixes displayport multistream fixes from AMD. * 'drm-fixes-mst' of git://people.freedesktop.org/~airlied/linux: drm/dp/mst: deallocate payload on port destruction drm/dp/mst: Reverse order of MST enable and clearing VC payload table. drm/dp/mst: move GUID storage from mgr, port to only mst branch drm/dp/mst: change MST detection scheme drm/dp/mst: Calculate MST PBN with 31.32 fixed point drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil drm/mst: Add range check for max_payloads during init drm/mst: Don't ignore the MST PBN self-test result drm: fix missing reference counting decrease commit 91a25e463130c8e19bdb42f2d827836c7937992e Author: Mykola Lysenko Date: Wed Jan 27 09:39:36 2016 -0500 drm/dp/mst: deallocate payload on port destruction This is needed to properly deallocate port payload after downstream branch get unplugged. In order to do this unplugged MST topology should be preserved, to find first alive port on path to unplugged MST topology, and send payload deallocation request to branch device of found port. For this mstb and port kref's are used in reversed order to track when port and branch memory could be freed. Added additional functions to find appropriate mstb as described above. Signed-off-by: Mykola Lysenko Reviewed-by: Harry Wentland Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 91 ++++++++++++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 8 deletions(-) commit c175cd16df272119534058f28cbd5eeac6ff2d24 Author: Andrey Grodzovsky Date: Fri Jan 22 17:07:29 2016 -0500 drm/dp/mst: Reverse order of MST enable and clearing VC payload table. On DELL U3014 if you clear the table before enabling MST it sometimes hangs the receiver. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Cc: stable@vger.kernel.org Acked-by: Alex Deucher Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5e93b8208d3c419b515fb75e2601931c027e12ab Author: Hersen Wu Date: Fri Jan 22 17:07:28 2016 -0500 drm/dp/mst: move GUID storage from mgr, port to only mst branch Previous implementation does not handle case below: boot up one MST branch to DP connector of ASIC. After boot up, hot plug 2nd MST branch to DP output of 1st MST, GUID is not created for 2nd MST branch. When downstream port of 2nd MST branch send upstream request, it fails because 2nd MST branch GUID is not available. New Implementation: only create GUID for MST branch and save it within Branch. Signed-off-by: Hersen Wu Reviewed-by: Harry Wentland Cc: stable@vger.kernel.org Acked-by: Alex Deucher Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 64 +++++++++++++++-------------------- include/drm/drm_dp_mst_helper.h | 25 ++++++-------- 2 files changed, 38 insertions(+), 51 deletions(-) commit cfcfa086d43ced33e1099b9befb12f17fca102e1 Author: Mykola Lysenko Date: Fri Jan 22 17:07:27 2016 -0500 drm/dp/mst: change MST detection scheme 1. Get edid for all connected MST displays, not only on logical ports, in the same thread as MST topology detection is done: There are displays that have branches inside w/o logical ports. So in case another SST display connected downstream system can end-up in situation when 3 DOWN requests sent: two for ‘remote i2c read’ and one for ‘enum path resources’, making slots full. 2. Call notification callback in one place in the end of topology discovery/update: This is done to reduce number of events sent to userspace in case complex topology discovery is going, adding multiple number of connectors; 3. Remove notification callback call from short pulse interrupt processing function: This is done in order not to block interrupt processing function, in case any MST request will be made from it. Notification will be send from topology discovery/update work item. Signed-off-by: Mykola Lysenko Reviewed-by: Harry Wentland Cc: stable@vger.kernel.org Acked-by: Alex Deucher Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 37 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) commit a9ebb3e46c7ef6112c0da466ef0954673ad36832 Author: Harry Wentland Date: Fri Jan 22 17:07:26 2016 -0500 drm/dp/mst: Calculate MST PBN with 31.32 fixed point Our PBN value overflows the 20 bits integer part of the 20.12 fixed point. We need to use 31.32 fixed point to avoid this. This happens with display clocks larger than 293122 (at 24 bpp), which we see with the Sharp (and similar) 4k tiled displays. Signed-off-by: Harry Wentland Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 67 ++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 28 deletions(-) commit 64566b5e767f9bc3161055ca1b443a51afb52aad Author: Harry Wentland Date: Fri Jan 22 17:07:25 2016 -0500 drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil drm_fixp_from_fraction allows us to create a fixed point directly from a fraction, rather than creating fixed point values and dividing later. This avoids overflow of our 64 bit value for large numbers. drm_fixp2int_ceil allows us to return the ceiling of our fixed point value. [airlied: squash Jordan's fix] 32-bit-build-fix: Jordan Lazare Signed-off-by: Harry Wentland Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie include/drm/drm_fixed.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) commit 4d6a10da79fddcf7460299ab390da74ef2b592f6 Author: Imre Deak Date: Fri Jan 29 14:44:29 2016 +0200 drm/mst: Add range check for max_payloads during init max_payload is limited by the space we have in drm_dp_mst_topology_mgr::vcpi_mask,payload_mask. We need to track max_payloads+1 IDs in these masks, see drm_dp_mst_assign_payload_id(). Add a sanity check for this. Caught by coverity. Signed-off-by: Imre Deak Reviewed-by: David Weinehall Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 3 +++ 1 file changed, 3 insertions(+) commit 441388a8a73f905359e60518cfc18eca6aed2b6a Author: Imre Deak Date: Fri Jan 29 14:44:28 2016 +0200 drm/mst: Don't ignore the MST PBN self-test result Otherwise this call would have no effect. Caught by Coverity. Signed-off-by: Imre Deak Reviewed-by: David Weinehall Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dabe19540af9e563d526113bb102e1b9b9fa73f9 Author: Insu Yun Date: Mon Feb 1 11:08:29 2016 -0500 drm: fix missing reference counting decrease In drm_dp_mst_allocate_vcpi, it returns true in two paths, but in one path, there is no reference couting decrease. Signed-off-by: Insu Yun Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/drm_dp_mst_topology.c | 1 + 1 file changed, 1 insertion(+) commit c745884b30f96348f83ce59caf6798d8085daa77 Merge: ec71f12 6357b75 Author: Dave Airlie Date: Fri Feb 5 14:48:36 2016 +1000 Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-fixes - fix and enable iceland/topaz support - handle WC on platforms that don't support it * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: disable uvd and vce clockgating on Fiji drm/amdgpu: remove exp hardware support from iceland drm/amdgpu: load MEC ucode manually on iceland drm/amdgpu: don't load MEC2 on topaz drm/amdgpu: drop topaz support from gmc8 module drm/amdgpu: pull topaz gmc bits into gmc_v7 drm/amdgpu: The VI specific EXE bit should only apply to GMC v8.0 above drm/amdgpu: iceland use CI based MC IP drm/amdgpu: move gmc7 support out of CIK dependency drm/amdgpu/gfx7: enable cp inst/reg error interrupts drm/amdgpu/gfx8: enable cp inst/reg error interrupts drm/amdgpu: mask out WC from BO on unsupported arches drm/radeon: mask out WC from BO on unsupported arches drm: add helper to check for wc memory support drm/amdgpu: no need to load MC firmware on fiji commit ec71f1284ae4bb8e2cee27c3931449187a14fe68 Merge: 07c8fed 642f0f2 Author: Dave Airlie Date: Fri Feb 5 14:47:24 2016 +1000 Merge tag 'drm-amdkfd-fixes-2016-01-28' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes two static checker fixes. * tag 'drm-amdkfd-fixes-2016-01-28' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Remove unnecessary cast in kfree drm/amdgpu: fix non-ANSI declaration of amdgpu_amdkfd_gfx_*_get_functions() commit 07c8fedd701acb595d3520f522772bd40cc02e67 Merge: c6b431c 37e1106 Author: Dave Airlie Date: Fri Feb 5 14:45:44 2016 +1000 Merge branch 'exynos-drm-fixes' of git://git.kernel.org:/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Just regression fixes. - Fix build warning and error without PM configuration - Fix no display issue on Snow board reported by Michal Suchanek, http://www.spinics.net/lists/dri-devel/msg99473.html * 'exynos-drm-fixes' of git://git.kernel.org:/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: dp: Fix panel and bridge lookup logic drm: exynos: make PM functions as __maybe_unused drm/exynos: fix building without CONFIG_PM_SLEEP commit c6b431cc595b714c631866087b00dc2db9c5f450 Merge: 87d0f93 29ce4ed Author: Dave Airlie Date: Fri Feb 5 14:44:16 2016 +1000 Merge branch 'drm/adv7511' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into drm-fixes misc adv7511 edid reading fixes. * 'drm/adv7511' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: drm: adv7511: it's HPD, not HDP drm: adv7511: mark ADV7511_REG_EDID_READ_CTRL volatile drm: adv7511: really enable interrupts for EDID detection commit 87d0f93961b201997b0d2d41af259e794a4e41b9 Merge: 36f90b0 f2e3051 Author: Dave Airlie Date: Fri Feb 5 14:43:35 2016 +1000 Merge tag 'drm-intel-fixes-2016-02-04' of git://anongit.freedesktop.org/drm-intel into drm-fixes misc i915 fixes. * tag 'drm-intel-fixes-2016-02-04' of git://anongit.freedesktop.org/drm-intel: drm/i915: refine qemu south bridge detection drm/i915: Remove select to deleted STOP_MACHINE from Kconfig drm/i915: Fix NULL plane->fb oops on SKL drm/i915: Don't reject primary plane windowing with color keying enabled on SKL+ drm/i915/dp: fall back to 18 bpp when sink capability is unknown drm/i915: Make sure DC writes are coherent on flush. commit 0fb5b1fb30fba3671dd5b1489d78e93e08d62e4e Author: Martin K. Petersen Date: Thu Feb 4 00:52:12 2016 -0500 block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled When a storage device rejects a WRITE SAME command we will disable write same functionality for the device and return -EREMOTEIO to the block layer. -EREMOTEIO will in turn prevent DM from retrying the I/O and/or failing the path. Yiwen Jiang discovered a small race where WRITE SAME requests issued simultaneously would cause -EIO to be returned. This happened because any requests being prepared after WRITE SAME had been disabled for the device caused us to return BLKPREP_KILL. The latter caused the block layer to return -EIO upon completion. To overcome this we introduce BLKPREP_INVALID which indicates that this is an invalid request for the device. blk_peek_request() is modified to return -EREMOTEIO in that case. Reported-by: Yiwen Jiang Suggested-by: Mike Snitzer Reviewed-by: Hannes Reinicke Reviewed-by: Ewan Milne Reviewed-by: Yiwen Jiang Signed-off-by: Martin K. Petersen block/blk-core.c | 6 ++++-- drivers/scsi/sd.c | 4 ++-- include/linux/blkdev.h | 9 ++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) commit 82c43310508eb19eb41fe7862e89afeb74030b84 Author: Mika Westerberg Date: Wed Jan 27 16:19:13 2016 +0200 SCSI: Add Marvell Console to VPD blacklist I have a Marvell 88SE9230 SATA Controller that has some sort of integrated console SCSI device attached to one of the ports. ata14: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata14.00: ATAPI: MARVELL VIRTUALL, 1.09, max UDMA/66 ata14.00: configured for UDMA/66 scsi 13:0:0:0: Processor Marvell Console 1.01 PQ: 0 ANSI: 5 Sending it VPD INQUIRY command seem to always fail with following error: ata14.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 ata14.00: irq_stat 0x40000001 ata14.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 2 dma 16640 in Inquiry 12 01 00 00 ff 00res 00/00:00:00:00:00/00:00:00:00:00/00 Emask 0x3 (HSM violation) ata14: hard resetting link This has been minor annoyance (only error printed on dmesg) until commit 09e2b0b14690 ("scsi: rescan VPD attributes") added call to scsi_attach_vpd() in scsi_rescan_device(). The commit causes the system to splat out following errors continuously without ever reaching the UI: ata14.00: configured for UDMA/66 ata14: EH complete ata14.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 ata14.00: irq_stat 0x40000001 ata14.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 6 dma 16640 in Inquiry 12 01 00 00 ff 00res 00/00:00:00:00:00/00:00:00:00:00/00 Emask 0x3 (HSM violation) ata14: hard resetting link ata14: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata14.00: configured for UDMA/66 ata14: EH complete ata14.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 ata14.00: irq_stat 0x40000001 ata14.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 7 dma 16640 in Inquiry 12 01 00 00 ff 00res 00/00:00:00:00:00/00:00:00:00:00/00 Emask 0x3 (HSM violation) Without in-depth understanding of SCSI layer and the Marvell controller, I suspect this happens because when the link goes down (because of an error) we schedule scsi_rescan_device() which again fails to read VPD data... ad infinitum. Since VPD data cannot be read from the device anyway we prevent the SCSI layer from even trying by blacklisting the device. This gets away the error and the system starts up normally. [mkp: Widened the match to all revisions of this device] Cc: Signed-off-by: Mika Westerberg Reported-by: Kirill A. Shutemov Reported-by: Alexander Duyck Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 1 + 1 file changed, 1 insertion(+) commit d2d06d4fe0f2cc2df9b17fefec96e6e1a1271d91 Author: Hannes Reinecke Date: Fri Jan 22 15:42:41 2016 +0100 scsi_dh_rdac: always retry MODE SELECT on command lock violation If MODE SELECT returns with sense '05/91/36' (command lock violation) it should always be retried without counting the number of retries. During an HBA upgrade or similar circumstances one might see a flood of MODE SELECT command from various HBAs, which will easily trigger the sense code and exceed the retry count. Cc: Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_rdac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0c0fe3b0fa45082cd752553fdb3a4b42503a118e Author: Filipe Manana Date: Wed Feb 3 19:17:27 2016 +0000 Btrfs: fix hang on extent buffer lock caused by the inode_paths ioctl While doing some tests I ran into an hang on an extent buffer's rwlock that produced the following trace: [39389.800012] NMI watchdog: BUG: soft lockup - CPU#15 stuck for 22s! [fdm-stress:32166] [39389.800016] NMI watchdog: BUG: soft lockup - CPU#14 stuck for 22s! [fdm-stress:32165] [39389.800016] Modules linked in: btrfs dm_mod ppdev xor sha256_generic hmac raid6_pq drbg ansi_cprng aesni_intel i2c_piix4 acpi_cpufreq aes_x86_64 ablk_helper tpm_tis parport_pc i2c_core sg cryptd evdev psmouse lrw tpm parport gf128mul serio_raw pcspkr glue_helper processor button loop autofs4 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring crc32c_intel scsi_mod e1000 virtio floppy [last unloaded: btrfs] [39389.800016] irq event stamp: 0 [39389.800016] hardirqs last enabled at (0): [< (null)>] (null) [39389.800016] hardirqs last disabled at (0): [] copy_process+0x638/0x1a35 [39389.800016] softirqs last enabled at (0): [] copy_process+0x638/0x1a35 [39389.800016] softirqs last disabled at (0): [< (null)>] (null) [39389.800016] CPU: 14 PID: 32165 Comm: fdm-stress Not tainted 4.4.0-rc6-btrfs-next-18+ #1 [39389.800016] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [39389.800016] task: ffff880175b1ca40 ti: ffff8800a185c000 task.ti: ffff8800a185c000 [39389.800016] RIP: 0010:[] [] queued_spin_lock_slowpath+0x57/0x158 [39389.800016] RSP: 0018:ffff8800a185fb80 EFLAGS: 00000202 [39389.800016] RAX: 0000000000000101 RBX: ffff8801710c4e9c RCX: 0000000000000101 [39389.800016] RDX: 0000000000000100 RSI: 0000000000000001 RDI: 0000000000000001 [39389.800016] RBP: ffff8800a185fb98 R08: 0000000000000001 R09: 0000000000000000 [39389.800016] R10: ffff8800a185fb68 R11: 6db6db6db6db6db7 R12: ffff8801710c4e98 [39389.800016] R13: ffff880175b1ca40 R14: ffff8800a185fc10 R15: ffff880175b1ca40 [39389.800016] FS: 00007f6d37fff700(0000) GS:ffff8802be9c0000(0000) knlGS:0000000000000000 [39389.800016] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [39389.800016] CR2: 00007f6d300019b8 CR3: 0000000037c93000 CR4: 00000000001406e0 [39389.800016] Stack: [39389.800016] ffff8801710c4e98 ffff8801710c4e98 ffff880175b1ca40 ffff8800a185fbb0 [39389.800016] ffffffff81091e11 ffff8801710c4e98 ffff8800a185fbc8 ffffffff81091895 [39389.800016] ffff8801710c4e98 ffff8800a185fbe8 ffffffff81486c5c ffffffffa067288c [39389.800016] Call Trace: [39389.800016] [] queued_read_lock_slowpath+0x46/0x60 [39389.800016] [] do_raw_read_lock+0x3e/0x41 [39389.800016] [] _raw_read_lock+0x3d/0x44 [39389.800016] [] ? btrfs_tree_read_lock+0x54/0x125 [btrfs] [39389.800016] [] btrfs_tree_read_lock+0x54/0x125 [btrfs] [39389.800016] [] ? btrfs_find_item+0xa7/0xd2 [btrfs] [39389.800016] [] btrfs_ref_to_path+0xd6/0x174 [btrfs] [39389.800016] [] inode_to_path+0x53/0xa2 [btrfs] [39389.800016] [] paths_from_inode+0x117/0x2ec [btrfs] [39389.800016] [] btrfs_ioctl+0xd5b/0x2793 [btrfs] [39389.800016] [] ? arch_local_irq_save+0x9/0xc [39389.800016] [] ? __this_cpu_preempt_check+0x13/0x15 [39389.800016] [] ? arch_local_irq_save+0x9/0xc [39389.800016] [] ? rcu_read_unlock+0x3e/0x5d [39389.800016] [] do_vfs_ioctl+0x42b/0x4ea [39389.800016] [] ? __fget_light+0x62/0x71 [39389.800016] [] SyS_ioctl+0x57/0x79 [39389.800016] [] entry_SYSCALL_64_fastpath+0x12/0x6f [39389.800016] Code: b9 01 01 00 00 f7 c6 00 ff ff ff 75 32 83 fe 01 89 ca 89 f0 0f 45 d7 f0 0f b1 13 39 f0 74 04 89 c6 eb e2 ff ca 0f 84 fa 00 00 00 <8b> 03 84 c0 74 04 f3 90 eb f6 66 c7 03 01 00 e9 e6 00 00 00 e8 [39389.800012] Modules linked in: btrfs dm_mod ppdev xor sha256_generic hmac raid6_pq drbg ansi_cprng aesni_intel i2c_piix4 acpi_cpufreq aes_x86_64 ablk_helper tpm_tis parport_pc i2c_core sg cryptd evdev psmouse lrw tpm parport gf128mul serio_raw pcspkr glue_helper processor button loop autofs4 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring crc32c_intel scsi_mod e1000 virtio floppy [last unloaded: btrfs] [39389.800012] irq event stamp: 0 [39389.800012] hardirqs last enabled at (0): [< (null)>] (null) [39389.800012] hardirqs last disabled at (0): [] copy_process+0x638/0x1a35 [39389.800012] softirqs last enabled at (0): [] copy_process+0x638/0x1a35 [39389.800012] softirqs last disabled at (0): [< (null)>] (null) [39389.800012] CPU: 15 PID: 32166 Comm: fdm-stress Tainted: G L 4.4.0-rc6-btrfs-next-18+ #1 [39389.800012] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [39389.800012] task: ffff880179294380 ti: ffff880034a60000 task.ti: ffff880034a60000 [39389.800012] RIP: 0010:[] [] queued_write_lock_slowpath+0x62/0x72 [39389.800012] RSP: 0018:ffff880034a639f0 EFLAGS: 00000206 [39389.800012] RAX: 0000000000000101 RBX: ffff8801710c4e98 RCX: 0000000000000000 [39389.800012] RDX: 00000000000000ff RSI: 0000000000000000 RDI: ffff8801710c4e9c [39389.800012] RBP: ffff880034a639f8 R08: 0000000000000001 R09: 0000000000000000 [39389.800012] R10: ffff880034a639b0 R11: 0000000000001000 R12: ffff8801710c4e98 [39389.800012] R13: 0000000000000001 R14: ffff880172cbc000 R15: ffff8801710c4e00 [39389.800012] FS: 00007f6d377fe700(0000) GS:ffff8802be9e0000(0000) knlGS:0000000000000000 [39389.800012] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [39389.800012] CR2: 00007f6d3d3c1000 CR3: 0000000037c93000 CR4: 00000000001406e0 [39389.800012] Stack: [39389.800012] ffff8801710c4e98 ffff880034a63a10 ffffffff81091963 ffff8801710c4e98 [39389.800012] ffff880034a63a30 ffffffff81486f1b ffffffffa0672cb3 ffff8801710c4e00 [39389.800012] ffff880034a63a78 ffffffffa0672cb3 ffff8801710c4e00 ffff880034a63a58 [39389.800012] Call Trace: [39389.800012] [] do_raw_write_lock+0x72/0x8c [39389.800012] [] _raw_write_lock+0x3a/0x41 [39389.800012] [] ? btrfs_tree_lock+0x119/0x251 [btrfs] [39389.800012] [] btrfs_tree_lock+0x119/0x251 [btrfs] [39389.800012] [] ? rcu_read_unlock+0x5b/0x5d [btrfs] [39389.800012] [] ? btrfs_root_node+0xda/0xe6 [btrfs] [39389.800012] [] btrfs_lock_root_node+0x22/0x42 [btrfs] [39389.800012] [] btrfs_search_slot+0x1b8/0x758 [btrfs] [39389.800012] [] ? time_hardirqs_on+0x15/0x28 [39389.800012] [] btrfs_lookup_inode+0x31/0x95 [btrfs] [39389.800012] [] ? trace_hardirqs_on+0xd/0xf [39389.800012] [] ? mutex_lock_nested+0x397/0x3bc [39389.800012] [] __btrfs_update_delayed_inode+0x59/0x1c0 [btrfs] [39389.800012] [] __btrfs_commit_inode_delayed_items+0x194/0x5aa [btrfs] [39389.800012] [] ? _raw_spin_unlock+0x31/0x44 [39389.800012] [] __btrfs_run_delayed_items+0xa4/0x15c [btrfs] [39389.800012] [] btrfs_run_delayed_items+0x11/0x13 [btrfs] [39389.800012] [] btrfs_commit_transaction+0x234/0x96e [btrfs] [39389.800012] [] btrfs_sync_fs+0x145/0x1ad [btrfs] [39389.800012] [] btrfs_ioctl+0x11d2/0x2793 [btrfs] [39389.800012] [] ? arch_local_irq_save+0x9/0xc [39389.800012] [] ? __might_fault+0x4c/0xa7 [39389.800012] [] ? __might_fault+0x4c/0xa7 [39389.800012] [] ? arch_local_irq_save+0x9/0xc [39389.800012] [] ? rcu_read_unlock+0x3e/0x5d [39389.800012] [] do_vfs_ioctl+0x42b/0x4ea [39389.800012] [] ? __fget_light+0x62/0x71 [39389.800012] [] SyS_ioctl+0x57/0x79 [39389.800012] [] entry_SYSCALL_64_fastpath+0x12/0x6f [39389.800012] Code: f0 0f b1 13 85 c0 75 ef eb 2a f3 90 8a 03 84 c0 75 f8 f0 0f b0 13 84 c0 75 f0 ba ff 00 00 00 eb 0a f0 0f b1 13 ff c8 74 0b f3 90 <8b> 03 83 f8 01 75 f7 eb ed c6 43 04 00 5b 5d c3 0f 1f 44 00 00 This happens because in the code path executed by the inode_paths ioctl we end up nesting two calls to read lock a leaf's rwlock when after the first call to read_lock() and before the second call to read_lock(), another task (running the delayed items as part of a transaction commit) has already called write_lock() against the leaf's rwlock. This situation is illustrated by the following diagram: Task A Task B btrfs_ref_to_path() btrfs_commit_transaction() read_lock(&eb->lock); btrfs_run_delayed_items() __btrfs_commit_inode_delayed_items() __btrfs_update_delayed_inode() btrfs_lookup_inode() write_lock(&eb->lock); --> task waits for lock read_lock(&eb->lock); --> makes this task hang forever (and task B too of course) So fix this by avoiding doing the nested read lock, which is easily avoidable. This issue does not happen if task B calls write_lock() after task A does the second call to read_lock(), however there does not seem to exist anything in the documentation that mentions what is the expected behaviour for recursive locking of rwlocks (leaving the idea that doing so is not a good usage of rwlocks). Also, as a side effect necessary for this fix, make sure we do not needlessly read lock extent buffers when the input path has skip_locking set (used when called from send). Cc: stable@vger.kernel.org Signed-off-by: Filipe Manana fs/btrfs/backref.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 89140fdaf11aec81e93d5590a993720f2ef0d26e Author: Joe Lawrence Date: Wed Feb 3 12:51:12 2016 -0500 xhci: harden xhci_find_next_ext_cap against device removal xhci_find_next_ext_cap doesn't check for PCI hotplug removal and may use the PCI master abort bit pattern (~0) to calculate a new PCI address offset to read/write. The has lead to reproducable crashes when testing surprise removal during device initialization on a Stratus platform, at least after commit d5ddcdf4d672 ("xhci: rework xhci extended capability list parsing functions"). The crash is repeatable on a Stratus platform when injecting hardware faults to induce xHCI host controller hotplug during driver initialization. If a PCI read in xhci_find_next_ext_cap returns the master abort pattern, quirk_usb_handoff_xhci may start using a bogus ext_cap_offset to start searching more bogus PCI addresses. Signed-off-by: Joe Lawrence Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ext-caps.h | 4 ++++ 1 file changed, 4 insertions(+) commit df48ab3c2f5ffca88b7803ffbadd074bd5a0a2ef Merge: 5787c25 3e275c6 Author: Linus Torvalds Date: Thu Feb 4 14:09:55 2016 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Nothing particularly interesting here, but all important fixes nonetheless: - Add missing PAN toggling in the futex code - Fix missing #include that briefly caused issues in -next - Allow changing of vmalloc permissions with set_memory_* (used by bpf)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: asm: Explicitly include linux/personality.h in asm/page.h arm64: futex.h: Add missing PAN toggling arm64: allow vmalloc regions to be set with set_memory_* commit 381a65c21aa1fcf4f3fafe70027b79b303bdb71d Author: Dinh Nguyen Date: Wed Feb 3 11:03:06 2016 -0600 ARM: multi_v7_defconfig: enable DW_WATCHDOG The watchdog timer on the SoCFPGA platform is the Synopsys Designware watchdog. Enable CONFIG_DW_WATCHDOG for the driver to get built. Signed-off-by: Dinh Nguyen Tested-by: Kevin Hilman Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 418d5516568b3fdbc4e7b53677dd78aed8514565 Author: Linus Walleij Date: Mon Feb 1 14:18:57 2016 +0100 ARM: nomadik: fix up SD/MMC DT settings The DTSI file for the Nomadik does not properly specify how the PL180 levelshifter is connected: the Nomadik actually needs all the five st,sig-dir-* flags set to properly control all lines out. Further this board supports full power cycling of the card, and since this variant has no hardware clock gating, it needs a ridiculously low frequency setting to keep up with the ever overflowing FIFO. The pin configuration set-up is a bit of a mystery, because of course these pins are a mix of inputs and outputs. However the reference implementation sets all pins to "output" with unspecified initial value, so let's do that here as well. Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Ulf Hansson Signed-off-by: Olof Johansson arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 37 ++++++++++++++++-------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 207b08b9426dfaa63fcfea4156be0acb5b46ee38 Merge: 5c82171 6a4290c Author: Greg Kroah-Hartman Date: Thu Feb 4 13:07:23 2016 -0800 Merge tag 'fixes-for-v4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.5-rc2 DWC3 got a fix for OTG Certification, DWC2 has two fixes for regressions on RasPI, MUSB has a NULL pointer dereference fix for ux500 platforms and two PHYs (MSM and MXS) got some minor fixes. While at that, I'm also adding a fix to my email address which has changed recently. commit 5787c25240c92df25f34c1abb7f76a96d8615034 Merge: 04d740d 9ea0641 Author: Linus Torvalds Date: Thu Feb 4 11:50:15 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fix from Shaohua Li: "As you know, Neil steps down from MD. I'm looking after it. Here are some patches queued. A build fix from Gayatri and several trival patches from me" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md-cluster: delete useless code md-cluster: fix missing memory free raid6/algos.c : bug fix : Add the missing definitions to the pq.h file MD: add myself as MD maintainer MD: rename some functions commit 04d740d5f5a3f37d69fef112b061340fcef6a26d Merge: b37a05c b85d990 Author: Linus Torvalds Date: Thu Feb 4 11:18:22 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: - One minor fix to the ib core - Four minor fixes to the Mellanox drivers - Remove three deprecated drivers from staging/rdma now that all of Greg's queued changes to them are merged * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: staging/rdma: remove deprecated ipath driver staging/rdma: remove deprecated ehca driver staging/rdma: remove deprecated amso1100 driver IB/core: Set correct payload length for RoCEv2 over IPv6 IB/mlx5: Use MLX5_GET to correctly get end of padding mode IB/mlx5: Fix use of null pointer PD IB/mlx5: Fix reqlen validation in mlx5_ib_alloc_ucontext IB/mlx5: Add CREATE_CQ and CREATE_QP to uverbs_ex_cmd_mask commit ac75fe5d8fe4a0bf063be18fb29684405279e79e Author: Mauro Carvalho Chehab Date: Thu Feb 4 15:59:43 2016 -0200 [media] saa7134-alsa: Only frees registered sound cards That prevents this bug: [ 2382.269496] BUG: unable to handle kernel NULL pointer dereference at 0000000000000540 [ 2382.270013] IP: [] snd_card_free+0x36/0x70 [snd] [ 2382.270013] PGD 0 [ 2382.270013] Oops: 0002 [#1] SMP [ 2382.270013] Modules linked in: saa7134_alsa(-) tda1004x saa7134_dvb videobuf2_dvb dvb_core tda827x tda8290 tuner saa7134 tveeprom videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc tun bridge stp llc ebtables ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack it87 hwmon_vid snd_hda_codec_idt snd_hda_codec_generic iTCO_wdt iTCO_vendor_support snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_seq pcspkr i2c_i801 snd_seq_device snd_pcm snd_timer lpc_ich snd mfd_core soundcore binfmt_misc i915 video i2c_algo_bit drm_kms_helper drm r8169 ata_generic serio_raw pata_acpi mii i2c_core [last unloaded: videobuf2_memops] [ 2382.270013] CPU: 0 PID: 4899 Comm: rmmod Not tainted 4.5.0-rc1+ #4 [ 2382.270013] Hardware name: PCCHIPS P17G/P17G, BIOS 080012 05/14/2008 [ 2382.270013] task: ffff880039c38000 ti: ffff88003c764000 task.ti: ffff88003c764000 [ 2382.270013] RIP: 0010:[] [] snd_card_free+0x36/0x70 [snd] [ 2382.270013] RSP: 0018:ffff88003c767ea0 EFLAGS: 00010286 [ 2382.270013] RAX: ffff88003c767eb8 RBX: 0000000000000000 RCX: 0000000000006260 [ 2382.270013] RDX: ffffffffa020a060 RSI: ffffffffa0206de1 RDI: ffff88003c767eb0 [ 2382.270013] RBP: ffff88003c767ed8 R08: 0000000000019960 R09: ffffffff811a5412 [ 2382.270013] R10: ffffea0000d7c200 R11: 0000000000000000 R12: ffff88003c767ea8 [ 2382.270013] R13: 00007ffe760617f7 R14: 0000000000000000 R15: 0000557625d7f1e0 [ 2382.270013] FS: 00007f80bb1c0700(0000) GS:ffff88003f400000(0000) knlGS:0000000000000000 [ 2382.270013] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 2382.270013] CR2: 0000000000000540 CR3: 000000003c00f000 CR4: 00000000000006f0 [ 2382.270013] Stack: [ 2382.270013] 000000003c767ed8 ffffffff00000000 ffff880000000000 ffff88003c767eb8 [ 2382.270013] ffff88003c767eb8 ffffffffa049a890 00007ffe76060060 ffff88003c767ef0 [ 2382.270013] ffffffffa049889d ffffffffa049a500 ffff88003c767f48 ffffffff8111079c [ 2382.270013] Call Trace: [ 2382.270013] [] saa7134_alsa_exit+0x1d/0x780 [saa7134_alsa] [ 2382.270013] [] SyS_delete_module+0x19c/0x1f0 [ 2382.270013] [] entry_SYSCALL_64_fastpath+0x12/0x71 [ 2382.270013] Code: 20 a0 48 c7 c6 e1 6d 20 a0 48 89 e5 41 54 53 4c 8d 65 d0 48 89 fb 48 83 ec 28 c7 45 d0 00 00 00 00 49 8d 7c 24 08 e8 7a 55 ed e0 <4c> 89 a3 40 05 00 00 48 89 df e8 eb fd ff ff 85 c0 75 1a 48 8d [ 2382.270013] RIP [] snd_card_free+0x36/0x70 [snd] [ 2382.270013] RSP [ 2382.270013] CR2: 0000000000000540 Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7134/saa7134-alsa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b0b31a8ffe54abf0a455bcaee54dd92f08817164 Author: Ilya Dryomov Date: Wed Feb 3 15:25:48 2016 +0100 libceph: MOSDOpReply v7 encoding Empty request_redirect_t (struct ceph_request_redirect in the kernel client) is now encoded with a bool. NEW_OSDOPREPLY_ENCODING feature bit overlaps with already supported CRUSH_TUNABLES5. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil include/linux/ceph/ceph_features.h | 5 ++++- net/ceph/osd_client.c | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 97db9a88186e3a7d3a1942370c836bf221d3ab90 Author: Ilya Dryomov Date: Mon Feb 1 17:08:33 2016 +0100 libceph: advertise support for TUNABLES5 Add TUNABLES5 feature (chooseleaf_stable tunable) to a set of features supported by default. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil include/linux/ceph/ceph_features.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit b9b519b78cfbef9ed1b7aabca63eaaa9d1682a71 Author: Ilya Dryomov Date: Mon Feb 1 16:57:16 2016 +0100 crush: decode and initialize chooseleaf_stable Also add missing \n while at it. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/osdmap.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit dc6ae6d8e7726bad4f1c87244b49cac851746c65 Author: Ilya Dryomov Date: Sun Jan 31 14:36:07 2016 +0100 crush: add chooseleaf_stable tunable Add a tunable to fix the bug that chooseleaf may cause unnecessary pg migrations when some device fails. Reflects ceph.git commit fdb3f664448e80d984470f32f04e2e6f03ab52ec. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil include/linux/crush/crush.h | 8 +++++++- net/ceph/crush/mapper.c | 18 ++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) commit 56a4f3091dceb7dfc14dc3ef1d5f59fe39ba4447 Author: Ilya Dryomov Date: Sun Jan 31 14:36:05 2016 +0100 crush: ensure take bucket value is valid Ensure that the take argument is a valid bucket ID before indexing the buckets array. Reflects ceph.git commit 93ec538e8a667699876b72459b8ad78966d89c61. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/crush/mapper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f224a6915f266921507bb6e50a82f87a3de5b4b5 Author: Ilya Dryomov Date: Sun Jan 31 14:35:59 2016 +0100 crush: ensure bucket id is valid before indexing buckets array We were indexing the buckets array without verifying the index was within the [0,max_buckets) range. This could happen because a multistep rule does not have enough buckets and has CRUSH_ITEM_NONE for an intermediate result, which would feed in CRUSH_ITEM_NONE and make us crash. Reflects ceph.git commit 976a24a326da8931e689ee22fce35feab5b67b76. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/crush/mapper.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit db6aed70235b35a113e1b0e81cb293fd2e92de0f Author: Yan, Zheng Date: Tue Jan 26 23:05:37 2016 +0800 ceph: fix snap context leak in error path Signed-off-by: Yan, Zheng fs/ceph/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1418bf076d08edd47a610ea3844c6f6012949a51 Author: Dan Carpenter Date: Tue Jan 26 12:24:44 2016 +0300 ceph: checking for IS_ERR instead of NULL ceph_osdc_alloc_request() returns NULL on error, it never returns error pointers. Fixes: 5be0389dac66 ('ceph: re-send AIO write request when getting -EOLDSNAP error') Signed-off-by: Dan Carpenter Signed-off-by: Ilya Dryomov fs/ceph/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf64318564c43385ffc3d3dfedab5287bdf3dfdd Author: Matias Bjørling Date: Thu Feb 4 15:13:27 2016 +0100 lightnvm: allow to force mm initialization System block allows the device to initialize with its configured media manager. The system blocks is written to disk, and read again when media manager is determined. For this to work, the backend must store the data. Device drivers, such as null_blk, does not have any backend storage. This patch allows the media manager to be initialized without a storage backend. It also fix incorrect configuration of capabilities in null_blk, as it does not support get/set bad block interface. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/block/null_blk.c | 2 +- drivers/lightnvm/core.c | 25 ++++++++++++++++--------- include/linux/lightnvm.h | 4 ++++ 3 files changed, 21 insertions(+), 10 deletions(-) commit 6dde1d6c9094a7c20a680aa2196ad6d032ec7ded Author: Matias Bjørling Date: Thu Feb 4 15:13:26 2016 +0100 lightnvm: check overflow and correct mlc pairs The specification currently limits the number of MLC pairs to 886. Make sure that a device is unable to be instantiate if more is configured. Also, previously the patch had the wrong math for copying MLC pairs, as it only copied half of the actual entries. Fixes: ca5927e7ab53 "lightnvm: introduce mlc lower page table mappings" Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 3704e098cc1a4c2cabcf4e1cfbbff38b4bfb1ea7 Author: Javier González Date: Thu Feb 4 15:13:25 2016 +0100 lightnvm: fix request intersection locking in rrpc This patch fixes an error on the calculation of intersecting logical addresses; it contemplates the case where a new request including several addresses intersects with a single locked address. This case is typical when multiple pages are sent in a new request, while GC - which at the moment sends one address at the time - is running. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bba7f40a029c1e2966146e3a021b3deaf5639904 Author: Javier González Date: Thu Feb 4 15:13:24 2016 +0100 lightnvm: warn if irqs are disabled in lock laddr Add a warning if irqs are disabled when locking a new address in rrpc. The typical path to a new request does not disable irqs, but this is not guaranteed in the future. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.h | 2 ++ 1 file changed, 2 insertions(+) commit 16c6d048d7b74249a4387700887e8adb13028866 Author: Wenwei Tao Date: Thu Feb 4 15:13:23 2016 +0100 lightnvm: put bio before return The bio is not returned if the data page cannot be allocated. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 094fd3be87b0f102589e2d5c3fa5d06b7e20496d Author: Takashi Iwai Date: Thu Feb 4 17:06:13 2016 +0100 ALSA: timer: Fix leftover link at closing In ALSA timer core, the active timer instance is managed in active_list linked list. Each element is added / removed dynamically at timer start, stop and in timer interrupt. The problem is that snd_timer_interrupt() has a thinko and leaves the element in active_list when it's the last opened element. This eventually leads to list corruption or use-after-free error. This hasn't been revealed because we used to delete the list forcibly in snd_timer_stop() in the past. However, the recent fix avoids the double-stop behavior (in commit [f784beb75ce8: ALSA: timer: Fix link corruption due to double start or stop]), and this leak hits reality. This patch fixes the link management in snd_timer_interrupt(). Now it simply unlinks no matter which stream is. BugLink: http://lkml.kernel.org/r/CACT4Y+Yy2aukHP-EDp8-ziNqNNmb-NTf=jDWXMP7jB8HDa2vng@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a485f4d2e28efd77075b2952926683d6c245633 Author: Shanker Donthineni Date: Mon Feb 1 20:19:44 2016 -0600 irqchip/gicv3-its: Fix memory leak in its_free_tables() The current ITS driver has a memory leak in its_free_tables(). It happens on tear down path of the driver when its_probe() call fails. its_free_tables() should free the exact number of pages that have been allocated, not just a single page as current code does. This patch records the memory size for each ITS_BASERn at the time of page allocation and uses the same size information when freeing pages to fix the issue. Signed-off-by: Shanker Donthineni Acked-by: Marc Zyngier Cc: Jason Cooper Cc: Vikram Sethi Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1454379584-21772-1-git-send-email-shankerd@codeaurora.org Signed-off-by: Thomas Gleixner drivers/irqchip/irq-gic-v3-its.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 9f780dab7fb5618ee8bacbf6f91832374231c30c Author: Colin Ian King Date: Mon Jan 25 18:38:06 2016 +0000 IB/sysfs: remove unused va_list args _show_port_gid_attr performs a va_end on some unused va_list args. Clean this up by removing the args completely. Fixes: 470be516a226e8 ("IB/core: Add gid attributes to sysfs") Signed-off-by: Colin Ian King Reviewed-by: Ira Weiny Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 2 -- 1 file changed, 2 deletions(-) commit bb6a777369449d15a4a890306d2f925cae720e1c Author: Carol L Soto Date: Wed Feb 3 15:55:37 2016 -0500 IB/IPoIB: Do not set skb truesize since using one linearskb We are seeing this warning: at net/core/skbuff.c:4174 and before commit a44878d10063 ("IB/ipoib: Use one linear skb in RX flow") skb truesize was not being set when ipoib was using just one skb. Removing this line avoids the warning when running tcp tests like iperf. Fixes: a44878d10063 ("IB/ipoib: Use one linear skb in RX flow") Signed-off-by: Carol L Soto Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 -- 1 file changed, 2 deletions(-) commit 38c079e230f25969e7ce3501fa967b003a2abc39 Author: Vinod Koul Date: Wed Feb 3 17:59:54 2016 +0530 ASoC: Intel: Skylake: Remove autosuspend delay The driver used autosuspend delay to delay going to D3. But per HW recommendation we should go to D3 soon, so remove the delay from driver Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 2 -- 1 file changed, 2 deletions(-) commit 6e3ffa00424e198d2f0c628e7575c5adefeda3d7 Author: Jeeja KP Date: Wed Feb 3 17:59:53 2016 +0530 ASoC: Intel: Skylake: Fix stereo DMIC record DMIC BE can have 2 or 4 channels supported. The DMIC fixup needs to take this into account. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/skl_rt286.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit de1fedf25b075664320010789ede2a0f9f4de07d Author: Jeeja KP Date: Wed Feb 3 17:59:52 2016 +0530 ASoC: Intel: Skylake: Add missing PRE/POST_PMU handlers for vmixer Some modules may be directly connected to a pipeline without a mixer module. For these modules, we require PRE_PMU and POST_PMU handler which will do bind between the pipelines, so add these missing handlers. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6bd4cf855698312133b7776c77ee78af865608eb Author: Jeeja KP Date: Wed Feb 3 17:59:51 2016 +0530 ASoC: Intel: Skylake: Fix bind of source with multiple sinks skl_tplg_bind_sinks() takes only the first sink widget. This breaks in case we have multiple sinks for a module. So pass source widget to skl_tplg_bind_sinks() and bind for all sinks by calling this recursively Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 9946f70906eebf2a305d0b189de52eec8ba39649 Author: Jeeja KP Date: Wed Feb 3 17:59:50 2016 +0530 ASoC: Intel: Skylake: Fix not to stop sink pipe in pga pmd event We should not stop the sink pipe in it's pmd handler for a mixin module as this module may still be connected to other pipes. This will be stopped and freed by current implementation on last connected pipe unbind. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 3 --- 1 file changed, 3 deletions(-) commit 0c684c48257bc6033bdd3b942babef22d0a1852a Author: Jeeja KP Date: Wed Feb 3 17:59:49 2016 +0530 ASoC: Intel: Skylake: Fix the module state check condition For binding modules we should check if source or destination module is in UNINT state. We canot bind even if one of them is in this state. So update the check from logical AND to logical OR and do not bind modules for this case Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cf3049e21e4e6873aae45df19c11f7243e2f03f Author: Jeeja KP Date: Wed Feb 3 17:59:48 2016 +0530 ASoC: Intel: Skylake: Fix return of skl_get_queue_index In unbind modules, the skl_get_queue_index() can return error if the pin is dynamic and module is not bound yet. So instead of returning error this check should return success as modules is not yet bound. This will let the module be bound when connected pipes are enabled and will bind this as well. So change the return value to 0 Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ba8ffef9635c11102bc42d0f2d0a4213de273d5 Author: Dharageswari.R Date: Wed Feb 3 17:59:47 2016 +0530 ASoC: Intel: Skylake: Fix pipe memory allocation leak We check and allocate pipeline resources in one shot. That causes leaks if module creation fails later as that is not freed. So split the resource allocation into two, first check if resources are available and then add the resources upon successful creation. So two new functions are added for checking and current functions are re-purposed to only add the resources for memory and MCPS. Signed-off-by: Dharageswari.R Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 42 +++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 13 deletions(-) commit 7ca42f5ac5e0d8011086bcfa00e85aede42f0b78 Author: Guneshwor Singh Date: Wed Feb 3 17:59:46 2016 +0530 ASoC: Intel: Skylake: Fix mcps freeup after module unbind failure While cleaning resources on module pmd event, we check for return of skl_unbind_modules(). On failure this causes leak as all modules attached do not have resources freed. So ignore return value of module unbind and continue freeing resources. This makes dapm state and resources correct. Signed-off-by: Guneshwor Singh Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ee564d489cc47b1b6043bbe7e95464306d112cf5 Author: Guneshwor Singh Date: Wed Feb 3 17:59:45 2016 +0530 ASoC: Intel: Skylake: Fix delay wrap condition When delay reported by HW is equal to buffersize, it means the value is wrapped so we should report as 0. So add the condition to check this while reporting the delay from LPIB. Signed-off-by: Guneshwor Singh Signed-off-by: Dharageswari.R Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 1 + 1 file changed, 1 insertion(+) commit 41556f68d1dd0b6bbf311a220523b034d2a040e7 Author: Vinod Koul Date: Wed Feb 3 17:59:44 2016 +0530 ASoC: Intel: Skylake: Fix the memory overwrite of tlv buffer TLV buffer can be smaller than the module data, so update the size of data to be copied before doing the copy. Also TLV header consists of two unsigned ints, this is also taken into account here and size modified to reflect this Suggested-by: Takashi Iwai Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1f2c450185b7b8d50d38d37ee30387ff4cd337f8 Author: Mauro Carvalho Chehab Date: Wed Feb 3 19:30:31 2016 -0200 [media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR changeset 70433a152f0 ("media: videobuf2: Refactor vb2_fileio_data and vb2_thread") broke videobuf2-dvb. The root cause is that, instead of calling threadio->fnc() for all types of events except for VB2_BUF_STATE_ERROR, it was calling it only for VB2_BUF_STATE_DONE. With that, the DVB thread were never called. Cc: stable@vger.kernel.org # Kernel >= 4.3 Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fac710e45d0b12443acd4d905c9acec27ab4ca14 Author: Hans Verkuil Date: Wed Jan 27 10:08:42 2016 -0200 [media] vb2: fix nasty vb2_thread regression The vb2_thread implementation was made generic and was moved from videobuf2-v4l2.c to videobuf2-core.c in commit af3bac1a. Unfortunately that clearly was never tested since it broke read() causing NULL address references. The root cause was confused handling of vb2_buffer vs v4l2_buffer (the pb pointer in various core functions). The v4l2_buffer no longer exists after moving the code into the core and it is no longer needed. However, the vb2_thread code passed a pointer to a vb2_buffer to the core functions were a v4l2_buffer pointer was expected and vb2_thread expected that the vb2_buffer fields would be filled in correctly. This is obviously wrong since v4l2_buffer != vb2_buffer. Note that the pb pointer is a void pointer, so no type-checking took place. This patch fixes this problem: 1) allow pb to be NULL for vb2_core_(d)qbuf. The vb2_thread code will use a NULL pointer here since they don't care about v4l2_buffer anyway. 2) let vb2_core_dqbuf pass back the index of the received buffer. This is all vb2_thread needs: this index is the index into the q->bufs array and vb2_thread just gets the vb2_buffer from there. 3) the fileio->b pointer (that originally contained a v4l2_buffer) is removed altogether since it is no longer needed. Tested with vivid and the cobalt driver. Cc: stable@vger.kernel.org # Kernel >= 4.3 Signed-off-by: Hans Verkuil Reported-by: Matthias Schwarzott Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 95 +++++++++++++++----------------- drivers/media/v4l2-core/videobuf2-v4l2.c | 2 +- include/media/videobuf2-core.h | 3 +- 3 files changed, 46 insertions(+), 54 deletions(-) commit e8beb02343e7582980c6705816cd957cf4f74c7a Author: Mauro Carvalho Chehab Date: Wed Feb 3 17:33:48 2016 -0200 [media] tda1004x: only update the frontend properties if locked The tda1004x was updating the properties cache before locking. If the device is not locked, the data at the registers are just random values with no real meaning. This caused the driver to fail with libdvbv5, as such library calls GET_PROPERTY from time to time, in order to return the DVB stats. Tested with a saa7134 card 78: ASUSTeK P7131 Dual, vendor PCI ID: 1043:4862 Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/tda1004x.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 41d80025a83b9c7a94f97ef25c4cd3345bdc3c5e Author: Lars-Peter Clausen Date: Wed Feb 3 21:59:50 2016 +0100 ASoC: dapm: Don't prefix autodisable widgets twice When a DAPM context has a prefix the autodisable widgets get prefixed twice, once for the control and once for the widget. To avoid this use the un-prefixed control name to construct the autodisable widget name. This change is purely cosmetic. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 580df49eed6639263348af3ff60941ff14aa72c0 Merge: 9a96940 51fd2df Author: Ingo Molnar Date: Thu Feb 4 08:56:54 2016 +0100 Merge tag 'perf-urgent-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fix from Arnaldo Carvalho de Melo: - Fix 'perf stat' interval output values (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 9a969403c34ffcc4c92118616665ae1c7eb5a650 Merge: b37a05c 270bde1 Author: Ingo Molnar Date: Thu Feb 4 08:55:00 2016 +0100 Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - tracepoint_error() can receive e=NULL, robustify it, fixes a problem noticed with a very specific combination: Machine with Intel PT (e.g. Broadwell), kernel with no perf_event_attr.context_switch feature (e.g. 4.2) and unreadable tracefs (for instance !root users), making the fallback from perf_event_attr.context_switch to the sched:sched_switch tracepoint to fail reading its info from tracefs, fix it. (Adrian Hunter) - Fix segfault in intel PT, by making it follow the 'struct thread' lifetime cycle checking expectations, noticed for instance, when processing perf.data files with Intel PT data using 'perf script' and when exiting 'perf report' (Adrian Hunter) - Fix CFI usage from .eh_frame and .debug_frame, which sometimes requires that we fallback from .eh_frame to .debug_frame in architectures such as PowerPC (Hemant Kumar) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit d7de413475f443957a0c1d256e405d19b3a2cb22 Author: Ralf Baechle Date: Thu Feb 4 01:24:40 2016 +0100 MIPS: Fix 64k page support for 32 bit kernels. TASK_SIZE was defined as 0x7fff8000UL which for 64k pages is not a multiple of the page size. Somewhere further down the math fails such that executing an ELF binary fails. Signed-off-by: Ralf Baechle Tested-by: Joshua Henderson arch/mips/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ea064158f4e02e64890ee1261449b01e954e594 Merge: b37a05c fc2561e Author: Shaohua Li Date: Wed Feb 3 15:43:59 2016 -0800 Merge branch 'mymd/for-next' into mymd/for-linus commit 51fd2df1e882a3c2a3f4b6c9ff243a93c9046dba Author: Jiri Olsa Date: Wed Feb 3 08:43:56 2016 +0100 perf stat: Fix interval output values We broke interval data displays with commit: 3f416f22d1e2 ("perf stat: Do not clean event's private stats") This commit removed stats cleaning, which is important for '-r' option to carry counters data over the whole run. But it's necessary to clean it for interval mode, otherwise the displayed value is avg of all previous values. Before: $ perf stat -e cycles -a -I 1000 record # time counts unit events 1.000240796 75,216,287 cycles 2.000512791 107,823,524 cycles $ perf stat report # time counts unit events 1.000240796 75,216,287 cycles 2.000512791 91,519,906 cycles Now: $ perf stat report # time counts unit events 1.000240796 75,216,287 cycles 2.000512791 107,823,524 cycles Notice the second value being bigger (91,.. < 107,..). This could be easily verified by using perf script which displays raw stat data: $ perf script CPU THREAD VAL ENA RUN TIME EVENT 0 -1 23855779 1000209530 1000209530 1000240796 cycles 1 -1 33340397 1000224964 1000224964 1000240796 cycles 2 -1 15835415 1000226695 1000226695 1000240796 cycles 3 -1 2184696 1000228245 1000228245 1000240796 cycles 0 -1 97014312 2000514533 2000514533 2000512791 cycles 1 -1 46121497 2000543795 2000543795 2000512791 cycles 2 -1 32269530 2000543566 2000543566 2000512791 cycles 3 -1 7634472 2000544108 2000544108 2000512791 cycles The sum of the first 4 values is the first interval aggregated value: 23855779 + 33340397 + 15835415 + 2184696 = 75,216,287 The sum of the second 4 values minus first value is the second interval aggregated value: 97014312 + 46121497 + 32269530 + 7634472 - 75216287 = 107,823,524 Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1454485436-20639-1-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ebde1ca5a908b10312db4ecd7553e3ba039319ab Author: Nicholas Bellinger Date: Sat Jan 16 12:49:49 2016 -0800 target: Fix TAS handling for multi-session se_node_acls This patch fixes a bug in TMR task aborted status (TAS) handling when multiple sessions are connected to the same target WWPN endpoint and se_node_acl descriptor, resulting in TASK_ABORTED status to not be generated for aborted se_cmds on the remote port. This is due to core_tmr_handle_tas_abort() incorrectly comparing se_node_acl instead of se_session, for which the multi-session case is expected to be sharing the same se_node_acl. Instead, go ahead and update core_tmr_handle_tas_abort() to compare tmr_sess + cmd->se_sess in order to determine if the LUN_RESET was received on a different I_T nexus, and TASK_ABORTED status response needs to be generated. Reviewed-by: Christoph Hellwig Cc: Quinn Tran Cc: Himanshu Madhani Cc: Sagi Grimberg Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit a6d9bb1c9605cd4f44e2d8290dc4d0e88f20292d Author: Nicholas Bellinger Date: Mon Jan 11 21:53:05 2016 -0800 target: Fix LUN_RESET active TMR descriptor handling This patch fixes a NULL pointer se_cmd->cmd_kref < 0 refcount bug during TMR LUN_RESET with active TMRs, triggered during se_cmd + se_tmr_req descriptor shutdown + release via core_tmr_drain_tmr_list(). To address this bug, go ahead and obtain a local kref_get_unless_zero(&se_cmd->cmd_kref) for active I/O to set CMD_T_ABORTED, and transport_wait_for_tasks() followed by the final target_put_sess_cmd() to drop the local ->cmd_kref. Also add two new checks within target_tmr_work() to avoid CMD_T_ABORTED -> TFO->queue_tm_rsp() callbacks ahead of invoking the backend -> fabric put in transport_cmd_check_stop_to_fabric(). For good measure, also change core_tmr_release_req() to use list_del_init() ahead of se_tmr_req memory free. Reviewed-by: Quinn Tran Cc: Himanshu Madhani Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 22 +++++++++++++++++++++- drivers/target/target_core_transport.c | 17 +++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) commit febe562c20dfa8f33bee7d419c6b517986a5aa33 Author: Nicholas Bellinger Date: Mon Jan 11 21:31:09 2016 -0800 target: Fix LUN_RESET active I/O handling for ACK_KREF This patch fixes a NULL pointer se_cmd->cmd_kref < 0 refcount bug during TMR LUN_RESET with active se_cmd I/O, that can be triggered during se_cmd descriptor shutdown + release via core_tmr_drain_state_list() code. To address this bug, add common __target_check_io_state() helper for ABORT_TASK + LUN_RESET w/ CMD_T_COMPLETE checking, and set CMD_T_ABORTED + obtain ->cmd_kref for both cases ahead of last target_put_sess_cmd() after TFO->aborted_task() -> transport_cmd_finish_abort() callback has completed. It also introduces SCF_ACK_KREF to determine when transport_cmd_finish_abort() needs to drop the second extra reference, ahead of calling target_put_sess_cmd() for the final kref_put(&se_cmd->cmd_kref). It also updates transport_cmd_check_stop() to avoid holding se_cmd->t_state_lock while dropping se_cmd device state via target_remove_from_state_list(), now that core_tmr_drain_state_list() is holding the se_device lock while checking se_cmd state from within TMR logic. Finally, move transport_put_cmd() release of SGL + TMR + extended CDB memory into target_free_cmd_mem() in order to avoid potential resource leaks in TMR ABORT_TASK + LUN_RESET code-paths. Also update target_release_cmd_kref() accordingly. Reviewed-by: Quinn Tran Cc: Himanshu Madhani Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 69 ++++++++++++++++++++++------------ drivers/target/target_core_transport.c | 67 ++++++++++++++------------------- include/target/target_core_base.h | 1 + 3 files changed, 76 insertions(+), 61 deletions(-) commit 5c82171167adb8e4ac77b91a42cd49fb211a81a0 Author: Mathias Nyman Date: Tue Jan 26 17:50:12 2016 +0200 xhci: Fix list corruption in urb dequeue at host removal xhci driver frees data for all devices, both usb2 and and usb3 the first time usb_remove_hcd() is called, including td_list and and xhci_ring structures. When usb_remove_hcd() is called a second time for the second xhci bus it will try to dequeue all pending urbs, and touches td_list which is already freed for that endpoint. Cc: Reported-by: Joe Lawrence Tested-by: Joe Lawrence Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2ad294d5f9d13d108c1e2f1a4be8542859ead134 Author: Gregory CLEMENT Date: Tue Jan 26 17:50:11 2016 +0200 usb: host: xhci-plat: fix NULL pointer in probe for device tree case During probe, in the device tree case, the data pointer associated to a compatible is dereferenced. However, not all the compatibles are associated to a private data pointer. The generic-xhci and the xhci-platform don't need them, this patch adds a test on the data pointer before accessing it, avoiding a kernel crash. Fixes: 4efb2f694114 ("usb: host: xhci-plat: add struct xhci_plat_priv") Cc: stable@vger.kernel.org Signed-off-by: Gregory CLEMENT Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 882fa27f488ed3c4b67699d99e8c5ff64c7a9cd1 Author: Chunfeng Yun Date: Tue Jan 26 17:50:10 2016 +0200 usb: xhci-mtk: fix AHB bus hang up caused by roothubs polling when ip fails to enter sleep mode, register access protection will be disabled, at the same time if all clocks are disabled, access register will hang up AHB bus. the common case causes ip sleep failure is that after all ports enter U3 but before ip enters sleep mode, a port receives a resume signal('K'). this will happens when such as clicks mouse to try to do remote-wakeup to stop system enter suspend. so stop polling root hubs to avoid access xHCI register on bus suspend, and restart it when bus resumes. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit b765a16a11fad6b9c94fea7718c22692581e8d18 Author: Chunfeng Yun Date: Tue Jan 26 17:50:09 2016 +0200 usb: xhci-mtk: fix bpkts value of LS/HS periodic eps not behind TT when a LS or FS device doesn't connect though a HS hub, the @bPkts field of its periodic endpoint context should be set to 1. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk-sch.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit ccc04afb72cddbdf7c0e1c17e92886405a71b754 Author: Lu Baolu Date: Tue Jan 26 17:50:08 2016 +0200 usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms Intel Broxton M was verifed to require XHCI_PME_STUCK_QUIRK quirk as well. Cc: stable@vger.kernel.org Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 92149c930cce1865d0d4aca2ab07c2b4b197b418 Author: Lu Baolu Date: Tue Jan 26 17:50:07 2016 +0200 usb: xhci: set SSIC port unused only if xhci_suspend succeeds XHCI_SSIC_PORT_UNUSED quirk was applied to the xHCI host controllers in some Intel SoC chips. With this quirk applied, SSIC port is set to "unused" prior to xhci_suspend(). This may cause problem if host fails to suspend. In this case, the port is set to unused without host further entering D3, and the port will not be usable anymore. Cc: stable@vger.kernel.org Signed-off-by: Zhuang Jin Can Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7e70cbffe236721051bbaff965e477df06dcb190 Author: Lu Baolu Date: Tue Jan 26 17:50:06 2016 +0200 usb: xhci: add a quirk bit for ssic port unused Two workarounds introduced by commit b8cb91e058cd ("xhci: Workaround for PME stuck issues in Intel xhci") and commit abce329c27b3 ("xhci: Workaround to get D3 working in Intel xHCI") share a single quirk bit XHCI_PME_STUCK_QUIRK. These two workarounds actually are different and might happen on different hardwares. Need to separate them by adding a quirk bit for the later. Cc: stable@vger.kernel.org Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 79 ++++++++++++++++++++++++++------------------- drivers/usb/host/xhci.h | 1 + 2 files changed, 46 insertions(+), 34 deletions(-) commit fa89537783cb442263fa5a14df6c7693eaf32f11 Author: Lu Baolu Date: Tue Jan 26 17:50:05 2016 +0200 usb: xhci: handle both SSIC ports in PME stuck quirk Commit abce329c27b3 ("xhci: Workaround to get D3 working in Intel xHCI") adds a workaround for a limitation of PME storm caused by SSIC port in some Intel SoCs. This commit only handled one SSIC port, while there are actually two SSIC ports in the chips. This patch handles both SSIC ports. Without this fix, users still see PME storm. Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Zhuang Jin Can Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 48 +++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 19 deletions(-) commit 6a4290cc28be12d72d50644bd4bda1aede37cd41 Author: Jianqiang Tang Date: Wed Jan 20 14:09:39 2016 +0800 usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver. This patch is needed in order to pass one test case defined in the OTG Automated Compliance Test specification. Specification location: http://www.usb.org/developers/onthego/otgeh_compliance_plan_1_2.pdf This test case uses PET Tool, and PET Tool is one USB hardware equipment provided by MQP Electronics. Test case id is 6.8.3 B-UUT Bypass Capacitance. We must set this otg flag in order to be able to return OTG descriptor during enumeration, otherwise this test case with failed with below error: "Get OTG descriptor request stalled". Signed-off-by: Jianqiang Tang Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 1 + 1 file changed, 1 insertion(+) commit a6835090716a85f2297668ba593bd00e1051e662 Author: Mathias Nyman Date: Tue Jan 26 17:50:04 2016 +0200 Revert "xhci: don't finish a TD if we get a short-transfer event mid TD" This reverts commit e210c422b6fd ("xhci: don't finish a TD if we get a short transfer event mid TD") Turns out that most host controllers do not follow the xHCI specs and never send the second event for the last TRB in the TD if there was a short event mid-TD. Returning the URB directly after the first short-transfer event is far better than never returning the URB. (class drivers usually timeout after 30sec). For the hosts that do send the second event we will go back to treating it as misplaced event and print an error message for it. The origial patch was sent to stable kernels and needs to be reverted from there as well Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 10 ---------- 1 file changed, 10 deletions(-) commit a55f6286575863ebfa5577d4d3bb3b6f1dbd45ec Author: Felipe Balbi Date: Wed Feb 3 20:23:01 2016 +0200 MAINTAINERS: fix my email address As I'm not working for Texas Instruments anymore, balbi@ti.com isn't a valid address. I'll be using balbi@kernel.org at least for the time being. Acked-by: Greg Kroah-Hartman Signed-off-by: Felipe Balbi MAINTAINERS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7f042a8370a5bb7e29a6a6372e8180a56d44aa5c Author: Filipe Manana Date: Wed Jan 27 19:17:20 2016 +0000 Btrfs: remove no longer used function extent_read_full_page_nolock() Not needed after the previous patch named "Btrfs: fix page reading in extent_same ioctl leading to csum errors". Signed-off-by: Filipe Manana fs/btrfs/compression.c | 6 +----- fs/btrfs/extent_io.c | 45 +++++++++++---------------------------------- fs/btrfs/extent_io.h | 3 --- 3 files changed, 12 insertions(+), 42 deletions(-) commit 313140023026ae542ad76e7e268c56a1eaa2c28e Author: Filipe Manana Date: Wed Jan 27 18:37:47 2016 +0000 Btrfs: fix page reading in extent_same ioctl leading to csum errors In the extent_same ioctl, we were grabbing the pages (locked) and attempting to read them without bothering about any concurrent IO against them. That is, we were not checking for any ongoing ordered extents nor waiting for them to complete, which leads to a race where the extent_same() code gets a checksum verification error when it reads the pages, producing a message like the following in dmesg and making the operation fail to user space with -ENOMEM: [18990.161265] BTRFS warning (device sdc): csum failed ino 259 off 495616 csum 685204116 expected csum 1515870868 Fix this by using btrfs_readpage() for reading the pages instead of extent_read_full_page_nolock(), which waits for any concurrent ordered extents to complete and locks the io range. Also do better error handling and don't treat all failures as -ENOMEM, as that's clearly misleasing, becoming identical to the checks and operation of prepare_uptodate_page(). The use of extent_read_full_page_nolock() was required before commit f441460202cb ("btrfs: fix deadlock with extent-same and readpage"), as we had the range locked in an inode's io tree before attempting to read the pages. Fixes: f441460202cb ("btrfs: fix deadlock with extent-same and readpage") Cc: stable@vger.kernel.org # 4.2+ Signed-off-by: Filipe Manana fs/btrfs/ioctl.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit e0bd70c67bf996b360f706b6c643000f2e384681 Author: Filipe Manana Date: Wed Jan 27 10:20:58 2016 +0000 Btrfs: fix invalid page accesses in extent_same (dedup) ioctl In the extent_same ioctl we are getting the pages for the source and target ranges and unlocking them immediately after, which is incorrect because later we attempt to map them (with kmap_atomic) and access their contents at btrfs_cmp_data(). When we do such access the pages might have been relocated or removed from memory, which leads to an invalid memory access. This issue is detected on a kernel with CONFIG_DEBUG_PAGEALLOC=y which produces a trace like the following: 186736.677437] general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [186736.680382] Modules linked in: btrfs dm_flakey dm_mod ppdev xor raid6_pq sha256_generic hmac drbg ansi_cprng acpi_cpufreq evdev sg aesni_intel aes_x86_64 parport_pc ablk_helper tpm_tis psmouse parport i2c_piix4 tpm cryptd i2c_core lrw processor button serio_raw pcspkr gf128mul glue_helper loop autofs4 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring crc32c_intel scsi_mod e1000 virtio floppy [last unloaded: btrfs] [186736.681319] CPU: 13 PID: 10222 Comm: duperemove Tainted: G W 4.4.0-rc6-btrfs-next-18+ #1 [186736.681319] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [186736.681319] task: ffff880132600400 ti: ffff880362284000 task.ti: ffff880362284000 [186736.681319] RIP: 0010:[] [] memcmp+0xb/0x22 [186736.681319] RSP: 0018:ffff880362287d70 EFLAGS: 00010287 [186736.681319] RAX: 000002c002468acf RBX: 0000000012345678 RCX: 0000000000000000 [186736.681319] RDX: 0000000000001000 RSI: 0005d129c5cf9000 RDI: 0005d129c5cf9000 [186736.681319] RBP: ffff880362287d70 R08: 0000000000000000 R09: 0000000000001000 [186736.681319] R10: ffff880000000000 R11: 0000000000000476 R12: 0000000000001000 [186736.681319] R13: ffff8802f91d4c88 R14: ffff8801f2a77830 R15: ffff880352e83e40 [186736.681319] FS: 00007f27b37fe700(0000) GS:ffff88043dda0000(0000) knlGS:0000000000000000 [186736.681319] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [186736.681319] CR2: 00007f27a406a000 CR3: 0000000217421000 CR4: 00000000001406e0 [186736.681319] Stack: [186736.681319] ffff880362287ea0 ffffffffa048d0bd 000000000009f000 0000000000001000 [186736.681319] 0100000000000000 ffff8801f2a77850 ffff8802f91d49b0 ffff880132600400 [186736.681319] 00000000000004f8 ffff8801c1efbe41 0000000000000000 0000000000000038 [186736.681319] Call Trace: [186736.681319] [] btrfs_ioctl+0x24cb/0x2731 [btrfs] [186736.681319] [] ? arch_local_irq_save+0x9/0xc [186736.681319] [] ? rcu_read_unlock+0x3e/0x5d [186736.681319] [] do_vfs_ioctl+0x42b/0x4ea [186736.681319] [] ? __fget_light+0x62/0x71 [186736.681319] [] SyS_ioctl+0x57/0x79 [186736.681319] [] entry_SYSCALL_64_fastpath+0x12/0x6f [186736.681319] Code: 0a 3c 6e 74 0d 3c 79 74 04 3c 59 75 0c c6 06 01 eb 03 c6 06 00 31 c0 eb 05 b8 ea ff ff ff 5d c3 55 31 c9 48 89 e5 48 39 d1 74 13 <0f> b6 04 0f 44 0f b6 04 0e 48 ff c1 44 29 c0 74 ea eb 02 31 c0 (gdb) list *(btrfs_ioctl+0x24cb) 0x5e0e1 is in btrfs_ioctl (fs/btrfs/ioctl.c:2972). 2967 dst_addr = kmap_atomic(dst_page); 2968 2969 flush_dcache_page(src_page); 2970 flush_dcache_page(dst_page); 2971 2972 if (memcmp(addr, dst_addr, cmp_len)) 2973 ret = BTRFS_SAME_DATA_DIFFERS; 2974 2975 kunmap_atomic(addr); 2976 kunmap_atomic(dst_addr); So fix this by making sure we keep the pages locked and respect the same locking order as everywhere else: get and lock the pages first and then lock the range in the inode's io tree (like for example at __btrfs_buffered_write() and extent_readpages()). If an ordered extent is found after locking the range in the io tree, unlock the range, unlock the pages, wait for the ordered extent to complete and repeat the entire locking process until no overlapping ordered extents are found. Cc: stable@vger.kernel.org # 4.2+ Signed-off-by: Filipe Manana fs/btrfs/ioctl.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 76 insertions(+), 14 deletions(-) commit 3e275c64a973ba1554ef87f76c9f0f5b5221ab14 Author: Mark Brown Date: Thu Jan 28 12:18:28 2016 +0000 arm64: asm: Explicitly include linux/personality.h in asm/page.h asm/page.h uses READ_IMPLIES_EXEC from linux/personality.h but does not explicitly include it causing build failures in -next where whatever was causing it to be implicitly included has changed to remove that inclusion. Add an explicit inclusion to fix this. Signed-off-by: Mark Brown [will: moved #include inside #ifndef __ASSEMBLY__ block] Signed-off-by: Will Deacon arch/arm64/include/asm/page.h | 1 + 1 file changed, 1 insertion(+) commit 6357b75a5c356a9d8f91c614ab72ac5264a5932c Author: Alex Deucher Date: Tue Feb 2 18:22:24 2016 -0500 drm/amdgpu: disable uvd and vce clockgating on Fiji Doesn't work properly yet. Reviewed-by: Christian König Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 192cb07f7928e8cb09a9851e6c0f7478baa3bc6d Author: John Youn Date: Mon Jan 11 16:32:28 2016 -0800 usb: dwc2: Fix probe problem on bcm2835 Fixes an issue found on Raspberry PI platform that prevents probe. Don't skip setting the force mode if it's already set. Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force mode") Tested-by: Heiko Stuebner Tested-by: Douglas Anderson Signed-off-by: John Youn Reported-by: Stefan Wahren Reported-by: Remi Pommarel Tested-by: Stefan Wahren Tested-by: Remi Pommarel Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 6 ------ 1 file changed, 6 deletions(-) commit 03b32e4c9bd1b52fcf1e4304e7a704aa0315e398 Author: John Youn Date: Mon Jan 11 16:32:14 2016 -0800 Revert "usb: dwc2: Move reset into dwc2_get_hwparams()" This reverts commit 263b7fb557f7 ("usb: dwc2: Move reset into dwc2_get_hwparams()") due to regression found on bcm2835 platform. USB ethernet fails, due to being unable to pick up proper parameters when performing a plain reset before reading hw params. Below shows the results of the gnptxfsiz and hptxfsiz with and before and after reverting this (from Stefan Wahren): So here is the probe result before Patch 1 is applied: [ 1.283148] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to host [ 1.313894] dwc2 20980000.usb: gnptxfsiz=00201000 [ 1.314104] dwc2 20980000.usb: hptxfsiz=00000000 [ 1.353908] dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size. Check HW configuration. [ 1.354262] dwc2 20980000.usb: 512 invalid for host_perio_tx_fifo_size. Check HW configuration. [ 1.394249] dwc2 20980000.usb: DWC OTG Controller [ 1.394561] dwc2 20980000.usb: new USB bus registered, assigned bus number 1 [ 1.394917] dwc2 20980000.usb: irq 33, io mem 0x00000000 And here is the probe result after Patch 1 is applied: [ 1.280107] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to host [ 1.353949] dwc2 20980000.usb: gnptxfsiz=01001000 [ 1.354166] dwc2 20980000.usb: hptxfsiz=02002000 [ 1.434301] dwc2 20980000.usb: DWC OTG Controller [ 1.434616] dwc2 20980000.usb: new USB bus registered, assigned bus number 1 [ 1.434973] dwc2 20980000.usb: irq 33, io mem 0x00000000 Tested-by: Heiko Stuebner Tested-by: Douglas Anderson Signed-off-by: John Youn Reported-by: Stefan Wahren Reported-by: Remi Pommarel Tested-by: Stefan Wahren Tested-by: Remi Pommarel Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 8 -------- drivers/usb/dwc2/platform.c | 8 +++++++- 2 files changed, 7 insertions(+), 9 deletions(-) commit e79aee49bcf9ad005b3f2f4cf68b17dc2c22d9c2 Author: Rafael J. Wysocki Date: Sat Jan 30 12:54:29 2016 +0100 PM: Avoid false-positive warnings in dev_pm_domain_set() There is a WARN_ON() in dev_pm_domain_set() that triggers on attempts to set the pm_domain pointer for devices with a driver bound. However, that WARN_ON() triggers on attempts to clear the pointer too and the test it uses is based on checking the device's p->knode_driver pointer which still is set when the device bus type's/driver's ->remove callback has been executed. This leads to false-positive warnings when bus type code calls dev_pm_domain_set() to clear the pm_domain pointer after invoking the driver's ->remove() callback. To avoid those false-positives, make dev_pm_domain_set() check if the pointer passed to it is NULL and skip the warning in that case. Fixes: 989561de9b51 (PM / Domains: add setter for dev.pm_domain) Signed-off-by: Rafael J. Wysocki Tested-by: Andy Shevchenko Tested-by: Sinan Kaya Tested-by: Steven Rostedt Acked-by: Ulf Hansson drivers/base/power/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b37a05c083c85c2657dca9bbe1f5d79dccf756d5 Merge: d5bfb96 12c9d70 Author: Linus Torvalds Date: Wed Feb 3 10:10:02 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "18 fixes" [ The 18 fixes turned into 17 commits, because one of the fixes was a fix for another patch in the series that I just folded in by editing the patch manually - hopefully correctly - Linus ] * emailed patches from Andrew Morton : mm: fix memory leak in copy_huge_pmd() drivers/hwspinlock: fix race between radix tree insertion and lookup radix-tree: fix race in gang lookup mm/vmpressure.c: fix subtree pressure detection mm: polish virtual memory accounting mm: warn about VmData over RLIMIT_DATA Documentation: cgroup-v2: add memory.stat::sock description mm: memcontrol: drop superfluous entry in the per-memcg stats array drivers/scsi/sg.c: mark VMA as VM_IO to prevent migration proc: revert /proc//maps [stack:TID] annotation numa: fix /proc//numa_maps for hugetlbfs on s390 MAINTAINERS: update Seth email ocfs2/cluster: fix memory leak in o2hb_region_release lib/test-string_helpers.c: fix and improve string_get_size() tests thp: limit number of object to scan on deferred_split_scan() thp: change deferred_split_count() to return number of THP in queue thp: make split_queue per-node commit d5bfb96bdad3588961f49a6eff89a625fbaa12bf Merge: 86270c8 58c9d61 Author: Linus Torvalds Date: Wed Feb 3 10:04:58 2016 -0800 Merge tag 'for-linus-4.5-2' of git://git.code.sf.net/p/openipmi/linux-ipmi Pull IPMI fix from Corey Minyard: "Fix a compile error on IPMI when ACPI is disabled" * tag 'for-linus-4.5-2' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: put acpi.h with the other headers commit 79c5623f1cb85f33403eb9f1e45124e9f56181f8 Author: Ulf Hansson Date: Mon Jan 25 13:01:29 2016 +0100 usb: musb: ux500: Fix NULL pointer dereference at system PM The commit 7d32cdef5356 ("usb: musb: fail with error when no DMA controller set"), caused the core platform driver to correctly return an error code when fail probing. Unfurtante it also caused bug for a NULL pointer dereference, during system suspend for the ux500 driver. The reason is a lacking validation of the corresponding ->driver_data pointer, which won't be set when the musb core driver fails to probe (or haven't yet been probed). Fixes: 7d32cdef5356 ("usb: musb: fail with error when no DMA...") Acked-by: Linus Walleij Signed-off-by: Ulf Hansson Signed-off-by: Felipe Balbi drivers/usb/musb/ux500.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 63b121e3a3167df9fdb99633fd1c840c841b07b9 Author: Li Jun Date: Thu Jan 21 15:51:26 2016 +0800 usb: phy: mxs: declare variable with initialized value Initialize vbus_value to be 0 since it's possible not to assign any value before judgement. Acked-by: Peter Chen Signed-off-by: Felipe Balbi drivers/usb/phy/phy-mxs-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86270c8d7b1e98cd0f1dc107446461c050149b67 Merge: 81b676b 71f50c6 Author: Linus Torvalds Date: Wed Feb 3 09:55:50 2016 -0800 Merge tag 'devicetree-fixes-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: - Fix build error with *_OF_DECLARE() when used in modules - Add missing platform maintainers for dts files in MAINTAINERS * tag 'devicetree-fixes-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: drop symbols declared by _OF_DECLARE() from modules MAINTAINERS: Add missing platform maintainers for dts files commit a38a08dfaaab978dced63aa9cad45f0f62e23a66 Author: Srinivas Kandagatla Date: Wed Jan 13 09:13:10 2016 +0000 usb: phy: msm: fix error handling in probe. This driver registers for extcon events as part of its probe, but never unregisters them in case of error in the probe path. There were multiple issues noticed due to this missing error handling. One of them is random crashes if the regulators are not ready yet by the time probe is invoked. Ivan's previous attempt [1] to fix this issue, did not really address all the failure cases like regualtor/get_irq failures. [1] https://lkml.org/lkml/2015/9/7/62 Without this patch the kernel would carsh with log: ... Unable to handle kernel paging request at virtual address 17d78410 pgd = ffffffc001a5c000 [17d78410] *pgd=00000000b6806003, *pud=00000000b6806003, *pmd=0000000000000000 Internal error: Oops: 96000005 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.4.0+ #48 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) Workqueue: deferwq deferred_probe_work_func task: ffffffc03686e900 ti: ffffffc0368b0000 task.ti: ffffffc0368b0000 PC is at raw_notifier_chain_register+0x1c/0x44 LR is at extcon_register_notifier+0x88/0xc8 pc : [] lr : [] pstate: 80000085 sp : ffffffc0368b3a70 x29: ffffffc0368b3a70 x28: ffffffc03680c310 x27: ffffffc035518000 x26: ffffffc035518000 x25: ffffffc03bfa20e0 x24: ffffffc035580a18 x23: 0000000000000000 x22: ffffffc035518458 x21: ffffffc0355e9a60 x20: ffffffc035518000 x19: 0000000000000000 x18: 0000000000000028 x17: 0000000000000003 x16: ffffffc0018153c8 x15: 0000000000000001 x14: ffffffc03686f0f8 x13: ffffffc03686f0f8 x12: 0000000000000003 x11: 0000000000000001 x10: 0000000000000001 x9 : ffffffc03686f0f8 x8 : 0000e3872014c1a1 x7 : 0000000000000028 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000000 x3 : 00000000354fb170 x2 : 0000000017d78400 x1 : ffffffc0355e9a60 x0 : ffffffc0354fb268 Fixes: 591fc116f330 ("usb: phy: msm: Use extcon framework for VBUS and ID detection") CC: Stable Signed-off-by: Srinivas Kandagatla Signed-off-by: Felipe Balbi drivers/usb/phy/phy-msm-usb.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit 81b676bd87b3e098e06295a6dd523c02e7861e88 Merge: ef582d0 2370abd Author: Linus Torvalds Date: Wed Feb 3 09:36:41 2016 -0800 Merge tag 'nfs-for-4.5-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfix and cleanup from Trond Myklebust: "Bugfix: - pNFS: Fix for missing layoutreturn calls Cleanup: - pNFS: rename NFS_LAYOUT_RETURN_BEFORE_CLOSE for code clarity" * tag 'nfs-for-4.5-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: Cleanup - rename NFS_LAYOUT_RETURN_BEFORE_CLOSE pNFS: Fix missing layoutreturn calls commit ef582d095db13504a54b9bc57c9489e551441c2a Merge: 4643536 6ccd837 Author: Linus Torvalds Date: Wed Feb 3 09:31:34 2016 -0800 Merge tag 'trace-v4.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "A cleanup to the stack tracer broke stack tracing on s390. Here's a simple fix to correct that issue" * tag 'trace-v4.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/stacktrace: Show entire trace if passed in function not found commit 464353647427793aef800503ec42acb68e95d9e2 Author: Hugh Dickins Date: Sat Jan 30 18:03:16 2016 -0800 mm: retire GUP WARN_ON_ONCE that outlived its usefulness Trinity is now hitting the WARN_ON_ONCE we added in v3.15 commit cda540ace6a1 ("mm: get_user_pages(write,force) refuse to COW in shared areas"). The warning has served its purpose, nobody was harmed by that change, so just remove the warning to generate less noise from Trinity. Which reminds me of the comment I wrongly left behind with that commit (but was spotted at the time by Kirill), which has since moved into a separate function, and become even more obscure: delete it. Reported-by: Dave Jones Suggested-by: Kirill A. Shutemov Signed-off-by: Hugh Dickins Signed-off-by: Linus Torvalds mm/gup.c | 4 +--- mm/memory.c | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) commit 58c9d61f86e86ebe1e45ac7a0cd89a2c6299b034 Author: Tony Camuso Date: Tue Feb 2 13:57:24 2016 -0500 ipmi: put acpi.h with the other headers Enclosing '#include ' within '#ifdef CONFIG_ACPI' is unnecessary, since it has its own conditional compile for CONFIG_ACPI. Commit 0fbcf4af7c83 ("ipmi: Convert the IPMI SI ACPI handling to a platform device") exposed this as a problem for platforms that do not support ACPI when it introduced a call to ACPI_PTR() macro outside of the CONFIG_ACPI conditional compile. This would have been perfectly acceptable if acpi.h were not conditionally excluded for the non-acpi platform, because the conditional compile within acpi.h defines ACPI_PTR() to return NULL when compiled for non acpi platforms. Signed-off-by: Tony Camuso Fixed commit reference in header to conform to standard. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 12c9d70bd5056b3ae84746fca973c286f48384cc Author: Matthew Wilcox Date: Tue Feb 2 16:57:57 2016 -0800 mm: fix memory leak in copy_huge_pmd() We allocate a pgtable but do not attach it to anything if the PMD is in a DAX VMA, causing it to leak. We certainly try to not free pgtables associated with the huge zero page if the zero page is in a DAX VMA, so I think this is the right solution. This needs to be properly audited. Signed-off-by: Matthew Wilcox Cc: Dan Williams Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit c6400ba7e13a41539342f1b6e1f9e78419cb0148 Author: Matthew Wilcox Date: Tue Feb 2 16:57:55 2016 -0800 drivers/hwspinlock: fix race between radix tree insertion and lookup of_hwspin_lock_get_id() is protected by the RCU lock, which means that insertions can occur simultaneously with the lookup. If the radix tree transitions from a height of 0, we can see a slot with the indirect_ptr bit set, which will cause us to at least read random memory, and could cause other havoc. Fix this by using the newly introduced radix_tree_iter_retry(). Signed-off-by: Matthew Wilcox Cc: Hugh Dickins Cc: Ohad Ben-Cohen Cc: Konstantin Khlebnikov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/hwspinlock/hwspinlock_core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 46437f9a554fbe3e110580ca08ab703b59f2f95a Author: Matthew Wilcox Date: Tue Feb 2 16:57:52 2016 -0800 radix-tree: fix race in gang lookup If the indirect_ptr bit is set on a slot, that indicates we need to redo the lookup. Introduce a new function radix_tree_iter_retry() which forces the loop to retry the lookup by setting 'slot' to NULL and turning the iterator back to point at the problematic entry. This is a pretty rare problem to hit at the moment; the lookup has to race with a grow of the radix tree from a height of 0. The consequences of hitting this race are that gang lookup could return a pointer to a radix_tree_node instead of a pointer to whatever the user had inserted in the tree. Fixes: cebbd29e1c2f ("radix-tree: rewrite gang lookup using iterator") Signed-off-by: Matthew Wilcox Cc: Hugh Dickins Cc: Ohad Ben-Cohen Cc: Konstantin Khlebnikov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 16 ++++++++++++++++ lib/radix-tree.c | 12 ++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit 3c1da7beeee02560cd0f0c66c5a59fce3c6746e3 Author: Vladimir Davydov Date: Tue Feb 2 16:57:49 2016 -0800 mm/vmpressure.c: fix subtree pressure detection When vmpressure is called for the entire subtree under pressure we mistakenly use vmpressure->scanned instead of vmpressure->tree_scanned when checking if vmpressure work is to be scheduled. This results in suppressing all vmpressure events in the legacy cgroup hierarchy. Fix it. Fixes: 8e8ae645249b ("mm: memcontrol: hook up vmpressure to socket pressure") Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmpressure.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 30bdbb78009e67767983085e302bec6d97afc679 Author: Konstantin Khlebnikov Date: Tue Feb 2 16:57:46 2016 -0800 mm: polish virtual memory accounting * add VM_STACK as alias for VM_GROWSUP/DOWN depending on architecture * always account VMAs with flag VM_STACK as stack (as it was before) * cleanup classifying helpers * update comments and documentation Signed-off-by: Konstantin Khlebnikov Tested-by: Sudip Mukherjee Cc: Cyrill Gorcunov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 4 ++-- include/linux/mm.h | 6 ++++-- include/linux/mm_types.h | 6 +++--- mm/internal.h | 23 +++++++++++++++++++---- 4 files changed, 28 insertions(+), 11 deletions(-) commit d977d56ce5b3e8842236f2f9e7483d4914c9592e Author: Konstantin Khlebnikov Date: Tue Feb 2 16:57:43 2016 -0800 mm: warn about VmData over RLIMIT_DATA This patch provides a way of working around a slight regression introduced by commit 84638335900f ("mm: rework virtual memory accounting"). Before that commit RLIMIT_DATA have control only over size of the brk region. But that change have caused problems with all existing versions of valgrind, because it set RLIMIT_DATA to zero. This patch fixes rlimit check (limit actually in bytes, not pages) and by default turns it into warning which prints at first VmData misuse: "mmap: top (795): VmData 516096 exceed data ulimit 512000. Will be forbidden soon." Behavior is controlled by boot param ignore_rlimit_data=y/n and by sysfs /sys/module/kernel/parameters/ignore_rlimit_data. For now it set to "y". [akpm@linux-foundation.org: tweak kernel-parameters.txt text[ Signed-off-by: Konstantin Khlebnikov Link: http://lkml.kernel.org/r/20151228211015.GL2194@uranus Reported-by: Christian Borntraeger Cc: Cyrill Gorcunov Cc: Linus Torvalds Cc: Vegard Nossum Cc: Peter Zijlstra Cc: Vladimir Davydov Cc: Andy Lutomirski Cc: Quentin Casasnovas Cc: Kees Cook Cc: Willy Tarreau Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kernel-parameters.txt | 5 +++++ mm/internal.h | 16 ++++++++++++++++ mm/mmap.c | 23 +++++++++++++++++------ 3 files changed, 38 insertions(+), 6 deletions(-) commit 4758e198ad3bcbc1c468e0632c53a63a7d201649 Author: Johannes Weiner Date: Tue Feb 2 16:57:41 2016 -0800 Documentation: cgroup-v2: add memory.stat::sock description Signed-off-by: Johannes Weiner Cc: Vladimir Davydov Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 4 ++++ 1 file changed, 4 insertions(+) commit c792e8240338e41eda4d06a3a71a7bb7af4e6156 Author: Johannes Weiner Date: Tue Feb 2 16:57:38 2016 -0800 mm: memcontrol: drop superfluous entry in the per-memcg stats array MEM_CGROUP_STAT_NSTATS is just a delimiter for cgroup1 statistics, not an actual array entry. Reuse it for the first cgroup2 stat entry, like in the event array. Fixes: b2807f07f4f8 ("mm: memcontrol: add "sock" to cgroup2 memory.stat") Signed-off-by: Johannes Weiner Cc: Vladimir Davydov Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 461c7fa126794157484dca48e88effa4963e3af3 Author: Kirill A. Shutemov Date: Tue Feb 2 16:57:35 2016 -0800 drivers/scsi/sg.c: mark VMA as VM_IO to prevent migration Reduced testcase: #include #include #include #include #define SIZE 0x2000 int main() { int fd; void *p; fd = open("/dev/sg0", O_RDWR); p = mmap(NULL, SIZE, PROT_EXEC, MAP_PRIVATE | MAP_LOCKED, fd, 0); mbind(p, SIZE, 0, NULL, 0, MPOL_MF_MOVE); return 0; } We shouldn't try to migrate pages in sg VMA as we don't have a way to update Sg_scatter_hold::pages accordingly from mm core. Let's mark the VMA as VM_IO to indicate to mm core that the VMA is not migratable. Signed-off-by: Kirill A. Shutemov Reported-by: Dmitry Vyukov Acked-by: Vlastimil Babka Cc: Doug Gilbert Cc: David Rientjes Cc: Naoya Horiguchi Cc: "Kirill A. Shutemov" Cc: Shiraz Hashim Cc: Hugh Dickins Cc: Sasha Levin Cc: syzkaller Cc: Kostya Serebryany Cc: Alexander Potapenko Cc: James Bottomley Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65376df582174ffcec9e6471bf5b0dd79ba05e4a Author: Johannes Weiner Date: Tue Feb 2 16:57:29 2016 -0800 proc: revert /proc//maps [stack:TID] annotation Commit b76437579d13 ("procfs: mark thread stack correctly in proc//maps") added [stack:TID] annotation to /proc//maps. Finding the task of a stack VMA requires walking the entire thread list, turning this into quadratic behavior: a thousand threads means a thousand stacks, so the rendering of /proc//maps needs to look at a million combinations. The cost is not in proportion to the usefulness as described in the patch. Drop the [stack:TID] annotation to make /proc//maps (and /proc//numa_maps) usable again for higher thread counts. The [stack] annotation inside /proc//task//maps is retained, as identifying the stack VMA there is an O(1) operation. Siddesh said: "The end users needed a way to identify thread stacks programmatically and there wasn't a way to do that. I'm afraid I no longer remember (or have access to the resources that would aid my memory since I changed employers) the details of their requirement. However, I did do this on my own time because I thought it was an interesting project for me and nobody really gave any feedback then as to its utility, so as far as I am concerned you could roll back the main thread maps information since the information is available in the thread-specific files" Signed-off-by: Johannes Weiner Cc: "Kirill A. Shutemov" Cc: Siddhesh Poyarekar Cc: Shaohua Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 9 ++---- fs/proc/task_mmu.c | 66 +++++++++++++------------------------- fs/proc/task_nommu.c | 49 ++++++++++++---------------- include/linux/mm.h | 3 +- mm/util.c | 27 +--------------- 5 files changed, 48 insertions(+), 106 deletions(-) commit 5c2ff95e41c9290d16556cd02e35b25d81be8fe0 Author: Michael Holzheu Date: Tue Feb 2 16:57:26 2016 -0800 numa: fix /proc//numa_maps for hugetlbfs on s390 When working with hugetlbfs ptes (which are actually pmds) is not valid to directly use pte functions like pte_present() because the hardware bit layout of pmds and ptes can be different. This is the case on s390. Therefore we have to convert the hugetlbfs ptes first into a valid pte encoding with huge_ptep_get(). Currently the /proc//numa_maps code uses hugetlbfs ptes without huge_ptep_get(). On s390 this leads to the following two problems: 1) The pte_present() function returns false (instead of true) for PROT_NONE hugetlb ptes. Therefore PROT_NONE vmas are missing completely in the "numa_maps" output. 2) The pte_dirty() function always returns false for all hugetlb ptes. Therefore these pages are reported as "mapped=xxx" instead of "dirty=xxx". Therefore use huge_ptep_get() to correctly convert the hugetlb ptes. Signed-off-by: Michael Holzheu Reviewed-by: Gerald Schaefer Cc: [4.3+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0bb181c7ddc0340ef8d4a3b082b1f1bc7ae21636 Author: Seth Jennings Date: Tue Feb 2 16:57:23 2016 -0800 MAINTAINERS: update Seth email Update/unify my contact info. The old email address will no longer work soon. Signed-off-by: Seth Jennings Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4a1dfa4bb8b1d76d1ed464432ed95bb5956408f Author: Joseph Qi Date: Tue Feb 2 16:57:21 2016 -0800 ocfs2/cluster: fix memory leak in o2hb_region_release o2hb_region_release currently doesn't free o2hb_debug_buf hr_db_elapsed_time and hr_db_pinned malloced in o2hb_debug_create. Also we should call debugfs_remove before freeing its data, to prevent the risk accessing debugfs rightly after its data has been freed. Signed-off-by: Joseph Qi Reviewed-by: Jiufei Xue Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/heartbeat.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 72676bb53f33fd0ef3a1484fc1ecfd306dc6ff40 Author: Vitaly Kuznetsov Date: Tue Feb 2 16:57:18 2016 -0800 lib/test-string_helpers.c: fix and improve string_get_size() tests Recently added commit 564b026fbd0d ("string_helpers: fix precision loss for some inputs") fixed precision issues for string_get_size() and broke tests. Fix and improve them: test both STRING_UNITS_2 and STRING_UNITS_10 at a time, better failure reporting, test small an huge values. Fixes: 564b026fbd0d28e9 ("string_helpers: fix precision loss for some inputs") Signed-off-by: Vitaly Kuznetsov Cc: Andy Shevchenko Cc: Rasmus Villemoes Cc: James Bottomley Cc: James Bottomley Cc: "James E.J. Bottomley" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test-string_helpers.c | 67 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 18 deletions(-) commit e3ae19535c665771e2c03cdd63df9bc4d6b37941 Author: Kirill A. Shutemov Date: Tue Feb 2 16:57:15 2016 -0800 thp: limit number of object to scan on deferred_split_scan() If we have a lot of pages in queue to be split, deferred_split_scan() can spend unreasonable amount of time under spinlock with disabled interrupts. Let's cap number of pages to split on scan by sc->nr_to_scan. Signed-off-by: Kirill A. Shutemov Reported-by: Andrea Arcangeli Reviewed-by: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Sasha Levin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit cb8d68ec16a511f8be7e1028fd8f869ef7c6a1a8 Author: Kirill A. Shutemov Date: Tue Feb 2 16:57:12 2016 -0800 thp: change deferred_split_count() to return number of THP in queue I've got meaning of shrinker::count_objects() wrong: it should return number of potentially freeable objects, which is not necessary correlate with freeable memory. Returning 256 per THP in queue is not reasonable: shrinker::scan_objects() never called with nr_to_scan > 128 in my setup. Let's return 1 per THP and correct scan_object accordingly. Signed-off-by: Kirill A. Shutemov Reviewed-by: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Sasha Levin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit a3d0a918502cc73af4f60da2cc4c5cac5573f183 Author: Kirill A. Shutemov Date: Tue Feb 2 16:57:08 2016 -0800 thp: make split_queue per-node Andrea Arcangeli suggested to make split queue per-node to improve scalability. Let's do it. Signed-off-by: Kirill A. Shutemov Suggested-by: Andrea Arcangeli Reviewed-by: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Sasha Levin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 6 ++++++ mm/huge_memory.c | 49 ++++++++++++++++++++++++++----------------------- mm/page_alloc.c | 5 +++++ 3 files changed, 37 insertions(+), 23 deletions(-) commit b85d9905a7ca128f24e3a4e60ff2a1b0cd58ae7c Author: Doug Ledford Date: Wed Feb 3 11:10:58 2016 -0500 staging/rdma: remove deprecated ipath driver This driver was moved to staging for eventual deletion. Time to complete that task. Signed-off-by: Doug Ledford MAINTAINERS | 6 - drivers/staging/rdma/Kconfig | 2 - drivers/staging/rdma/Makefile | 1 - drivers/staging/rdma/ipath/Kconfig | 16 - drivers/staging/rdma/ipath/Makefile | 37 - drivers/staging/rdma/ipath/TODO | 5 - drivers/staging/rdma/ipath/ipath_common.h | 851 -------- drivers/staging/rdma/ipath/ipath_cq.c | 483 ---- drivers/staging/rdma/ipath/ipath_debug.h | 99 - drivers/staging/rdma/ipath/ipath_diag.c | 551 ----- drivers/staging/rdma/ipath/ipath_dma.c | 179 -- drivers/staging/rdma/ipath/ipath_driver.c | 2784 ------------------------ drivers/staging/rdma/ipath/ipath_eeprom.c | 1183 ---------- drivers/staging/rdma/ipath/ipath_file_ops.c | 2619 ---------------------- drivers/staging/rdma/ipath/ipath_fs.c | 415 ---- drivers/staging/rdma/ipath/ipath_iba6110.c | 1939 ----------------- drivers/staging/rdma/ipath/ipath_init_chip.c | 1062 --------- drivers/staging/rdma/ipath/ipath_intr.c | 1271 ----------- drivers/staging/rdma/ipath/ipath_kernel.h | 1374 ------------ drivers/staging/rdma/ipath/ipath_keys.c | 270 --- drivers/staging/rdma/ipath/ipath_mad.c | 1521 ------------- drivers/staging/rdma/ipath/ipath_mmap.c | 174 -- drivers/staging/rdma/ipath/ipath_mr.c | 370 ---- drivers/staging/rdma/ipath/ipath_qp.c | 1079 --------- drivers/staging/rdma/ipath/ipath_rc.c | 1969 ----------------- drivers/staging/rdma/ipath/ipath_registers.h | 512 ----- drivers/staging/rdma/ipath/ipath_ruc.c | 733 ------- drivers/staging/rdma/ipath/ipath_sdma.c | 818 ------- drivers/staging/rdma/ipath/ipath_srq.c | 380 ---- drivers/staging/rdma/ipath/ipath_stats.c | 347 --- drivers/staging/rdma/ipath/ipath_sysfs.c | 1237 ----------- drivers/staging/rdma/ipath/ipath_uc.c | 547 ----- drivers/staging/rdma/ipath/ipath_ud.c | 579 ----- drivers/staging/rdma/ipath/ipath_user_pages.c | 228 -- drivers/staging/rdma/ipath/ipath_user_sdma.c | 874 -------- drivers/staging/rdma/ipath/ipath_user_sdma.h | 52 - drivers/staging/rdma/ipath/ipath_verbs.c | 2376 -------------------- drivers/staging/rdma/ipath/ipath_verbs.h | 941 -------- drivers/staging/rdma/ipath/ipath_verbs_mcast.c | 363 --- drivers/staging/rdma/ipath/ipath_wc_ppc64.c | 49 - drivers/staging/rdma/ipath/ipath_wc_x86_64.c | 144 -- 41 files changed, 30440 deletions(-) commit e581d111dad3781266ae1abe1d2848e69406deb5 Author: Doug Ledford Date: Wed Feb 3 11:08:53 2016 -0500 staging/rdma: remove deprecated ehca driver This driver was moved to staging for eventual deletion. Time to complete that task. Signed-off-by: Doug Ledford MAINTAINERS | 7 - drivers/staging/rdma/Kconfig | 2 - drivers/staging/rdma/Makefile | 1 - drivers/staging/rdma/ehca/Kconfig | 10 - drivers/staging/rdma/ehca/Makefile | 16 - drivers/staging/rdma/ehca/TODO | 4 - drivers/staging/rdma/ehca/ehca_av.c | 279 --- drivers/staging/rdma/ehca/ehca_classes.h | 481 ----- drivers/staging/rdma/ehca/ehca_classes_pSeries.h | 208 -- drivers/staging/rdma/ehca/ehca_cq.c | 397 ---- drivers/staging/rdma/ehca/ehca_eq.c | 189 -- drivers/staging/rdma/ehca/ehca_hca.c | 414 ---- drivers/staging/rdma/ehca/ehca_irq.c | 870 --------- drivers/staging/rdma/ehca/ehca_irq.h | 77 - drivers/staging/rdma/ehca/ehca_iverbs.h | 202 -- drivers/staging/rdma/ehca/ehca_main.c | 1118 ----------- drivers/staging/rdma/ehca/ehca_mcast.c | 131 -- drivers/staging/rdma/ehca/ehca_mrmw.c | 2202 --------------------- drivers/staging/rdma/ehca/ehca_mrmw.h | 127 -- drivers/staging/rdma/ehca/ehca_pd.c | 123 -- drivers/staging/rdma/ehca/ehca_qes.h | 260 --- drivers/staging/rdma/ehca/ehca_qp.c | 2256 ---------------------- drivers/staging/rdma/ehca/ehca_reqs.c | 953 --------- drivers/staging/rdma/ehca/ehca_sqp.c | 245 --- drivers/staging/rdma/ehca/ehca_tools.h | 155 -- drivers/staging/rdma/ehca/ehca_uverbs.c | 309 --- drivers/staging/rdma/ehca/hcp_if.c | 949 --------- drivers/staging/rdma/ehca/hcp_if.h | 265 --- drivers/staging/rdma/ehca/hcp_phyp.c | 82 - drivers/staging/rdma/ehca/hcp_phyp.h | 90 - drivers/staging/rdma/ehca/hipz_fns.h | 68 - drivers/staging/rdma/ehca/hipz_fns_core.h | 100 - drivers/staging/rdma/ehca/hipz_hw.h | 414 ---- drivers/staging/rdma/ehca/ipz_pt_fn.c | 289 --- drivers/staging/rdma/ehca/ipz_pt_fn.h | 289 --- 35 files changed, 13582 deletions(-) commit f5e741b7c7dddefa318b7f91af134f8ae2a342c1 Author: Doug Ledford Date: Wed Feb 3 11:06:23 2016 -0500 staging/rdma: remove deprecated amso1100 driver Driver was placed in staging for eventual removal, it is time to complete that task. Signed-off-by: Doug Ledford MAINTAINERS | 7 - drivers/staging/rdma/Kconfig | 2 - drivers/staging/rdma/Makefile | 1 - drivers/staging/rdma/amso1100/Kbuild | 6 - drivers/staging/rdma/amso1100/Kconfig | 15 - drivers/staging/rdma/amso1100/TODO | 4 - drivers/staging/rdma/amso1100/c2.c | 1240 ---------------------- drivers/staging/rdma/amso1100/c2.h | 547 ---------- drivers/staging/rdma/amso1100/c2_ae.c | 327 ------ drivers/staging/rdma/amso1100/c2_ae.h | 108 -- drivers/staging/rdma/amso1100/c2_alloc.c | 142 --- drivers/staging/rdma/amso1100/c2_cm.c | 458 -------- drivers/staging/rdma/amso1100/c2_cq.c | 437 -------- drivers/staging/rdma/amso1100/c2_intr.c | 219 ---- drivers/staging/rdma/amso1100/c2_mm.c | 377 ------- drivers/staging/rdma/amso1100/c2_mq.c | 175 --- drivers/staging/rdma/amso1100/c2_mq.h | 106 -- drivers/staging/rdma/amso1100/c2_pd.c | 90 -- drivers/staging/rdma/amso1100/c2_provider.c | 862 --------------- drivers/staging/rdma/amso1100/c2_provider.h | 182 ---- drivers/staging/rdma/amso1100/c2_qp.c | 1024 ------------------ drivers/staging/rdma/amso1100/c2_rnic.c | 652 ------------ drivers/staging/rdma/amso1100/c2_status.h | 158 --- drivers/staging/rdma/amso1100/c2_user.h | 82 -- drivers/staging/rdma/amso1100/c2_vq.c | 260 ----- drivers/staging/rdma/amso1100/c2_vq.h | 63 -- drivers/staging/rdma/amso1100/c2_wr.h | 1520 --------------------------- 27 files changed, 9064 deletions(-) commit 2e5dc73fe1c4befaf894ca357edb5443b82148b1 Merge: 2154cc0 7f0973e Author: Takashi Iwai Date: Wed Feb 3 14:52:41 2016 +0100 Merge branch 'topic/core-fixes' into for-linus commit 7f0973e973cd74aa40747c9d38844560cd184ee8 Author: Takashi Iwai Date: Wed Feb 3 08:32:44 2016 +0100 ALSA: seq: Fix lockdep warnings due to double mutex locks The port subscription code uses double mutex locks for source and destination ports, and this may become racy once when wrongly set up. It leads to lockdep warning splat, typically triggered by fuzzer like syzkaller, although the actual deadlock hasn't been seen, so far. This patch simplifies the handling by reducing to two single locks, so that no lockdep warning will be trigger any longer. By splitting to two actions, a still-in-progress element shall be added in one list while handling another. For ignoring this element, a new check is added in deliver_to_subscribers(). Along with it, the code to add/remove the subscribers list element was cleaned up and refactored. BugLink: http://lkml.kernel.org/r/CACT4Y+aKQXV7xkBW9hpQbzaDO7LrUvohxWh-UwMxXjDy-yBD=A@mail.gmail.com Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 3 + sound/core/seq/seq_ports.c | 233 +++++++++++++++++++++++------------------ 2 files changed, 133 insertions(+), 103 deletions(-) commit 81f577542af15640cbcb6ef68baa4caa610cbbfc Author: Takashi Iwai Date: Wed Feb 3 14:41:22 2016 +0100 ALSA: rawmidi: Fix race at copying & updating the position The rawmidi read and write functions manage runtime stream status such as runtime->appl_ptr and runtime->avail. These point where to copy the new data and how many bytes have been copied (or to be read). The problem is that rawmidi read/write call copy_from_user() or copy_to_user(), and the runtime spinlock is temporarily unlocked and relocked while copying user-space. Since the current code advances and updates the runtime status after the spin unlock/relock, the copy and the update may be asynchronous, and eventually runtime->avail might go to a negative value when many concurrent accesses are done. This may lead to memory corruption in the end. For fixing this race, in this patch, the status update code is performed in the same lock before the temporary unlock. Also, the spinlock is now taken more widely in snd_rawmidi_kernel_read1() for protecting more properly during the whole operation. BugLink: http://lkml.kernel.org/r/CACT4Y+b-dCmNf1GpgPKfDO0ih+uZCL2JV4__j-r1kdhPLSgQCQ@mail.gmail.com Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/rawmidi.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 06ab30034ed9c200a570ab13c017bde248ddb2a6 Author: Takashi Iwai Date: Sun Jan 31 11:57:41 2016 +0100 ALSA: rawmidi: Make snd_rawmidi_transmit() race-free A kernel WARNING in snd_rawmidi_transmit_ack() is triggered by syzkaller fuzzer: WARNING: CPU: 1 PID: 20739 at sound/core/rawmidi.c:1136 Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0x6f/0xa2 lib/dump_stack.c:50 [] warn_slowpath_common+0xd9/0x140 kernel/panic.c:482 [] warn_slowpath_null+0x29/0x30 kernel/panic.c:515 [] snd_rawmidi_transmit_ack+0x275/0x400 sound/core/rawmidi.c:1136 [] snd_virmidi_output_trigger+0x4b1/0x5a0 sound/core/seq/seq_virmidi.c:163 [< inline >] snd_rawmidi_output_trigger sound/core/rawmidi.c:150 [] snd_rawmidi_kernel_write1+0x549/0x780 sound/core/rawmidi.c:1223 [] snd_rawmidi_write+0x543/0xb30 sound/core/rawmidi.c:1273 [] __vfs_write+0x113/0x480 fs/read_write.c:528 [] vfs_write+0x167/0x4a0 fs/read_write.c:577 [< inline >] SYSC_write fs/read_write.c:624 [] SyS_write+0x111/0x220 fs/read_write.c:616 [] entry_SYSCALL_64_fastpath+0x16/0x7a arch/x86/entry/entry_64.S:185 Also a similar warning is found but in another path: Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0x6f/0xa2 lib/dump_stack.c:50 [] warn_slowpath_common+0xd9/0x140 kernel/panic.c:482 [] warn_slowpath_null+0x29/0x30 kernel/panic.c:515 [] rawmidi_transmit_ack+0x24a/0x3b0 sound/core/rawmidi.c:1133 [] snd_rawmidi_transmit_ack+0x51/0x80 sound/core/rawmidi.c:1163 [] snd_virmidi_output_trigger+0x2b6/0x570 sound/core/seq/seq_virmidi.c:185 [< inline >] snd_rawmidi_output_trigger sound/core/rawmidi.c:150 [] snd_rawmidi_kernel_write1+0x4bb/0x760 sound/core/rawmidi.c:1252 [] snd_rawmidi_write+0x543/0xb30 sound/core/rawmidi.c:1302 [] __vfs_write+0x113/0x480 fs/read_write.c:528 [] vfs_write+0x167/0x4a0 fs/read_write.c:577 [< inline >] SYSC_write fs/read_write.c:624 [] SyS_write+0x111/0x220 fs/read_write.c:616 [] entry_SYSCALL_64_fastpath+0x16/0x7a arch/x86/entry/entry_64.S:185 In the former case, the reason is that virmidi has an open code calling snd_rawmidi_transmit_ack() with the value calculated outside the spinlock. We may use snd_rawmidi_transmit() in a loop just for consuming the input data, but even there, there is a race between snd_rawmidi_transmit_peek() and snd_rawmidi_tranmit_ack(). Similarly in the latter case, it calls snd_rawmidi_transmit_peek() and snd_rawmidi_tranmit_ack() separately without protection, so they are racy as well. The patch tries to address these issues by the following ways: - Introduce the unlocked versions of snd_rawmidi_transmit_peek() and snd_rawmidi_transmit_ack() to be called inside the explicit lock. - Rewrite snd_rawmidi_transmit() to be race-free (the former case). - Make the split calls (the latter case) protected in the rawmidi spin lock. BugLink: http://lkml.kernel.org/r/CACT4Y+YPq1+cYLkadwjWa5XjzF1_Vki1eHnVn-Lm0hzhSpu5PA@mail.gmail.com BugLink: http://lkml.kernel.org/r/CACT4Y+acG4iyphdOZx47Nyq_VHGbpJQK-6xNpiqUjaZYqsXOGw@mail.gmail.com Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai include/sound/rawmidi.h | 4 ++ sound/core/rawmidi.c | 98 ++++++++++++++++++++++++++++++++------------ sound/core/seq/seq_virmidi.c | 17 +++++--- 3 files changed, 88 insertions(+), 31 deletions(-) commit 2154cc0e2d4ae15132d005d17e473327c70c9a06 Author: Takashi Iwai Date: Wed Feb 3 12:32:51 2016 +0100 ALSA: hda - Add fixup for Mac Mini 7,1 model Mac Mini 7,1 model with CS4208 codec reports the headphone jack detection wrongly in an inverted way. Moreover, the advertised pins for the audio input and SPDIF output have actually no jack detection. This patch addresses these issues. The inv_jack_detect flag is set for fixing the headphone jack detection, and the pin configs for audio input and SPDIF output are marked as non-detectable. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=105161 Report-and-tested-by: moosotc@gmail.com Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_cirrus.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 74c81ecdc0e37b917d7c6358ed72dc8337d8900f Author: Ralf Baechle Date: Wed Feb 3 10:32:22 2016 +0100 MIPS: R6000: Don't allow 64k pages for R6000. The R6000 does not support 64k pages. Signed-off-by: Ralf Baechle arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cc9b9d627af2c443cf98e651e3738d84f991cec Author: Kailang Yang Date: Wed Feb 3 15:09:35 2016 +0800 ALSA: hda/realtek - Support headset mode for ALC225 Support headset mode for ALC225 platforms. Signed-off-by: Kailang Yang Cc: # v4.4+ Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit cfc5a845e62853edd36e564c23c64588f4adcae6 Author: Kailang Yang Date: Wed Feb 3 15:20:39 2016 +0800 ALSA: hda/realtek - Support Dell headset mode for ALC225 Dell create new platform with ALC298 codec. This patch will enable headset mode for ALC225/ALC3253 platform. Signed-off-by: Kailang Yang Cc: # v4.4+ Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4231430da9607fb2eb7ea92f3b93ceef3bc2ed93 Author: Kailang Yang Date: Wed Feb 3 15:03:50 2016 +0800 ALSA: hda/realtek - New codec support of ALC225 Add new support for ALC225, yet another variant of ALC298 codec. Signed-off-by: Kailang Yang Cc: # 4.4+ Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8244062ef1e54502ef55f54cced659913f244c3e Author: Rusty Russell Date: Wed Feb 3 16:55:26 2016 +1030 modules: fix longstanding /proc/kallsyms vs module insertion race. For CONFIG_KALLSYMS, we keep two symbol tables and two string tables. There's one full copy, marked SHF_ALLOC and laid out at the end of the module's init section. There's also a cut-down version that only contains core symbols and strings, and lives in the module's core section. After module init (and before we free the module memory), we switch the mod->symtab, mod->num_symtab and mod->strtab to point to the core versions. We do this under the module_mutex. However, kallsyms doesn't take the module_mutex: it uses preempt_disable() and rcu tricks to walk through the modules, because it's used in the oops path. It's also used in /proc/kallsyms. There's nothing atomic about the change of these variables, so we can get the old (larger!) num_symtab and the new symtab pointer; in fact this is what I saw when trying to reproduce. By grouping these variables together, we can use a carefully-dereferenced pointer to ensure we always get one or the other (the free of the module init section is already done in an RCU callback, so that's safe). We allocate the init one at the end of the module init section, and keep the core one inside the struct module itself (it could also have been allocated at the end of the module core, but that's probably overkill). Reported-by: Weilong Chen Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111541 Cc: stable@kernel.org Signed-off-by: Rusty Russell include/linux/module.h | 19 +++++---- kernel/module.c | 112 ++++++++++++++++++++++++++++++------------------- 2 files changed, 79 insertions(+), 52 deletions(-) commit 2e7bac536106236104e9e339531ff0fcdb7b8147 Author: Rusty Russell Date: Wed Feb 3 16:55:26 2016 +1030 module: wrapper for symbol name. This trivial wrapper adds clarity and makes the following patch smaller. Cc: stable@kernel.org Signed-off-by: Rusty Russell kernel/module.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 4355efbd80482a961cae849281a8ef866e53d55c Author: Luis R. Rodriguez Date: Wed Feb 3 16:55:26 2016 +1030 modules: fix modparam async_probe request Commit f2411da746985 ("driver-core: add driver module asynchronous probe support") added async probe support, in two forms: * in-kernel driver specification annotation * generic async_probe module parameter (modprobe foo async_probe) To support the generic kernel parameter parse_args() was extended via commit ecc8617053e0 ("module: add extra argument for parse_params() callback") however commit failed to f2411da746985 failed to add the required argument. This causes a crash then whenever async_probe generic module parameter is used. This was overlooked when the form in which in-kernel async probe support was reworked a bit... Fix this as originally intended. Cc: Hannes Reinecke Cc: Dmitry Torokhov Cc: stable@vger.kernel.org (4.2+) Signed-off-by: Luis R. Rodriguez Signed-off-by: Rusty Russell [minimized] kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d896910f381737a139686eb3fa9e1c7ce8f59e52 Author: Geert Uytterhoeven Date: Fri Jan 15 14:40:24 2016 +0100 phy: Restrict phy-hi6220-usb to HiSilicon arm64 The HiSilicon Hi6220 USB PHY is available in HiSilicon Hi6220 SoCs only. Restrict it to HiSilicon arm64, unless compile-testing. Signed-off-by: Geert Uytterhoeven Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) commit dba280b20bfd1c2bed8a07ce3f75a6da8ba7d247 Author: Alex Deucher Date: Tue Feb 2 16:24:20 2016 -0500 drm/amdgpu: remove exp hardware support from iceland It's working now. bug: https://bugs.freedesktop.org/show_bug.cgi?id=92270 Reviewed-by: Ken Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 951e09624a9f417f0b64c872f71feb6738905086 Author: Alex Deucher Date: Tue Feb 2 16:22:15 2016 -0500 drm/amdgpu: load MEC ucode manually on iceland The smc doesn't handle it. Reviewed-by: Ken Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 97dde76a30c2e67fa5fb9cb6a4072c0178c9df26 Author: Alex Deucher Date: Tue Feb 2 11:15:41 2016 -0500 drm/amdgpu: don't load MEC2 on topaz Not validated. Reviewed-by: Ken Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/iceland_smc.c | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) commit 8878d8548ac7fae43cd6d82579f966eb8825e282 Author: Alex Deucher Date: Tue Feb 2 10:57:30 2016 -0500 drm/amdgpu: drop topaz support from gmc8 module topaz is actually gmc7. Reviewed-by: Ken Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) commit 72b459c8f716ef03a8a0c78078547ce64d8d29a2 Author: Alex Deucher Date: Tue Feb 2 10:56:15 2016 -0500 drm/amdgpu: pull topaz gmc bits into gmc_v7 Add the topaz golden settings into the gmc7 module. Reviewed-by: Ken Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 8f3c162961fc2d92ec73a66496aab69eb2e19c36 Author: Ken Wang Date: Wed Feb 3 19:17:53 2016 +0800 drm/amdgpu: The VI specific EXE bit should only apply to GMC v8.0 above Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Ken Wang Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 429c45deae6e57f1bb91bfb05b671063fb0cef60 Author: Ken Wang Date: Wed Feb 3 19:16:54 2016 +0800 drm/amdgpu: iceland use CI based MC IP Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Ken Wang Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 10 +++++++++- drivers/gpu/drm/amd/amdgpu/vi.c | 7 ++++--- 2 files changed, 13 insertions(+), 4 deletions(-) commit e42d85261680edfc350a6c2a86b7fbb44a85014b Author: Alex Deucher Date: Tue Feb 2 10:59:53 2016 -0500 drm/amdgpu: move gmc7 support out of CIK dependency It's used by iceland which is VI. Reviewed-by: Ken Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 53af16f79fbc3f06df76f6d82adcd4ed03b3d752 Author: Ulf Hansson Date: Mon Feb 1 14:52:41 2016 +0100 PM / Domains: Silence compiler warning for an unused function The only remaining caller of genpd_poweron() is conditionally compiled based on CONFIG_PM_GENERIC_DOMAINS_OF, so we get a warning when that is unset. By moving the locking/unlocking of the genpd outside genpd_poweron(), thus to the caller, genpd_poweron() becomes redundant. Within this context let's then rename the wrapper function, __genpd_poweron(), to genpd_poweron() as it will then be consistent with its friend genpd_poweroff(). This change silence the warning about the unused function. Reported-by: Arnd Bergmann Fixes: ea823c7cbffa "PM / Domains: Remove pm_genpd_poweron() API" Signed-off-by: Ulf Hansson Acked-by: Arnd Bergmann Cc: 4.4+ # 4.4+ Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit 2db8f9a1d86aa32a9cbf1a975882b4fa162f040f Author: Timur Tabi Date: Tue Jan 26 12:43:00 2016 -0600 ACPI / CPPC: remove redundant mbox_send_message() declaration Remove a redundant function declaration in cppc_acpi.h for mbox_send_message(). That function is defined in mailbox_client.h, which is already included. Signed-off-by: Timur Tabi Signed-off-by: Rafael J. Wysocki include/acpi/cppc_acpi.h | 1 - 1 file changed, 1 deletion(-) commit 5be6ada39f3f11a14fae9c6c328bcc78cf476e2e Author: Andy Shevchenko Date: Mon Feb 1 16:17:38 2016 +0200 ACPI / LPSS: set PM domain via helper setter The commit 989561de9b51 ("PM / Domains: add setter for dev.pm_domain") changed acpi_lpss.c module to use PM domain setter, though it missed one assignment. Add it here. Fixes: 989561de9b51 (PM / Domains: add setter for dev.pm_domain) Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed1f0eeebaeeb7f790e9e7642116a208581e5bfc Author: Josh Boyer Date: Wed Feb 3 01:00:29 2016 +0100 PNP: Add Haswell-ULT to Intel MCH size workaround Add device ID 0x0a04 for Haswell-ULT to the list of devices with MCH problems. From a Lenovo ThinkPad T440S: [ 0.188604] pnp: PnP ACPI init [ 0.189044] system 00:00: [mem 0x00000000-0x0009ffff] could not be reserved [ 0.189048] system 00:00: [mem 0x000c0000-0x000c3fff] could not be reserved [ 0.189050] system 00:00: [mem 0x000c4000-0x000c7fff] could not be reserved [ 0.189052] system 00:00: [mem 0x000c8000-0x000cbfff] could not be reserved [ 0.189054] system 00:00: [mem 0x000cc000-0x000cffff] could not be reserved [ 0.189056] system 00:00: [mem 0x000d0000-0x000d3fff] has been reserved [ 0.189058] system 00:00: [mem 0x000d4000-0x000d7fff] has been reserved [ 0.189060] system 00:00: [mem 0x000d8000-0x000dbfff] has been reserved [ 0.189061] system 00:00: [mem 0x000dc000-0x000dffff] has been reserved [ 0.189063] system 00:00: [mem 0x000e0000-0x000e3fff] could not be reserved [ 0.189065] system 00:00: [mem 0x000e4000-0x000e7fff] could not be reserved [ 0.189067] system 00:00: [mem 0x000e8000-0x000ebfff] could not be reserved [ 0.189069] system 00:00: [mem 0x000ec000-0x000effff] could not be reserved [ 0.189071] system 00:00: [mem 0x000f0000-0x000fffff] could not be reserved [ 0.189073] system 00:00: [mem 0x00100000-0xdf9fffff] could not be reserved [ 0.189075] system 00:00: [mem 0xfec00000-0xfed3ffff] could not be reserved [ 0.189078] system 00:00: [mem 0xfed4c000-0xffffffff] could not be reserved [ 0.189082] system 00:00: Plug and Play ACPI device, IDs PNP0c01 (active) [ 0.189216] system 00:01: [io 0x1800-0x189f] could not be reserved [ 0.189220] system 00:01: [io 0x0800-0x087f] has been reserved [ 0.189222] system 00:01: [io 0x0880-0x08ff] has been reserved [ 0.189224] system 00:01: [io 0x0900-0x097f] has been reserved [ 0.189226] system 00:01: [io 0x0980-0x09ff] has been reserved [ 0.189229] system 00:01: [io 0x0a00-0x0a7f] has been reserved [ 0.189231] system 00:01: [io 0x0a80-0x0aff] has been reserved [ 0.189233] system 00:01: [io 0x0b00-0x0b7f] has been reserved [ 0.189235] system 00:01: [io 0x0b80-0x0bff] has been reserved [ 0.189238] system 00:01: [io 0x15e0-0x15ef] has been reserved [ 0.189240] system 00:01: [io 0x1600-0x167f] has been reserved [ 0.189242] system 00:01: [io 0x1640-0x165f] has been reserved [ 0.189246] system 00:01: [mem 0xf8000000-0xfbffffff] could not be reserved [ 0.189249] system 00:01: [mem 0x00000000-0x00000fff] could not be reserved [ 0.189251] system 00:01: [mem 0xfed1c000-0xfed1ffff] has been reserved [ 0.189254] system 00:01: [mem 0xfed10000-0xfed13fff] has been reserved [ 0.189256] system 00:01: [mem 0xfed18000-0xfed18fff] has been reserved [ 0.189258] system 00:01: [mem 0xfed19000-0xfed19fff] has been reserved [ 0.189261] system 00:01: [mem 0xfed45000-0xfed4bfff] has been reserved [ 0.189264] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active) [....] [ 0.583653] resource sanity check: requesting [mem 0xfed10000-0xfed15fff], which spans more than pnp 00:01 [mem 0xfed10000-0xfed13fff] [ 0.583654] ------------[ cut here ]------------ [ 0.583660] WARNING: CPU: 0 PID: 1 at arch/x86/mm/ioremap.c:198 __ioremap_caller+0x2c5/0x380() [ 0.583661] Info: mapping multiple BARs. Your kernel is fine. [ 0.583662] Modules linked in: [ 0.583666] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.3.3-303.fc23.x86_64 #1 [ 0.583668] Hardware name: LENOVO 20AR001GXS/20AR001GXS, BIOS GJET86WW (2.36 ) 12/04/2015 [ 0.583670] 0000000000000000 0000000014cf7e59 ffff880214a1baf8 ffffffff813a625f [ 0.583673] ffff880214a1bb40 ffff880214a1bb30 ffffffff810a07c2 00000000fed10000 [ 0.583675] ffffc90000cb8000 0000000000006000 0000000000000000 ffff8800d6381040 [ 0.583678] Call Trace: [ 0.583683] [] dump_stack+0x44/0x55 [ 0.583686] [] warn_slowpath_common+0x82/0xc0 [ 0.583688] [] warn_slowpath_fmt+0x5c/0x80 [ 0.583692] [] ? iomem_map_sanity_check+0xba/0xd0 [ 0.583695] [] __ioremap_caller+0x2c5/0x380 [ 0.583698] [] ioremap_nocache+0x17/0x20 [ 0.583701] [] snb_uncore_imc_init_box+0x79/0xb0 [ 0.583705] [] uncore_pci_probe+0xd0/0x1b0 [ 0.583707] [] local_pci_probe+0x45/0xa0 [ 0.583710] [] pci_device_probe+0xfd/0x140 [ 0.583713] [] driver_probe_device+0x222/0x480 [ 0.583715] [] __driver_attach+0x84/0x90 [ 0.583717] [] ? driver_probe_device+0x480/0x480 [ 0.583720] [] bus_for_each_dev+0x6c/0xc0 [ 0.583722] [] driver_attach+0x1e/0x20 [ 0.583724] [] bus_add_driver+0x1eb/0x280 [ 0.583727] [] ? uncore_cpu_setup+0x12/0x12 [ 0.583729] [] driver_register+0x60/0xe0 [ 0.583733] [] __pci_register_driver+0x4c/0x50 [ 0.583736] [] intel_uncore_init+0xe2/0x2e6 [ 0.583738] [] ? uncore_cpu_setup+0x12/0x12 [ 0.583741] [] do_one_initcall+0xb3/0x200 [ 0.583745] [] ? parse_args+0x1a0/0x4a0 [ 0.583749] [] kernel_init_freeable+0x189/0x223 [ 0.583752] [] ? rest_init+0x80/0x80 [ 0.583754] [] kernel_init+0xe/0xe0 [ 0.583758] [] ret_from_fork+0x3f/0x70 [ 0.583760] [] ? rest_init+0x80/0x80 [ 0.583765] ---[ end trace 077c426a39e018aa ]--- 00:00.0 Host bridge [0600]: Intel Corporation Haswell-ULT DRAM Controller [8086:0a04] (rev 0b) Subsystem: Lenovo Device [17aa:220c] Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- Kernel driver in use: hsw_uncore Link: https://bugzilla.redhat.com/show_bug.cgi?id=1300955 Tested-by: Signed-off-by: Josh Boyer Signed-off-by: Rafael J. Wysocki drivers/pnp/quirks.c | 1 + 1 file changed, 1 insertion(+) commit f146357f069e71aff8e474c625bcebcd3094b3ab Author: Takashi Iwai Date: Tue Feb 2 14:14:10 2016 +0100 ALSA: timer: Sync timer deletion at closing the system timer ALSA timer core framework has no sync point at stopping because it's called inside the spinlock. Thus we need a sync point at close for avoiding the stray timer task. This is simply done by implementing the close callback just calling del_timer_sync(). (It's harmless to call it unconditionally, as the core timer itself cares of the already deleted timer instance.) Signed-off-by: Takashi Iwai sound/core/timer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1c5e08099022942cd530c99f5f292c735acc288f Author: Moni Shoua Date: Thu Jan 28 17:51:50 2016 +0200 IB/core: Set correct payload length for RoCEv2 over IPv6 For GSI QP traffic, the count of the udp header bytes was missing from the IPv6 header, fix that. Fixes: 25f40220e56b ('IB/core: Initialize UD header structure with IP and UDP headers') Signed-off-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/core/ud_header.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 01581fb89e5a6d41d06132aefe105a506f04ce1e Author: Maor Gottlieb Date: Thu Jan 28 17:51:49 2016 +0200 IB/mlx5: Use MLX5_GET to correctly get end of padding mode MLX5_GET64 was used on end_padding_mode, which is a 2-bit field. This is wrong as the calculated offset is incorrect. Using MLX5_GET instead of MLX5_GET64 to fix that. Fixes: 0fb2ed66a14c ('IB/mlx5: Add create and destroy functionality for Raw Packet QP') Signed-off-by: Maor Gottlieb Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09f16cf59fbf825130c216c3af189253505dc9d9 Author: Majd Dibbiny Date: Thu Jan 28 17:51:48 2016 +0200 IB/mlx5: Fix use of null pointer PD When a Raw Ethernet QP is created, a NULL pointer PD could be used. Fixing that by only using the PD after validating it's valid. smatch also reported this error: drivers/infiniband/hw/mlx5/qp.c:1629 mlx5_ib_create_qp() error: we previously assumed 'pd' could be null (see line 1616) Fixes: 0fb2ed66a14c ('IB/mlx5: Add create and destroy functionality for Raw Packet QP') Signed-off-by: Majd Dibbiny Reported-by: Dan Carpenter Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit a168a41c8147fe644f1144031a6ec27a1a13fe37 Author: Majd Dibbiny Date: Thu Jan 28 17:51:47 2016 +0200 IB/mlx5: Fix reqlen validation in mlx5_ib_alloc_ucontext Older libraries that don't have all the new req_v2 fields should be able to work as well. Today, if the library uses v2, it will fail to allocate context since the size of reqlen is smaller than the req_v2 size. Fix the validation to be with the original req_v2 size and not the current. Fixes: f72300c56c3b ('IB/mlx5: Expose CQE version to user-space') Signed-off-by: Majd Dibbiny Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d4584ddfc97518a575ed538307e81e73456b8175 Author: Matan Barak Date: Thu Jan 28 17:51:46 2016 +0200 IB/mlx5: Add CREATE_CQ and CREATE_QP to uverbs_ex_cmd_mask The mlx5_ib driver supports the extended create_cq and create_qp user verbs. In the current mechanism, a vendor supporting an extended uverb should set the appropriate bit in the uverbs_ex_cmd_mask field. Adding the actual support by setting the required bits in order to support features like completion time-stamping and cross-channel. Fixes: 972ecb821379 ('IB/mlx5: Add create_cq extended command') Fixes: ddf9529be19c ('IB/core: Allow setting create flags in QP init attribute') Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ef720532ecc22a76fea4450bcc91ee054cde9bdb Author: Alex Deucher Date: Tue Feb 2 14:46:48 2016 -0500 drm/amdgpu/gfx7: enable cp inst/reg error interrupts Enable CP register/instruction error interrupts. Useful for debugging command stream problems. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 1d22a454ecda91c8b8c67ff2b07cdbdf7d26ede1 Author: Alex Deucher Date: Tue Feb 2 14:42:28 2016 -0500 drm/amdgpu/gfx8: enable cp inst/reg error interrupts Enable CP register/instruction error interrupts. Useful for debugging command stream problems. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 292d4200a90715ac29f3763df27adb38a243868c Author: Pierre-Louis Bossart Date: Tue Feb 2 12:49:49 2016 -0600 ASoC: Intel: Atom: fix regression on compress DAI Commit a106804 ("ASoC: compress: Fix compress device direction check") added a dependency on the compress-cpu-dai channel_min field which was removed earlier by commit 77095796 ("ASoC: Intel: Atom: clean-up compressed DAI definition") as part of the baytrail cleanups. The net result was a regression at probe on all Atom platforms with no sound card created. Fix by adding explicit initialization for channel_min to 1 for the compress-cpu-dai. Reported-by: Tobias Mädel Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst-mfld-platform-pcm.c | 1 + 1 file changed, 1 insertion(+) commit 5e82d2be6ee53275c72e964507518d7964c82753 Author: Vinod Koul Date: Mon Feb 1 22:26:40 2016 +0530 ASoC: dpcm: fix the BE state on hw_free While performing hw_free, DPCM checks the BE state but leaves out the suspend state. The suspend state needs to be checked as well, as we might be suspended and then usermode closes rather than resuming the audio stream. This was found by a stress testing of system with playback in loop and killed after few seconds running in background and second script running suspend-resume test in loop Signed-off-by: Vinod Koul Acked-by: Liam Girdwood Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/soc-pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d2f916aaccaf7b3bc27df2fd6cfc00f6cda2f78d Author: Jon Medhurst (Tixy) Date: Mon Feb 1 15:54:37 2016 +0000 ASoC: dwc: Ensure i2s_reg_comp{1,2} is always initialised In the case that the driver is configured from device-tree i2s_reg_comp1 and i2s_reg_comp2 aren't initialised, breaking the driver. Fix this by unconditionally setting these values before checking for quirks. Fixes: a242cac1d3aa ("ASoC: dwc: add quirk to override COMP_PARAM_1 register") Signed-off-by: Jon Medhurst Signed-off-by: Mark Brown sound/soc/dwc/designware_i2s.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 270bde1e76f400d81f8d0ab68905a18ee17fa2e8 Author: Hemant Kumar Date: Tue Feb 2 20:56:46 2016 +0530 perf probe: Search both .eh_frame and .debug_frame sections for probe location 'perf probe' through debuginfo__find_probes() in util/probe-finder.c checks for the functions' frame descriptions in either .eh_frame section of an ELF or the .debug_frame. The check is based on whether either one of these sections is present. Depending on distro, toolchain defaults, architetcutre, build flags, etc., CFI might be found in either .eh_frame and/or .debug_frame. Sometimes, it may happen that, .eh_frame, even if present, may not be complete and may miss some descriptions. Therefore, to be sure, to find the CFI covering an address we will always have to investigate both if available. For e.g., in powerpc, this may happen: $ gcc -g bin.c -o bin $ objdump --dwarf ./bin <1><145>: Abbrev Number: 7 (DW_TAG_subprogram) <146> DW_AT_external : 1 <146> DW_AT_name : (indirect string, offset: 0x9e): main <14a> DW_AT_decl_file : 1 <14b> DW_AT_decl_line : 39 <14c> DW_AT_prototyped : 1 <14c> DW_AT_type : <0x57> <150> DW_AT_low_pc : 0x100007b8 If the .eh_frame and .debug_frame are checked for the same binary, we will find that, .eh_frame (although present) doesn't contain a description for "main" function. But, .debug_frame has a description: 000000d8 00000024 00000000 FDE cie=00000000 pc=100007b8..10000838 DW_CFA_advance_loc: 16 to 100007c8 DW_CFA_def_cfa_offset: 144 DW_CFA_offset_extended_sf: r65 at cfa+16 ... Due to this (since, perf checks whether .eh_frame is present and goes on searching for that address inside that frame), perf is unable to process the probes: # perf probe -x ./bin main Failed to get call frame on 0x100007b8 Error: Failed to add events. To avoid this issue, we need to check both the sections (.eh_frame and .debug_frame), which is done in this patch. Note that, we can always force everything into both .eh_frame and .debug_frame by: $ gcc bin.c -fasynchronous-unwind-tables -fno-dwarf2-cfi-asm -g -o bin Signed-off-by: Hemant Kumar Acked-by: Masami Hiramatsu Cc: linuxppc-dev@lists.ozlabs.org Cc: Mark Wielaard Cc: Naveen N. Rao Cc: Srikar Dronamraju Link: http://lkml.kernel.org/r/1454426806-13974-1-git-send-email-hemant@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-finder.c | 62 +++++++++++++++++++++++++----------------- tools/perf/util/probe-finder.h | 5 +++- 2 files changed, 41 insertions(+), 26 deletions(-) commit 811d61e384e24759372bb3f01772f3744b0a8327 Author: James Morse Date: Tue Feb 2 15:53:59 2016 +0000 arm64: futex.h: Add missing PAN toggling futex.h's futex_atomic_cmpxchg_inatomic() does not use the __futex_atomic_op() macro and needs its own PAN toggling. This was missed when the feature was implemented. Fixes: 338d4f49d6f ("arm64: kernel: Add support for Privileged Access Never") Signed-off-by: James Morse Signed-off-by: Will Deacon arch/arm64/include/asm/futex.h | 2 ++ 1 file changed, 2 insertions(+) commit 3a4acda1ecbd290973de08250d7dcdfaf5b2fe0f Author: Adrian Hunter Date: Mon Feb 1 03:21:04 2016 +0000 perf tools: Fix thread lifetime related segfaut in intel_pt intel_pt_process_auxtrace_info() creates a pt->unknown_thread thread that eventually needs to be freed by the last thread__put() on it, when its refcount hits zero, which may happen in intel_pt_process_auxtrace_info() error handling path and triggers the following segfault, which would happen as well at intel_pt_free, when tools using this intel_pt codebase frees up resources: # perf record -I -e intel_pt/tsc=1,noretcomp=1/u /bin/ls 0 a anaconda-ks.cfg bin perf.data perf.data.old perf-f23-bringup.todo [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.217 MB perf.data ] # # perf script -F event,comm,pid,tid,time,addr,ip,sym,dso,iregs Samples for 'instructions:u' event do not have IREGS attribute set. Cannot print 'iregs' field. intel_pt_synth_events: failed to synthesize 'instructions' event type Segmentation fault (core dumped) # The problem is: there's a union in 'struct thread' combines a list_head and a rb_node. The standard life cycle of a thread is: init rb_node in the constructor, insert it into machine->threads rbtree using rb_node, move it to machine->dead_threads using list_head, clean in the last thread__put: list_del_init(&thread->node). In the above command, it clean a thread before adding it into list, causes the above segfault. Since pt->unknown_thread will never live in an rbtree, initialize its list node so that when list_del_init() is done on it we don't segfault. After this patch: # perf script -F event,comm,pid,tid,time,addr,ip,sym,dso,iregs Samples for 'instructions:u' event do not have IREGS attribute set. Cannot print 'iregs' field. intel_pt_synth_events: failed to synthesize 'instructions' event type 0x248 [0x88]: failed to process type: 70 # Reported-by: Tong Zhang Reported-by: Wang Nan Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Josh Poimboeuf Link: http://lkml.kernel.org/r/1454296865-19749-1-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 95f5c80050ad723163aa80dc8bffd48ef4afc6d5 Author: Ard Biesheuvel Date: Wed Jan 27 10:50:19 2016 +0100 arm64: allow vmalloc regions to be set with set_memory_* The range of set_memory_* is currently restricted to the module address range because of difficulties in breaking down larger block sizes. vmalloc maps PAGE_SIZE pages so it is safe to use as well. Update the function ranges and add a comment explaining why the range is restricted the way it is. Suggested-by: Laura Abbott Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/mm/pageattr.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit a187f17f0e15a046aa5d7263b35df55230d92779 Author: Oded Gabbay Date: Sat Jan 30 07:59:34 2016 +0200 drm/amdgpu: mask out WC from BO on unsupported arches Reviewed-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Oded Gabbay Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c5244987394648913ae1a03879c58058a2fc2cee Author: Oded Gabbay Date: Sat Jan 30 07:59:33 2016 +0200 drm/radeon: mask out WC from BO on unsupported arches Reviewed-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Oded Gabbay Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_object.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4b0e4e4af6c6dc8354dcb72182d52c1bc55f12fc Author: Dave Airlie Date: Sat Jan 30 07:59:32 2016 +0200 drm: add helper to check for wc memory support Reviewed-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Dave Airlie Signed-off-by: Oded Gabbay Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org include/drm/drm_cache.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 212c5a5e6ba61678be6b5fee576e38bccb50b613 Author: Sven Eckelmann Date: Tue Feb 2 08:12:26 2016 +0100 mac80211: minstrel: Change expected throughput unit back to Kbps The change from cur_tp to the function minstrel_get_tp_avg/minstrel_ht_get_tp_avg changed the unit used for the current throughput. For example in minstrel_ht the correct conversion between them would be: mrs->cur_tp / 10 == minstrel_ht_get_tp_avg(..). This factor 10 must also be included in the calculation of minstrel_get_expected_throughput and minstrel_ht_get_expected_throughput to return values with the unit [Kbps] instead of [10Kbps]. Otherwise routing algorithms like B.A.T.M.A.N. V will make incorrect decision based on these values. Its kernel based implementation expects expected_throughput always to have the unit [Kbps] and not sometimes [10Kbps] and sometimes [Kbps]. The same requirement has iw or olsrdv2's nl80211 based statistics module which retrieve the same data via NL80211_STA_INFO_TX_BITRATE. Cc: stable@vger.kernel.org Fixes: 6a27b2c40b48 ("mac80211: restructure per-rate throughput calculation into function") Signed-off-by: Sven Eckelmann Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel.c | 2 +- net/mac80211/rc80211_minstrel_ht.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit f84a93726e0c0c53b5b6dbee96623e7e53e06dd8 Author: Konstantin Khlebnikov Date: Fri Jan 29 11:35:12 2016 +0300 mac80211: minstrel_ht: fix out-of-bound in minstrel_ht_set_best_prob_rate Patch fixes this splat BUG: KASAN: slab-out-of-bounds in minstrel_ht_update_stats.isra.7+0x6e1/0x9e0 [mac80211] at addr ffff8800cee640f4 Read of size 4 by task swapper/3/0 Signed-off-by: Konstantin Khlebnikov Link: http://lkml.kernel.org/r/CALYGNiNyJhSaVnE35qS6UCGaSb2Dx1_i5HcRavuOX14oTz2P+w@mail.gmail.com Acked-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/rc80211_minstrel_ht.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5a1d5eff3ede4de4482015a9999336051054283f Author: Jon Hunter Date: Fri Dec 4 17:04:25 2015 +0000 clk: tegra: super: Fix sparse warnings for functions not declared as static Sparse reports the following warnings for structures and functions that should be declared static: drivers/clk/tegra/clk-tegra-super-gen4.c:70:35: warning: symbol 'tegra_super_gen_info_gen4' was not declared. Should it be static? drivers/clk/tegra/clk-tegra-super-gen4.c:96:35: warning: symbol 'tegra_super_gen_info_gen5' was not declared. Should it be static? drivers/clk/tegra/clk-tegra-super-gen4.c:174:13: warning: symbol 'tegra_super_clk_init' was not declared. Should it be static? Fix this by making the above static. Signed-off-by: Jon Hunter Acked-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-super-gen4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fd360e20844aa8d1081eb28c72128abb7a5d3598 Author: Jon Hunter Date: Fri Dec 4 17:04:24 2015 +0000 clk: tegra: Fix sparse warnings for functions not declared as static Sparse reports the following warnings for functions in clk-tegra210.c that should be declared as static: drivers/clk/tegra/clk-tegra210.c:460:6: warning: symbol 'tegra210_pllcx_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:485:6: warning: symbol '_pllc_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:490:6: warning: symbol '_pllc2_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:495:6: warning: symbol '_pllc3_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:500:6: warning: symbol '_plla1_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:510:6: warning: symbol 'tegra210_plla_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:562:6: warning: symbol 'tegra210_plld_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:701:6: warning: symbol 'tegra210_plld2_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:709:6: warning: symbol 'tegra210_plldp_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:722:6: warning: symbol 'tegra210_pllc4_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:731:6: warning: symbol 'tegra210_pllre_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:844:6: warning: symbol 'tegra210_pllx_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:904:6: warning: symbol 'tegra210_pllmb_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:963:6: warning: symbol 'tegra210_pllp_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:1025:6: warning: symbol 'tegra210_pllu_set_defaults' was not declared. Should it be static? drivers/clk/tegra/clk-tegra210.c:1215:15: warning: symbol 'tegra210_clk_adjust_vco_min' was not declared. Should it be static? Fix this by declaring the above as static. Signed-off-by: Jon Hunter Acked-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit d9e657919afe0794713b5ffb069f9f66c37bfe17 Author: Jon Hunter Date: Fri Dec 4 17:04:23 2015 +0000 clk: tegra: Fix sparse warning for pll_m Sparse generates the following warning for the pll_m params structure: drivers/clk/tegra/clk-tegra210.c:1569:10: warning: Initializer entry defined twice drivers/clk/tegra/clk-tegra210.c:1570:10: also defined here Fix this by correcting the index for the MISC1 register. Fixes: b31eba5ff3f7 ("clk: tegra: Add support for Tegra210 clocks") Signed-off-by: Jon Hunter Acked-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d5b6cf84a1764aa9837128bc1e6fd53cb0bb9c1 Author: Jon Hunter Date: Mon Dec 21 12:56:32 2015 +0000 clk: tegra: Use definition for pll_u override bit The definition, PLLU_BASE_OVERRIDE, for the pll_u OVERRIDE bit is defined but not used and when the OVERRIDE bit is cleared in tegra210_pll_init() the code directly uses the bit number. Therefore, use the definition, PLLU_BASE_OVERRIDE when clearing the OVERRIDE bit. Signed-off-by: Jon Hunter Acked-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0649c3232be5b647dba50e2f6d31fe1306913ab2 Author: Jon Hunter Date: Mon Dec 21 12:56:31 2015 +0000 clk: tegra: Fix warning caused by pll_u failing to lock If the pll_u is not configured by the bootloader, then on kernel boot the following warning is seen: clk_pll_wait_for_lock: Timed out waiting for pll pll_u_vco lock tegra_init_from_table: Failed to enable pll_u_out1 ------------[ cut here ]------------ WARNING: at drivers/clk/tegra/clk.c:269 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc4-next-20151214+ #1 Hardware name: NVIDIA Tegra210 P2371 reference board (E.1) (DT) task: ffffffc0bc0a0000 ti: ffffffc0bc0a8000 task.ti: ffffffc0bc0a8000 PC is at tegra_init_from_table+0x140/0x164 LR is at tegra_init_from_table+0x140/0x164 pc : [] lr : [] pstate: 80000045 sp : ffffffc0bc0abd50 x29: ffffffc0bc0abd50 x28: ffffffc00090b8a8 x27: ffffffc000a06000 x26: ffffffc0bc019780 x25: ffffffc00086a708 x24: ffffffc00086a790 x23: ffffffc0006d7188 x22: ffffffc0bc010000 x21: 000000000000016e x20: ffffffc0bc00d100 x19: ffffffc000944178 x18: 0000000000000007 x17: 000000000000000e x16: 0000000000000001 x15: 0000000000000007 x14: 000000000000000e x13: 0000000000000013 x12: 000000000000001a x11: 000000000000004d x10: 0000000000000750 x9 : ffffffc0bc0a8000 x8 : ffffffc0bc0a07b0 x7 : 0000000000000001 x6 : 0000000002d5f0f8 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000002 x2 : ffffffc000996724 x1 : 0000000000000000 x0 : 0000000000000032 ---[ end trace cbd20ae519e92ced ]--- Call trace: [] tegra_init_from_table+0x140/0x164 [] tegra210_clock_apply_init_table+0x20/0x28 [] tegra_clocks_apply_init_table+0x18/0x24 [] do_one_initcall+0x90/0x194 [] kernel_init_freeable+0x148/0x1e8 [] kernel_init+0x10/0xdc [] ret_from_fork+0x10/0x40 clk_pll_wait_for_lock: Timed out waiting for pll pll_u_vco lock tegra_init_from_table: Failed to enable pll_u_out2 ------------[ cut here ]------------ pll_u can be either controlled by software or hardware and this is selected via the OVERRIDE bit in the pll_u base register. In the function tegra210_pll_init(), the OVERRIDE bit for pll_u is cleared, which selects hardware control of the pll. However, at the same time the pll_u clocks are populated in the init_table for tegra210 and so software will try to configure the pll_u if it is not already configured and hence, the above warning is seen when the pll fails to lock. Remove the pll_u clocks from the init_table so that software does not try to configure this pll on boot. Signed-off-by: Jon Hunter Acked-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 2 -- 1 file changed, 2 deletions(-) commit 4f8d44403079991a29e69f6aa25bb718ead418cb Author: Jon Hunter Date: Fri Dec 18 13:45:28 2015 +0000 clk: tegra: Fix clock sources for Tegra210 EMC The EMC clock sources for Tegra210 currently incorrectly include pll_c2 and pll_c3. However, both of these should have been pll_mb as shown in the TRM. If Tegra210 happens to be configured such that the pll_mb is the default clock for the EMC, as configured by the bootloader, then this will cause a system hang on boot. This is because the kernel will disable the pll_mb when disabling unused clock as it appears to be unused when it is not. Also add the additional pll_p clock source for the EMC. Signed-off-by: Jon Hunter Acked-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 29569941688cdf647f953b2eb073aa6ec9dd3fc1 Author: Jon Hunter Date: Thu Jan 28 16:33:50 2016 +0000 clk: tegra: Add the APB2APE audio clock on Tegra210 The APB2APE clock for the audio subsystem is required for powering up the audio power domain and accessing the various modules in this subsystem on Tegra210 devices. Add this clock for Tegra210. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding drivers/clk/tegra/clk-id.h | 1 + drivers/clk/tegra/clk-tegra-periph.c | 1 + drivers/clk/tegra/clk-tegra210.c | 1 + include/dt-bindings/clock/tegra210-car.h | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) commit 047d6d8401c2d8f59ae5f478486096c13147ddf7 Author: Amitoj Kaur Chawla Date: Sun Jan 24 20:45:20 2016 +0530 clk: tegra: Add missing of_node_put() for_each_child_of_node() performs an of_node_get() on each iteration, so before breaking out of the loop an of_node_put() is required. Found using Coccinelle. The semantic patch used for this is as follows: // @@ expression e; local idexpression child; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Thierry Reding drivers/clk/tegra/clk-emc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 442f53fb1be44c00263ebb8e7c2eff19dd019037 Author: Mark Kuo Date: Thu Jan 14 14:26:42 2016 -0500 clk: tegra: Fix PLLE SS coefficients The PLLE SS coefficients are different between Tegra210 and Tegra114. Add SoC generation specific versions for Tegra114 and Tegra210 and use them in their respective ->enable() callbacks. Signed-off-by: Mark Kuo Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-pll.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit fd2963b071c1346572285a274a6ae8f26a970c4d Author: Rhyland Klein Date: Thu Jan 14 14:24:37 2016 -0500 clk: tegra: Fix typos around clearing PLLE bits during enable While enabling PLLE on both Tegra114 and Tegra210, we should be clearing PLLE_MISC_VREG_BG_CTRL_MASK and PLLE_MISC_VREG_CTRL_MASK not setting them. This patch fixes both places where we incorrectly set instead of cleared those bits. Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-pll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f59b0168d3f3257f9bf0734563290acc3c9d972b Author: Mark Kuo Date: Thu Jan 14 14:24:36 2016 -0500 clk: tegra: Do not disable PLLE when under hardware control Software should not disable PLLE if PLLE is already put under hardware control. Signed-off-by: Mark Kuo Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-pll.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 3dad5c5fa1d24c3bbb3e9e8ac0c52f35e045b807 Author: Rhyland Klein Date: Thu Jan 14 14:24:35 2016 -0500 clk: tegra: Fix pllx dyn step calculation The logic for calculating the input rate used when figuring out the proper dynamic steps for pllx was incorrect. It is supposed to be calculated using parent_rate / m but it was just using the parent rate directly, therefore using the wrong step values. Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3eb61566a6efc5a56ebe1e6b86519bc5e0b39003 Author: Andrew Bresticker Date: Thu Jan 14 14:24:34 2016 -0500 clk: tegra: pll: Fix potential sleeping-while-atomic Since the ->enable() callback is called with a spinlock held, we cannot call potentially blocking functions such as clk_get_rate() or clk_get_parent(), so use the unlocked versions instead. Signed-off-by: Andrew Bresticker [rklein: Adapted from ChromeOS patch, removing pllu_enable cleanup as it isn't present upstream] Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-pll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 736971bed20de137db9b418cc641c7d11336fffb Author: Rhyland Klein Date: Thu Jan 14 14:24:33 2016 -0500 clk: tegra: Fix the misnaming of nvenc from msenc When adding the nvenc clock, it was partially named msenc in the code. Since the msenc clock isn't present in Tegra210 and has been replaced by the nvenc clock, its misleading to see it present. Therefore, properly rename it. Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-periph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 474f2ba268f220e75ed7b9bfa7b977ade740d30c Author: Rhyland Klein Date: Thu Jan 14 14:24:32 2016 -0500 clk: tegra: Fix naming of MISC registers Some register for PLLM and PLLMB were named MISC0 but according to the TRM, they have different names. Sync up the names to make it easier to understand which register they are really referring to. Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 6235f0ecc4ed799169b80f7317c7f974f7415320 Author: Andre Przywara Date: Mon Feb 1 17:39:20 2016 +0000 irqchip/sun4i: Fix compilation outside of arch/arm The Allwinner sunxi specific interrupt controller cannot be compiled for any architecture except arm: drivers/irqchip/irq-sun4i.c:25:26: fatal error: asm/mach/irq.h: No such file or directory compilation terminated. It turns out that this header is actually not needed for the driver, so remove it and allow compilation for other architectures like arm64. Signed-off-by: Andre Przywara Acked-by: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org Cc: Jason Cooper Cc: Marc Zyngier Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: linux-sunxi@googlegroups.com Link: http://lkml.kernel.org/r/1454348370-3816-2-git-send-email-andre.przywara@arm.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-sun4i.c | 1 - 1 file changed, 1 deletion(-) commit 29ce4ed441d04a8931150f291c0f7d961690ab81 Author: Wolfram Sang Date: Mon Jan 4 03:33:47 2016 +0100 drm: adv7511: it's HPD, not HDP Fix this typo, consequently used over both files :) Signed-off-by: Wolfram Sang Acked-by: Lars-Peter Clausen Reviewed-by: Laurent Pinchart Tested-by: Archit Taneja drivers/gpu/drm/i2c/adv7511.c | 22 +++++++++++----------- drivers/gpu/drm/i2c/adv7511.h | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) commit cd38a33750ace4300ef91b9ad668baf07c3bfd2b Author: Wolfram Sang Date: Mon Jan 4 03:33:46 2016 +0100 drm: adv7511: mark ADV7511_REG_EDID_READ_CTRL volatile This register includes a counter which is decremented by the chip on I2C failures. Also, it is reset when powering down. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Tested-by: Archit Taneja drivers/gpu/drm/i2c/adv7511.c | 1 + 1 file changed, 1 insertion(+) commit d0be8584b01160eb6f49e77f8e9c1da286bb4ffb Author: Wolfram Sang Date: Mon Jan 4 03:33:45 2016 +0100 drm: adv7511: really enable interrupts for EDID detection The interrupts for EDID_READY or DDC_ERROR were never enabled in this driver, so reading EDID always timed out when chip was powered down and interrupts were used. Fix this and also remove clearing the interrupt flags, they are cleared in POWER_DOWN mode anyhow (unlike the interrupt enable flags) according to docs and my tests. Signed-off-by: Wolfram Sang Tested-by: Archit Taneja drivers/gpu/drm/i2c/adv7511.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 0f26922fe5dc5724b1adbbd54b21bad03590b4f3 Author: zengtao Date: Tue Feb 2 11:38:34 2016 +0800 cputime: Prevent 32bit overflow in time[val|spec]_to_cputime() The datatype __kernel_time_t is u32 on 32bit platform, so its subject to overflows in the timeval/timespec to cputime conversion. Currently the following functions are affected: 1. setitimer() 2. timer_create/timer_settime() 3. sys_clock_nanosleep This can happen on MIPS32 and ARM32 with "Full dynticks CPU time accounting" enabled, which is required for CONFIG_NO_HZ_FULL. Enforce u64 conversion to prevent the overflow. Fixes: 31c1fc818715 ("ARM: Kconfig: allow full nohz CPU accounting") Signed-off-by: zengtao Reviewed-by: Arnd Bergmann Cc: Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1454384314-154784-1-git-send-email-prime.zeng@huawei.com Signed-off-by: Thomas Gleixner include/asm-generic/cputime_nsecs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2df9d58fcc0f20d812f390e0b97df69d70d3152f Author: Jisheng Zhang Date: Tue Feb 2 19:55:06 2016 +0800 mmc: sdhci-of-at91: fix pm runtime unbalanced issue in error path The device power usage counter is increased by pm_runtime_get_noresume but isn't decreased in err_add_host error path. Fix this issue by calling pm_runtime_put_noidle() in the error path to restore the device's power usage counter. Signed-off-by: Jisheng Zhang Acked-by: Ludovic Desroches Fixes: f5f17813ae9b ("mmc: sdhci-of-at91: add PM support) Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 1 + 1 file changed, 1 insertion(+) commit 41c89159a6ae5472d39ed8bded5b3b4e07a37944 Author: Robert Jarzmik Date: Fri Jan 29 00:21:26 2016 +0100 mmc: pxamci: fix again read-only gpio detection polarity The commit fixing the conversion of pxamci to slot-gpio API fixed the inverted the logic of the read-only gpio. Unfortunately, the commit was tested on a non-inverted gpio, and not on the inverted one. And the fix did work partially, by luck. This is the remaining missing part of the fix, trivial but still necessary. Fixes: Fixes: 26d49fe71953 ("mmc: pxamci: fix read-only gpio detection polarity") Reported-by: Andrea Adami Tested-by: Andrea Adami Signed-off-by: Robert Jarzmik Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/pxamci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65d3b04a814679a31fe4d5edd19d89dd5b94fd40 Author: Richard Weinberger Date: Mon Jan 25 23:24:09 2016 +0100 mailbox: Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e9c8dc8ba96b165ae72daad3b1f27823c3aee628 Author: Alexey Klimov Date: Thu Dec 10 17:28:37 2015 +0000 mailbox: pcc: fix channel calculation in get_pcc_channel() This patch fixes the calculation of pcc_chan for non-zero id. After the compiler ignores the (unsigned long) cast the pcc_mbox_channels pointer is type-cast and then the type-cast offset is added which results in address outside of the range leading to the kernel crashing. We might add braces and make it: pcc_chan = (struct mbox_chan *) ((unsigned long) pcc_mbox_channels + (id * sizeof(*pcc_chan))); but let's go with array approach here and use id as index. Tested on Juno board. Signed-off-by: Alexey Klimov Acked-by: Sudeep Holla Acked-by: Ashwin Chaugule Signed-off-by: Jassi Brar drivers/mailbox/pcc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 7aa7047100113ec9f5e4e685f94223825bd74a7b Author: Maciej W. Rozycki Date: Sat Jan 30 09:08:28 2016 +0000 MIPS: traps.c: Correct microMIPS RDHWR emulation Fix the code to fetch and decode the whole 32-bit instruction. This only really matters with the `noulri' kernel parameter as all microMIPS processors are supposed to have all the hardware registers we support. Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12281/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 10f6d99f0fb186bbca1e9e2905d0d3693f941396 Author: Maciej W. Rozycki Date: Sat Jan 30 09:08:16 2016 +0000 MIPS: traps.c: Don't emulate RDHWR in the CpU #0 exception handler In the regular MIPS instruction set RDHWR is encoded with the SPECIAL3 (011111) major opcode. Therefore it cannot trigger the CpU (Coprocessor Unusable) exception, and certainly not for coprocessor 0, as the opcode does not overlap with any of the older ISA reservations, i.e. LWC0 (110000), SWC0 (111000), LDC0 (110100) or SDC0 (111100). The closest match might be SDC3 (111111), possibly causing a CpU #3 exception, however our code does not handle it anyway. A quick check with a MIPS I and a MIPS III processor: CPU0 revision is: 00000220 (R3000) CPU0 revision is: 00000440 (R4400SC) indeed indicates that the RI (Reserved Instruction) exception is triggered. It's only LL and SC that require emulation in the CpU #0 exception handler as they reuse the LWC0 and SWC0 opcodes respectively. In the microMIPS instruction set RDHWR is mandatory and triggering the RI exception is required on unimplemented or disabled register accesses. Therefore emulating the microMIPS instruction in the CpU #0 exception handler is not required either. Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12280/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 34229b277480f46c1e9a19f027f30b074512e68b Merge: 2c92341 53729eb Author: Linus Torvalds Date: Mon Feb 1 15:56:08 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "This looks like a lot but it's a mixture of regression fixes as well as fixes for longer standing issues. 1) Fix on-channel cancellation in mac80211, from Johannes Berg. 2) Handle CHECKSUM_COMPLETE properly in xt_TCPMSS netfilter xtables module, from Eric Dumazet. 3) Avoid infinite loop in UDP SO_REUSEPORT logic, also from Eric Dumazet. 4) Avoid a NULL deref if we try to set SO_REUSEPORT after a socket is bound, from Craig Gallek. 5) GRO key comparisons don't take lightweight tunnels into account, from Jesse Gross. 6) Fix struct pid leak via SCM credentials in AF_UNIX, from Eric Dumazet. 7) We need to set the rtnl_link_ops of ipv6 SIT tunnels before we register them, otherwise the NEWLINK netlink message is missing the proper attributes. From Thadeu Lima de Souza Cascardo. 8) Several Spectrum chip bug fixes for mlxsw switch driver, from Ido Schimmel 9) Handle fragments properly in ipv4 easly socket demux, from Eric Dumazet. 10) Don't ignore the ifindex key specifier on ipv6 output route lookups, from Paolo Abeni" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (128 commits) tcp: avoid cwnd undo after receiving ECN irda: fix a potential use-after-free in ircomm_param_request net: tg3: avoid uninitialized variable warning net: nb8800: avoid uninitialized variable warning net: vxge: avoid unused function warnings net: bgmac: clarify CONFIG_BCMA dependency net: hp100: remove unnecessary #ifdefs net: davinci_cpdma: use dma_addr_t for DMA address ipv6/udp: use sticky pktinfo egress ifindex on connect() ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail() netlink: not trim skb for mmaped socket when dump vxlan: fix a out of bounds access in __vxlan_find_mac net: dsa: mv88e6xxx: fix port VLAN maps fib_trie: Fix shift by 32 in fib_table_lookup net: moxart: use correct accessors for DMA memory ipv4: ipconfig: avoid unused ic_proto_used symbol bnxt_en: Fix crash in bnxt_free_tx_skbs() during tx timeout. bnxt_en: Exclude rx_drop_pkts hw counter from the stack's rx_dropped counter. bnxt_en: Ring free response from close path should use completion ring net_sched: drr: check for NULL pointer in drr_dequeue ... commit 2c923414d3963b959f65a8a6031972402e6a34a5 Merge: 29a8ea4 49a2045 Author: Linus Torvalds Date: Mon Feb 1 15:49:18 2016 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes the following issues: API: - algif_hash needs to wait for init operations to complete. - The has_key setting for shash was always true. Algorithms: - Add missing selections of CRYPTO_HASH. - Fix pkcs7 authentication. Drivers: - Fix stack alignment bug in chacha20-ssse3. - Fix performance regression in caam due to incorrect setting. - Fix potential compile-only build failure of stm32" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: atmel-aes - remove calls of clk_prepare() from atomic contexts crypto: algif_hash - wait for crypto_ahash_init() to complete crypto: shash - Fix has_key setting hwrng: stm32 - Fix dependencies for !HAS_IOMEM archs crypto: ghash,poly1305 - select CRYPTO_HASH where needed crypto: chacha20-ssse3 - Align stack pointer to 64 bytes PKCS#7: Don't require SpcSpOpusInfo in Authenticode pkcs7 signatures crypto: caam - make write transactions bufferable on PPC platforms commit 29a8ea4fbe6beda81300835a739740c35c7abcab Merge: 36f90b0 76e9f0e Author: Linus Torvalds Date: Mon Feb 1 15:21:20 2016 -0800 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "1/ Fixes to the libnvdimm 'pfn' device that establishes a reserved area for storing a struct page array. 2/ Fixes for dax operations on a raw block device to prevent pagecache collisions with dax mappings. 3/ A fix for pfn_t usage in vm_insert_mixed that lead to a null pointer de-reference. These have received build success notification from the kbuild robot across 153 configs and pass the latest ndctl tests" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: phys_to_pfn_t: use phys_addr_t mm: fix pfn_t to page conversion in vm_insert_mixed block: use DAX for partition table reads block: revert runtime dax control of the raw block device fs, block: force direct-I/O for dax-enabled block devices devm_memremap_pages: fix vmem_altmap lifetime + alignment handling libnvdimm, pfn: fix restoring memmap location libnvdimm: fix mode determination for e820 devices commit 87bee0ecf01d2ed0d48bba1fb12c954f9476d243 Author: Florian Fainelli Date: Sun Jan 31 17:40:01 2016 -0800 MAINTAINERS: Remove stale entry for BCM33xx chips Commit 70371cef114ca ("MAINTAINERS: Add entry for BMIPS multiplatform kernel") supersedes this entry for BCM33xx. Fixes: 70371cef114ca ("MAINTAINERS: Add entry for BMIPS multiplatform kernel") Signed-off-by: Florian Fainelli Cc: blogic@openwrt.org Cc: cernekee@gmail.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12301/ Signed-off-by: Ralf Baechle MAINTAINERS | 8 -------- 1 file changed, 8 deletions(-) commit 00fe56dca6a845d5f10ef0398eef26e559e8f98c Author: James Hogan Date: Mon Feb 1 13:50:37 2016 +0000 MIPS: Fix FPU disable with preemption The FPU should not be left enabled after a task context switch. This isn't usually a problem as the FPU enable bit is updated before returning to userland, however it can potentially mask kernel bugs, and in fact KVM assumes it won't happen and won't clear the FPU enable bit before returning to the guest, which allows the guest to use stale FPU context. Interrupts and exceptions save and restore most bits of the CP0 Status register which contains the FPU enable bit (CU1). When the kernel needs to enable or disable the FPU (for example due to attempted FPU use by userland, or the scheduler being invoked) both the actual Status register and the saved value in the userland context are updated. However this doesn't work correctly with full kernel preemption enabled, since the FPU enable bit can be cleared from within an interrupt when the scheduler is invoked, and only the userland context is updated, not the interrupt context. For example: 1) Enter kernel with FPU already enabled, TIF_USEDFPU=1, Status.CU1=1 saved. 2) Take a timer interrupt while in kernel mode, Status.CU1=1 saved. 3) Timer interrupt invokes scheduler to preempt the task, which clears TIF_USEDFPU, disables the FPU in Status register (Status.CU1=0), and the value stored in user context from step (1), but not the interrupt context from step (2). 4) When the process is scheduled back in again Status.CU1=0. 5) The interrupt context from step (2) is restored, which sets Status.CU1=1. So from user context point of view, preemption has re-enabled FPU! 6) If the scheduler is invoked again (via preemption or voluntarily) before returning to userland, TIF_USEDFPU=0 so the FPU is not disabled before the task context switch. 7) The next task resumes from the context switch with FPU enabled! The restoring of the Status register on return from interrupt/exception is already selective about which bits to restore, leaving the interrupt mask bits alone so enabling/disabling of CPU interrupt lines can persist. Extend this to also leave both the CU1 bit (FPU enable) and the FR bit (which specifies the FPU mode and gets changed with CU1). This prevents a stale Status value being restored in step (5) above and persisting through subsequent context switches. Also switch to the use of definitions from asm/mipsregs.h while we're at it. Since this change also affects the restoration of Status register on the path back to userland, it increases the sensitivity of the kernel to the problem of the FPU being left enabled, allowing it to propagate to userland, therefore a warning is also added to lose_fpu_inatomic() to point out any future reoccurances before they do any damage. Signed-off-by: James Hogan Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12303/ Signed-off-by: Ralf Baechle arch/mips/include/asm/fpu.h | 4 ++++ arch/mips/include/asm/stackframe.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 76e5846d3bdf59eb1010d5607003da2dc3910bb1 Author: James Hogan Date: Mon Feb 1 13:50:36 2016 +0000 MIPS: Properly disable FPU in start_thread() start_thread() (called for execve(2)) clears the TIF_USEDFPU flag without atomically disabling the FPU. With a preemptive kernel, an unfortunately timed preemption after this could result in another task (or KVM guest) being scheduled in with the FPU still enabled, since lose_fpu_inatomic() only turns it off if TIF_USEDFPU is set. Use lose_fpu(0) instead of the separate FPU / MSA management, which should do the right thing (drop FPU properly and atomically without saving state) and will be more future proof. Signed-off-by: James Hogan Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12302/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f4dce1ffd2e30fa31756876ef502ce6d2324be35 Author: James Hogan Date: Mon Jan 25 20:32:03 2016 +0000 MIPS: Fix buffer overflow in syscall_get_arguments() Since commit 4c21b8fd8f14 ("MIPS: seccomp: Handle indirect system calls (o32)"), syscall_get_arguments() attempts to handle o32 indirect syscall arguments by incrementing both the start argument number and the number of arguments to fetch. However only the start argument number needs to be incremented. The number of arguments does not change, they're just shifted up by one, and in fact the output array is provided by the caller and is likely only n entries long, so reading more arguments overflows the output buffer. In the case of seccomp, this results in it fetching 7 arguments starting at the 2nd one, which overflows the unsigned long args[6] in populate_seccomp_data(). This clobbers the $s0 register from syscall_trace_enter() which __seccomp_phase1_filter() saved onto the stack, into which syscall_trace_enter() had placed its syscall number argument. This caused Chromium to crash. Credit goes to Milko for tracking it down as far as $s0 being clobbered. Fixes: 4c21b8fd8f14 ("MIPS: seccomp: Handle indirect system calls (o32)") Reported-by: Milko Leporis Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Cc: # 3.15- Patchwork: https://patchwork.linux-mips.org/patch/12213/ Signed-off-by: Ralf Baechle arch/mips/include/asm/syscall.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5982557ac6ee5d36a02248be18a2ba945360d9f6 Merge: 48436e8 17a2f46 Author: Greg Kroah-Hartman Date: Mon Feb 1 13:08:26 2016 -0800 Merge tag 'iio-fixes-for-4.5b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for the 4.5 cycle. These ones are mostly dependent on patches from the recent merge cycle. * adc, imu and iio staging drivers - !HAS_IOMEM dependency fixes * dht11 - use boottime clock for time measurement to avoid incorrect measurements due to clock updates. * lidar - correct a return value for short i2c transfers. commit 48436e82fd2925a42293f670f3570b5c855c90c1 Merge: 8d9b39c 7e1da86 Author: Greg Kroah-Hartman Date: Mon Feb 1 13:07:38 2016 -0800 Merge tag 'iio-fixes-for-4.5a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes for the 4.5 cycle. This set comprises those not dependent on patches in the 4.5 merge cycle. A second set will follow shortly with ones that are. * core in kernel interfaces - fix a possible NULL dereference that is a theoretical possibility via odd usage of iio_channel_release. Pretty much a hardening of the interface, but observed in the wild with the twl4030_charger driver. * acpi-als - report the data as processed as it is in lux. This fixes a wrong use of the IIO ABI. However, old _raw version retained to avoid breaking any userspace in the wild that is relying on that (none known but it doesn't hurt us much to retain it) * ade7753 - fix some error handling to avoid use of unitialized data. * ltr501 - use a signed return type for ltr501_match_samp_freq so as to allow returning of an error code. * mcp4725 - set name field of struct iio_dev to ensure the sysfs name attribute doesn't give NULL. * mpl115 - temperature offset sign is wrong. * stk8ba50 - IIO_TRIGGER dependency added * ti_am335x_adc - Label buffer as a software buffer. It's actually a hybrid of a true hardware buffer feeding a kfifo, but the meaning of these fields has changed a little recently and in this case it should be labeled a software buffer ensure it is allowed to use the kfifo. * vf610_adc - HAS_IOMEM dependency commit 8d9b39c6499b113ef9218c80682de114beffe7bb Author: Samuel Thibault Date: Mon Feb 1 09:06:03 2016 +0100 Staging: speakup: Fix allyesconfig build on mn10300 mn10300 uses an mmio-driven uart. This is not supported by speakup, so prevent from enabling it. Signed-off-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa5306a370a9384788d923e4eae15649f1f82671 Merge: 6c38892 aeb2ee5 Author: Olof Johansson Date: Mon Feb 1 12:27:18 2016 -0800 Merge tag 'vexpress-for-v4.5/fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into fixes vexpress fixes for v4.5 Couple of minor fixes for vexpress platforms: 1. Add missing of_node_put in vexpress config bus 2. Add missing DMA-330 abort interrupt on Juno platforms * tag 'vexpress-for-v4.5/fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: Add missing DMA Abort interrupt to Juno bus: vexpress-config: Add missing of_node_put Signed-off-by: Olof Johansson commit 6c388927a7db95c20a29ff6c26da29cb9a5555aa Merge: 7f7420f ff61ee8 Author: Olof Johansson Date: Mon Feb 1 12:24:31 2016 -0800 Merge tag 'mvebu-fixes-4.5-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.5 (part 1) - Fix dts on buffalo linksations machines (gpios and leds) - Fix dts partition node according to new binding introduced in v4.5 * tag 'mvebu-fixes-4.5-1' of git://git.infradead.org/linux-mvebu: ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl ARM: dts: kirkwood: gpio-leds fixes for linkstation ls-wvl/vl ARM: dts: kirkwood: gpio-leds fixes for linkstation ls-wxl/wsxl ARM: dts: kirkwood: gpio pin fixes for linkstation ls-wvl/vl ARM: dts: kirkwood: gpio pin fixes for linkstation ls-wxl/wsxl ARM: mvebu: ix4-300d: Add compatible property to "partitions" node ARM: mvebu: kirkwood: Add compatible property to "partitions" node Signed-off-by: Olof Johansson commit 7f7420f07ee2161e09e305e2d8a41069c3612942 Merge: b83132f ab342c7 Author: Olof Johansson Date: Mon Feb 1 12:22:52 2016 -0800 Merge tag 'omap-for-v4.5/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps with the most intrusive stuff being read-only data assembly fixes, the other things are mostly board related: - A series of omap assembly code fixes to fix issues with rodata with ARM_KERNMEM_PERMS enabled. We had several places writing to rodata, which is bad. The fix in most cases is to load the value from data section using a pointer. Let's also enable ARM_KERNMEM_PERMS so DEBUG_RODATA gets selected by default. And while testing things, I also added few more loadable driver modules to the defconfig that I seem to need quite often. - Fix a long standing omap5 RTC mystery and enable RTC where we need to ensure the SoC msecure pin is high so we can write to the RTC registers. - Fix irq types for am437x - A series of minor dts fixes for sbc-am57x and cl-som-am57x - Fixes for torpedo dts to make WLAN behave and to remove a duplicate i2c rate entry This series also includes few minor changes that are not stricly fixes, but would be good to get in during the early -rc cycle: - Remove legacy mailbox platform data that is no longer needed - Add the pdata-quirks needed for the new pwm-omap-dmtimer so people can use it - Enable ti,mbox-send-noirq that's needed by wkup_m3 driver - Enable SPLIT and DWARF4 in omap2plus_defconfig as it makes the initramfs quite a bit smaller * tag 'omap-for-v4.5/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (23 commits) ARM: dts: am57xx: sbc-am57x: correct Eth PHY settings ARM: dts: am57xx: cl-som-am57x: fix CPSW EMAC pinmux ARM: dts: am57xx: sbc-am57x: fix UART3 pinmux ARM: dts: am57xx: cl-som-am57x: update SPI Flash frequency ARM: dts: am57xx: cl-som-am57x: set HOST mode for USB2 ARM: dts: am57xx: sbc-am57x: fix SB-SOM EEPROM I2C address ARM: dts: LogicPD Torpedo: Revert Duplicative Entries ARM: dts: am437x: pixcir_tangoc: use correct flags for irq types ARM: dts: am4372: fix irq type for arm twd and global timer ARM: dts: Fix wl12xx missing clocks that cause hangs ARM: OMAP: Add PWM dmtimer platform data quirks ARM: omap2plus_defconfig: Enable ARM_KERNMEM_PERMS and few loadable modules ARM: OMAP2+: Fix ppa_zero_params and ppa_por_params for rodata ARM: OMAP2+: Fix l2_inv_api_params for rodata ARM: OMAP2+: Fix save_secure_ram_context for rodata ARM: OMAP2+: Fix l2dis_3630 for rodata ARM: OMAP2+: Fix wait_dll_lock_timed for rodata ARM: OMAP2+: Remove legacy mailbox device instantiation ARM: dts: AM4372: Add ti,mbox-send-noirq to wkup_m3 mailbox ARM: dts: AM33xx: Add ti,mbox-send-noirq to wkup_m3 mailbox ... Signed-off-by: Olof Johansson commit b83132f76225fa2e61771ef999a884d02c2217fd Merge: 43acf83 e873cc0 Author: Olof Johansson Date: Mon Feb 1 12:21:15 2016 -0800 Merge tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into fixes First fixes for 4.5. Only DT changes: - sama5d4: error in DBGU index - addition of phy properties in several boards - at91sam9n12ek fix a panel compatible string * tag 'at91-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: dts: at91: sama5d4 xplained: fix phy0 IRQ type ARM: dts: at91: sama5d4 xplained: properly mux phy interrupt ARM: dts: at91: sama5d4ek: add phy address and IRQ for macb0 ARM: dts: at91: sama5d2 xplained: add phy address and IRQ for macb0 ARM: dts: at91: at91sam9n12ek: fix panel compatible string ARM: dts: at91: sama5d4: fix instance id of DBGU Signed-off-by: Olof Johansson commit 43acf83166eb85082e03b25c9ccd4851e7203ea1 Author: Jon Hunter Date: Mon Jan 25 20:25:55 2016 +0000 ARM64: tegra: Add chosen node for tegra132 norrin The NVIDIA bootloader, nvtboot, expects the "chosen" node to be present in the device-tree blob and if it is not then it fails to boot the kernel. Add the chosen node so we can boot the kernel on Tegra132 Norrin with the nvtboot bootloader. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Olof Johansson arch/arm64/boot/dts/nvidia/tegra132-norrin.dts | 2 ++ 1 file changed, 2 insertions(+) commit c65cd255e4b7dd529b9f35f7e4b05fe154adbb5f Author: Masahiro Yamada Date: Mon Jan 25 20:42:44 2016 +0900 ARM: realview: use "depends on" instead of "if" after prompt This platform recently moved to multi-platform, so missed the global fixup by commit e32465429490 ("ARM: use "depends on" for SoC configs instead of "if" after prompt"). Fix it now. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm/mach-realview/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 990591ee39b6e2d0ad1f281a476c62cebbc7ee7c Author: Masahiro Yamada Date: Mon Jan 25 20:40:44 2016 +0900 ARM: tango: use "depends on" instead of "if" after prompt This platform was recently added, so missed the global fixup by commit e32465429490 ("ARM: use "depends on" for SoC configs instead of "if" after prompt"). Fix it now. Signed-off-by: Masahiro Yamada Acked-by: Marc Gonzalez Signed-off-by: Olof Johansson arch/arm/mach-tango/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c38ac80eb4b0d0c78aad9b8978a3c0da3da01ead Author: Masahiro Yamada Date: Mon Jan 25 20:33:42 2016 +0900 ARM: tango: use const and __initconst for smp_operations This newly added code missed the global fixup by commit 75305275a721 ("ARM: use const and __initconst for smp_operations"). So fix it now. Signed-off-by: Masahiro Yamada Acked-by: Marc Gonzalez Signed-off-by: Olof Johansson arch/arm/mach-tango/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 567fdd9d91db09c0af563930253ef9dbb28ddb5b Author: Masahiro Yamada Date: Mon Jan 25 20:33:07 2016 +0900 ARM: realview: use const and __initconst for smp_operations This newly added code missed the global fixup by commit 75305275a721 ("ARM: use const and __initconst for smp_operations"). So fix it now. Also, add missing "static" qualifier. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm/mach-realview/platsmp-dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 047a555f95fec4bcb8adfc37eb6fb1026fb3026a Author: Masahiro Yamada Date: Sat Jan 23 23:06:28 2016 +0900 bus: uniphier-system-bus: revive tristate prompt At first, commit 4b7f48d395a7 ("bus: uniphier-system-bus: add UniPhier System Bus driver") introduced this driver as a tristate one. Then, commit 326ea45aa827 ("bus: uniphier: allow only built-in driver") temporarily made it boolean in order to fix a link error in case it is compiled as a module. The root cause was fixed by commit b80443c2211c ("of/platform: export of_default_bus_match_table"). Now this driver can really be a module. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson drivers/bus/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a2f46c3d8877fe2a0b6ff391d1df30e67892a6 Author: Abhilash Jindal Date: Wed Jan 27 17:46:02 2016 -0500 iio: dht11: Use boottime Wall time obtained from ktime_get_real_ns is susceptible to sudden jumps due to user setting the time or due to NTP. Boot time is constantly increasing time better suited for comparing two timestamps. Signed-off-by: Abhilash Jindal Reviewed-by: Harald Geyer Signed-off-by: Jonathan Cameron drivers/iio/humidity/dht11.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8eee1d3ed5b6fc8e14389567c9a6f53f82bb7224 Author: Tejun Heo Date: Mon Feb 1 11:33:21 2016 -0500 libata: fix sff host state machine locking while polling The bulk of ATA host state machine is implemented by ata_sff_hsm_move(). The function is called from either the interrupt handler or, if polling, a work item. Unlike from the interrupt path, the polling path calls the function without holding the host lock and ata_sff_hsm_move() selectively grabs the lock. This is completely broken. If an IRQ triggers while polling is in progress, the two can easily race and end up accessing the hardware and updating state machine state at the same time. This can put the state machine in an illegal state and lead to a crash like the following. kernel BUG at drivers/ata/libata-sff.c:1302! invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN Modules linked in: CPU: 1 PID: 10679 Comm: syz-executor Not tainted 4.5.0-rc1+ #300 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff88002bd00000 ti: ffff88002e048000 task.ti: ffff88002e048000 RIP: 0010:[] [] ata_sff_hsm_move+0x619/0x1c60 ... Call Trace: [] __ata_sff_port_intr+0x1e1/0x3a0 drivers/ata/libata-sff.c:1584 [] ata_bmdma_port_intr+0x71/0x400 drivers/ata/libata-sff.c:2877 [< inline >] __ata_sff_interrupt drivers/ata/libata-sff.c:1629 [] ata_bmdma_interrupt+0x253/0x580 drivers/ata/libata-sff.c:2902 [] handle_irq_event_percpu+0x108/0x7e0 kernel/irq/handle.c:157 [] handle_irq_event+0xa7/0x140 kernel/irq/handle.c:205 [] handle_edge_irq+0x1e3/0x8d0 kernel/irq/chip.c:623 [< inline >] generic_handle_irq_desc include/linux/irqdesc.h:146 [] handle_irq+0x10c/0x2a0 arch/x86/kernel/irq_64.c:78 [] do_IRQ+0x7d/0x1a0 arch/x86/kernel/irq.c:240 [] common_interrupt+0x8c/0x8c arch/x86/entry/entry_64.S:520 [< inline >] rcu_lock_acquire include/linux/rcupdate.h:490 [< inline >] rcu_read_lock include/linux/rcupdate.h:874 [] filemap_map_pages+0x131/0xba0 mm/filemap.c:2145 [< inline >] do_fault_around mm/memory.c:2943 [< inline >] do_read_fault mm/memory.c:2962 [< inline >] do_fault mm/memory.c:3133 [< inline >] handle_pte_fault mm/memory.c:3308 [< inline >] __handle_mm_fault mm/memory.c:3418 [] handle_mm_fault+0x2516/0x49a0 mm/memory.c:3447 [] __do_page_fault+0x376/0x960 arch/x86/mm/fault.c:1238 [] trace_do_page_fault+0xe8/0x420 arch/x86/mm/fault.c:1331 [] do_async_page_fault+0x14/0xd0 arch/x86/kernel/kvm.c:264 [] async_page_fault+0x28/0x30 arch/x86/entry/entry_64.S:986 Fix it by ensuring that the polling path is holding the host lock before entering ata_sff_hsm_move() so that all hardware accesses and state updates are performed under the host lock. Signed-off-by: Tejun Heo Reported-and-tested-by: Dmitry Vyukov Link: http://lkml.kernel.org/g/CACT4Y+b_JsOxJu2EZyEf+mOXORc_zid5V1-pLZSroJVxyWdSpw@mail.gmail.com Cc: stable@vger.kernel.org drivers/ata/libata-sff.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) commit e502fb8f8801c9561c57397e7fd917187762324e Author: Tahsin Erdogan Date: Thu Jan 14 14:41:32 2016 -0800 deadline: remove unused struct member commit 63de428b139d3d31d86ebe25ae97b33f6540fb7e ("deadline-iosched: allow non-sequential batching") removed last use of last_sector. Signed-off-by: Tahsin Erdogan Reviewed-by: Jeff Moyer Signed-off-by: Jens Axboe block/deadline-iosched.c | 3 --- 1 file changed, 3 deletions(-) commit 90b90d06db0be30aeb89b6b4ab618d644211a85e Merge: ed0ae43 a0c80ef Author: Jens Axboe Date: Mon Feb 1 09:08:39 2016 -0700 Merge branch 'for-4.5/for-jens' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/linux-block into for-linus Locking fix from Jiri commit 329d88da4df9a96da43018aceabd3a06e6a7e7ae Author: Javier Martinez Canillas Date: Wed Jan 27 12:03:23 2016 -0200 [media] media: i2c: Don't export ir-kbd-i2c module alias This is a partial revert of commit ed8d1cf07cb16d ("[media] Export I2C module alias information in missing drivers") that exported the module aliases for the I2C drivers that were missing to make autoload to work. But there is a bug report [0] that auto load of the ir-kbd-i2c driver cause the Hauppauge HD-PVR driver to not behave correctly. This is a hdpvr latent bug that was just exposed by ir-kbd-i2c module autoloading working and will also happen if the I2C driver is built-in or a user calls modprobe to load the module and register the driver. But there is a regression experimented by users so until the real bug is fixed, let's not export the module alias for the ir-kbd-i2c driver even when this just masks the actual issue. [0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810726 Fixes: ed8d1cf07cb1 ("[media] Export I2C module alias information in missing drivers") Cc: # 4.3+ Signed-off-by: Javier Martinez Canillas drivers/media/i2c/ir-kbd-i2c.c | 1 - 1 file changed, 1 deletion(-) commit ec183d22cc284a7a1e17f0341219d8ec8ca070cc Author: Adrian Hunter Date: Tue Jan 26 14:05:20 2016 +0200 perf tools: tracepoint_error() can receive e=NULL, robustify it Fixes segmentation fault using, for instance: (gdb) run record -I -e intel_pt/tsc=1,noretcomp=1/u /bin/ls Starting program: /home/acme/bin/perf record -I -e intel_pt/tsc=1,noretcomp=1/u /bin/ls Missing separate debuginfos, use: dnf debuginfo-install glibc-2.22-7.fc23.x86_64 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0 x00000000004b9ea5 in tracepoint_error (e=0x0, err=13, sys=0x19b1370 "sched", name=0x19a5d00 "sched_switch") at util/parse-events.c:410 (gdb) bt #0 0x00000000004b9ea5 in tracepoint_error (e=0x0, err=13, sys=0x19b1370 "sched", name=0x19a5d00 "sched_switch") at util/parse-events.c:410 #1 0x00000000004b9fc5 in add_tracepoint (list=0x19a5d20, idx=0x7fffffffb8c0, sys_name=0x19b1370 "sched", evt_name=0x19a5d00 "sched_switch", err=0x0, head_config=0x0) at util/parse-events.c:433 #2 0x00000000004ba334 in add_tracepoint_event (list=0x19a5d20, idx=0x7fffffffb8c0, sys_name=0x19b1370 "sched", evt_name=0x19a5d00 "sched_switch", err=0x0, head_config=0x0) at util/parse-events.c:498 #3 0x00000000004bb699 in parse_events_add_tracepoint (list=0x19a5d20, idx=0x7fffffffb8c0, sys=0x19b1370 "sched", event=0x19a5d00 "sched_switch", err=0x0, head_config=0x0) at util/parse-events.c:936 #4 0x00000000004f6eda in parse_events_parse (_data=0x7fffffffb8b0, scanner=0x19a49d0) at util/parse-events.y:391 #5 0x00000000004bc8e5 in parse_events__scanner (str=0x663ff2 "sched:sched_switch", data=0x7fffffffb8b0, start_token=258) at util/parse-events.c:1361 #6 0x00000000004bca57 in parse_events (evlist=0x19a5220, str=0x663ff2 "sched:sched_switch", err=0x0) at util/parse-events.c:1401 #7 0x0000000000518d5f in perf_evlist__can_select_event (evlist=0x19a3b90, str=0x663ff2 "sched:sched_switch") at util/record.c:253 #8 0x0000000000553c42 in intel_pt_track_switches (evlist=0x19a3b90) at arch/x86/util/intel-pt.c:364 #9 0x00000000005549d1 in intel_pt_recording_options (itr=0x19a2c40, evlist=0x19a3b90, opts=0x8edf68 ) at arch/x86/util/intel-pt.c:664 #10 0x000000000051e076 in auxtrace_record__options (itr=0x19a2c40, evlist=0x19a3b90, opts=0x8edf68 ) at util/auxtrace.c:539 #11 0x0000000000433368 in cmd_record (argc=1, argv=0x7fffffffde60, prefix=0x0) at builtin-record.c:1264 #12 0x000000000049bec2 in run_builtin (p=0x8fa2a8 , argc=5, argv=0x7fffffffde60) at perf.c:390 #13 0x000000000049c12a in handle_internal_command (argc=5, argv=0x7fffffffde60) at perf.c:451 #14 0x000000000049c278 in run_argv (argcp=0x7fffffffdcbc, argv=0x7fffffffdcb0) at perf.c:495 #15 0x000000000049c60a in main (argc=5, argv=0x7fffffffde60) at perf.c:618 (gdb) Intel PT attempts to find the sched:sched_switch tracepoint but that seg faults if tracefs is not readable, because the error reporting structure is null, as errors are not reported when automatically adding tracepoints. Fix by checking before using. Committer note: This doesn't take place in a kernel that supports perf_event_attr.context_switch, that is the default way that will be used for tracking context switches, only in older kernels, like 4.2, in a machine with Intel PT (e.g. Broadwell) for non-priviledged users. Further info from a similar patch by Wang: The error is in tracepoint_error: it assumes the 'e' parameter is valid. However, there are many situation a parse_event() can be called without parse_events_error. See result of $ grep 'parse_events(.*NULL)' ./tools/perf/ -r' Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Tong Zhang Cc: Wang Nan Cc: stable@vger.kernel.org # v4.4+ Fixes: 196581717d85 ("perf tools: Enhance parsing events tracepoint error output") Link: http://lkml.kernel.org/r/1453809921-24596-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 3 +++ 1 file changed, 3 insertions(+) commit f784beb75ce82f4136f8a0960d3ee872f7109e09 Author: Takashi Iwai Date: Sat Jan 30 23:09:08 2016 +0100 ALSA: timer: Fix link corruption due to double start or stop Although ALSA timer code got hardening for races, it still causes use-after-free error. This is however rather a corrupted linked list, not actually the concurrent accesses. Namely, when timer start is triggered twice, list_add_tail() is called twice, too. This ends up with the link corruption and triggers KASAN error. The simplest fix would be replacing list_add_tail() with list_move_tail(), but fundamentally it's the problem that we don't check the double start/stop correctly. So, the right fix here is to add the proper checks to snd_timer_start() and snd_timer_stop() (and their variants). BugLink: http://lkml.kernel.org/r/CACT4Y+ZyPRoMQjmawbvmCEDrkBD2BQuH7R09=eOkf5ESK8kJAw@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 2cdc7b636d55cbcf42e1e6c8accd85e62d3e9ae8 Author: Takashi Iwai Date: Sat Jan 30 23:30:25 2016 +0100 ALSA: seq: Fix yet another races among ALSA timer accesses ALSA sequencer may open/close and control ALSA timer instance dynamically either via sequencer events or direct ioctls. These are done mostly asynchronously, and it may call still some timer action like snd_timer_start() while another is calling snd_timer_close(). Since the instance gets removed by snd_timer_close(), it may lead to a use-after-free. This patch tries to address such a race by protecting each snd_timer_*() call via the existing spinlock and also by avoiding the access to timer during close call. BugLink: http://lkml.kernel.org/r/CACT4Y+Z6RzW5MBr-HUdV-8zwg71WQfKTdPpYGvOeS7v4cyurNQ@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_timer.c | 87 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 20 deletions(-) commit b248371628aad599a48540962f6b85a21a8a0c3f Author: Takashi Iwai Date: Sun Jan 31 10:32:37 2016 +0100 ALSA: pcm: Fix potential deadlock in OSS emulation There are potential deadlocks in PCM OSS emulation code while accessing read/write and mmap concurrently. This comes from the infamous mmap_sem usage in copy_from/to_user(). Namely, snd_pcm_oss_write() -> &runtime->oss.params_lock -> copy_to_user() -> &mm->mmap_sem mmap() -> &mm->mmap_sem -> snd_pcm_oss_mmap() -> &runtime->oss.params_lock Since we can't avoid taking params_lock from mmap code path, use trylock variant and aborts with -EAGAIN as a workaround of this AB/BA deadlock. BugLink: http://lkml.kernel.org/r/CACT4Y+bVrBKDG0G2_AcUgUQa+X91VKTeS4v+wN7BSHwHtqn3kQ@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit cc85f7a634cfaf9f0713c6aa06d08817424db37a Author: Takashi Iwai Date: Mon Feb 1 12:04:55 2016 +0100 ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check NULL user-space buffer can be passed even in a normal path, thus it's not good to spew a kernel warning with stack trace at each time. Just drop snd_BUG_ON() macro usage there. BugLink: http://lkml.kernel.org/r/CACT4Y+YfVJ3L+q0i-4vyQVyyPD7V=OMX0PWPi29x9Bo3QaBLdw@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/rawmidi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d1b5c08366acd46c35a2e9aba5d650cb5bf5c19 Author: Takashi Iwai Date: Mon Feb 1 12:06:42 2016 +0100 ALSA: seq: Fix race at closing in virmidi driver The virmidi driver has an open race at closing its assigned rawmidi device, and this may lead to use-after-free in snd_seq_deliver_single_event(). Plug the hole by properly protecting the linked list deletion and calling in the right order in snd_virmidi_input_close(). BugLink: http://lkml.kernel.org/r/CACT4Y+Zd66+w12fNN85-425cVQT=K23kWbhnCEcMB8s3us-Frw@mail.gmail.com Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_virmidi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a0c80efe5956ccce9fe7ae5c78542578c07bc20a Author: Jiri Kosina Date: Mon Feb 1 11:19:17 2016 +0100 floppy: fix lock_fdc() signal handling floppy_revalidate() doesn't perform any error handling on lock_fdc() result. lock_fdc() might actually be interrupted by a signal (it waits for fdc becoming non-busy interruptibly). In such case, floppy_revalidate() proceeds as if it had claimed the lock, but it fact it doesn't. In case of multiple threads trying to open("/dev/fdX"), this leads to serious corruptions all over the place, because all of a sudden there is no critical section protection (that'd otherwise be guaranteed by locked fd) whatsoever. While at this, fix the fact that the 'interruptible' parameter to lock_fdc() doesn't make any sense whatsoever, because we always wait interruptibly anyway. Most of the lock_fdc() callsites do properly handle error (and propagate EINTR), but floppy_revalidate() and floppy_check_events() don't. Fix this. Spotted by 'syzkaller' tool. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Signed-off-by: Jiri Kosina drivers/block/floppy.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit aeb2ee5683e51305aff274d8b0a50af69b3ab310 Author: Robin Murphy Date: Thu Jan 7 12:01:59 2016 +0000 arm64: dts: Add missing DMA Abort interrupt to Juno The DMA-330 has an "irq_abort" interrupt line on which it signals faults separately from the "irq[n:0]" channel interrupts. On Juno, this is wired up to SPI 92; add it to the DT so that DMAC faults are correctly reported for the driver to reset the thing, rather than leaving it locked up and waiting to time out. CC: Liviu Dudau CC: Lorenzo Pieralisi Signed-off-by: Robin Murphy Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 1 + 1 file changed, 1 insertion(+) commit d99875eebfebec5432981273fac0547f3e34f2d7 Author: Amitoj Kaur Chawla Date: Fri Jan 22 23:38:38 2016 +0530 bus: vexpress-config: Add missing of_node_put for_each_compatible_node performs an of_node_get on each iteration, so to break out of the loop an of_node_put is required. Found using Coccinelle. The semantic patch used for this is as follows: // @@ expression e; local idexpression n; @@ for_each_compatible_node(n, ...) { ... when != of_node_put(n) when != e = n ( return n; + of_node_put(n); ? return ...; ) ... } // Acked-by: Liviu Dudau Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Sudeep Holla drivers/bus/vexpress-config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit daf670bc9d36ba8b03e010f4bf798bebe08659fe Author: Geert Uytterhoeven Date: Sun Jan 24 22:39:04 2016 +0100 m68k/defconfig: Update defconfigs for v4.5-rc1 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 9 +++++++++ arch/m68k/configs/apollo_defconfig | 9 +++++++++ arch/m68k/configs/atari_defconfig | 9 +++++++++ arch/m68k/configs/bvme6000_defconfig | 9 +++++++++ arch/m68k/configs/hp300_defconfig | 9 +++++++++ arch/m68k/configs/mac_defconfig | 9 +++++++++ arch/m68k/configs/multi_defconfig | 9 +++++++++ arch/m68k/configs/mvme147_defconfig | 9 +++++++++ arch/m68k/configs/mvme16x_defconfig | 9 +++++++++ arch/m68k/configs/q40_defconfig | 9 +++++++++ arch/m68k/configs/sun3_defconfig | 9 +++++++++ arch/m68k/configs/sun3x_defconfig | 9 +++++++++ 12 files changed, 108 insertions(+) commit 78832a88e67b4c5e71926949aff401d2a1241b15 Author: Geert Uytterhoeven Date: Fri Jan 15 14:31:30 2016 +0100 m68k: Wire up copy_file_range Signed-off-by: Geert Uytterhoeven Acked-by: Greg Ungerer arch/m68k/include/asm/unistd.h | 2 +- arch/m68k/include/uapi/asm/unistd.h | 1 + arch/m68k/kernel/syscalltable.S | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 37e110625eeeaba83e8cb763ab7645f0678c6f8e Author: Javier Martinez Canillas Date: Fri Jan 29 12:09:31 2016 -0300 drm/exynos: dp: Fix panel and bridge lookup logic Commit a9fa852886fd ("drm/exynos: dp: add of_graph dt binding support for panel") made the Exynos DP DT binding more consistent since the OF graph could be used to lookup either a panel or a bridge device node. Before that commit, a panel would be looked up using a phandle and a bridge using the OF graph which made the DT binding not consistent. But the patch broke the later case since not finding a panel dev node would cause the driver's to do a probe deferral instead of attempting to lookup a bridge device node associated with the remote endpoint. So instead of returning a -EPROBE_DEFER if a panel is not found, check if there's a bridge and only do a probe deferral if both aren't found. Signed-off-by: Javier Martinez Canillas Tested-by: Michal Suchanek Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_dp_core.c | 55 +++++++++++++++------------------ 1 file changed, 25 insertions(+), 30 deletions(-) commit 010848a73fd87a481f263f7322e733f129ac398b Author: Arnd Bergmann Date: Wed Jan 20 11:33:37 2016 +0100 drm: exynos: make PM functions as __maybe_unused The newly added runtime-pm support for exynos-drm encloses the pm functions in an #ifdef, but not the functions that are called from them and nowhere else, which produces warnings: drm/exynos/exynos_drm_dsi.c:733:13: warning: 'exynos_dsi_disable_clock' defined but not used [-Wunused-function] static void exynos_dsi_disable_clock(struct exynos_dsi *dsi) ^ drm/exynos/exynos_drm_dsi.c:1291:13: warning: 'exynos_dsi_disable_irq' defined but not used [-Wunused-function] static void exynos_dsi_disable_irq(struct exynos_dsi *dsi) ^ This removes the #ifdef and instead marks the functions as __maybe_unused, so gcc can silently discard them and all called functions when CONFIG_PM is disabled. Signed-off-by: Arnd Bergmann Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e0fea7e7b63108b31c043df0d5754bbd666d05c6 Author: Arnd Bergmann Date: Tue Nov 17 16:08:36 2015 +0100 drm/exynos: fix building without CONFIG_PM_SLEEP The runtime PM operations use the suspend/resume functions even when CONFIG_PM_SLEEP is not set, but this now fails for the exynos DRM driver: exynos_mixer.c:1289:61: error: 'exynos_mixer_resume' undeclared here (not in a function) SET_RUNTIME_PM_OPS(exynos_mixer_suspend, exynos_mixer_resume, NULL) This removes the #ifdef and instead marks the functions as __maybe_unused, which does the right thing in all cases and also looks nicer. Signed-off-by: Arnd Bergmann Reviewed-by: Krzysztof Kozlowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 36f90b0a2ddd60823fe193a85e60ff1906c2a9b3 Author: Linus Torvalds Date: Sun Jan 31 18:12:16 2016 -0800 Linux 4.5-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d784ef581bd64ef7a3dac2d940fbf0c3fb9e26c8 Merge: 54e3f3e a89a798 Author: Linus Torvalds Date: Sun Jan 31 17:36:45 2016 -0800 Merge tag 'usb-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB driver fixes from Greg KH: "Here are some small USB fixes and new device ids for 4.5-rc2. Nothing major here, full details are in the shortlog, and all of these have been in linux-next successfully" * tag 'usb-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: option: fix Cinterion AHxx enumeration USB: mxu11x0: fix memory leak on usb_serial private data USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable USB: serial: option: Adding support for Telit LE922 USB: serial: visor: fix crash on detecting device without write_urbs USB: visor: fix null-deref at probe USB: cp210x: add ID for IAI USB to RS485 adaptor usb: hub: do not clear BOS field during reset device cdc-acm:exclude Samsung phone 04e8:685d usb: cdc-acm: send zero packet for intel 7260 modem usb: cdc-acm: handle unlinked urb in acm read callback commit 54e3f3e30245abb0d47e3bc53a1b3c75434616f1 Merge: 8c4e378 6c55d9b Author: Linus Torvalds Date: Sun Jan 31 17:09:39 2016 -0800 Merge tag 'tty-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some small tty/serial driver fixes for 4.5-rc2. They resolve a number of reported problems (the ioctl one specifically has been pointed out by numerous people) and one patch adds some new device ids for the 8250_pci driver. All have been in linux-next successfully" * tag 'tty-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: 8250_pci: Add Intel Broadwell ports staging/speakup: Use tty_ldisc_ref() for paste kworker n_tty: Fix unsafe reference to "other" ldisc tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) tty: Retry failed reopen if tty teardown in-progress tty: Wait interruptibly for tty lock on reopen commit 8c4e378e426d1b065a1e8d9f45b8bcc4905d3410 Merge: f3ca903 88867e3 Author: Linus Torvalds Date: Sun Jan 31 17:00:27 2016 -0800 Merge tag 'staging-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging fixes from Greg KH: "Here are some small staging driver fixes for 4.5-rc2. One of them predated 4.4-final, but I missed that merge window due to the holliday. The others fix reported issues that have come up recently. The tty change is needed for the speakup driver fix and has the ack of the tty driver maintainer as well, i.e. myself :) All have been in linux-next with no reported issues" * tag 'staging-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: Staging: speakup: fix read scrolled-back VT Staging: speakup: Fix getting port information Revert "Staging: panel: usleep_range is preferred over udelay" iio: adis_buffer: Fix out-of-bounds memory access commit f3ca903fbbb0d26221a39cbebfe6dd4efbebd3ef Merge: 510ae0c 25cad69 Author: Linus Torvalds Date: Sun Jan 31 16:55:04 2016 -0800 Merge tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "Here's a single driver core fix that resolves an issue a lot of users have been hitting for a while now. It's been tested a lot and has been in linux-next successfully for a while" * tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: base/platform: Fix platform drivers with no probe callback commit 510ae0c994cb38fcf5033ad69eb8103552e335e8 Merge: d517be5 b0a119f Author: Linus Torvalds Date: Sun Jan 31 16:50:31 2016 -0800 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fix from Ralf Baechle: "Just a single revert for a patch which I had upstreamed out of sequence" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: Revert "MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function" commit d517be5fcf1a7feb06ce3d5f28055ad1ce17030b Merge: dc799d0 7425637 Author: Linus Torvalds Date: Sun Jan 31 16:17:19 2016 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A bit on the largish side due to a series of fixes for a regression in the x86 vector management which was introduced in 4.3. This work was started in December already, but it took some time to fix all corner cases and a couple of older bugs in that area which were detected while at it Aside of that a few platform updates for intel-mid, quark and UV and two fixes for in the mm code: - Use proper types for pgprot values to avoid truncation - Prevent a size truncation in the pageattr code when setting page attributes for large mappings" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) x86/mm/pat: Avoid truncation when converting cpa->numpages to address x86/mm: Fix types used in pgprot cacheability flags translations x86/platform/quark: Print boundaries correctly x86/platform/UV: Remove EFI memmap quirk for UV2+ x86/platform/intel-mid: Join string and fix SoC name x86/platform/intel-mid: Enable 64-bit build x86/irq: Plug vector cleanup race x86/irq: Call irq_force_move_complete with irq descriptor x86/irq: Remove outgoing CPU from vector cleanup mask x86/irq: Remove the cpumask allocation from send_cleanup_vector() x86/irq: Clear move_in_progress before sending cleanup IPI x86/irq: Remove offline cpus from vector cleanup x86/irq: Get rid of code duplication x86/irq: Copy vectormask instead of an AND operation x86/irq: Check vector allocation early x86/irq: Reorganize the search in assign_irq_vector x86/irq: Reorganize the return path in assign_irq_vector x86/irq: Do not use apic_chip_data.old_domain as temporary buffer x86/irq: Validate that irq descriptor is still active x86/irq: Fix a race in x86_vector_free_irqs() ... commit dc799d0179baa7f62d2e73a8217a273ca82adbdf Merge: 7ab85d4 1ca8ec5 Author: Linus Torvalds Date: Sun Jan 31 15:49:06 2016 -0800 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "The timer departement delivers: - a regression fix for the NTP code along with a proper selftest - prevent a spurious timer interrupt in the NOHZ lowres code - a fix for user space interfaces returning the remaining time on architectures with CONFIG_TIME_LOW_RES=y - a few patches to fix COMPILE_TEST fallout" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/nohz: Set the correct expiry when switching to nohz/lowres mode clocksource: Fix dependencies for archs w/o HAS_IOMEM clocksource: Select CLKSRC_MMIO where needed tick/sched: Hide unused oneshot timer code kselftests: timers: Add adjtimex SETOFFSET validity tests ntp: Fix ADJ_SETOFFSET being used w/ ADJ_NANO itimers: Handle relative timers with CONFIG_TIME_LOW_RES proper posix-timers: Handle relative timers with CONFIG_TIME_LOW_RES proper timerfd: Handle relative timers with CONFIG_TIME_LOW_RES proper hrtimer: Handle remaining time proper for TIME_LOW_RES clockevents/tcb_clksrc: Prevent disabling an already disabled clock commit 7ab85d4a85160ea2ffc96b1255443cbc83be180f Merge: 29d14f0 840d6fe Author: Linus Torvalds Date: Sun Jan 31 15:44:04 2016 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Three small fixes in the scheduler/core: - use after free in the numa code - crash in the numa init code - a simple spelling fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: pid: Fix spelling in comments sched/numa: Fix use-after-free bug in the task_numa_compare sched: Fix crash in sched_init_numa() commit 29d14f083522e5bc762256f68227d267118946c8 Merge: bbfb239 28fb8a5 Author: Linus Torvalds Date: Sun Jan 31 15:38:27 2016 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "This is much bigger than typical fixes, but Peter found a category of races that spurred more fixes and more debugging enhancements. Work started before the merge window, but got finished only now. Aside of that this contains the usual small fixes to perf and tools. Nothing particular exciting" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (43 commits) perf: Remove/simplify lockdep annotation perf: Synchronously clean up child events perf: Untangle 'owner' confusion perf: Add flags argument to perf_remove_from_context() perf: Clean up sync_child_event() perf: Robustify event->owner usage and SMP ordering perf: Fix STATE_EXIT usage perf: Update locking order perf: Remove __free_event() perf/bpf: Convert perf_event_array to use struct file perf: Fix NULL deref perf/x86: De-obfuscate code perf/x86: Fix uninitialized value usage perf: Fix race in perf_event_exit_task_context() perf: Fix orphan hole perf stat: Do not clean event's private stats perf hists: Fix HISTC_MEM_DCACHELINE width setting perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed perf tests: Remove wrong semicolon in while loop in CQM test perf: Synchronously free aux pages in case of allocation failure ... commit bbfb239a106d41d793f58befdaf5c806e34ea97e Merge: 30e4c9a b4abf91 Author: Linus Torvalds Date: Sun Jan 31 15:29:37 2016 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "A single commit, which makes the rtmutex.wait_lock an irq safe lock. This prevents a potential deadlock which can be triggered by the rcu boosting code from rcu_read_unlock()" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rtmutex: Make wait_lock irq safe commit 53c520c2ab79e9f3765d24116ab54f6d5b3cd563 Author: Florian Westphal Date: Thu Jan 28 13:16:59 2016 +0100 netfilter: cttimeout: fix deadlock due to erroneous unlock/lock conversion The spin_unlock call should have been left as-is, revert. Fixes: b16c29191dc89bd ("netfilter: nf_conntrack: use safer way to lock all buckets") Reported-by: kernel test robot Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cttimeout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c7bdf35991bb8f7cfaeaf22ea3a2f2d1967c166 Author: Pablo Neira Ayuso Date: Sun Jan 24 23:08:39 2016 +0100 netfilter: nfnetlink: use original skbuff when acking batches Since bd678e09dc17 ("netfilter: nfnetlink: fix splat due to incorrect socket memory accounting in skbuff clones"), we don't manually attach the sk to the skbuff clone anymore, so we have to use the original skbuff from netlink_ack() which needs to access the sk pointer. Fixes: bd678e09dc17 ("netfilter: nfnetlink: fix splat due to incorrect socket memory accounting in skbuff clones") Reported-by: Dmitry Vyukov Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d93c6258ee4255749c10012c50a31c08f4e9fb16 Author: Florian Westphal Date: Wed Jan 20 11:16:43 2016 +0100 netfilter: conntrack: resched in nf_ct_iterate_cleanup Ulrich reports soft lockup with following (shortened) callchain: NMI watchdog: BUG: soft lockup - CPU#1 stuck for 22s! __netif_receive_skb_core+0x6e4/0x774 process_backlog+0x94/0x160 net_rx_action+0x88/0x178 call_do_softirq+0x24/0x3c do_softirq+0x54/0x6c __local_bh_enable_ip+0x7c/0xbc nf_ct_iterate_cleanup+0x11c/0x22c [nf_conntrack] masq_inet_event+0x20/0x30 [nf_nat_masquerade_ipv6] atomic_notifier_call_chain+0x1c/0x2c ipv6_del_addr+0x1bc/0x220 [ipv6] Problem is that nf_ct_iterate_cleanup can run for a very long time since it can be interrupted by softirq processing. Moreover, atomic_notifier_call_chain runs with rcu readlock held. So lets call cond_resched() in nf_ct_iterate_cleanup and defer the call to a work queue for the atomic_notifier_call_chain case. We also need another cond_resched in get_next_corpse, since we have to deal with iter() always returning false, in that case get_next_corpse will walk entire conntrack table. Reported-by: Ulrich Weber Tested-by: Ulrich Weber Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/nf_nat_masquerade_ipv6.c | 74 +++++++++++++++++++++++++++-- net/netfilter/nf_conntrack_core.c | 5 ++ 2 files changed, 76 insertions(+), 3 deletions(-) commit 30e4c9ad04a7bec4a04b975ce1ad5541d74e1906 Merge: f25a96e c5b6352 Author: Linus Torvalds Date: Sun Jan 31 14:48:58 2016 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull IRQ fixes from Ingo Molnar: "Mostly irqchip driver fixes, but also an irq core crash fix and a build fix" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mxs: Add missing set_handle_irq() irqchip/atmel-aic: Fix wrong bit operation for IRQ priority irqchip/gic-v3-its: Recompute the number of pages on page size change base: Export platform_msi_domain_[alloc,free]_irqs of: MSI: Simplify irqdomain lookup irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token irqchip: Fix dependencies for archs w/o HAS_IOMEM irqchip/s3c24xx: Mark init_eint as __maybe_unused genirq: Validate action before dereferencing it in handle_irq_event_percpu() commit f25a96eada61ceeaa3ec1a0ed774c99f1d9d9060 Merge: 660f6fe 0b6ec8c Author: Linus Torvalds Date: Sun Jan 31 14:43:09 2016 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects fix from Ingo Molnar: "Bump up debugobjects pool limit that bigger s390 systems kept running into" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Allow bigger number of early boot objects commit 660f6fea425db4398a6c94747a5da9be8ca8989f Merge: bb47680 16ab8a5 Author: Linus Torvalds Date: Sun Jan 31 14:38:37 2016 -0800 Merge tag 'vfio-v4.5-rc2' of git://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: "Use alternate group tracking for no-iommu" * tag 'vfio-v4.5-rc2' of git://github.com/awilliam/linux-vfio: vfio/noiommu: Don't use iommu_present() to track fake groups commit bb4768004b0a68a01fc1bc68f8f5f0f75ea584bb Merge: ad0b40fa 52795f6 Author: Linus Torvalds Date: Sun Jan 31 14:29:52 2016 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Here are two I2C driver regression fixes. piix4 gets a larger overhaul fixing the latest refactoring and also an older known issue as well. designware-pci gets a fix for a bad merge conflict resolution" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: piix4: don't regress on bus names i2c: designware-pci: use IRQF_COND_SUSPEND flag i2c: piix4: Fully initialize SB800 before it is registered i2c: piix4: Fix SB800 locking commit ca0bb0798022732773752fee97bb633c6f3623d2 Author: wim.coekaerts@oracle.com Date: Fri Jan 29 09:39:38 2016 -0800 Add sun4v_wdt watchdog driver This driver adds sparc hypervisor watchdog support. The default timeout is 60 seconds and the range is between 1 and 31536000 seconds. Both watchdog-resolution and watchdog-max-timeout MD properties settings are supported. Signed-off-by: Wim Coekaerts Reviewed-by: Julian Calaby Reviewed-by: Guenter Roeck Signed-off-by: David S. Miller Documentation/watchdog/watchdog-parameters.txt | 4 + arch/sparc/kernel/hvcalls.S | 3 +- arch/sparc/kernel/sparc_ksyms_64.c | 1 + drivers/watchdog/Kconfig | 11 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/sun4v_wdt.c | 191 +++++++++++++++++++++++++ 6 files changed, 210 insertions(+), 1 deletion(-) commit 76e9f0ee52b0be5761e29847e0ef01f23f24f1df Author: Dan Williams Date: Fri Jan 22 09:43:28 2016 -0800 phys_to_pfn_t: use phys_addr_t A dma_addr_t is potentially smaller than a phys_addr_t on some archs. Don't truncate the address when doing the pfn conversion. Cc: Ross Zwisler Reported-by: Matthew Wilcox [willy: fix pfn_t_to_phys as well] Signed-off-by: Dan Williams include/linux/pfn_t.h | 4 ++-- kernel/memremap.c | 2 +- tools/testing/nvdimm/test/iomap.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 03fc2da63b9a33dce784a2075c7e068bb97cbf69 Author: Dan Williams Date: Tue Jan 26 09:48:05 2016 -0800 mm: fix pfn_t to page conversion in vm_insert_mixed pfn_t_to_page() honors the flags in the pfn_t value to determine if a pfn is backed by a page. However, vm_insert_mixed() was originally written to use pfn_valid() to make this determination. To restore the old/correct behavior, ignore the pfn_t flags in the !pfn_t_devmap() case and fallback to trusting pfn_valid(). Fixes: 01c8f1c44b83 ("mm, dax, gpu: convert vm_insert_mixed to pfn_t") Cc: Dave Hansen Cc: David Airlie Reported-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Signed-off-by: Dan Williams mm/memory.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d42d6108711b142804b4710d4215efbf5f9b6e21 Author: Richard Weinberger Date: Mon Jan 25 23:24:14 2016 +0100 watchdog: Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit df1a3e64f79b3e277a22b2e789896f86c63eec1f Author: Arnd Bergmann Date: Mon Jan 25 17:06:27 2016 +0100 watchdog: imgdpc: select WATCHDOG_CORE The imgpdc_wdt driver can be built on all architectures with CONFIG_COMPILE_TEST, but fails if no other watchdog driver is enabled: drivers/watchdog/built-in.o: In function `pdc_wdt_remove': imgpdc_wdt.c:(.text+0x74): undefined reference to `watchdog_unregister_device' This adds the normal 'select WATCHDOG_CORE' that is needed to ensure the driver always builds cleanly. Signed-off-by: Arnd Bergmann Reviewed-by: James Hogan Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 1 + 1 file changed, 1 insertion(+) commit c75f6c5ac0877e8d9728f680aa324e9adeff91e1 Author: Marc Gonzalez Date: Thu Jan 21 15:27:07 2016 +0100 watchdog: tango: rename ARCH_TANGOX to ARCH_TANGO This change was requested by arm-soc maintainer Kevin Hilman because the X in TANGOX is a wildcard. Signed-off-by: Marc Gonzalez Acked-by: Mans Rullgard Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99f08ca84156f08b8545f7a5bfedfdd2452c4556 Author: Tomas Winkler Date: Tue Jan 19 15:51:04 2016 +0200 watchdog: pcwd_usb: fix compilation warning In function ‘usb_pcwd_probe’: drivers/watchdog/pcwd_usb.c:611:12: warning: variable ‘maxp’ set but not used [-Wunused-but-set-variable] int pipe, maxp; Signed-off-by: Tomas Winkler Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pcwd_usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 55e071779c79890f43b75d4472243280e91581de Author: Sandeep Tripathy Date: Tue Jan 19 14:44:49 2016 +0530 watchdog: sp805: ping fails to abort wdt reset sp805 wdt asserts interrupt for the first expiry and reloads the counter. If wdt interrupt is set and count reaches zero then wdt reset event is generated. To get wdt reset at 't' timeout the driver loads wdt counter with 't/2'. A ping before time 't' *should* prevent wdt reset. Currently if ping is done after 't/2' then wdt interrupt condition gets set. On the next countdown of loadval wdt reset event occurs eventhough wdt was reloaded before the set timeout 't'. This patch clears the interrupt condition on ping. Signed-off-by: Sandeep Tripathy Acked-by: Viresh Kumar Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sp805_wdt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 29efefb9091dc7b58a2ac9d054c92295101e6bb2 Author: Uwe Kleine-König Date: Fri Jan 15 18:35:34 2016 +0100 watchdog: max63xx: make module's license marker match the header The header specifies GPL version 2 only, so make the MODULE_LICENSE string use the respective string for that. Signed-off-by: Uwe Kleine-König Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/max63xx_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e502e5bc546a8d8be188fa019fe6fcdf02e3c87 Author: Oren Givon Date: Mon Jan 25 12:00:42 2016 +0200 iwlwifi: fix name of ucode loaded for 8265 series Fix the name of the ucode being loaded for 8265 series to be: iwlwifi-8265-XX.ucode Signed-off-by: Oren Givon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 42 +++++++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 6 ++-- 2 files changed, 37 insertions(+), 11 deletions(-) commit ed0ae43c9d5312932e1706e66506b2ba97fa7c93 Merge: 7ddc971 3db70a8 Author: Jens Axboe Date: Sat Jan 30 22:04:52 2016 -0700 Merge branch 'stable/for-jens-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus commit 7ddc971f86aa0a4cee9f6886c356a052461957ae Author: Mike Krinkin Date: Sat Jan 30 19:09:59 2016 +0300 block: fix use-after-free in dio_bio_complete kasan reported the following error when i ran xfstest: [ 701.826854] ================================================================== [ 701.826864] BUG: KASAN: use-after-free in dio_bio_complete+0x41a/0x600 at addr ffff880080b95f94 [ 701.826870] Read of size 4 by task loop2/3874 [ 701.826879] page:ffffea000202e540 count:0 mapcount:0 mapping: (null) index:0x0 [ 701.826890] flags: 0x100000000000000() [ 701.826895] page dumped because: kasan: bad access detected [ 701.826904] CPU: 3 PID: 3874 Comm: loop2 Tainted: G B W L 4.5.0-rc1-next-20160129 #83 [ 701.826910] Hardware name: LENOVO 23205NG/23205NG, BIOS G2ET95WW (2.55 ) 07/09/2013 [ 701.826917] ffff88008fadf800 ffff88008fadf758 ffffffff81ca67bb 0000000041b58ab3 [ 701.826941] ffffffff830d1e74 ffffffff81ca6724 ffff88008fadf748 ffffffff8161c05c [ 701.826963] 0000000000000282 ffff88008fadf800 ffffed0010172bf2 ffffea000202e540 [ 701.826987] Call Trace: [ 701.826997] [] dump_stack+0x97/0xdc [ 701.827005] [] ? _atomic_dec_and_lock+0xc4/0xc4 [ 701.827014] [] ? __dump_page+0x32c/0x490 [ 701.827023] [] kasan_report_error+0x5f3/0x8b0 [ 701.827033] [] ? dio_bio_complete+0x41a/0x600 [ 701.827040] [] __asan_report_load4_noabort+0x59/0x80 [ 701.827048] [] ? dio_bio_complete+0x41a/0x600 [ 701.827053] [] dio_bio_complete+0x41a/0x600 [ 701.827057] [] ? blk_queue_exit+0x108/0x270 [ 701.827060] [] dio_bio_end_aio+0xa0/0x4d0 [ 701.827063] [] ? dio_bio_complete+0x600/0x600 [ 701.827067] [] ? blk_account_io_completion+0x316/0x5d0 [ 701.827070] [] bio_endio+0x79/0x200 [ 701.827074] [] blk_update_request+0x1df/0xc50 [ 701.827078] [] blk_mq_end_request+0x57/0x120 [ 701.827081] [] __blk_mq_complete_request+0x310/0x590 [ 701.827084] [] ? set_next_entity+0x2f8/0x2ed0 [ 701.827088] [] ? put_prev_entity+0x22d/0x2a70 [ 701.827091] [] blk_mq_complete_request+0x5b/0x80 [ 701.827094] [] loop_queue_work+0x273/0x19d0 [ 701.827098] [] ? finish_task_switch+0x1c8/0x8e0 [ 701.827101] [] ? trace_hardirqs_on_caller+0x18/0x6c0 [ 701.827104] [] ? lo_read_simple+0x890/0x890 [ 701.827108] [] ? debug_check_no_locks_freed+0x350/0x350 [ 701.827111] [] ? __hrtick_start+0x130/0x130 [ 701.827115] [] ? __schedule+0x936/0x20b0 [ 701.827118] [] ? kthread_worker_fn+0x3ed/0x8d0 [ 701.827121] [] ? kthread_worker_fn+0x21d/0x8d0 [ 701.827125] [] ? trace_hardirqs_on_caller+0x18/0x6c0 [ 701.827128] [] kthread_worker_fn+0x2af/0x8d0 [ 701.827132] [] ? __init_kthread_worker+0x170/0x170 [ 701.827135] [] ? _raw_spin_unlock_irqrestore+0x36/0x60 [ 701.827138] [] ? __init_kthread_worker+0x170/0x170 [ 701.827141] [] ? __init_kthread_worker+0x170/0x170 [ 701.827144] [] kthread+0x24b/0x3a0 [ 701.827148] [] ? kthread_create_on_node+0x4c0/0x4c0 [ 701.827151] [] ? trace_hardirqs_on+0xd/0x10 [ 701.827155] [] ? do_group_exit+0xdd/0x350 [ 701.827158] [] ? kthread_create_on_node+0x4c0/0x4c0 [ 701.827161] [] ret_from_fork+0x3f/0x70 [ 701.827165] [] ? kthread_create_on_node+0x4c0/0x4c0 [ 701.827167] Memory state around the buggy address: [ 701.827170] ffff880080b95e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 701.827172] ffff880080b95f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 701.827175] >ffff880080b95f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 701.827177] ^ [ 701.827179] ffff880080b96000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 701.827182] ffff880080b96080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 701.827183] ================================================================== The problem is that bio_check_pages_dirty calls bio_put, so we must not access bio fields after bio_check_pages_dirty. Fixes: 9b81c842355ac96097ba ("block: don't access bio->bi_error after bio_put()"). Signed-off-by: Mike Krinkin Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe fs/direct-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19f97c98307115f5a6b0bbf84850c9c272ce5dd3 Author: Aneesh Kumar K.V Date: Fri Jan 29 22:32:49 2016 +0530 powerpc/book3s_32: Fix build error with checkpoint restart In file included from mm/vmscan.c:54:0: include/linux/swapops.h: In function ‘pte_to_swp_entry’: include/linux/swapops.h:69:2: error: implicit declaration of function ‘pte_swp_soft_dirty’ [-Werror=implicit-function-declaration] if (pte_swp_soft_dirty(pte)) ^ include/linux/swapops.h:70:3: error: implicit declaration of function ‘pte_swp_clear_soft_dirty’ [-Werror=implicit-function-declaration] pte = pte_swp_clear_soft_dirty(pte); We support soft dirty tracking only with book3s 64 for now. So change the Kconfig dependency accordingly. Also CHECKPOINT_RESTORE feature is not really dependent on SOFT_DIRTY. We track the dependency between MEM_SOFT_DIRTY and ARCH_SOFT_DIRTY through headers Fixes: 7207f43665b8 ("powerpc/mm: Add page soft dirty tracking") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53729eb174c1589f9185340ffe8c10b3f39f3ef3 Merge: 99b4dd9 cff10ce Author: David S. Miller Date: Sat Jan 30 15:32:42 2016 -0800 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Johan Hedberg says: ==================== pull request: bluetooth 2016-01-30 Here's a set of important Bluetooth fixes for the 4.5 kernel: - Two fixes to 6LoWPAN code (one fixing a potential crash) - Fix LE pairing with devices using both public and random addresses - Fix allocation of dynamic LE PSM values - Fix missing COMPATIBLE_IOCTL for UART line discipline Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit d1a5f2b4d8a125943dcb6b032fc7eaefc2c78296 Author: Dan Williams Date: Thu Jan 28 20:25:31 2016 -0800 block: use DAX for partition table reads Avoid populating pagecache when the block device is in DAX mode. Otherwise these page cache entries collide with the fsync/msync implementation and break data durability guarantees. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Dave Chinner Cc: Andrew Morton Reported-by: Ross Zwisler Tested-by: Ross Zwisler Reviewed-by: Matthew Wilcox Signed-off-by: Dan Williams block/partition-generic.c | 18 +++++++++++++++--- fs/dax.c | 20 ++++++++++++++++++++ include/linux/dax.h | 11 +++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) commit 9f4736fe7ca804aa79b5916221bb13dfc6221a0f Author: Dan Williams Date: Thu Jan 28 20:13:39 2016 -0800 block: revert runtime dax control of the raw block device Dynamically enabling DAX requires that the page cache first be flushed and invalidated. This must occur atomically with the change of DAX mode otherwise we confuse the fsync/msync tracking and violate data durability guarantees. Eliminate the possibilty of DAX-disabled to DAX-enabled transitions for now and revisit this for the next cycle. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Dave Chinner Cc: Matthew Wilcox Cc: Andrew Morton Cc: Ross Zwisler Signed-off-by: Dan Williams block/ioctl.c | 38 -------------------------------------- fs/block_dev.c | 28 ---------------------------- include/linux/fs.h | 3 --- include/uapi/linux/fs.h | 1 - 4 files changed, 70 deletions(-) commit 65f87ee71852a754f7981d0653e7136039b8798a Author: Dan Williams Date: Mon Jan 25 17:23:18 2016 -0800 fs, block: force direct-I/O for dax-enabled block devices Similar to the file I/O path, re-direct all I/O to the DAX path for I/O to a block-device special file. Both regular files and device special files can use the common filp->f_mapping->host lookup to determing is DAX is enabled. Otherwise, we confuse the DAX code that does not expect to find live data in the page cache: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 7676 at mm/filemap.c:217 __delete_from_page_cache+0x9f6/0xb60() Modules linked in: CPU: 0 PID: 7676 Comm: a.out Not tainted 4.4.0+ #276 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 00000000ffffffff ffff88006d3f7738 ffffffff82999e2d 0000000000000000 ffff8800620a0000 ffffffff86473d20 ffff88006d3f7778 ffffffff81352089 ffffffff81658d36 ffffffff86473d20 00000000000000d9 ffffea0000009d60 Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0x6f/0xa2 lib/dump_stack.c:50 [] warn_slowpath_common+0xd9/0x140 kernel/panic.c:482 [] warn_slowpath_null+0x29/0x30 kernel/panic.c:515 [] __delete_from_page_cache+0x9f6/0xb60 mm/filemap.c:217 [] delete_from_page_cache+0x112/0x200 mm/filemap.c:244 [] __dax_fault+0x859/0x1800 fs/dax.c:487 [] blkdev_dax_fault+0x26/0x30 fs/block_dev.c:1730 [< inline >] wp_pfn_shared mm/memory.c:2208 [] do_wp_page+0xc85/0x14f0 mm/memory.c:2307 [< inline >] handle_pte_fault mm/memory.c:3323 [< inline >] __handle_mm_fault mm/memory.c:3417 [] handle_mm_fault+0x2483/0x4640 mm/memory.c:3446 [] __do_page_fault+0x376/0x960 arch/x86/mm/fault.c:1238 [] trace_do_page_fault+0xe8/0x420 arch/x86/mm/fault.c:1331 [] do_async_page_fault+0x14/0xd0 arch/x86/kernel/kvm.c:264 [] async_page_fault+0x28/0x30 arch/x86/entry/entry_64.S:986 [] entry_SYSCALL_64_fastpath+0x16/0x7a arch/x86/entry/entry_64.S:185 ---[ end trace dae21e0f85f1f98c ]--- Fixes: 5a023cdba50c ("block: enable dax for raw block devices") Reported-by: Dmitry Vyukov Reported-by: Kirill A. Shutemov Suggested-by: Jan Kara Reviewed-by: Jan Kara Suggested-by: Matthew Wilcox Tested-by: Ross Zwisler Signed-off-by: Dan Williams include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1d353ad3d5835b16724653b33c05124e1b5acf1 Author: Dan Carpenter Date: Tue Jan 26 12:24:25 2016 +0300 intel_scu_ipcutil: underflow in scu_reg_access() "count" is controlled by the user and it can be negative. Let's prevent that by making it unsigned. You have to have CAP_SYS_RAWIO to call this function so the bug is not as serious as it could be. Fixes: 5369c02d951a ('intel_scu_ipc: Utility driver for intel scu ipc') Signed-off-by: Dan Carpenter Cc: stable@vger.kernel.org Signed-off-by: Darren Hart drivers/platform/x86/intel_scu_ipcutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c319e781e0ecc48228081558f38044a11c7a76e Author: Alex Hung Date: Wed Jan 27 21:35:00 2016 +0800 intel-hid: fix incorrect entries in intel_hid_keymap intel_hid_keymap contains a duplicate entry for KEY_HOME and an incorrect HID index for KEY_PAGEDOWN Reported-by: Pavel Bludov Signed-off-by: Alex Hung drivers/platform/x86/intel-hid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8a695db01dc2b07959628626bc3810c4c6ff2681 Author: Dave Jiang Date: Tue Jan 19 08:57:48 2016 -0700 dmaengine: IOATDMA: fix timer code that continues to restart channels during idle The timer_event() function seems to have a bug where it ends up marking the last entry as non-responding and eventually attempts to restart the channel. This also continuously happen when idle. What needs to happen is for us to make sure there are no descriptors active and then handle that case properly. We should only hit the "cleanup" stage if there are still active descriptors. Signed-off-by: Dave Jiang Signed-off-by: Vinod Koul drivers/dma/ioat/dma.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 7e1da86339f29e445e40d41132c30741df8c19ad Author: Arnd Bergmann Date: Mon Jan 25 16:52:40 2016 +0100 iio: ade7753: avoid uninitialized data The ade7753_spi_read_reg_16() will either successfully read a value from SPI, or return a failure code without delivering data. However, the ade7753_stop_device() and ade7753_reset() functions use the returned data without checking for an error condition first. Gcc detects this as a possible bug and warns about it: drivers/staging/iio/meter/ade7753.c: In function 'ade7753_remove': drivers/staging/iio/meter/ade7753.c:348:6: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized] val |= BIT(4); /* AD converters can be turned off */ ^ drivers/staging/iio/meter/ade7753.c:345:6: note: 'val' was declared here u16 val; ^ drivers/staging/iio/meter/ade7753.c: In function 'ade7753_probe': drivers/staging/iio/meter/ade7753.c:222:6: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized] In both cases, we can avoids the warning by checking the return code before using the data. Signed-off-by: Arnd Bergmann Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7753.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 431386e783a3a6c8b7707bee32d18c353b8688b2 Author: Akinobu Mita Date: Thu Jan 21 01:07:31 2016 +0900 iio: pressure: mpl115: fix temperature offset sign According to the datasheet, the resolusion of temperature sensor is -5.35 counts/C. Temperature ADC is 472 counts at 25C. (https://www.sparkfun.com/datasheets/Sensors/Pressure/MPL115A1.pdf NOTE: This is older revision, but this information is removed from the latest datasheet from nxp somehow) Temp [C] = (Tadc - 472) / -5.35 + 25 = (Tadc - 605.750000) * -0.186915888 So the correct offset is -605.750000. Signed-off-by: Akinobu Mita Acked-by: Peter Meerwald-Stadler Cc: Signed-off-by: Jonathan Cameron drivers/iio/pressure/mpl115.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddeb35cbd6221751f0197ffaa9500da31e8337f4 Author: Richard Weinberger Date: Mon Jan 25 23:24:15 2016 +0100 iio: imu: Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. While the driver has correct dependencies the select statement will bypass the HAS_IOMEM dependency. So, unbreak the build by rendering it into a real dependency. Signed-off-by: Richard Weinberger Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e884cebf9ea34f559bc78a474f3fccbc285dcb71 Author: Richard Weinberger Date: Mon Jan 25 23:24:03 2016 +0100 staging: iio: Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Acked-by: Geert Uytterhoeven Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0165c3005fd64f850b1bbfe2fd24b916a161b696 Author: Richard Weinberger Date: Mon Jan 25 23:24:05 2016 +0100 iio: adc: Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit d81dac3c1c5295c61b15293074ac2bd3254e1875 Author: Dan Carpenter Date: Tue Jan 26 12:25:21 2016 +0300 iio: inkern: fix a NULL dereference on error In twl4030_bci_probe() there are some failure paths where we call iio_channel_release() with a NULL pointer. (Apparently, that driver can opperate without a valid channel pointer). Let's fix it by adding a NULL check in iio_channel_release(). Fixes: 2202e1fc5a29 ('drivers: power: twl4030_charger: fix link problems when building as module') Signed-off-by: Dan Carpenter Cc: Signed-off-by: Jonathan Cameron drivers/iio/inkern.c | 2 ++ 1 file changed, 2 insertions(+) commit 49a20454e0eb907093ec564d4e8f3832bcbf9d53 Author: Cyrille Pitchen Date: Fri Jan 29 17:53:33 2016 +0100 crypto: atmel-aes - remove calls of clk_prepare() from atomic contexts clk_prepare()/clk_unprepare() must not be called within atomic context. This patch calls clk_prepare() once for all from atmel_aes_probe() and clk_unprepare() from atmel_aes_remove(). Then calls of clk_prepare_enable()/clk_disable_unprepare() were replaced by calls of clk_enable()/clk_disable(). Cc: stable@vger.kernel.org Signed-off-by: Cyrille Pitchen Reported-by: Matthias Mayr Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit fe09786178f9df713a4b2dd6b93c0a722346bf5e Author: Wang, Rui Y Date: Wed Jan 27 17:08:37 2016 +0800 crypto: algif_hash - wait for crypto_ahash_init() to complete hash_sendmsg/sendpage() need to wait for the completion of crypto_ahash_init() otherwise it can cause panic. Cc: stable@vger.kernel.org Signed-off-by: Rui Wang Signed-off-by: Herbert Xu crypto/algif_hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 840d6fe7425ffb6a62d53b2759e01ae6daf90e4e Author: Zhen Lei Date: Sat Jan 30 10:04:17 2016 +0800 pid: Fix spelling in comments Accidentally discovered this typo when I studied this module. Signed-off-by: Zhen Lei Cc: Hanjun Guo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tianhong Ding Cc: Xinwei Hu Cc: Zefan Li Link: http://lkml.kernel.org/r/1454119457-11272-1-git-send-email-thunder.leizhen@huawei.com Signed-off-by: Ingo Molnar kernel/pid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28fb8a5b6e233fc384fb27f9f91f811b40ba9cf8 Merge: 5fa7c8e 3f416f2 Author: Ingo Molnar Date: Sat Jan 30 09:15:49 2016 +0100 Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fix 'perf stat' stddev reporting due to mistakenly cleaning event private stats (Jiri Olsa) - Fix 'perf test CQM' endless loop detected by 'gcc6 -Wmisleading-indentation' (Markus Trippelsdorf) - Fix behaviour of Shift-Tab when nothing is focussed in the annotate TUI browser, detected with gcc6 -Wmisleading-indentation (Markus Trippelsdorf) - Fix mem data cacheline hists browser width setting for unresolved addresses (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 99b4dd9f2423130875ac486fe587cd103c64f753 Author: Yuchung Cheng Date: Fri Jan 29 15:11:50 2016 -0800 tcp: avoid cwnd undo after receiving ECN RFC 4015 section 3.4 says the TCP sender MUST refrain from reversing the congestion control state when the ACK signals congestion through the ECN-Echo flag. Currently we may not always do that when prior_ssthresh is reset upon receiving ACKs with ECE marks. This patch fixes that. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 2 -- 1 file changed, 2 deletions(-) commit 3d45296ab96c2ec8308226b3350a6d9e48379870 Author: WANG Cong Date: Fri Jan 29 11:58:03 2016 -0800 irda: fix a potential use-after-free in ircomm_param_request self->ctrl_skb is protected by self->spinlock, we should not access it out of the lock. Move the debugging printk inside. Reported-by: Dmitry Vyukov Cc: Samuel Ortiz Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/irda/ircomm/ircomm_param.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eb7d78c9e7f6418932bd5fbee45eb46d5ab05002 Author: Dan Williams Date: Fri Jan 29 21:48:34 2016 -0800 devm_memremap_pages: fix vmem_altmap lifetime + alignment handling to_vmem_altmap() needs to return valid results until arch_remove_memory() completes. It also needs to be valid for any pfn in a section regardless of whether that pfn maps to data. This escape was a result of a bug in the unit test. The signature of this bug is that free_pagetable() fails to retrieve a vmem_altmap and goes off into the weeds: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] get_pfnblock_flags_mask+0x49/0x60 [..] Call Trace: [] free_hot_cold_page+0x97/0x1d0 [] __free_pages+0x2a/0x40 [] free_pagetable+0x8c/0xd4 [] remove_pagetable+0x37a/0x808 [] vmemmap_free+0x10/0x20 Fixes: 4b94ffdc4163 ("x86, mm: introduce vmem_altmap to augment vmemmap_populate()") Cc: Andrew Morton Reported-by: Jeff Moyer Signed-off-by: Dan Williams kernel/memremap.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit ae9d723e9fbe9fb28213b7df26475791428bf76a Merge: 84922d8 e434e04 Author: David S. Miller Date: Fri Jan 29 20:33:57 2016 -0800 Merge branch 'arnd-net-driver-fixes' Arnd Bergmann says: ==================== network driver fixes This is an updated series of fixes for the network device drivers that showed warnings in ARM randconfig. Changes since v1 are: dropped "net: macb: avoid uninitialized variables", already fixed in net-next dropped "net: fddi/defxx: avoid warning about uninitialized variable use", already fixed in net-next added missing barriers in "net: moxart: use correct accessors for DMA memory" clarified "net: bgmac: clarify CONFIG_BCMA dependency" changelog ==================== Signed-off-by: David S. Miller commit e434e04110704eb91acfecbd0fb8ca8e2da9c29b Author: Arnd Bergmann Date: Fri Jan 29 12:39:15 2016 +0100 net: tg3: avoid uninitialized variable warning The tg3_set_eeprom() function correctly initializes the 'start' variable, but gcc generates a false warning: drivers/net/ethernet/broadcom/tg3.c: In function 'tg3_set_eeprom': drivers/net/ethernet/broadcom/tg3.c:12057:4: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized] I have not come up with a way to restructure the code in a way that avoids the warning without making it less readable, so this adds an initialization for the declaration to shut up that warning. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bdb290896d2ff22942c9c9f5bf19909329f3664 Author: Arnd Bergmann Date: Fri Jan 29 12:39:14 2016 +0100 net: nb8800: avoid uninitialized variable warning The nb8800_poll() function initializes the 'next' variable in the loop looking for new input data. We know this will be called at least once because 'budget' is a guaranteed to be a positive number when we enter the function, but the compiler doesn't know that and warns when the variable is used later: drivers/net/ethernet/aurora/nb8800.c: In function 'nb8800_poll': drivers/net/ethernet/aurora/nb8800.c:350:21: warning: 'next' may be used uninitialized in this function [-Wmaybe-uninitialized] Changing the 'while() {}' loop to 'do {} while()' makes it obvious to the compiler what is going on so it no longer warns. Signed-off-by: Arnd Bergmann Acked-by: Mans Rullgard Signed-off-by: David S. Miller drivers/net/ethernet/aurora/nb8800.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 57e7c8cef224af166b8ec932b5e383641418c005 Author: Arnd Bergmann Date: Fri Jan 29 12:39:13 2016 +0100 net: vxge: avoid unused function warnings When CONFIG_PCI_MSI is disabled, we get warnings about unused functions in the vxge driver: drivers/net/ethernet/neterion/vxge/vxge-main.c:2121:13: warning: 'adaptive_coalesce_tx_interrupts' defined but not used [-Wunused-function] drivers/net/ethernet/neterion/vxge/vxge-main.c:2149:13: warning: 'adaptive_coalesce_rx_interrupts' defined but not used [-Wunused-function] We could add another #ifdef here, but it's nicer to avoid those warnings for good by converting the existing #ifdef to if(IS_ENABLED()), which has the same effect but provides better compile-time coverage in general, and lets the compiler understand better when the function is intentionally unused. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/neterion/vxge/vxge-main.c | 31 ++++++++++---------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit 1f820f538f7396db7fd40684b9c3620816acc5a3 Author: Arnd Bergmann Date: Fri Jan 29 12:39:12 2016 +0100 net: bgmac: clarify CONFIG_BCMA dependency The bgmac driver depends on BCMA_HOST_SOC, which is only used when CONFIG_BCMA is enabled. However, it is a bool option and can be set when CONFIG_BCMA=m, and then bgmac can be built-in, leading to an obvious link error: drivers/built-in.o: In function `bgmac_init': :(.init.text+0x7f2c): undefined reference to `__bcma_driver_register' drivers/built-in.o: In function `bgmac_exit': :(.exit.text+0x110a): undefined reference to `bcma_driver_unregister' To avoid this case, we need to depend on both BCMA and BCMA_SOC, as this patch does. I'm also trying to make the dependency more readable by splitting it into three lines, and adding a COMPILE_TEST alternative so we can test-build it in all configurations that support BCMA. The added dependency on FIXED_PHY addresses a related issue where we cannot call fixed_phy_register() when CONFIG_FIXED_PHY=m and CONFIG_BGMAC=y. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 747a11279a442b913a57bf38934879babab3b58b Author: Arnd Bergmann Date: Fri Jan 29 12:39:11 2016 +0100 net: hp100: remove unnecessary #ifdefs Building the hp100 ethernet driver causes warnings when both the PCI and EISA drivers are disabled: ethernet/hp/hp100.c: In function 'hp100_module_init': ethernet/hp/hp100.c:3047:2: warning: label 'out3' defined but not used [-Wunused-label] ethernet/hp/hp100.c: At top level: ethernet/hp/hp100.c:2828:13: warning: 'cleanup_dev' defined but not used [-Wunused-function] We can easily avoid the warnings and make the driver look slightly nicer by removing the #ifdefs that check for the CONFIG_PCI and CONFIG_EISA, as all the registration functions are designed to have no effect when the buses are disabled. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/hp/hp100.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 84092996673211f16ef3b942a191d7952e9dfea9 Author: Arnd Bergmann Date: Fri Jan 29 12:39:10 2016 +0100 net: davinci_cpdma: use dma_addr_t for DMA address The davinci_cpdma mixes up physical addresses as seen from the CPU and DMA addresses as seen from a DMA master, since it can operate on both normal memory or an on-chip buffer. If dma_addr_t is different from phys_addr_t, this means we get a compile-time warning about the type mismatch: ethernet/ti/davinci_cpdma.c: In function 'cpdma_desc_pool_create': ethernet/ti/davinci_cpdma.c:182:48: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types] pool->cpumap = dma_alloc_coherent(dev, size, &pool->phys, In file included from ethernet/ti/davinci_cpdma.c:21:0: dma-mapping.h:398:21: note: expected 'dma_addr_t * {aka long long unsigned int *}' but argument is of type 'phys_addr_t * {aka unsigned int *}' static inline void *dma_alloc_coherent(struct device *dev, size_t size, This slightly restructures the code so the address we use for mapping RAM into a DMA address is always a dma_addr_t, avoiding the warning. The code is correct even if both types are 32-bit because the DMA master in this device only supports 32-bit addressing anyway, independent of the types that are used. We still assign this value to pool->phys, and that is wrong if the driver is ever used with an IOMMU, but that value appears to be never used, so there is no problem really. I've added a couple of comments about where we do things that are slightly violating the API. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 84922d8cd49c505dc0912f57f4ab1f8f33c7e118 Merge: 39a4867 1cdda91 Author: David S. Miller Date: Fri Jan 29 20:31:27 2016 -0800 Merge branch 'ipv6-sticky-pktinfo' Paolo Abeni says: ==================== ipv6: fix sticky pktinfo behaviour Currently: ip addr add dev eth0 2001:0010::1/64 ip addr add dev eth1 2001:0020::1/64 ping6 -I eth0 2001:0020::2 do not lead to the expected results, i.e. eth1 is used as the egress interface. This is due to two related issues in handling sticky pktinfo, used by ping6 to enforce the device binding: - ip6_dst_lookup_flow()/ip6_dst_lookup_tail() do not really enforce flowi6_oif match - ipv6 udp connect() just ignore flowi6_oif These patches address each issue individually. The kernel has never enforced the egress interface specified via the sticky pktinfo, except briefly between the commits 741a11d9e410 ("net: ipv6: Add RT6_LOOKUP_F_IFACE flag if oif is set") and d46a9d678e4c ("net: ipv6: Dont add RT6_LOOKUP_F_IFACE flag if saddr set"), but the ping6 tools was unaffected up to iputils-20100214, since before it used SO_BINDTODEVICE to enforce the egress interface. ==================== Signed-off-by: David S. Miller commit 1cdda91871470f15e79375991bd2eddc6e86ddb1 Author: Paolo Abeni Date: Fri Jan 29 12:30:20 2016 +0100 ipv6/udp: use sticky pktinfo egress ifindex on connect() Currently, the egress interface index specified via IPV6_PKTINFO is ignored by __ip6_datagram_connect(), so that RFC 3542 section 6.7 can be subverted when the user space application calls connect() before sendmsg(). Fix it by initializing properly flowi6_oif in connect() before performing the route lookup. Signed-off-by: Paolo Abeni Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/datagram.c | 3 +++ 1 file changed, 3 insertions(+) commit 6f21c96a78b835259546d8f3fb4edff0f651d478 Author: Paolo Abeni Date: Fri Jan 29 12:30:19 2016 +0100 ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail() The current implementation of ip6_dst_lookup_tail basically ignore the egress ifindex match: if the saddr is set, ip6_route_output() purposefully ignores flowi6_oif, due to the commit d46a9d678e4c ("net: ipv6: Dont add RT6_LOOKUP_F_IFACE flag if saddr set"), if the saddr is 'any' the first route lookup in ip6_dst_lookup_tail fails, but upon failure a second lookup will be performed with saddr set, thus ignoring the ifindex constraint. This commit adds an output route lookup function variant, which allows the caller to specify lookup flags, and modify ip6_dst_lookup_tail() to enforce the ifindex match on the second lookup via said helper. ip6_route_output() becames now a static inline function build on top of ip6_route_output_flags(); as a side effect, out-of-tree modules need now a GPL license to access the output route lookup functionality. Signed-off-by: Paolo Abeni Acked-by: Hannes Frederic Sowa Acked-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_route.h | 12 ++++++++++-- net/ipv6/ip6_output.c | 6 +++++- net/ipv6/route.c | 7 +++---- 3 files changed, 18 insertions(+), 7 deletions(-) commit 39a4867a9b481afce3f28d2c7e216bdd6ff51417 Merge: aa3a022 f9ead9b Author: David S. Miller Date: Fri Jan 29 20:26:08 2016 -0800 Merge tag 'wireless-drivers-for-davem-2016-01-29' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== iwlwifi * Fix support for 3168 device: * NVM version * firmware file name * device IDs * Fix a compilation warning in dvm calibration code * Fix the TPC (reduced Tx Power) code. This fixes performance issues * Add device IDs for 8265 rtx2x00 * fix monitor mode regression dating back to 4.1 brcmfmac * fix sdio initialisation related crash rtlwifi * rtl8821ae: Fix 5G failure when EEPROM is incorrectly encoded ath9k * ignore eeprom magic mismatch on flash based devices ==================== Signed-off-by: David S. Miller commit aa3a022094fac7f6e48050e139fa8a5a2e3265ce Author: Ken-ichirou MATSUZAWA Date: Fri Jan 29 10:45:50 2016 +0900 netlink: not trim skb for mmaped socket when dump We should not trim skb for mmaped socket since its buf size is fixed and userspace will read as frame which data equals head. mmaped socket will not call recvmsg, means max_recvmsg_len is 0, skb_reserve was not called before commit: db65a3aaf29e. Fixes: db65a3aaf29e (netlink: Trim skb to alloc size to avoid MSG_TRUNC) Signed-off-by: Ken-ichirou MATSUZAWA Signed-off-by: David S. Miller net/netlink/af_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7256eac13b0e6884355cf40f75db05785d18f5da Author: Li RongQing Date: Fri Jan 29 09:43:47 2016 +0800 vxlan: fix a out of bounds access in __vxlan_find_mac The size of all_zeros_mac is 6 byte, but eth_hash() will access the 8 byte, and KASan reported the below bug: [ 8596.479031] BUG: KASan: out of bounds access in __vxlan_find_mac+0x24/0x100 at addr ffffffff841514c0 [ 8596.487647] Read of size 8 by task ip/52820 [ 8596.490818] Address belongs to variable all_zeros_mac+0x0/0x40 [ 8596.496051] CPU: 0 PID: 52820 Comm: ip Tainted: G WC 4.1.15 #1 [ 8596.503520] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 02/10/2014 [ 8596.509365] ffffffff841514c0 ffff88007450f0b8 ffffffff822fa5e1 0000000000000032 [ 8596.516112] ffff88007450f150 ffff88007450f138 ffffffff812dd58c ffff88007450f1d8 [ 8596.522856] ffffffff81113b80 0000000000000282 0000000000000001 ffffffff8101ee4d [ 8596.529599] Call Trace: [ 8596.530858] [] dump_stack+0x4f/0x7b [ 8596.535080] [] kasan_report_error+0x3bc/0x3f0 [ 8596.540258] [] ? __lock_acquire+0x90/0x2140 [ 8596.545245] [] ? save_stack_trace+0x2d/0x80 [ 8596.550234] [] kasan_report+0x40/0x50 [ 8596.554647] [] ? __vxlan_find_mac+0x24/0x100 [ 8596.559729] [] __asan_load8+0x69/0xa0 [ 8596.564141] [] __vxlan_find_mac+0x24/0x100 [ 8596.569033] [] vxlan_fdb_create+0x9d/0x570 it can be fixed by enlarging the all_zeros_mac to 8 byte, although it is harmless; eth_hash() will be called in other place with the memory which is larger and equal to 8 byte. Signed-off-by: Li RongQing Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be1faa92e83b1252d9200c59d8c98aab44463f1e Author: Vivien Didelot Date: Thu Jan 28 16:54:37 2016 -0500 net: dsa: mv88e6xxx: fix port VLAN maps Currently the port based VLAN maps should be configured to allow every port to egress frames on all other ports, except themselves. The debugfs interface shows that they are misconfigured. For instance, a 7-port switch has the following content in the related register 0x06: GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6 ... 6: 1fa4 1f0f 4 7f 7e 7d 7c 7b 7a 79 ... This means that port 3 is allowed to talk to port 2-6, but cannot talk to ports 0 and 1. With this fix, port 3 can correctly talk to all ports except 3 itself: GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6 ... 6: 1fa4 1f0f 4 7e 7d 7b 77 6f 5f 3f ... Fixes: ede8098d0fef ("net: dsa: mv88e6xxx: bridges do not need an FID") Reported-by: Kevin Smith Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Tested-by: Kevin Smith Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a5829f536b3d11a57617e83d4bcb2b7d70671e98 Author: Alexander Duyck Date: Thu Jan 28 13:42:24 2016 -0800 fib_trie: Fix shift by 32 in fib_table_lookup The fib_table_lookup function had a shift by 32 that triggered a UBSAN warning. This was due to the fact that I had placed the shift first and then followed it with the check for the suffix length to ignore the undefined behavior. If we reorder this so that we verify the suffix is less than 32 before shifting the value we can avoid the issue. Reported-by: Toralf Förster Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 59a557be385b66c1da20e9cfc6ff6c2e676c6804 Author: Arnd Bergmann Date: Thu Jan 28 17:54:33 2016 +0100 net: moxart: use correct accessors for DMA memory The moxart ethernet driver confuses coherent DMA buffers with MMIO registers. moxart_ether.c: In function 'moxart_mac_setup_desc_ring': moxart_ether.c:146:428: error: passing argument 1 of '__fswab32' makes integer from pointer without a cast [-Werror=int-conversion] moxart_ether.c:74:39: warning: incorrect type in argument 3 (different address spaces) moxart_ether.c:74:39: expected void *cpu_addr moxart_ether.c:74:39: got void [noderef] *tx_desc_base This leaves the basic logic alone and uses normal pointers for the virtual address of the descriptor. As we cannot use readl/writel to access them, we also introduce our own moxart_desc_read moxart_desc_write helpers that perform the same endianess swap as the original code, but without the address space conversion. The barriers are made explicit here where needed: Even in the worst-case scenario, we just have to use a rmb() after checking ownership so we don't read any input data before we are sure it is value, and we use wmb() before transferring ownership back to the device. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/moxa/moxart_ether.c | 46 +++++++++++++++++++++----------- drivers/net/ethernet/moxa/moxart_ether.h | 4 +-- 2 files changed, 32 insertions(+), 18 deletions(-) commit 52b79e2bdf92b07b37c805c50811eaf69a33683d Author: Arnd Bergmann Date: Thu Jan 28 17:39:24 2016 +0100 ipv4: ipconfig: avoid unused ic_proto_used symbol When CONFIG_PROC_FS, CONFIG_IP_PNP_BOOTP, CONFIG_IP_PNP_DHCP and CONFIG_IP_PNP_RARP are all disabled, we get a warning about the ic_proto_used variable being unused: net/ipv4/ipconfig.c:146:12: error: 'ic_proto_used' defined but not used [-Werror=unused-variable] This avoids the warning, by making the definition conditional on whether a dynamic IP configuration protocol is configured. If not, we know that the value is always zero, so we can optimize away the variable and all code that depends on it. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 4 ++++ 1 file changed, 4 insertions(+) commit a07100e00ac42a4474530ce17b4978c9e06bde55 Author: Quinn Tran Date: Mon Dec 7 19:48:57 2015 -0500 qla2xxx: Fix TMR ABORT interaction issue between qla2xxx and TCM During lun reset, TMR thread from TCM would issue abort to qla driver. At abort time, each command is in different state. Depending on the state, qla will use the TMR thread to trigger a command free(cmd_kref--) if command is not down at firmware. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 55 +++++++++++++++++++--------- drivers/scsi/qla2xxx/qla_target.h | 59 +++++++++++++++++------------- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 73 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 142 insertions(+), 45 deletions(-) commit dacb58221805bb72ec46a73826c9e59a587d7d68 Author: Himanshu Madhani Date: Wed Jan 20 15:42:58 2016 -0800 qla2xxx: Fix warning reported by static checker This patch fixes following warning drivers/scsi/qla2xxx/qla_target.c:3587 qlt_do_ctio_completion() warn: impossible condition '(logged_out == 41) => (0-1 == 41)' drivers/scsi/qla2xxx/qla_target.c 3580 case CTIO_PORT_LOGGED_OUT: 3581 case CTIO_PORT_UNAVAILABLE: 3582 { 3583 bool logged_out = (status & 0xFFFF); 3584 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059, 3585 "qla_target(%d): CTIO with %s status %x " 3586 "received (state %x, se_cmd %p)\n", vha->vp_idx, 3587 (logged_out == CTIO_PORT_LOGGED_OUT) ? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Bool cannot equal 0x26. 3588 "PORT LOGGED OUT" : "PORT UNAVAILABLE", Reported-by: Dan Carpenter Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8a9ebe717a133ba7bc90b06047f43cc6b8bcb8b3 Author: Mike Christie Date: Mon Jan 18 14:09:27 2016 -0600 target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors In a couple places we are not converting to/from the Linux block layer 512 bytes sectors. 1. The request queue values and what we do are a mismatch of things: max_discard_sectors - This is in linux block layer 512 byte sectors. We are just copying this to max_unmap_lba_count. discard_granularity - This is in bytes. We are converting it to Linux block layer 512 byte sectors. discard_alignment - This is in bytes. We are just copying this over. The problem is that the core LIO code exports these values in spc_emulate_evpd_b0 and we use them to test request arguments in sbc_execute_unmap, but we never convert to the block size we export to the initiator. If we are not using 512 byte sectors then we are exporting the wrong values or are checks are off. And, for the discard_alignment/bytes case we are just plain messed up. 2. blkdev_issue_discard's start and number of sector arguments are supposed to be in linux block layer 512 byte sectors. We are currently passing in the values we get from the initiator which might be based on some other sector size. There is a similar problem in iblock_execute_write_same where the bio functions want values in 512 byte sectors but we are passing in what we got from the initiator. Signed-off-by: Mike Christie Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_device.c | 44 +++++++++++++++++++++++++++ drivers/target/target_core_file.c | 29 ++++++------------ drivers/target/target_core_iblock.c | 58 +++++++++--------------------------- include/target/target_core_backend.h | 3 ++ 4 files changed, 70 insertions(+), 64 deletions(-) commit 3db70a853202c252a8ebefa71ccb088ad149cdd2 Author: Bob Liu Date: Wed Nov 25 17:52:55 2015 -0500 xen/blkfront: realloc ring info in blkif_resume Need to reallocate ring info in the resume path, because info->rinfo was freed in blkif_free(). And 'multi-queue-max-queues' backend reports may have been changed. Signed-off-by: Bob Liu Reported-and-Tested-by: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 74 +++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 29 deletions(-) commit 45eb570a0db3391c88cba04510a20fe7e4125497 Author: Dan Williams Date: Fri Jan 29 17:42:51 2016 -0800 libnvdimm, pfn: fix restoring memmap location This path was missed when turning on the memmap in pmem support. Permit 'pmem' as a valid location for the map. Reported-by: Jeff Moyer Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0260a2f4e2cabb998f5add733e042a7375bca3b4 Merge: df3eb6c d612a57 Author: David S. Miller Date: Fri Jan 29 17:28:40 2016 -0800 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. 3 small bug fix patches for net. ==================== Signed-off-by: David S. Miller commit d612a579771385e08f7b665063b36bfa52c03ea3 Author: Michael Chan Date: Thu Jan 28 03:11:22 2016 -0500 bnxt_en: Fix crash in bnxt_free_tx_skbs() during tx timeout. The ring index j is not wrapped properly at the end of the ring, causing it to reference pointers past the end of the ring. For proper loop termination and to access the ring properly, we need to increment j and mask it before referencing the ring entry. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8a4d4c8dde7a4119bce3fd8287dca193ff6356da Author: Michael Chan Date: Thu Jan 28 03:11:21 2016 -0500 bnxt_en: Exclude rx_drop_pkts hw counter from the stack's rx_dropped counter. This hardware counter is misleading as it counts dropped packets that don't match the hardware filters for unicast/broadcast/multicast. We will still report this counter in ethtool -S for diagnostics purposes. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 -- 1 file changed, 2 deletions(-) commit 74608fc98d2856fa7201a498b61c9dd9455b504a Author: Prashant Sreedharan Date: Thu Jan 28 03:11:20 2016 -0500 bnxt_en: Ring free response from close path should use completion ring Use completion ring for ring free response from firmware. The response will be the last entry in the ring and we can free the ring after getting the response. This will guarantee no spurious DMA to freed memory. Signed-off-by: Prashant Sreedharan Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df3eb6cd68924d5ea16032faecae7fb775f67883 Author: Bernie Harris Date: Thu Jan 28 16:30:51 2016 +1300 net_sched: drr: check for NULL pointer in drr_dequeue There are cases where qdisc_dequeue_peeked can return NULL, and the result is dereferenced later on in the function. Similarly to the other qdisc dequeue functions, check whether the skb pointer is NULL and if it is, goto out. Signed-off-by: Bernie Harris Reviewed-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_drr.c | 2 ++ 1 file changed, 2 insertions(+) commit 60c7e2d2edc7a2a3613540e18760a713359946f6 Merge: eac2d86 8931f8e Author: Stephen Boyd Date: Fri Jan 29 17:24:28 2016 -0800 Merge tag 'v4.5-rockchip-clkfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-fixes Pull rockchip fixes from Heiko Stuebner: Fixes for wrong register offsets in both rk3036 and rk3368. Also rename the external input for the emac on rk3036, which should still be ok to do, as that binding was only introduced during this merge-window. * tag 'v4.5-rockchip-clkfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: rk3368: fix some clock gates clk: rockchip: rk3036: rename emac ext source clock clk: rockchip: rk3036: fix the div offset for emac clock clk: rockchip: rk3036: fix uarts clock error clk: rockchip: rk3036: fix the FLAGs for clock mux commit ad0b40fa944628d6f30b40266a599b285d70a266 Merge: ec1cc55 03590cb Author: Linus Torvalds Date: Fri Jan 29 16:16:12 2016 -0800 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Just one fix for a -fstack-protector-strong problem from Kees Cook, and adding the new copy_file_range syscall" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: wire up copy_file_range() syscall ARM: 8500/1: fix atags_to_fdt with stack-protector-strong commit ec1cc55d6fa0b34029419634125fadc77dce1e88 Merge: 6b292a8 2d19fc6 Author: Linus Torvalds Date: Fri Jan 29 16:10:16 2016 -0800 Merge tag 'powerpc-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Wire up copy_file_range() syscall from Chandan Rajendra - Simplify module TOC handling from Alan Modra - Remove newly added extra definition of pmd_dirty from Stephen Rothwell - Allow user space to map rtas_rmo_buf from Vasant Hegde - Fix PE location code from Gavin Shan - Remove PPMU_HAS_SSLOT flag for Power8 from Madhavan Srinivasan - Fixup _HPAGE_CHG_MASK from Aneesh Kumar K.V * tag 'powerpc-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fixup _HPAGE_CHG_MASK powerpc/perf: Remove PPMU_HAS_SSLOT flag for Power8 powerpc/eeh: Fix PE location code powerpc/mm: Allow user space to map rtas_rmo_buf powerpc: Remove newly added extra definition of pmd_dirty powerpc: Simplify module TOC handling powerpc: Wire up copy_file_range() syscall commit 6b292a8abd8113410a25a179ac13a1a6e1c9d451 Merge: d3f71ae 9f3d6d7 Author: Linus Torvalds Date: Fri Jan 29 16:05:18 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: "An optimization for irq-restore, the SSM instruction is quite a bit slower than an if-statement and a STOSM. The copy_file_range system all is added. Cleanup for PCI and CIO. And a couple of bug fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/cio: update measurement characteristics s390/cio: ensure consistent measurement state s390/cio: fix measurement characteristics memleak s390/zcrypt: Fix cryptographic device id in kernel messages s390/pci: remove iomap sanity checks s390/pci: set error state for unusable functions s390/pci: fix bar check s390/pci: resize iomap s390/pci: improve ZPCI_* macros s390/pci: provide ZPCI_ADDR macro s390/pci: adjust IOMAP_MAX_ENTRIES s390/numa: move numa_init_late() from device to arch_initcall s390: remove all usages of PSW_ADDR_INSN s390: remove all usages of PSW_ADDR_AMODE s390: wire up copy_file_range syscall s390: remove superfluous memblock_alloc() return value checks s390/numa: allocate memory with correct alignment s390/irqflags: optimize irq restore s390/mm: use TASK_MAX_SIZE where applicable commit d3f71ae711cebdeaff12989761f48bd4230e83d5 Merge: 46552e6 e410e34 Author: Linus Torvalds Date: Fri Jan 29 15:46:49 2016 -0800 Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "Dave had a small collection of fixes to the new free space tree code, one of which was keeping our sysfs files more up to date with feature bits as different things get enabled (lzo, raid5/6, etc). I should have kept the sysfs stuff for rc3, since we always manage to trip over something. This time it was GFP_KERNEL from somewhere that is NOFS only. Instead of rebasing it out I've put a revert in, and we'll fix it properly for rc3. Otherwise, Filipe fixed a btrfs DIO race and Qu Wenruo fixed up a use-after-free in our tracepoints that Dave Jones reported" * 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Revert "btrfs: synchronize incompat feature bits with sysfs files" btrfs: don't use GFP_HIGHMEM for free-space-tree bitmap kzalloc btrfs: sysfs: check initialization state before updating features Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()" btrfs: async-thread: Fix a use-after-free error for trace Btrfs: fix race between fsync and lockless direct IO writes btrfs: add free space tree to the cow-only list btrfs: add free space tree to lockdep classes btrfs: tweak free space tree bitmap allocation btrfs: tests: switch to GFP_KERNEL btrfs: synchronize incompat feature bits with sysfs files btrfs: sysfs: introduce helper for syncing bits with sysfs files btrfs: sysfs: add free-space-tree bit attribute btrfs: sysfs: fix typo in compat_ro attribute definition commit 46552e68acf71752c2330929cb97c644e4560155 Merge: ad233ac ad1ac94 Author: Linus Torvalds Date: Fri Jan 29 15:40:59 2016 -0800 Merge tag 'pm+acpi-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: "These are: cpuidle fixes (including one fix for a recent regression), cpufreq fixes (including fixes for two issues introduced during the 4.2 cycle), generic power domains framework fixes (two locking fixes and one cleanup), one locking fix in the ACPI-based PCI hotplug framework (ACPIPHP), removal of one ACPI backlight blacklist entry that isn't necessary any more and a PM Kconfig cleanup. Specifics: - Fix a recent cpuidle core regression that broke suspend-to-idle on all systems where cpuidle drivers don't provide ->enter_freeze callbacks for any states (Sudeep Holla). - Drop an unnecessary symbol definition from the cpuidle core code handling coupled CPU cores (Anders Roxell). - Fix a race condition related to governor initialization and removal in the cpufreq core (Viresh Kumar). - Clean up the cpufreq core to use list_is_last() for checking if the given policy object is the last element of a list instead of open coding that in a clumsy way (Gautham R Shenoy). - Fix compiler warnings in the pxa2xx and cpufreq-dt cpufreq drivers (Arnd Bergmann). - Fix two locking issues and clean up a comment in the generic power domains framework (Ulf Hansson, Marek Szyprowski, Moritz Fischer). - Fix the error code path of one function in the ACPI-based PCI hotplug framework (ACPIPHP) that forgets to release a lock acquired previously (Insu Yun). - Drop the ACPI backlight blacklist entry for Dell Inspiron 5737 that is not necessary any more (Hans de Goede). - Clean up the top-level PM Kconfig to stop requiring APM emulation to depend on PM which in fact isn't necessary (Arnd Bergmann)" * tag 'pm+acpi-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: cpufreq-dt: avoid uninitialized variable warnings: cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype PM: APM_EMULATION does not depend on PM cpufreq: Use list_is_last() to check last entry of the policy list cpufreq: Fix NULL reference crash while accessing policy->governor_data cpuidle: coupled: remove unused define cpuidle_coupled_lock PM / Domains: Fix typo in comment PM / Domains: Fix potential deadlock while adding/removing subdomains ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot() ACPI: Revert "ACPI / video: Add Dell Inspiron 5737 to the blacklist" cpuidle: fix fallback mechanism for suspend to idle in absence of enter_freeze PM / domains: fix lockdep issue for all subdomains commit ad233aca21509d337c78d32a50d2116cd6943031 Merge: 2973737 3867444 Author: Linus Torvalds Date: Fri Jan 29 15:19:42 2016 -0800 Merge branch 'stable/for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb patchlet from Konrad Rzeszutek Wilk: "One trivial patch. Another patch (from Fengguang) is already in your tree courtesy of Andrew Morton - but I would prefer not to rebase my tree. Hence the diff is very small" * 'stable/for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: Make linux/swiotlb.h standalone includible MAINTAINERS: add git URL for swiotlb commit 29737370120b0570ac52e334cfc4117d68b3d044 Merge: f6a239a a39bb9a Author: Linus Torvalds Date: Fri Jan 29 15:13:48 2016 -0800 Merge branch 'stable/for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/mm Pull cleancache cleanups from Konrad Rzeszutek Wilk: "Simple cleanups" * 'stable/for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/mm: include/linux/cleancache.h: Clean up code cleancache: constify cleancache_ops structure commit f6a239a927905278fe378670d5d880f3aa157bdf Merge: f51d4d7 0d9bacb Author: Linus Torvalds Date: Fri Jan 29 15:05:49 2016 -0800 Merge tag 'iommu-fixes-v4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Five patches queued up: - Two patches for the AMD and Intel IOMMU drivers to fix alias handling and ATS handling. - Fix build error with arm io-pgtable code - Two documentation fixes" * tag 'iommu-fixes-v4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: Update struct iommu_ops comments iommu/vt-d: Fix link to Intel IOMMU Specification iommu/amd: Correct the wrong setting of alias DTE in do_attach iommu/vt-d: Don't skip PCI devices when disabling IOTLB iommu/io-pgtable-arm: Fix io-pgtable-arm build failure commit f51d4d7826d64dee2c421267c7bd44c4d52805c5 Merge: a12883f 60dee3c Author: Linus Torvalds Date: Fri Jan 29 13:20:39 2016 -0800 Merge tag 'hwmon-for-linus-v4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Use bit mask to calculate tdp limit in fam15h_power driver - Black-list Dell Studio XPS 8000 in dell-smm driver * tag 'hwmon-for-linus-v4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (fam15h_power) Add bit masking for tdp_limit hwmon: (dell-smm) Blacklist Dell Studio XPS 8000 commit a12883f0af7a4ccc74381395fab5912784183efe Merge: 13d5699 6344a5c Author: Linus Torvalds Date: Fri Jan 29 13:14:45 2016 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four fixes: one to try to fix our repeated intermittent crashes in suspend/resume, one to correct a regression in the optimal I/O size reporting and a couple for randconfig build failures in the hisi_sas driver" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: SCSI: fix crashes in sd and sr runtime PM sd: Optimal I/O size is in bytes, not sectors hisi_sas: Restrict SCSI_HISI_SAS to arm64 hisi_sas: SCSI_HISI_SAS should depend on HAS_DMA commit 13d569900792fdc3a46dda48d1d2bf46febdc0bc Merge: b545443 d0e5fbb Author: Linus Torvalds Date: Fri Jan 29 12:56:08 2016 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block layer fix from Jens Axboe: "This just contains the fix for the split issue that we had in -rc1. It's been well tested at this point, so let's get it in mainline so we don't have the same split issue for -rc2" * 'for-linus' of git://git.kernel.dk/linux-block: block: fix bio splitting on max sectors commit ad1ac94767aa9d74c6533e33e768a14d2715162f Merge: 0bce39c 75274b3 b331bc2 a3d09c7 993e9fe Author: Rafael J. Wysocki Date: Fri Jan 29 21:45:17 2016 +0100 Merge branches 'pm-cpuidle', 'pm-cpufreq', 'pm-domains' and 'pm-sleep' * pm-cpuidle: cpuidle: coupled: remove unused define cpuidle_coupled_lock cpuidle: fix fallback mechanism for suspend to idle in absence of enter_freeze * pm-cpufreq: cpufreq: cpufreq-dt: avoid uninitialized variable warnings: cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype cpufreq: Use list_is_last() to check last entry of the policy list cpufreq: Fix NULL reference crash while accessing policy->governor_data * pm-domains: PM / Domains: Fix typo in comment PM / Domains: Fix potential deadlock while adding/removing subdomains PM / domains: fix lockdep issue for all subdomains * pm-sleep: PM: APM_EMULATION does not depend on PM commit 0bce39ccb2efab511dd1a08e3a3b4b5e1590ec9f Merge: 92e963f b186b4d 2c3033a Author: Rafael J. Wysocki Date: Fri Jan 29 21:44:53 2016 +0100 Merge branches 'acpi-video' and 'acpi-hotplug' * acpi-video: ACPI: Revert "ACPI / video: Add Dell Inspiron 5737 to the blacklist" * acpi-hotplug: ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot() commit b83ef507d9e2bc25cea40b1fb13ebd1ca7c4969a Author: Kefeng Wang Date: Thu Jan 28 10:27:19 2016 +0800 ptp: ixp46x: use helpers for converting ns to timespec Convert the driver to use ns_to_timespec64() and timespec64_to_ns() instead of open coding the same logic. Signed-off-by: Kefeng Wang Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/ptp/ptp_ixp46x.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b54544322e818c692e360fd37b0eb30ec8b3172f Merge: b943d0b 6639484 Author: Linus Torvalds Date: Fri Jan 29 12:34:39 2016 -0800 Merge tag 'sound-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "There are a few fixes in ALSA core for bugs that have been spotted by fuzzer. Also a temporary workaround for PowerPC (and possibly other) builds with incompatible ioctls was applied to compress API. Other than that, a few trivial fixes and quirks for FireWire BeBoB, USB-audio and HD-audio are found, too" * tag 'sound-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - disable dynamic clock gating on Broxton before reset ALSA: hda - Add new GPU codec ID 0x10de0083 to snd-hda ALSA: dummy: Disable switching timer backend via sysfs ALSA: timer: fix SND_PCM_TIMER Kconfig text ALSA: Add missing dependency on CONFIG_SND_TIMER ALSA: bebob: Use a signed return type for get_formation_index ALSA: usb-audio: Fix TEAC UD-501/UD-503/NT-503 usb delay ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures ALSA: seq: Degrade the error message for too many opens ALSA: seq: Fix incorrect sanity check at snd_seq_oss_synth_cleanup() commit b943d0b9c7c5162d81a1dc7e83315550131c7164 Merge: 704bb81 d8b8eb8 Author: Linus Torvalds Date: Fri Jan 29 12:28:45 2016 -0800 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Summary: - Misc amdgpu/radeon fixes - VC4 build fix - vmwgfx fix - misc rockchip fixes The etnaviv guys had an API feature they wanted in their first release, so I've merged that with their fixes" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (41 commits) drm/vmwgfx: respect 'nomodeset' drm/amdgpu: only move pt bos in LRU list on success drm/radeon: fix DP audio support for APU with DCE4.1 display engine drm/radeon: Add a common function for DFS handling drm/radeon: cleaned up VCO output settings for DP audio drm/amd/powerplay: Update SMU firmware loading for Stoney drm/etnaviv: call correct function when trying to vmap a DMABUF drm/etnaviv: rename etnaviv_gem_vaddr to etnaviv_gem_vmap drm/etnaviv: fix get pages error path in etnaviv_gem_vaddr drm/etnaviv: fix memory leak in IOMMU init path drm/etnaviv: add further minor features and varyings count drm/etnaviv: add helper for comparing model/revision IDs drm/etnaviv: add helper to extract bitfields drm/etnaviv: use defined constants for the chip model drm/etnaviv: update common and state_hi xml.h files drm/etnaviv: ignore VG GPUs with FE2.0 drm/amdgpu: don't init fbdev if we don't have any connectors drm/radeon: only init fbdev if we have connectors drm/radeon: Ensure radeon bo is unreserved in radeon_gem_va_ioctl drm/etnaviv: fix failure path if model is zero ... commit 704bb813c2202f140d6c364a1703b0265473218f Merge: 26cd836 1c1ecf1 Author: Linus Torvalds Date: Fri Jan 29 12:24:05 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security layer fixes from James Morris: "The keys patch fixes a bug which is breaking kerberos, and the seccomp fix addresses a no_new_privs bypass" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: Only apply KEY_FLAG_KEEP to a key if a parent keyring has it set seccomp: always propagate NO_NEW_PRIVS on tsync commit 21603fc45bdef3696f45d80a1c9d730e06b925c5 Author: Jörg Thalheim Date: Wed Jan 27 22:54:06 2016 +0100 tcp: Change reference to experimental CWND RFC. Signed-off-by: Jörg Thalheim Signed-off-by: David S. Miller include/net/tcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de7d244d0a351f27cfef5f51088ea9a64054c948 Author: Nikolay Aleksandrov Date: Wed Jan 27 17:50:43 2016 +0100 macvlan: make operstate and carrier more accurate Currently when a macvlan is being initialized and the lower device is netif_carrier_ok(), the macvlan device doesn't run through rfc2863_policy() and is left with UNKNOWN operstate. Fix it by adding an unconditional linkwatch event for the new macvlan device. Similar fix is already used by the 8021q device (see register_vlan_dev()). Also fix the inconsistent state when the lower device has been down and its carrier was changed (when a device is down NETDEV_CHANGE doesn't get generated). The second issue can be seen f.e. when we have a macvlan on top of a 8021q device which has been down and its real device has been changing carrier states, after setting the 8021q device up, the macvlan device will have the same carrier state as it was before even though the 8021q can now have a different state. Example for case 1: 4: eth2: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 $ ip l add l eth2 macvl0 type macvlan $ ip l set macvl0 up $ ip l sh macvl0 72: macvl0@eth2: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether f6:0b:54:0a:9d:a3 brd ff:ff:ff:ff:ff:ff Example for case 2 (order is important): Prestate: eth2 UP/CARRIER, vlan1 down, vlan1-macvlan down $ ip l set vlan1-macvlan up $ ip l sh vlan1-macvlan 71: vlan1-macvlan@vlan1: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff [ eth2 loses CARRIER before vlan1 has been UP-ed ] $ ip l sh eth2 4: eth2: mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/ether 52:54:00:bf:57:16 brd ff:ff:ff:ff:ff:ff $ ip l sh vlan1-macvlan 71: vlan1-macvlan@vlan1: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff $ ip l set vlan1 up $ ip l sh vlan1 70: vlan1@eth2: mtu 1500 qdisc noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000 link/ether 52:54:00:bf:57:16 brd ff:ff:ff:ff:ff:ff $ ip l sh vlan1-macvlan 71: vlan1-macvlan@vlan1: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff vlan1-macvlan is still UP, still has carrier and is still in the same operstate as before. After the patch in case 1 macvl0 has state UP as it should and in case 2 vlan1-macvlan has state LOWERLAYERDOWN again as it should. Note that while the lower macvlan device is down their carrier and thus operstate can go out of sync but that will be fixed once the lower device goes up again. This behaviour seems to have been present since beginning of git history. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller drivers/net/macvlan.c | 2 ++ 1 file changed, 2 insertions(+) commit 4d5cfcba2f6ec494d8810b9e3c0a7b06255c8067 Author: Parthasarathy Bhuvaragan Date: Wed Jan 27 11:35:59 2016 +0100 tipc: fix connection abort during subscription cancel In 'commit 7fe8097cef5f ("tipc: fix nullpointer bug when subscribing to events")', we terminate the connection if the subscription creation fails. In the same commit, the subscription creation result was based on the value of the subscription pointer (set in the function) instead of the return code. Unfortunately, the same function tipc_subscrp_create() handles subscription cancel request. For a subscription cancellation request, the subscription pointer cannot be set. Thus if a subscriber has several subscriptions and cancels any of them, the connection is terminated. In this commit, we terminate the connection based on the return value of tipc_subscrp_create(). Fixes: commit 7fe8097cef5f ("tipc: fix nullpointer bug when subscribing to events") Reviewed-by: Jon Maloy Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/subscr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 286af315d3f153595ce718fb1e442891f14ed5c0 Author: Kefeng Wang Date: Wed Jan 27 17:34:37 2016 +0800 net: cavium: liquidio: use helpers ns_to_timespec64() Convert the driver to use ns_to_timespec64() to keep consistency with timespec64_to_ns() instead of open coding the same logic. Signed-off-by: Kefeng Wang Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 63e51b6a24f1bee5363056b7aee3a468b12c546b Author: Eric Dumazet Date: Tue Jan 26 16:59:42 2016 -0800 ipv4: early demux should be aware of fragments We should not assume a valid protocol header is present, as this is not the case for IPv4 fragments. Lets avoid extra cache line misses and potential bugs if we actually find a socket and incorrectly uses its dst. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eac2d86d60449bc9852f94853cc156897fe9e893 Author: Marc Gonzalez Date: Fri Jan 29 15:07:22 2016 +0100 clk: tango4: rename ARCH_TANGOX to ARCH_TANGO Requested by arm-soc maintainer Kevin Hilman in v9 review. http://article.gmane.org/gmane.linux.ports.arm.kernel/456331 Signed-off-by: Marc Gonzalez Signed-off-by: Stephen Boyd drivers/clk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d22eb66b3cc3d7d486bc9fa8c6fdbce197eede5f Author: Axel Lin Date: Fri Dec 4 14:51:36 2015 +0800 clk: scpi: Fix checking return value of platform_device_register_simple() platform_device_register_simple() returns ERR_PTR on error. Signed-off-by: Axel Lin Signed-off-by: Stephen Boyd drivers/clk/clk-scpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ce133ec89027dc2dff6d0784564da27f1c21fdc Author: Stephen Boyd Date: Fri Jan 8 09:35:58 2016 -0800 clk: mvebu: Mark ioremapped memory as __iomem Silence the following sparse warning drivers/clk/mvebu/dove-divider.c:252:14: warning: incorrect type in assignment (different address spaces) drivers/clk/mvebu/dove-divider.c:252:14: expected void *base drivers/clk/mvebu/dove-divider.c:252:14: got void [noderef] * drivers/clk/mvebu/dove-divider.c:256:13: warning: incorrect type in argument 2 (different address spaces) drivers/clk/mvebu/dove-divider.c:256:13: expected void [noderef] *base drivers/clk/mvebu/dove-divider.c:256:13: got void *base drivers/clk/mvebu/dove-divider.c:257:25: warning: incorrect type in argument 1 (different address spaces) drivers/clk/mvebu/dove-divider.c:257:25: expected void volatile [noderef] *iomem_cookie drivers/clk/mvebu/dove-divider.c:257:25: got void *base Cc: Russell King Signed-off-by: Stephen Boyd drivers/clk/mvebu/dove-divider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23d11a58a9a60dcb52c8fc6494efce908b24c295 Author: Tejun Heo Date: Fri Jan 29 05:59:46 2016 -0500 workqueue: skip flush dependency checks for legacy workqueues fca839c00a12 ("workqueue: warn if memory reclaim tries to flush !WQ_MEM_RECLAIM workqueue") implemented flush dependency warning which triggers if a PF_MEMALLOC task or WQ_MEM_RECLAIM workqueue tries to flush a !WQ_MEM_RECLAIM workquee. This assumes that workqueues marked with WQ_MEM_RECLAIM sit in memory reclaim path and making it depend on something which may need more memory to make forward progress can lead to deadlocks. Unfortunately, workqueues created with the legacy create*_workqueue() interface always have WQ_MEM_RECLAIM regardless of whether they are depended upon memory reclaim or not. These spurious WQ_MEM_RECLAIM markings cause spurious triggering of the flush dependency checks. WARNING: CPU: 0 PID: 6 at kernel/workqueue.c:2361 check_flush_dependency+0x138/0x144() workqueue: WQ_MEM_RECLAIM deferwq:deferred_probe_work_func is flushing !WQ_MEM_RECLAIM events:lru_add_drain_per_cpu ... Workqueue: deferwq deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x94/0xd4) [] (dump_stack) from [] (warn_slowpath_common+0x80/0xb0) [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [] (warn_slowpath_fmt) from [] (check_flush_dependency+0x138/0x144) [] (check_flush_dependency) from [] (flush_work+0x50/0x15c) [] (flush_work) from [] (lru_add_drain_all+0x130/0x180) [] (lru_add_drain_all) from [] (migrate_prep+0x8/0x10) [] (migrate_prep) from [] (alloc_contig_range+0xd8/0x338) [] (alloc_contig_range) from [] (cma_alloc+0xe0/0x1ac) [] (cma_alloc) from [] (__alloc_from_contiguous+0x38/0xd8) [] (__alloc_from_contiguous) from [] (__dma_alloc+0x240/0x278) [] (__dma_alloc) from [] (arm_dma_alloc+0x54/0x5c) [] (arm_dma_alloc) from [] (dmam_alloc_coherent+0xc0/0xec) [] (dmam_alloc_coherent) from [] (ahci_port_start+0x150/0x1dc) [] (ahci_port_start) from [] (ata_host_start.part.3+0xc8/0x1c8) [] (ata_host_start.part.3) from [] (ata_host_activate+0x50/0x148) [] (ata_host_activate) from [] (ahci_host_activate+0x44/0x114) [] (ahci_host_activate) from [] (ahci_platform_init_host+0x1d8/0x3c8) [] (ahci_platform_init_host) from [] (tegra_ahci_probe+0x448/0x4e8) [] (tegra_ahci_probe) from [] (platform_drv_probe+0x50/0xac) [] (platform_drv_probe) from [] (driver_probe_device+0x214/0x2c0) [] (driver_probe_device) from [] (bus_for_each_drv+0x60/0x94) [] (bus_for_each_drv) from [] (__device_attach+0xb0/0x114) [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [] (bus_probe_device) from [] (deferred_probe_work_func+0x68/0x98) [] (deferred_probe_work_func) from [] (process_one_work+0x120/0x3f8) [] (process_one_work) from [] (worker_thread+0x38/0x55c) [] (worker_thread) from [] (kthread+0xdc/0xf4) [] (kthread) from [] (ret_from_fork+0x14/0x3c) Fix it by marking workqueues created via create*_workqueue() with __WQ_LEGACY and disabling flush dependency checks on them. Signed-off-by: Tejun Heo Reported-and-tested-by: Thierry Reding Link: http://lkml.kernel.org/g/20160126173843.GA11115@ulmo.nvidia.com Fixes: fca839c00a12 ("workqueue: warn if memory reclaim tries to flush !WQ_MEM_RECLAIM workqueue") include/linux/workqueue.h | 9 +++++---- kernel/workqueue.c | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) commit 6ccd83714a009ee301b50c15f6c3a5dc1f30164c Author: Steven Rostedt Date: Fri Jan 29 10:22:41 2016 -0500 tracing/stacktrace: Show entire trace if passed in function not found When a max stack trace is discovered, the stack dump is saved. In order to not record the overhead of the stack tracer, the ip of the traced function is looked for within the dump. The trace is started from the location of that function. But if for some reason the ip is not found, the entire stack trace is then truncated. That's not very useful. Instead, print everything if the ip of the traced function is not found within the trace. This issue showed up on s390. Link: http://lkml.kernel.org/r/20160129102241.1b3c9c04@gandalf.local.home Fixes: 72ac426a5bb0 ("tracing: Clean up stack tracing and fix fentry updates") Cc: stable@vger.kernel.org # v4.3+ Reported-by: Heiko Carstens Tested-by: Heiko Carstens Signed-off-by: Steven Rostedt kernel/trace/trace_stack.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f1d51595a2a54d725cd6a21dd54508335a14ab90 Author: Insu Yun Date: Fri Jan 29 10:56:11 2016 -0500 ALSA: emu10k1: correctly handling failed thread creation Since kthread_create can be failed, it needs to check whether error occurred and return error code. Signed-off-by: Insu Yun Signed-off-by: Takashi Iwai sound/pci/emu10k1/emu10k1_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1b3c993a699bed282e47c3f7c49d539c331dae04 Author: Lev Lybin Date: Fri Jan 29 22:55:11 2016 +0700 ALSA: usb-audio: Add quirk for Microsoft LifeCam HD-6000 Microsoft LifeCam HD-6000 (045e:076f) requires the similar quirk for avoiding the stall due to the invalid sample rate reads. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111491 Signed-off-by: Lev Lybin Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit e410e34fad913dd568ec28d2a9949694324c14db Author: Chris Mason Date: Fri Jan 29 08:19:37 2016 -0800 Revert "btrfs: synchronize incompat feature bits with sysfs files" This reverts commit 14e46e04958df740c6c6a94849f176159a333f13. This ends up doing sysfs operations from deep in balance (where we should be GFP_NOFS) and under heavy balance load, we're making races against sysfs internals. Revert it for now while we figure things out. Signed-off-by: Chris Mason fs/btrfs/free-space-tree.c | 7 ------- fs/btrfs/ioctl.c | 4 ---- fs/btrfs/super.c | 4 ---- fs/btrfs/volumes.c | 2 -- 4 files changed, 17 deletions(-) commit 6c55d9b98335f7f6bd5f061866ff1633401f3a44 Author: Mika Westerberg Date: Fri Jan 29 16:49:47 2016 +0200 serial: 8250_pci: Add Intel Broadwell ports Some recent (early 2015) macbooks have Intel Broadwell where LPSS UARTs are PCI enumerated instead of ACPI. The LPSS UART block is pretty much same as used on Intel Baytrail so we can reuse the existing Baytrail setup code. Add both Broadwell LPSS UART ports to the list of supported devices. Signed-off-by: Leif Liddy Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit f39ea2690bd61efec97622c48323f40ed6e16317 Author: Chris Bainbridge Date: Wed Jan 27 15:46:18 2016 +0000 mac80211: fix use of uninitialised values in RX aggregation Use kzalloc instead of kmalloc for struct tid_ampdu_rx to initialize the "removed" field (all others are initialized manually). That fixes: UBSAN: Undefined behaviour in net/mac80211/rx.c:932:29 load of value 2 is not a valid value for type '_Bool' CPU: 3 PID: 1134 Comm: kworker/u16:7 Not tainted 4.5.0-rc1+ #265 Workqueue: phy0 rt2x00usb_work_rxdone 0000000000000004 ffff880254a7ba50 ffffffff8181d866 0000000000000007 ffff880254a7ba78 ffff880254a7ba68 ffffffff8188422d ffffffff8379b500 ffff880254a7bab8 ffffffff81884747 0000000000000202 0000000348620032 Call Trace: [] dump_stack+0x45/0x5f [] ubsan_epilogue+0xd/0x40 [] __ubsan_handle_load_invalid_value+0x67/0x70 [] ieee80211_sta_reorder_release.isra.16+0x5ed/0x730 [] ieee80211_prepare_and_rx_handle+0xd04/0x1c00 [] __ieee80211_rx_handle_packet+0x1f3/0x750 [] ieee80211_rx_napi+0x447/0x990 While at it, convert to use sizeof(*tid_agg_rx) instead. Fixes: 788211d81bfdf ("mac80211: fix RX A-MPDU session reorder timer deletion") Cc: stable@vger.kernel.org Signed-off-by: Chris Bainbridge [reword commit message, use sizeof(*tid_agg_rx)] Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb150b9d23be6ee7f3a0fff29784f1c5b5ac514d Author: Johannes Berg Date: Wed Jan 27 13:29:34 2016 +0100 cfg80211/wext: fix message ordering Since cfg80211 frequently takes actions from its netdev notifier call, wireless extensions messages could still be ordered badly since the wext netdev notifier, since wext is built into the kernel, runs before the cfg80211 netdev notifier. For example, the following can happen: 5: wlan1: mtu 1500 qdisc mq state DOWN group default link/ether 02:00:00:00:01:00 brd ff:ff:ff:ff:ff:ff 5: wlan1: link/ether when setting the interface down causes the wext message. To also fix this, export the wireless_nlevent_flush() function and also call it from the cfg80211 notifier. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg include/net/iw_handler.h | 6 ++++++ net/wireless/core.c | 2 ++ net/wireless/wext-core.c | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) commit 8bf862739a7786ae72409220914df960a0aa80d8 Author: Johannes Berg Date: Wed Jan 27 12:37:52 2016 +0100 wext: fix message delay/ordering Beniamino reported that he was getting an RTM_NEWLINK message for a given interface, after the RTM_DELLINK for it. It turns out that the message is a wireless extensions message, which was sent because the interface had been connected and disconnection while it was deleted caused a wext message. For its netlink messages, wext uses RTM_NEWLINK, but the message is without all the regular rtnetlink attributes, so "ip monitor link" prints just rudimentary information: 5: wlan1: mtu 1500 qdisc mq state DOWN group default link/ether 02:00:00:00:01:00 brd ff:ff:ff:ff:ff:ff Deleted 5: wlan1: mtu 1500 qdisc noop state DOWN group default link/ether 02:00:00:00:01:00 brd ff:ff:ff:ff:ff:ff 5: wlan1: link/ether (from my hwsim reproduction) This can cause userspace to get confused since it doesn't expect an RTM_NEWLINK message after RTM_DELLINK. The reason for this is that wext schedules a worker to send out the messages, and the scheduling delay can cause the messages to get out to userspace in different order. To fix this, have wext register a netdevice notifier and flush out any pending messages when netdevice state changes. This fixes any ordering whenever the original message wasn't sent by a notifier itself. Cc: stable@vger.kernel.org Reported-by: Beniamino Galvani Signed-off-by: Johannes Berg net/wireless/wext-core.c | 51 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) commit ad32152eb26043d165eed9406cb9e2f7011f6b10 Author: Alex Deucher Date: Thu Jan 28 16:27:41 2016 -0500 drm/amdgpu: no need to load MC firmware on fiji Vbios does this for us on asic_init. Reviewed-by: Ken Wang >Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ad678b4ccd41aa51cf5f142c0e8cffe9d61fc2bf Author: Jurgen Kramer Date: Fri Jan 29 14:59:25 2016 +0100 ALSA: usb-audio: Add native DSD support for PS Audio NuWave DAC This patch adds native DSD support for the PS Audio NuWave DAC. Signed-off-by: Jurgen Kramer Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 5327d6ba975042fd3da50ac6e94d1e9551ebeaec Author: Jurgen Kramer Date: Fri Jan 29 14:49:55 2016 +0100 ALSA: usb-audio: Fix OPPO HA-1 vendor ID In my patch adding native DSD support for the Oppo HA-1, the wrong vendor ID got through. This patch fixes the vendor ID and aligns the comment. Fixes: a4eae3a506ea ('ALSA: usb: Add native DSD support for Oppo HA-1') Signed-off-by: Jurgen Kramer Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 742563777e8da62197d6cb4b99f4027f59454735 Author: Matt Fleming Date: Fri Jan 29 11:36:10 2016 +0000 x86/mm/pat: Avoid truncation when converting cpa->numpages to address There are a couple of nasty truncation bugs lurking in the pageattr code that can be triggered when mapping EFI regions, e.g. when we pass a cpa->pgd pointer. Because cpa->numpages is a 32-bit value, shifting left by PAGE_SHIFT will truncate the resultant address to 32-bits. Viorel-Cătălin managed to trigger this bug on his Dell machine that provides a ~5GB EFI region which requires 1236992 pages to be mapped. When calling populate_pud() the end of the region gets calculated incorrectly in the following buggy expression, end = start + (cpa->numpages << PAGE_SHIFT); And only 188416 pages are mapped. Next, populate_pud() gets invoked for a second time because of the loop in __change_page_attr_set_clr(), only this time no pages get mapped because shifting the remaining number of pages (1048576) by PAGE_SHIFT is zero. At which point the loop in __change_page_attr_set_clr() spins forever because we fail to map progress. Hitting this bug depends very much on the virtual address we pick to map the large region at and how many pages we map on the initial run through the loop. This explains why this issue was only recently hit with the introduction of commit a5caa209ba9c ("x86/efi: Fix boot crash by mapping EFI memmap entries bottom-up at runtime, instead of top-down") It's interesting to note that safe uses of cpa->numpages do exist in the pageattr code. If instead of shifting ->numpages we multiply by PAGE_SIZE, no truncation occurs because PAGE_SIZE is a UL value, and so the result is unsigned long. To avoid surprises when users try to convert very large cpa->numpages values to addresses, change the data type from 'int' to 'unsigned long', thereby making it suitable for shifting by PAGE_SHIFT without any type casting. The alternative would be to make liberal use of casting, but that is far more likely to cause problems in the future when someone adds more code and fails to cast properly; this bug was difficult enough to track down in the first place. Reported-and-tested-by: Viorel-Cătălin Răpițeanu Acked-by: Borislav Petkov Cc: Sai Praneeth Prakhya Cc: Signed-off-by: Matt Fleming Link: https://bugzilla.kernel.org/show_bug.cgi?id=110131 Link: http://lkml.kernel.org/r/1454067370-10374-1-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Thomas Gleixner arch/x86/mm/pageattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6639484ddaf6707b41082c9fa9ca9af342df6402 Author: Libin Yang Date: Fri Jan 29 20:39:09 2016 +0800 ALSA: hda - disable dynamic clock gating on Broxton before reset On Broxton, to make sure the reset controller works properly, MISCBDCGE bit (bit 6) in CGCTL (0x48) of PCI configuration space need be cleared before reset and set back to 1 after reset. Otherwise, it may prevent the CORB/RIRB logic from being reset. Signed-off-by: Libin Yang Cc: # v4.4+ Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b82fe6ddd782f847332aeabf8cab980852f61629 Author: Fabio Estevam Date: Tue Jan 19 11:10:57 2016 -0200 video: fbdev: imxfb: Provide a reset mechanism Currently when we boot the kernel on a mx25pdk the LCDC controller does not show the Linux logo on boot. This problem is well explained by Sascha Hauer: "Unfortunately this LCD controller does not have an enable bit. The controller starts directly when the clocks are enabled. If the clocks are enabled when the controller is not yet programmed with proper register values then it just goes into some undefined state. What I suspect is that the clocks already were enabled before driver probe, presumably by the bootloader, so the controller is already in undefined state when entering Linux. Now by dis/enabling the ipg clock you effectively reset the controller. Since you have programmed it with valid register values in the mean time it starts working after this reset." So do as suggested and force a reset of the LCDC hardware by enabling and disabling the IPG clock. With this change the Linux logo can be seen on boot on a mx25pdk. Signed-off-by: Fabio Estevam Signed-off-by: Tomi Valkeinen drivers/video/fbdev/imxfb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit a588afc920bc50e894f6ae2874c4281c795e0979 Author: Tejun Heo Date: Fri Jan 29 07:06:53 2016 -0500 libata-sff: use WARN instead of BUG on illegal host state machine state ata_sff_hsm_move() triggers BUG if it sees a host state machine state that it dind't expect. The risk for data corruption when the condition occurs is low as it's highly unlikely that it would lead to spurious completion of commands. The BUG occasionally triggered for subtle race conditions in the driver. Let's downgrade it to WARN so that it doesn't kill the machine unnecessarily. Signed-off-by: Tejun Heo Cc: Dmitry Vyukov drivers/ata/libata-sff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c3a2da26e6216033456c1d5375cd1d2629d1fd09 Author: Arnd Bergmann Date: Mon Jan 25 16:03:01 2016 +0100 fbdev: mmp: print IRQ resource using %pR format string resource_size_t cannot be printed using the %x format string when we it is defined as u64: drivers/video/fbdev/mmp/hw/mmp_ctrl.c: In function 'mmphw_probe': drivers/video/fbdev/mmp/hw/mmp_ctrl.c:506:22: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] dev_err(ctrl->dev, "%s: res %x - %x map failed\n", __func__, ^ drivers/video/fbdev/mmp/hw/mmp_ctrl.c:506:22: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] This changes the format string to %pR, which is interpreted by the printk implementation to pretty-print a resource structure. Signed-off-by: Arnd Bergmann Signed-off-by: Tomi Valkeinen drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ef88ee4e2c98c11dab56b2845ade9270acb8e68b Author: Arnd Bergmann Date: Mon Jan 25 16:05:18 2016 +0100 fbdev: da8xx-fb: remove incorrect type cast The probe function correct passes a dma_addr_t pointer into dma_alloc_coherent(), but has a cast to resource_size_t, which might be different from dma_addr_t: drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe': drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types] This removes the cast, which avoids the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Tomi Valkeinen drivers/video/fbdev/da8xx-fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b54729b6cea7d1f46b1ed70cb7065c6bdefaa780 Author: Arnd Bergmann Date: Mon Jan 25 16:04:03 2016 +0100 fbdev: s6e8ax0: avoid unused function warnings The s6e8ax0 suspend/resume functions are hidden inside of an #ifdef when CONFIG_PM is set to avoid unused function warnings, but they call some other functions that nothing else calls, and we get warnings about those: drivers/video/fbdev/exynos/s6e8ax0.c:449:13: error: 's6e8ax0_sleep_in' defined but not used [-Werror=unused-function] drivers/video/fbdev/exynos/s6e8ax0.c:485:13: error: 's6e8ax0_display_off' defined but not used [-Werror=unused-function] This marks the PM functions as __maybe_unused so the compiler can silently drop them when they are not referenced. Signed-off-by: Arnd Bergmann Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tomi Valkeinen drivers/video/fbdev/exynos/s6e8ax0.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 0d9bacb6c8265e7aa75ac28ae9b5d7748065942f Author: Magnus Damm Date: Tue Jan 19 14:28:48 2016 +0900 iommu: Update struct iommu_ops comments Update the comments around struct iommu_ops to match current state and fix a few typos while at it. Signed-off-by: Magnus Damm Signed-off-by: Joerg Roedel include/linux/iommu.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 87df1b2a2103b9019433da99be43a472c16647ab Author: Andrea Merello Date: Tue Jan 26 15:48:04 2016 +0100 ocfb: fix tgdel and tvdel timing parameters According to the ocfb documentation: Fix tgdel HW param should be left margin, not right. Fix tvdel HW param should upper margin, not lower. This seems to fix lock issues on certain monitors (tested on a slightly customized IP, but the FPGA guy said that it should be the same wrt this changes). Signed-off-by: Andrea Merello Acked-by: Stefan Kristiansson Signed-off-by: Tomi Valkeinen drivers/video/fbdev/ocfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f3cdb380f429af47ad6635568c22ba28df83a48 Author: Michael S. Tsirkin Date: Tue Jan 26 18:33:04 2016 +0200 iommu/vt-d: Fix link to Intel IOMMU Specification Looks like the VT-d spec at intel.com got moved. Update the link. Signed-off-by: Michael S. Tsirkin Signed-off-by: Joerg Roedel Documentation/Intel-IOMMU.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b1a12d29109234d2b9718d04d4d404b7da4e794 Author: Baoquan He Date: Wed Jan 20 22:01:19 2016 +0800 iommu/amd: Correct the wrong setting of alias DTE in do_attach In below commit alias DTE is set when its peripheral is setting DTE. However there's a code bug here to wrongly set the alias DTE, correct it in this patch. commit e25bfb56ea7f046b71414e02f80f620deb5c6362 Author: Joerg Roedel Date: Tue Oct 20 17:33:38 2015 +0200 iommu/amd: Set alias DTE in do_attach/do_detach Signed-off-by: Baoquan He Tested-by: Mark Hounschell Cc: stable@vger.kernel.org # v4.4 Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d0cb15fccd1db9dac0c964b2ccf10874e69f5b8 Author: Vineet Gupta Date: Fri Jan 29 16:47:44 2016 +0530 ARCv2: Check for LL-SC livelock only if LLSC is enabled Signed-off-by: Vineet Gupta arch/arc/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) commit b89bd1f4fbaecaa842588a034f8a44f4a84597e4 Author: Vineet Gupta Date: Fri Jan 22 15:20:18 2016 +0530 ARC: shrink cpuinfo by not saving full timer BCR Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 3 +-- arch/arc/kernel/setup.c | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) commit d584f0fb041d86b9605fae1f0ed9e268f217daa9 Author: Vineet Gupta Date: Fri Jan 22 14:27:50 2016 +0530 ARCv2: clocksource: Rename GRTC -> GFRC ... ... it is now called Global Free Running Counter Signed-off-by: Vineet Gupta arch/arc/Kconfig | 2 +- arch/arc/configs/vdk_hs38_smp_defconfig | 2 +- arch/arc/include/asm/mcip.h | 4 ++-- arch/arc/kernel/mcip.c | 10 +++++----- arch/arc/kernel/time.c | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) commit da972fb13bc5a1baad450c11f9182e4cd0a091f6 Author: Jeremy McNicoll Date: Thu Jan 14 21:33:06 2016 -0800 iommu/vt-d: Don't skip PCI devices when disabling IOTLB Fix a simple typo when disabling IOTLB on PCI(e) devices. Fixes: b16d0cb9e2fc ("iommu/vt-d: Always enable PASID/PRI PCI capabilities before ATS") Cc: stable@vger.kernel.org # v4.4 Signed-off-by: Jeremy McNicoll Reviewed-by: Alex Williamson Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5b635203032462603c503ecce91a7021c1ad44a Author: Oleksij Rempel Date: Fri Jan 29 10:57:53 2016 +0100 irqchip/mxs: Add missing set_handle_irq() The rework of the driver missed to move the call to set_handle_irq() into asm9260_of_init(). As a consequence no interrupt entry point is installed and no interrupts are delivered Solution is simple: Install the interrupt entry handler. Fixes: 7e4ac676ee ("irqchip/mxs: Add Alphascale ASM9260 support") Signed-off-by: Oleksij Rempel Cc: kernel@pengutronix.de Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1454061473-24957-1-git-send-email-linux@rempel-privat.de Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mxs.c | 1 + 1 file changed, 1 insertion(+) commit 8f6aff9858c45525345b92b2a88c2af776c64340 Author: Lada Trimasova Date: Wed Jan 27 11:10:32 2016 +0000 iommu/io-pgtable-arm: Fix io-pgtable-arm build failure Trying to build a kernel for ARC with both options CONFIG_COMPILE_TEST and CONFIG_IOMMU_IO_PGTABLE_LPAE enabled (e.g. as a result of "make allyesconfig") results in the following build failure: | CC drivers/iommu/io-pgtable-arm.o | linux/drivers/iommu/io-pgtable-arm.c: In | function ‘__arm_lpae_alloc_pages’: | linux/drivers/iommu/io-pgtable-arm.c:221:3: | error: implicit declaration of function ‘dma_map_single’ | [-Werror=implicit-function-declaration] | dma = dma_map_single(dev, pages, size, DMA_TO_DEVICE); | ^ | linux/drivers/iommu/io-pgtable-arm.c:221:42: | error: ‘DMA_TO_DEVICE’ undeclared (first use in this function) | dma = dma_map_single(dev, pages, size, DMA_TO_DEVICE); | ^ Since IOMMU_IO_PGTABLE_LPAE depends on DMA API, io-pgtable-arm.c should include linux/dma-mapping.h. This fixes the reported failure. Cc: Alexey Brodkin Cc: Vineet Gupta Cc: Joerg Roedel Signed-off-by: Lada Trimasova Signed-off-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/io-pgtable-arm.c | 1 + 1 file changed, 1 insertion(+) commit 9a2ddda572a002633a64b1ae5f4bc49cfcbf495f Author: W. Trevor King Date: Wed Jan 27 13:01:52 2016 -0800 Documentation: cgroup: Fix 'cgroup-legacy' -> 'cgroup-v1' This should have happened in 6255c46f (cgroup: rename cgroup documentations, 2016-01-11). Signed-off-by: W. Trevor King Signed-off-by: Tejun Heo Documentation/cgroup-v2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c84f6b8bce8723d8232547d6a3a3ae0725511adb Author: Tomi Valkeinen Date: Fri Jan 29 12:08:24 2016 +0200 ARM: omap2plus_defconfig: update display configs omapfb and omapdrm were recently made independent of each other, and this required Kconfig option changes. This patch changes the omap2plus_defconfig to enable display similarly as before: omapfb and panel & encoder drivers as modules. Signed-off-by: Tomi Valkeinen Acked-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit cff10ce7b4f02718ffd25e3914e60559f5ef6ca0 Author: Johan Hedberg Date: Tue Jan 26 14:31:31 2016 -0500 Bluetooth: Fix incorrect removing of IRKs The commit cad20c278085d893ebd616cd20c0747a8e9d53c7 was supposed to fix handling of devices first using public addresses and then switching to RPAs after pairing. Unfortunately it missed a couple of key places in the code. 1. When evaluating which devices should be removed from the existing white list we also need to consider whether we have an IRK for them or not, i.e. a call to hci_find_irk_by_addr() is needed. 2. In smp_notify_keys() we should not be requiring the knowledge of the RPA, but should simply keep the IRK around if the other conditions require it. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org # 4.4+ net/bluetooth/hci_request.c | 28 ++++++++++++++++++---------- net/bluetooth/smp.c | 16 ---------------- 2 files changed, 18 insertions(+), 26 deletions(-) commit a2342c5fe5f2810b8ef6a0826bd584aa709dd2c6 Author: Johan Hedberg Date: Tue Jan 26 17:19:11 2016 -0500 Bluetooth: L2CAP: Fix setting chan src info before adding PSM/CID At least the l2cap_add_psm() routine depends on the source address type being properly set to know what auto-allocation ranges to use, so the assignment to l2cap_chan needs to happen before this. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann net/bluetooth/l2cap_sock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 92594a51120ebc6c2f556204fc73568c8f7cb0f4 Author: Johan Hedberg Date: Tue Jan 26 17:19:10 2016 -0500 Bluetooth: L2CAP: Fix auto-allocating LE PSM values The LE dynamic PSM range is different from BR/EDR (0x0080 - 0x00ff) and doesn't have requirements relating to parity, so separate checks are needed. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann net/bluetooth/l2cap_core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 114f9f1e038eb23935c20fb54f49f07caaa0546d Author: Johan Hedberg Date: Tue Jan 26 17:19:09 2016 -0500 Bluetooth: L2CAP: Introduce proper defines for PSM ranges Having proper defines makes the code a bit readable, it also avoids duplicating hard-coded values since these are also needed when auto-allocating PSM values (in a subsequent patch). Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann include/net/bluetooth/l2cap.h | 6 ++++++ net/bluetooth/l2cap_sock.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 52795f6fdeb8a2b98373108ac2838c674bb2cbc4 Author: Jean Delvare Date: Wed Jan 27 14:40:33 2016 +0100 i2c: piix4: don't regress on bus names The I2C bus names are supposed to be stable as they can be used by userspace to uniquely identify a specific I2C bus. So restore the original names for all legacy (pre-SB800) devices. For SB800 devices and later, improve the names. "SDA" refers to the serial data pin of each SMBus port, it's an implementation detail the user doesn't need to know. Use "port" instead, which is easier to understand. Signed-off-by: Jean Delvare Reviewed-by: Mika Westerberg Tested-by: Christian Fetzer Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-piix4.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 5fa7c8ec57f70a7b5c6fe269fa9c51b9e465989c Author: Peter Zijlstra Date: Tue Jan 26 15:25:15 2016 +0100 perf: Remove/simplify lockdep annotation Now that the perf_event_ctx_lock_nested() call has moved from put_event() into perf_event_release_kernel() the first reason is no longer valid as that can no longer happen. The second reason seems to have been invalidated when Al Viro made fput() unconditionally async in the following commit: 4a9d4b024a31 ("switch fput to task_work_add") such that munmap()->fput()->release()->perf_release() would no longer happen. Therefore, remove the annotation. This should increase the efficiency of lockdep coverage of perf locking. Suggested-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit c6e5b73242d2d9172ea880483bc4ba7ffca0cfb2 Author: Peter Zijlstra Date: Fri Jan 15 16:07:41 2016 +0200 perf: Synchronously clean up child events The orphan cleanup workqueue doesn't always catch orphans, for example, if they never schedule after they are orphaned. IOW, the event leak is still very real. It also wouldn't work for kernel counters. Doing it synchonously is a little hairy due to lock inversion issues, but is made to work. Patch based on work by Alexander Shishkin. Suggested-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Signed-off-by: Ingo Molnar include/linux/perf_event.h | 3 - kernel/events/core.c | 174 ++++++++++++++++++++++----------------------- 2 files changed, 84 insertions(+), 93 deletions(-) commit 60beda849343494b2a598b927630bbe293c1cc6e Author: Peter Zijlstra Date: Tue Jan 26 14:55:02 2016 +0100 perf: Untangle 'owner' confusion There are two concepts of owner wrt an event and they are conflated: - event::owner / event::owner_list, used by prctl(.option = PR_TASK_PERF_EVENTS_{EN,DIS}ABLE). - the 'owner' of the event object, typically the file descriptor. Currently these two concepts are conflated, which gives trouble with scm_rights passing of file descriptors. Passing the event and then closing the creating task would render the event 'orphan' and would have it cleared out. Unlikely what is expectd. This patch untangles these two concepts by using PERF_EVENT_STATE_EXIT to denote the second type. Reported-by: Alexei Starovoitov Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 45a0e07abf4933490a2d2f81b1a31fe267bd3561 Author: Peter Zijlstra Date: Tue Jan 26 13:09:48 2016 +0100 perf: Add flags argument to perf_remove_from_context() In preparation to adding more options, convert the boolean argument into a flags word. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 8ba289b8d4e4dbd1f971fbf0d2085e4776a4ba25 Author: Peter Zijlstra Date: Tue Jan 26 13:06:56 2016 +0100 perf: Clean up sync_child_event() sync_child_event() has outgrown its purpose, it does far too much. Bring it back to its named purpose. Rename __perf_event_exit_task() to perf_event_exit_event() to better reflect what it does and move the event->state assignment under the ctx->lock, like state changes ought to be. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 81 +++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 42 deletions(-) commit f47c02c0c8403963fbb8c3484e285727305d0f73 Author: Peter Zijlstra Date: Tue Jan 26 12:30:14 2016 +0100 perf: Robustify event->owner usage and SMP ordering Use smp_store_release() to clear event->owner and lockless_dereference() to observe it. Further use READ_ONCE() for all lockless reads. This changes perf_remove_from_owner() to leave event->owner cleared. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6e801e016917989ab8a7ddfc4229a15a5621622a Author: Peter Zijlstra Date: Tue Jan 26 12:17:08 2016 +0100 perf: Fix STATE_EXIT usage We should never attempt to enable a STATE_EXIT event. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 07c4a776135ea6d808ea19aabeb51de6b8648402 Author: Peter Zijlstra Date: Tue Jan 26 12:15:37 2016 +0100 perf: Update locking order Update the locking order to note that ctx::lock nests inside of child_mutex, as per: perf_ioctl(): ctx::mutex -> perf_event_for_each(): event::child_mutex -> _perf_event_enable(): ctx::lock Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0733e695b83a9c31f779e41dcaec8ef924716b5 Author: Peter Zijlstra Date: Tue Jan 26 12:14:40 2016 +0100 perf: Remove __free_event() There is but a single caller, remove the function - we already have _free_event(), the extra indirection is nonsensical.. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) commit e03e7ee34fdd1c3ef494949a75cb8c61c7265fa9 Author: Alexei Starovoitov Date: Mon Jan 25 20:59:49 2016 -0800 perf/bpf: Convert perf_event_array to use struct file Robustify refcounting. Signed-off-by: Alexei Starovoitov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Wang Nan Cc: vince@deater.net Link: http://lkml.kernel.org/r/20160126045947.GA40151@ast-mbp.thefacebook.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 4 ++-- kernel/bpf/arraymap.c | 21 +++++++++++---------- kernel/events/core.c | 21 ++++++++++----------- kernel/trace/bpf_trace.c | 14 ++++++++++---- 4 files changed, 33 insertions(+), 27 deletions(-) commit 828b6f0e26170938d617e99a17177453be4d77a3 Author: Peter Zijlstra Date: Wed Jan 27 21:59:04 2016 +0100 perf: Fix NULL deref Dan reported: 1229 if (ctx->task == TASK_TOMBSTONE || 1230 !atomic_inc_not_zero(&ctx->refcount)) { 1231 raw_spin_unlock(&ctx->lock); 1232 ctx = NULL; ^^^^^^^^^^ ctx is NULL. 1233 } 1234 1235 WARN_ON_ONCE(ctx->task != task); ^^^^^^^^^^^^^^^^^ The patch adds a NULL dereference. Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 63b6da39bb38 ("perf: Fix perf_event_exit_task() race") Signed-off-by: Ingo Molnar kernel/events/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f04b8536f0c94f8999b65cd1c6c7523116a00ae Author: Peter Zijlstra Date: Wed Jan 27 23:31:09 2016 +0100 perf/x86: De-obfuscate code Get rid of the 'onln' obfuscation. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e01d8718de4170373cd7fbf5cf6f9cb61cebb1e9 Author: Peter Zijlstra Date: Wed Jan 27 23:24:29 2016 +0100 perf/x86: Fix uninitialized value usage When calling intel_alt_er() with .idx != EXTRA_REG_RSP_* we will not initialize alt_idx and then use this uninitialized value to index an array. When that is not fatal, it can result in an infinite loop in its caller __intel_shared_reg_get_constraints(), with IRQs disabled. Alternative error modes are random memory corruption due to the cpuc->shared_regs->regs[] array overrun, which manifest in either get_constraints or put_constraints doing weird stuff. Only took 6 hours of painful debugging to find this. Neither GCC nor Smatch warnings flagged this bug. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: ae3f011fc251 ("perf/x86/intel: Fix SLM MSR_OFFCORE_RSP1 valid_mask") Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f2e305108faba0c85eb4ba4066599decb675117e Author: Gerd Hoffmann Date: Mon Jan 25 12:02:28 2016 +0100 drm/i915: refine qemu south bridge detection The test for the qemu q35 south bridge added by commit "39bfcd52 drm/i915: more virtual south bridge detection" also matches on real hardware. Having the check for virtual systems last in the list is not enough to avoid that ... Refine the check by additionally verifying the pci subsystem id to see whenever it *really* is qemu. [ v2: fix subvendor tyops ] Reported-and-tested-by: Bjørn Mork Signed-off-by: Gerd Hoffmann Tested-by: Bruno Wolff III Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1453719748-10944-1-git-send-email-kraxel@redhat.com (cherry picked from commit 1e859111c128265f8d62b39ff322e42b1ddb5a20) drivers/gpu/drm/i915/i915_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 428398e44a2762875c01a4d5c18932f1e84fdc17 Author: Andreas Ziegler Date: Mon Jan 25 12:41:19 2016 +0100 drm/i915: Remove select to deleted STOP_MACHINE from Kconfig Commit 5bab6f60cb4d ("drm/i915: Serialise updates to GGTT with access through GGTT on Braswell") depended upon a working stop_machine() and so forced the selection of STOP_MACHINE. However, commit 86fffe4a61dd ("kernel: remove stop_machine() Kconfig dependency") removed the option STOP_MACHINE from init/Kconfig and ensured that stop_machine() universally works. Due to the order in which the patches were applied, removing the select from DRM_I915 got lost during merging. Remove the now obsolete select statement. Signed-off-by: Andreas Ziegler Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1453722079-2604-1-git-send-email-andreas.ziegler@fau.de Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Daniel Vetter (cherry picked from commit 21fabbebff0e17c7698ed399cae23958c214cc82) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 2850cfddfb052a552dfa19b75836a873e0ca1f50 Author: Ville Syrjälä Date: Tue Jan 19 18:23:17 2016 +0200 drm/i915: Fix NULL plane->fb oops on SKL In this atomic age, we can't trust the plane->fb pointer anymore. It might get update too late. Instead we are supposed to use the plane_state->fb pointer instead. Let's do that in intel_plane_obj_offset() and avoid problems from dereferencing the potentially stale plane->fb pointer. Paulo found this with 'kms_frontbuffer_tracking --show-hidden --run-subtest nop-1p-rte' but it can be reproduced with just plain old kms_setplane. I was too lazy to bisect this, so not sure exactly when it broke. The most obvious candidate commit ce7f17285639 ("drm/i915: Fix i915_ggtt_view_equal to handle rotation correctly") was actually still fine, so it must have broken some time after that. Here's the resulting fireworks: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] intel_fill_fb_ggtt_view+0x1b/0x15a [i915] PGD 8a5f6067 PUD 8a5f5067 PMD 0 Oops: 0000 [#1] PREEMPT SMP Modules linked in: i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_gtt agpgart netconsole mousedev hid_generic psmouse usbhid atkbd libps2 coretemp hwmon efi_pstore intel_rapl iosf_mbi x86_pkg_temp_thermal efivars pcspkr e1000e sdhci_pci ptp pps_core sdhci i2c_i801 mmc_core i2c_hid hid i8042 serio evdev sch_fq_codel ip_tables x_tables ipv6 autofs4 CPU: 1 PID: 260 Comm: kms_plane Not tainted 4.4.0-skl+ #171 Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.R00.B104.B00.1511030553 11/03/2015 task: ffff88008bde2d80 ti: ffff88008a6ec000 task.ti: ffff88008a6ec000 RIP: 0010:[] [] intel_fill_fb_ggtt_view+0x1b/0x15a [i915] RSP: 0018:ffff88008a6efa10 EFLAGS: 00010086 RAX: 0000000000000001 RBX: ffff8801674f4240 RCX: 0000000000000014 RDX: ffff88008a7440c0 RSI: 0000000000000000 RDI: ffff88008a6efa40 RBP: ffff88008a6efa30 R08: ffff88008bde3598 R09: 0000000000000001 R10: ffff88008b782000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88008a7440c0 R14: 0000000000000000 R15: ffff88008a7449c0 FS: 00007fa0c07a28c0(0000) GS:ffff88016ec40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000008a6ff000 CR4: 00000000003406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8801674f4240 0000000000000000 ffff88008a7440c0 0000000000000000 ffff88008a6efaa0 ffffffffa02daf25 ffffffff814ec80e 0000000000070298 ffff8800850d0000 ffff88008a6efaa0 ffffffffa02c49c2 0000000000000002 Call Trace: [] intel_plane_obj_offset+0x2d/0xa9 [i915] [] ? _raw_spin_unlock_irqrestore+0x4b/0x60 [] ? gen9_write32+0x2e8/0x3b8 [i915] [] skl_update_plane+0x203/0x4c5 [i915] [] intel_plane_atomic_update+0x53/0x6a [i915] [] drm_atomic_helper_commit_planes_on_crtc+0x142/0x1d5 [drm_kms_helper] [] intel_atomic_commit+0x1262/0x1350 [i915] [] ? __drm_atomic_helper_crtc_duplicate_state+0x2f/0x41 [drm_kms_helper] [] ? drm_atomic_check_only+0x3e3/0x552 [drm] [] drm_atomic_commit+0x4d/0x52 [drm] [] drm_atomic_helper_update_plane+0xcb/0x118 [drm_kms_helper] [] __setplane_internal+0x1c8/0x224 [drm] [] drm_mode_setplane+0x14e/0x172 [drm] [] drm_ioctl+0x265/0x3ad [drm] [] ? drm_mode_cursor_common+0x158/0x158 [drm] [] ? current_kernel_time64+0x5e/0x98 [] ? trace_hardirqs_on_caller+0x17a/0x196 [] do_vfs_ioctl+0x42b/0x4ea [] ? __fget_light+0x4d/0x71 [] SyS_ioctl+0x43/0x61 [] entry_SYSCALL_64_fastpath+0x12/0x6f Cc: drm-intel-fixes@lists.freedesktop.org Cc: Paulo Zanoni Testcase: igt/kms_plane Reported-by: Paulo Zanoni Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1453220597-28973-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter (cherry picked from commit e794129444aba459e9bedf5080bfb4605f933c32) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f94b6dd006909a5ef6435cc0af557e945240f48 Author: Ville Syrjälä Date: Fri Jan 15 20:46:53 2016 +0200 drm/i915: Don't reject primary plane windowing with color keying enabled on SKL+ On SKL+ plane scaling is mutually exclusive with color keying. The code check for this, but during some refactoring the code got changed to also reject primary plane windowing when color keying is used. There is no such restriction in the hardware, so restore the original logic. Cc: Maarten Lankhorst Fixes: 061e4b8d650a ("drm/i915: clean up atomic plane check functions, v2.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1452883613-28549-1-git-send-email-ville.syrjala@linux.intel.com Cc: stable@vger.kernel.org Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst (cherry picked from commit 693bdc28a733dba68b86af295e7509812fec35d9) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5efd407674068dede403551bea3b0b134c32513a Author: Jani Nikula Date: Wed Jan 13 16:35:20 2016 +0200 drm/i915/dp: fall back to 18 bpp when sink capability is unknown Per DP spec, the source device should fall back to 18 bpp, VESA range RGB when the sink capability is unknown. Fix the color depth clamping. 18 bpp color depth should ensure full color range in automatic mode. The clamping has been HDMI specific since its introduction in commit 996a2239f93b03c5972923f04b097f65565c5bed Author: Daniel Vetter Date: Fri Apr 19 11:24:34 2013 +0200 drm/i915: Disable high-bpc on pre-1.4 EDID screens Cc: stable@vger.kernel.org Reported-and-tested-by: Dihan Wickremasuriya Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=105331 Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1452695720-7076-1-git-send-email-jani.nikula@intel.com (cherry picked from commit 013dd9e038723bbd2aa67be51847384b75be8253) drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 935a0ff0e1ea62a116848c0a187b13838f7b9cee Author: Francisco Jerez Date: Wed Jan 13 18:59:39 2016 -0800 drm/i915: Make sure DC writes are coherent on flush. We need to set the DC FLUSH PIPE_CONTROL bit on Gen7+ to guarantee that writes performed via the HDC are visible in memory. Fixes an intermittent failure in a Piglit test that writes to a BO from a shader using GL atomic counters (implemented as HDC untyped atomics) and then expects the memory to read back the same value after mapping it on the CPU. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91298 Tested-by: Mark Janes Cc: Rodrigo Vivi Cc: stable@vger.kernel.org Signed-off-by: Francisco Jerez Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1452740379-3194-1-git-send-email-currojerez@riseup.net (cherry picked from commit 965fd602a6436f689f4f2fe40a6789582778ccd5) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++ 2 files changed, 3 insertions(+) commit 88867e3d0b7eea256c1cd432b0a3c7a21e8edf07 Author: Samuel Thibault Date: Mon Jan 25 01:32:08 2016 +0100 Staging: speakup: fix read scrolled-back VT Previously, speakup would always read the non-scrolled part of the VT, even when the VT is scrolled back with shift-page. This patch makes vt.c export screen_pos so that speakup can use it to properly access the content of the scrolled-back VT. This was tested with both vgacon and fbcon. Signed-off-by: Samuel Thibault Reviewed-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 21 +++++++++++++-------- drivers/tty/vt/vt.c | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) commit 327b882d3bcc1fba82dbd39b5cf5a838c81218e2 Author: Samuel Thibault Date: Fri Jan 15 00:47:41 2016 +0100 Staging: speakup: Fix getting port information Commit f79b0d9c223c ("staging: speakup: Fixed warning instead of ") broke the port information in the speakup driver: SERIAL_PORT_DFNS only gets defined if asm/serial.h is included, and no other header includes asm/serial.h. We here make sure serialio.c does get the arch-specific definition of SERIAL_PORT_DFNS from asm/serial.h, if any. Along the way, this makes sure that we do have information for the requested serial port number (index) Fixes: f79b0d9c223c ("staging: speakup: Fixed warning instead of ") Signed-off-by: Samuel Thibault Cc: stable # 3.18 Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit b64438853f4c29f2235124a1c879b5e242d1ae19 Merge: a77ce1b e4bf797 Author: David S. Miller Date: Thu Jan 28 22:53:17 2016 -0800 Merge branch 'phylib-regressions-part-2' Andrew Lunn says: ==================== Part 2 of v4.5-rc1 phylib regression White list PHY compatible values which indicate PHYs. Issue a warning when one is encountered. Update the documentation to make it clear what is expected in the compatible string. v2: Fix Grammar, reword changelog, add Tested-by and Acked-by. ==================== Signed-off-by: David S. Miller commit e4bf797ac1dcd8582d31a158dbdea5b1fbad94e6 Author: Andrew Lunn Date: Thu Jan 28 02:30:30 2016 +0100 DT: phy.txt: Clarify expected compatible values PHY devices may only list compatibility with clause 22, 45, and if they need to be more specific, their PHY identifier values. No other compatible strings are allowed. Make this clear in the documentation, and remove examples where make/model compatible strings are listed. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/brcm,bcmgenet.txt | 4 ++-- Documentation/devicetree/bindings/net/mdio-mux-gpio.txt | 8 -------- Documentation/devicetree/bindings/net/mdio-mux.txt | 8 -------- Documentation/devicetree/bindings/net/phy.txt | 6 ++++-- 4 files changed, 6 insertions(+), 20 deletions(-) commit ae461131960b27d4be158d62a89d40977388d7a1 Author: Andrew Lunn Date: Thu Jan 28 02:30:29 2016 +0100 of: of_mdio: Add a whitelist of PHY compatibilities. Some phy nodes list a compatible value indicating the PHY make/model. This is never used to match the device to the driver. However it does confuse the code to separate a PHY from a generic MDIO device like a switch. Generic MDIO devices must have a compatible value, PHYs can list clause 22 or 45, but nothing else. Issue a warning if we find a compatible value known on the whitelist, and say it is a PHY. Fixes: a9049e0c513c ("mdio: Add support for mdio drivers.") Reported-by: Aaro Koskinen Reported-by: Olof Johansson Tested-by: Aaro Koskinen Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/of/of_mdio.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a77ce1bc12d6e0c03e9cc5683bb657ae2f2bb9b5 Merge: ff5d749 4b2a4a9 Author: David S. Miller Date: Thu Jan 28 22:51:44 2016 -0800 Merge branch 'lan78xx-fixes' Woojung Huh says: ==================== lan78xx: update and fixes lan78xx: change to use updated phy-ignore-interrupts lan78xx: Add to handle mux control per chip id lan78xx: throttle TX path at slower than SuperSpeed USB ==================== Signed-off-by: David S. Miller commit 4b2a4a965331a8ce7303b43039ce43651ef80fb0 Author: Woojung.Huh@microchip.com Date: Wed Jan 27 22:57:54 2016 +0000 lan78xx: throttle TX path at slower than SuperSpeed USB Throttle TX path only at slower than SuperSpeed USB. SuperSpeed USB has enough bandwidth to maintain GigE. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a0db7d10b76e98df0cb5d4ee1ec5b8e5fbe2038c Author: Woojung.Huh@microchip.com Date: Wed Jan 27 22:57:53 2016 +0000 lan78xx: Add to handle mux control per chip id Depends on chip, some EEPROM pins are muxed with LED function. Disable & restore LED function to access EEPROM. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 98 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 71 insertions(+), 27 deletions(-) commit e4953910aee0c1a8f7f0fff598354948c2702900 Author: Woojung.Huh@microchip.com Date: Wed Jan 27 22:57:52 2016 +0000 lan78xx: change to use updated phy-ignore-interrupts Update lan78xx to use patch of commit 4f2aaf7dd95b ("Merge branch 'fix-phy-ignore-interrupts'"). Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit ff5d749772018602c47509bdc0093ff72acd82ec Author: Eric Dumazet Date: Wed Jan 27 10:52:43 2016 -0800 tcp: beware of alignments in tcp_get_info() With some combinations of user provided flags in netlink command, it is possible to call tcp_get_info() with a buffer that is not 8-bytes aligned. It does matter on some arches, so we need to use put_unaligned() to store the u64 fields. Current iproute2 package does not trigger this particular issue. Fixes: 0df48c26d841 ("tcp: add tcpi_bytes_acked to tcp_info") Fixes: 977cb0ecf82e ("tcp: add pacing_rate information into tcp_info") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 3ec622f40913ae036f218e5e7e92df9c1f1753d9 Author: Aaron Plattner Date: Thu Jan 28 14:07:38 2016 -0800 ALSA: hda - Add new GPU codec ID 0x10de0083 to snd-hda Vendor ID 0x10de0083 is used by a yet-to-be-named GPU chip. This chip also has the 2-ch audio swapping bug, so patch_nvhdmi is appropriate here. Signed-off-by: Aaron Plattner Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) commit b64a1cbef6df47c986ad622b5b2e4d3d1940070c Author: Sudip Mukherjee Date: Sat Jan 23 14:49:20 2016 +0530 Revert "Staging: panel: usleep_range is preferred over udelay" This reverts commit ebd43516d3879f882a403836bba8bc5791f26a28. We should not be sleeping inside spin_lock. Fixes: ebd43516d387 ("Staging: panel: usleep_range is preferred over udelay") Cc: Sirnam Swetha Signed-off-by: Sudip Mukherjee Reported-by: Huang, Ying Tested-by: Huang, Ying Cc: stable # 4.4 Signed-off-by: Greg Kroah-Hartman drivers/staging/panel/panel.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit 98441221708a092eb6d3d05142cf842a95aba152 Author: K. Y. Srinivasan Date: Wed Jan 27 18:22:45 2016 -0800 storvsc: Use the specified target ID in device lookup The current code assumes that there is only one target in device lookup. Fix this bug. This will alow us to correctly handle hot reomoval of LUNs. Signed-off-by: K. Y. Srinivasan Reviewed-by: Alex Ng Tested-by: Vivek Yadav Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d791a8c60e9cbd1c4fecbc5c86ff59c7ffe137e8 Author: K. Y. Srinivasan Date: Wed Jan 27 18:22:44 2016 -0800 storvsc: Install the storvsc specific timeout handler for FC devices The default timeout routine used for FC transport is not suitable for FC devices managed by storvsc since FC devices managed by storvsc driver do not have an rport associated with them. Use the time out handler used for SCSI devices for FC devices as well. Signed-off-by: K. Y. Srinivasan Reviewed-by: Alex Ng Tested-by: Vivek Yadav Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 26cd83670f2f5a3d5b5514a1f7d96567cdb9558b Merge: 03c21cb 7fd1361 Author: Linus Torvalds Date: Thu Jan 28 17:00:50 2016 -0800 Merge tag 'trace-v4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull minor tracing fixes from Steven Rostedt: "This includes three minor fixes, mostly due to cut-and-paste issues. The first is a cut and paste issue that changed the amount of stack to skip when tracing a stack dump from 0 to 6, which basically made the stack disappear for small stack traces. The second fix is just removing an unused field in a struct that is no longer used, and currently just wastes space. The third is another cut-and-paste fix that had a tracepoint recording the wrong field (it was recording the previous field a second time)" * tag 'trace-v4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/dma-buf/fence: Fix timeline str value on fence_annotate_wait_on ftrace: Remove unused nr_trampolines var tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs() commit 4f2c6ae5c64c353fb1b0425e4747e5603feadba1 Author: Ido Schimmel Date: Wed Jan 27 15:16:43 2016 +0100 switchdev: Require RTNL mutex to be held when sending FDB notifications When switchdev drivers process FDB notifications from the underlying device they resolve the netdev to which the entry points to and notify the bridge using the switchdev notifier. However, since the RTNL mutex is not held there is nothing preventing the netdev from disappearing in the middle, which will cause br_switchdev_event() to dereference a non-existing netdev. Make switchdev drivers hold the lock at the beginning of the notification processing session and release it once it ends, after notifying the bridge. Also, remove switchdev_mutex and fdb_lock, as they are no longer needed when RTNL mutex is held. Fixes: 03bf0c281234 ("switchdev: introduce switchdev notifier") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 - drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 8 +++----- drivers/net/ethernet/rocker/rocker.c | 2 ++ net/bridge/br.c | 3 +-- net/switchdev/switchdev.c | 15 ++++++++------- 5 files changed, 14 insertions(+), 15 deletions(-) commit 7d0105b5334b9722b7d33acad613096dfcf3330e Author: Malcolm Crossley Date: Tue Jan 26 17:12:44 2016 +0000 xen-netfront: request Tx response events more often Trying to batch Tx response events results in poor performance because this delays freeing the transmitted skbs. Instead use the standard RING_FINAL_CHECK_FOR_RESPONSES() macro to be notified once the next Tx response is placed on the ring. Signed-off-by: Malcolm Crossley Signed-off-by: David Vrabel Signed-off-by: David S. Miller drivers/net/xen-netfront.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 3b89624ab54b9dc2d92fc08ce2670e5f19ad8ec8 Author: Nicolas Schichan Date: Tue Jan 26 16:12:35 2016 +0100 net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned packets. The code in txq_put_data() would use txq->tx_curr_desc to index the tso_hdrs/tso_hdrs_dma buffers, for less than 8 bytes unaligned fragments, which is already moved to the next descriptor at the beginning of the function. If that fragment was the last of the the skb, the next skb would use that same space to place the ip headers, overwritting that small fragment data. Fixes: 91986fd3d335 (net: mv643xx_eth: Ensure proper data alignment in TSO TX path) Signed-off-by: Nicolas Schichan Reviewed-by: Philipp Kirchhofer Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mv643xx_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ed742363b9c3d1d038f013591d57a606ae2c261 Author: Andrew Lunn Date: Tue Jan 26 15:12:30 2016 +0100 of: of_mdio: Ensure mdio device is a PHY of_phy_find_device() is used to find the phy device associated with a device node. It is expected the node is for a PHY device, but in fact it could of been probed as a generic MDIO device. Ensure the device is a PHY before returning it. Fixes: a9049e0c513c ("mdio: Add support for mdio drivers.") Reported-by: Aaro Koskinen Reported-by: Olof Johansson Signed-off-by: Andrew Lunn Tested-by: Aaro Koskinen Signed-off-by: David S. Miller drivers/of/of_mdio.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit bd7c5e31552c06f1186606de8914a135e55f6bac Merge: c731f0e 6736fde Author: David S. Miller Date: Thu Jan 28 16:05:45 2016 -0800 Merge tag 'mac80211-for-davem-2016-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Here's a first set of fixes for the 4.5-rc cycle: * make regulatory messages much less verbose by default * various remain-on-channel fixes * scheduled scanning fixes with hardware restart * a PS-Poll handling fix; was broken just recently * bugfix to avoid buffering non-bufferable MMPDUs * world regulatory domain data fix * a fix for scanning causing other work to get stuck * hwsim: revert an older problematic patch that caused some userspace tools to have issues - not that big a deal as it's a debug only driver though ==================== Signed-off-by: David S. Miller commit d8b8eb829d4c30cd1e41a1ddc308a0e7c22169da Merge: 96c5d07 f0442df Author: Dave Airlie Date: Fri Jan 29 10:04:29 2016 +1000 Merge branch 'drm-rockchip-next-fixes-2016-01-22' of https://github.com/markyzq/kernel-drm-rockchip into drm-fixes Here are some fixes for drm/rockchip, these fixes base on drm-next. These fixes works on my popmetal(rk3288) board. About patch: drm/atomic-helper: Export framebuffer_changed() Daniel Vetter ack for merging it through rockchip git trees, so framebuffer_changed() can be reused by drm/rockchip. All others looks good, so I'd like you can land them. * 'drm-rockchip-next-fixes-2016-01-22' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION drm/rockchip: fix wrong pitch/size using on gem drm/rockchip: explain why we can't wait_for_vblanks drm/rockchip: don't wait for vblank if fb hasn't changed drm/atomic-helper: Export framebuffer_changed() drm/rockchip/dsi: fix handling mipi_dsi_pixel_format_to_bpp result drm/rockchip: vop: fix mask when updating interrupts drm/rockchip: cleanup unnecessary export symbol drm/rockchip: Don't build rockchip_drm_vop as modules commit 96c5d076f0a5e2023ecdb44d8261f87641ee71e0 Author: Rob Clark Date: Wed Oct 15 15:00:47 2014 -0400 drm/vmwgfx: respect 'nomodeset' Signed-off-by: Rob Clark Reviewed-by: Thomas Hellstrom . Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c731f0e3493cc9031a0aceea6a50c70beed23e6d Author: Richard Weinberger Date: Mon Jan 25 23:24:12 2016 +0100 net: Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Signed-off-by: David S. Miller drivers/net/ethernet/ezchip/Kconfig | 1 + drivers/net/phy/Kconfig | 1 + 2 files changed, 2 insertions(+) commit d88270eef4b56bd7973841dd1fed387ccfa83709 Author: Neal Cardwell Date: Mon Jan 25 14:01:53 2016 -0800 tcp: fix tcp_mark_head_lost to check skb len before fragmenting This commit fixes a corner case in tcp_mark_head_lost() which was causing the WARN_ON(len > skb->len) in tcp_fragment() to fire. tcp_mark_head_lost() was assuming that if a packet has tcp_skb_pcount(skb) of N, then it's safe to fragment off a prefix of M*mss bytes, for any M < N. But with the tricky way TCP pcounts are maintained, this is not always true. For example, suppose the sender sends 4 1-byte packets and have the last 3 packet sacked. It will merge the last 3 packets in the write queue into an skb with pcount = 3 and len = 3 bytes. If another recovery happens after a sack reneging event, tcp_mark_head_lost() may attempt to split the skb assuming it has more than 2*MSS bytes. This sounds very counterintuitive, but as the commit description for the related commit c0638c247f55 ("tcp: don't fragment SACKed skbs in tcp_mark_head_lost()") notes, this is because tcp_shifted_skb() coalesces adjacent regions of SACKed skbs, and when doing this it preserves the sum of their packet counts in order to reflect the real-world dynamics on the wire. The c0638c247f55 commit tried to avoid problems by not fragmenting SACKed skbs, since SACKed skbs are where the non-proportionality between pcount and skb->len/mss is known to be possible. However, that commit did not handle the case where during a reneging event one of these weird SACKed skbs becomes an un-SACKed skb, which tcp_mark_head_lost() can then try to fragment. The fix is to simply mark the entire skb lost when this happens. This makes the recovery slightly more aggressive in such corner cases before we detect reordering. But once we detect reordering this code path is by-passed because FACK is disabled. Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2ad14a6ca2f5d6e73e58c463e1b9dacffda3387a Merge: 2081e78 8483d15 Author: Dave Airlie Date: Fri Jan 29 10:02:35 2016 +1000 Merge tag 'drm-vc4-fixes-2015-01-19' of http://github.com/anholt/linux into drm-fixes This pull request just includes the !CONFIG_PM_SLEEP build fix for vc4. * tag 'drm-vc4-fixes-2015-01-19' of http://github.com/anholt/linux: drm/vc4: Remove broken attempt at GPU reset using genpd. commit 2081e78a5cb2e14e4980a8aaddd8e4899cc7557b Merge: 55ce625 a0a5ab3 Author: Dave Airlie Date: Fri Jan 29 10:01:54 2016 +1000 Merge branch 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux into drm-fixes A bunch of etnaviv fixes for 4.5-rc. Most of them are fixing things in code paths that will only be hit if something goes wrong, which have been unearthed by more extensive testing. The only thing that doesn't really qualify as fixes is an UAPI extension that userspace wants to rely on being present, so I want to fast-track this into 4.5 before etnaviv ends up in a released kernel. * 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux: drm/etnaviv: call correct function when trying to vmap a DMABUF drm/etnaviv: rename etnaviv_gem_vaddr to etnaviv_gem_vmap drm/etnaviv: fix get pages error path in etnaviv_gem_vaddr drm/etnaviv: fix memory leak in IOMMU init path drm/etnaviv: add further minor features and varyings count drm/etnaviv: add helper for comparing model/revision IDs drm/etnaviv: add helper to extract bitfields drm/etnaviv: use defined constants for the chip model drm/etnaviv: update common and state_hi xml.h files drm/etnaviv: ignore VG GPUs with FE2.0 drm/etnaviv: fix failure path if model is zero drm/etnaviv: hold object lock while getting pages for coredump drm/etnaviv: remove owner assignment from platform_driver commit 8282f27449bf15548cb82c77b6e04ee0ab827bdc Author: Joe Stringer Date: Fri Jan 22 15:49:12 2016 -0800 inet: frag: Always orphan skbs inside ip_defrag() Later parts of the stack (including fragmentation) expect that there is never a socket attached to frag in a frag_list, however this invariant was not enforced on all defrag paths. This could lead to the BUG_ON(skb->sk) during ip_do_fragment(), as per the call stack at the end of this commit message. While the call could be added to openvswitch to fix this particular error, the head and tail of the frags list are already orphaned indirectly inside ip_defrag(), so it seems like the remaining fragments should all be orphaned in all circumstances. kernel BUG at net/ipv4/ip_output.c:586! [...] Call Trace: [] ? do_output.isra.29+0x1b0/0x1b0 [openvswitch] [] ovs_fragment+0xcc/0x214 [openvswitch] [] ? dst_discard_out+0x20/0x20 [] ? dst_ifdown+0x80/0x80 [] ? find_bucket.isra.2+0x62/0x70 [openvswitch] [] ? mod_timer_pending+0x65/0x210 [] ? __lock_acquire+0x3db/0x1b90 [] ? nf_conntrack_in+0x252/0x500 [nf_conntrack] [] ? __lock_is_held+0x54/0x70 [] do_output.isra.29+0xe3/0x1b0 [openvswitch] [] do_execute_actions+0xe11/0x11f0 [openvswitch] [] ? __lock_is_held+0x54/0x70 [] ovs_execute_actions+0x32/0xd0 [openvswitch] [] ovs_dp_process_packet+0x85/0x140 [openvswitch] [] ? __lock_is_held+0x54/0x70 [] ovs_execute_actions+0xb2/0xd0 [openvswitch] [] ovs_dp_process_packet+0x85/0x140 [openvswitch] [] ? ovs_ct_get_labels+0x49/0x80 [openvswitch] [] ovs_vport_receive+0x5d/0xa0 [openvswitch] [] ? __lock_acquire+0x3db/0x1b90 [] ? __lock_acquire+0x3db/0x1b90 [] ? __lock_acquire+0x3db/0x1b90 [] ? internal_dev_xmit+0x5/0x140 [openvswitch] [] internal_dev_xmit+0x6c/0x140 [openvswitch] [] ? internal_dev_xmit+0x5/0x140 [openvswitch] [] dev_hard_start_xmit+0x2b9/0x5e0 [] ? netif_skb_features+0xd1/0x1f0 [] __dev_queue_xmit+0x800/0x930 [] ? __dev_queue_xmit+0x50/0x930 [] ? mark_held_locks+0x71/0x90 [] ? neigh_resolve_output+0x106/0x220 [] dev_queue_xmit+0x10/0x20 [] neigh_resolve_output+0x178/0x220 [] ? ip_finish_output2+0x1ff/0x590 [] ip_finish_output2+0x1ff/0x590 [] ? ip_finish_output2+0x7e/0x590 [] ip_do_fragment+0x831/0x8a0 [] ? ip_copy_metadata+0x1b0/0x1b0 [] ip_fragment.constprop.49+0x43/0x80 [] ip_finish_output+0x17c/0x340 [] ? nf_hook_slow+0xe4/0x190 [] ip_output+0x70/0x110 [] ? ip_fragment.constprop.49+0x80/0x80 [] ip_local_out+0x39/0x70 [] ip_send_skb+0x19/0x40 [] ip_push_pending_frames+0x33/0x40 [] icmp_push_reply+0xea/0x120 [] icmp_reply.constprop.23+0x1ed/0x230 [] icmp_echo.part.21+0x4e/0x50 [] ? __lock_is_held+0x54/0x70 [] ? rcu_read_lock_held+0x5e/0x70 [] icmp_echo+0x36/0x70 [] icmp_rcv+0x271/0x450 [] ip_local_deliver_finish+0x127/0x3a0 [] ? ip_local_deliver_finish+0x41/0x3a0 [] ip_local_deliver+0x60/0xd0 [] ? ip_rcv_finish+0x560/0x560 [] ip_rcv_finish+0xdd/0x560 [] ip_rcv+0x283/0x3e0 [] ? match_held_lock+0x192/0x200 [] ? inet_del_offload+0x40/0x40 [] __netif_receive_skb_core+0x392/0xae0 [] ? process_backlog+0x8e/0x230 [] ? mark_held_locks+0x71/0x90 [] __netif_receive_skb+0x18/0x60 [] process_backlog+0x78/0x230 [] ? process_backlog+0xdd/0x230 [] net_rx_action+0x155/0x400 [] __do_softirq+0xcc/0x420 [] ? ip_finish_output2+0x217/0x590 [] do_softirq_own_stack+0x1c/0x30 [] do_softirq+0x4e/0x60 [] __local_bh_enable_ip+0xa8/0xb0 [] ip_finish_output2+0x240/0x590 [] ? ip_do_fragment+0x831/0x8a0 [] ip_do_fragment+0x831/0x8a0 [] ? ip_copy_metadata+0x1b0/0x1b0 [] ip_fragment.constprop.49+0x43/0x80 [] ip_finish_output+0x17c/0x340 [] ? nf_hook_slow+0xe4/0x190 [] ip_output+0x70/0x110 [] ? ip_fragment.constprop.49+0x80/0x80 [] ip_local_out+0x39/0x70 [] ip_send_skb+0x19/0x40 [] ip_push_pending_frames+0x33/0x40 [] raw_sendmsg+0x7d3/0xc30 [] ? __lock_acquire+0x3db/0x1b90 [] ? inet_sendmsg+0xc7/0x1d0 [] ? __lock_is_held+0x54/0x70 [] inet_sendmsg+0x10a/0x1d0 [] ? inet_sendmsg+0x5/0x1d0 [] sock_sendmsg+0x38/0x50 [] ___sys_sendmsg+0x25f/0x270 [] ? handle_mm_fault+0x8dd/0x1320 [] ? _raw_spin_unlock+0x27/0x40 [] ? __do_page_fault+0x1e2/0x460 [] ? __fget_light+0x66/0x90 [] __sys_sendmsg+0x42/0x80 [] SyS_sendmsg+0x12/0x20 [] entry_SYSCALL_64_fastpath+0x12/0x6f Code: 00 00 44 89 e0 e9 7c fb ff ff 4c 89 ff e8 e7 e7 ff ff 41 8b 9d 80 00 00 00 2b 5d d4 89 d8 c1 f8 03 0f b7 c0 e9 33 ff ff f 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 RIP [] ip_do_fragment+0x892/0x8a0 RSP Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Signed-off-by: Joe Stringer Signed-off-by: David S. Miller net/ipv4/ip_fragment.c | 1 + net/ipv4/netfilter/nf_defrag_ipv4.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit 55ce625fc5e3a87e46a14c2cb062a3579f79b7e0 Merge: 92e963f 28b8d66 Author: Dave Airlie Date: Fri Jan 29 10:00:45 2016 +1000 Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Misc radeon and amdgpu fixes: - SMU firmware loading fix for Stoney - DP audio fixes for DCE4.1 - Don't expose fbdev device if no connectors - fix page table LRU list update handling * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: only move pt bos in LRU list on success drm/radeon: fix DP audio support for APU with DCE4.1 display engine drm/radeon: Add a common function for DFS handling drm/radeon: cleaned up VCO output settings for DP audio drm/amd/powerplay: Update SMU firmware loading for Stoney drm/amdgpu: don't init fbdev if we don't have any connectors drm/radeon: only init fbdev if we have connectors drm/radeon: Ensure radeon bo is unreserved in radeon_gem_va_ioctl drm/amdgpu: fix next_rptr handling for debugfs drm/radeon: properly byte swap vce firmware setup drm/amdgpu: add a message to indicate when powerplay is enabled (v2) drm/amdgpu: fix amdgpu_bo_pin_restricted VRAM placing v2 drm/amd/amdgpu: Improve amdgpu_dpm* macros to avoid unexpected result (v2) drm/amdgpu: Allow the driver to load if amdgpu.powerplay=1 on asics without powerplay support drm/amdgpu: Use drm_calloc_large for VM page_tables array drm/amdgpu: Add some tweaks to gfx 8 soft reset drm/amdgpu: fix tonga smu resume commit 2cc5e4caf4b9815c1c877701c85f7b3b6bfbf783 Merge: 2baaa2d 47faa1e Author: David S. Miller Date: Thu Jan 28 15:59:33 2016 -0800 Merge branch 'sctp-transport-races' Xin Long says: ==================== fix the transport dead race check by using atomic_add_unless on refcnt sctp: fix the transport dead race check by using atomic_add_unless on refcnt sctp: hold transport before we access t->asoc in sctp proc sctp: remove the dead field of sctp_transport ==================== Signed-off-by: David S. Miller commit 47faa1e4c50ec26e6e75dcd1ce53f064bd45f729 Author: Xin Long Date: Fri Jan 22 01:49:09 2016 +0800 sctp: remove the dead field of sctp_transport After we use refcnt to check if transport is alive, the dead can be removed from sctp_transport. The traversal of transport_addr_list in procfs dump is using list_for_each_entry_rcu, no need to check if it has been freed. sctp_generate_t3_rtx_event and sctp_generate_heartbeat_event is protected by sock lock, it's not necessary to check dead, either. also, the timers are cancelled when sctp_transport_free() is called, that it doesn't wait for refcnt to reach 0 to cancel them. Signed-off-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 3 +-- net/sctp/proc.c | 4 ---- net/sctp/sm_sideeffect.c | 12 ------------ net/sctp/transport.c | 4 +--- 4 files changed, 2 insertions(+), 21 deletions(-) commit fba4c330c5b9d1beeae08a42ed4430f5055e7f27 Author: Xin Long Date: Fri Jan 22 01:49:08 2016 +0800 sctp: hold transport before we access t->asoc in sctp proc Previously, before rhashtable, /proc assoc listing was done by read-locking the entire hash entry and dumping all assocs at once, so we were sure that the assoc wasn't freed because it wouldn't be possible to remove it from the hash meanwhile. Now we use rhashtable to list transports, and dump entries one by one. That is, now we have to check if the assoc is still a good one, as the transport we got may be being freed. Signed-off-by: Xin Long Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/proc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1eed677933b816978abc4e3e18ecae5f254cb9be Author: Xin Long Date: Fri Jan 22 01:49:07 2016 +0800 sctp: fix the transport dead race check by using atomic_add_unless on refcnt Now when __sctp_lookup_association is running in BH, it will try to check if t->dead is set, but meanwhile other CPUs may be freeing this transport and this assoc and if it happens that __sctp_lookup_association checked t->dead a bit too early, it may think that the association is still good while it was already freed. So we fix this race by using atomic_add_unless in sctp_transport_hold. After we get one transport from hashtable, we will hold it only when this transport's refcnt is not 0, so that we can make sure t->asoc cannot be freed before we hold the asoc again. Note that sctp association is not freed using RCU so we can't use atomic_add_unless() with it as it may just be too late for that either. Fixes: 4f0087812648 ("sctp: apply rhashtable api to send/recv path") Reported-by: Vlad Yasevich Signed-off-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/input.c | 17 +++++++++++------ net/sctp/transport.c | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) commit 2baaa2d1386bd9949877a74ffc0dc0f2c5394b85 Merge: 3b9e948 bbeeda2 Author: David S. Miller Date: Thu Jan 28 15:55:32 2016 -0800 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: driver fixes Couple of various mlxsw driver fixes. ==================== Signed-off-by: David S. Miller commit bbeeda27abc516af51ddd93c555b6324559dbb3b Author: Ido Schimmel Date: Wed Jan 27 15:20:26 2016 +0100 mlxsw: reg: Use correct offset in field definiton The rx_lane, tx_lane and module fields in the PMLP register don't have an additional offset besides the base one (0x04), so set it to 0x00. Fixes: 4ec14b7634b2 ("mlxsw: Add interface to access registers and process events") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3f47f867814cdb08cd43d4b82f95bfde4a9ae579 Author: Ido Schimmel Date: Wed Jan 27 15:20:25 2016 +0100 mlxsw: spectrum: Compare local ports instead of pointers When dumping the FDB we can't compare the actual pointers of the ports structs, as it's possible the struct represents a vPort instead of the underlying physical port. Solve this by comparing the local port number instead, as it's shared between the physical ports and all the vPorts on top of him. Fixes: 54a732018d8e ("mlxsw: spectrum: Adjust switchdev ops for VLAN devices") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 304f51584f4591789539c0d37fc359bc129a4ff0 Author: Ido Schimmel Date: Wed Jan 27 15:20:24 2016 +0100 mlxsw: spectrum: Dump LAG FDB records only once LAG FDB records can only point to LAG devices or VLAN devices configured on top of them. Therefore, when dumping the FDB we shouldn't associate these records with the underlying physical ports. Fixes: 8a1ab5d76639 ("mlxsw: spectrum: Implement FDB add/remove/dump for LAG") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit e43aca22ed039af235acc2ee0384f943c1fbfe83 Author: Ido Schimmel Date: Wed Jan 27 15:20:23 2016 +0100 mlxsw: spectrum: Use correct netdev when notifying bridge LAG FDB entries pointing to VLAN devices should be reported to the bridge with the matching VLAN device and not the underlying LAG device. Fixes: aac78a440887 ("mlxsw: spectrum: Adjust FDB notifications for VLAN devices") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 004f85ea8258a2ffecdeecd154bdbe08409c13a4 Author: Ido Schimmel Date: Wed Jan 27 15:20:22 2016 +0100 mlxsw: spectrum: Don't report VLAN for 802.1D FDB entries When dumping the hardware FDB we should report entries pointing to VLAN devices with VLAN 0, as packets coming into the bridge are untagged. Likewise, pass FDB_{ADD,DEL} notifications with VLAN 0 for these devices. Fixes: 54a732018d8e ("mlxsw: spectrum: Adjust switchdev ops for VLAN devices") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 45827d780aab533a777f965798018118b373cc0b Author: Ido Schimmel Date: Wed Jan 27 15:20:21 2016 +0100 mlxsw: spectrum: Notify bridge's FDB only based on learning_sync When we disable learning on bridge port we should still update the software bridge's FDB when entry pointing to this bridge port is aged-out. We can otherwise have an inconsistency between software and hardware tables. Fixes: 8a1ab5d76639 ("mlxsw: spectrum: Implement FDB add/remove/dump for LAG") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 454911333b1d86e1d58a557be271bc6b7e9e7f10 Author: Ido Schimmel Date: Wed Jan 27 15:20:20 2016 +0100 mlxsw: spectrum: Disable learning according to STP state When port is put into LISTENING state it shouldn't populate the FDB, so set the port's STP state in hardware to DISCARDING instead of LEARNING. It will therefore keep listening to BPDU packets, but discard other non-control packets and won't perform any learning. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cb026ebb8ab76829a8d8e4bbd057168ac38fb86 Author: Ido Schimmel Date: Wed Jan 27 15:20:19 2016 +0100 mlxsw: spectrum: Don't forward packets when STP state is DISABLED When STP state is set to DISABLED the port is assumed to be inactive, but currently we forward packets ingressing through it. Instead, set the port's STP state in hardware to DISCARDING, which means it doesn't forward packets or perform any learning, but it does trap control packets. However, these packets will be dropped by bridge code, which results in the expected behavior. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 039c49a6e6cf673a2bec572b3360209ec418a152 Author: Ido Schimmel Date: Wed Jan 27 15:20:18 2016 +0100 mlxsw: spectrum: Flush FDB when leaving bridge As explained in previous commit, we should always take care of flushing the FDB in the driver and not rely on bridge code. We need to distinguish between two cases with regards to LAG: 1) Port is leaving LAG while LAG is bridged (or VLAN devices on top of it). In this case don't flush the FDB entries pointing to the LAG ID, as this will affect other ports still member in the LAG. Only flush the FDB when the last port in the LAG is leaving the bridge. 2) LAG device is leaving the bridge. In this case the CHANGEUPPER event is simply propagated to each member port, so make each port flush the FDB in its turn. Note that emptying a bridged LAG from ports creates an inconsistency between hardware and software. A user who later (< ageing_time) re-populates the LAG won't have any FDB entries pointing to the LAG ID in hardware, but they will be present in the software bridge's FDB. Currently there is no good solution to this problem, but this will be addressed by us in the future. In order to optimize the flushing process, flush by port or LAG ID if there are no VLAN interfaces on top of the port. Otherwise, flush using (Port / LAG ID, FID=VID} for each of the lower 4K FIDs. In the case of VLAN device simply flush using {Port / LAG ID, vFID} with the vFID to which the VLAN device is mapped to. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 137 +++++++++++++++++++++++-- 1 file changed, 129 insertions(+), 8 deletions(-) commit 419332713581f0cbec6414f5e779afb79ddee3dd Author: Ido Schimmel Date: Wed Jan 27 15:20:17 2016 +0100 mlxsw: reg: Add the Switch Filtering DB Flush register When removing a net device from a bridge we should flush the FDB entries associated with this net device. Up until now, we relied upon bridge code to do that for us, but it is possible for user to prevent hardware from syncing with the software bridge (learning_sync=0), so we need to flush overselves. Add the Switch Filtering DB Flush (SFDF) register that is used to flush FDB entries according to different parameters (per-port, per-FID etc). Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 88 +++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 4dc236c31733f5d2a3872c88cf12f607d7d36905 Author: Ido Schimmel Date: Wed Jan 27 15:20:16 2016 +0100 mlxsw: spectrum: Handle port leaving LAG while bridged It is possible for a user to remove a port from a LAG device, while the LAG device or VLAN devices on top of it are bridged. In these cases, bridge's teardown sequence is never issued, so we need to take care of it ourselves. When LAG's unlinking event is received by port netdev: 1) Traverse its vPorts list and make those member in a bridge leave it. They will be deleted later by LAG code. 2) Make the port netdev itself leave its bridge if member in one. Fixes: 0d65fc13042f ("mlxsw: spectrum: Implement LAG port join/leave") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 30 +++++++++++++++++++--- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 8 ++++++ 3 files changed, 36 insertions(+), 3 deletions(-) commit 70f340df24518d36eeaefb6652d492f250115c19 Author: Cyrille Pitchen Date: Wed Jan 27 17:48:32 2016 +0100 spi: atmel: fix gpio chip-select in case of non-DT platform The non-DT platform that uses this driver (actually the AVR32) was taking a bad branch for determining if the IP would use gpio for CS. Adding the presence of DT as a condition fixes this issue. Fixes: 4820303480a1 ("spi: atmel: add support for the internal chip-select of the spi controller") Reported-by: Mans Rullgard Signed-off-by: Cyrille Pitchen [nicolas.ferre@atmel.com: extract from ml discussion] Signed-off-by: Nicolas Ferre Tested-by: Mans Rullgard Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-atmel.c | 1 + 1 file changed, 1 insertion(+) commit 6a3351b612b72c558910c88a43e2ef6d7d68bc97 Author: Peter Zijlstra Date: Mon Jan 25 14:09:54 2016 +0100 perf: Fix race in perf_event_exit_task_context() There is a race between perf_event_exit_task_context() and orphans_remove_work() which results in a use-after-free. We mark ctx->task with TASK_TOMBSTONE to indicate a context is 'dead', under ctx->lock. After which point event_function_call() on any event of that context will NOP A concurrent orphans_remove_work() will only hold ctx->mutex for the list iteration and not serialize against this. Therefore its possible that orphans_remove_work()'s perf_remove_from_context() call will fail, but we'll continue to free the event, with the result of free'd memory still being on lists and everything. Once perf_event_exit_task_context() gets around to acquiring ctx->mutex it too will iterate the event list, encounter the already free'd event and proceed to free it _again_. This fails with the WARN in free_event(). Plug the race by having perf_event_exit_task_context() hold ctx::mutex over the whole tear-down, thereby 'naturally' serializing against all other sites, including the orphan work. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: alexander.shishkin@linux.intel.com Cc: dsahern@gmail.com Cc: namhyung@kernel.org Link: http://lkml.kernel.org/r/20160125130954.GY6357@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/events/core.c | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) commit 78cd2c748f459739ff864dd9308c0f6caf7f6e41 Author: Peter Zijlstra Date: Mon Jan 25 14:08:45 2016 +0100 perf: Fix orphan hole We should set event->owner before we install the event, otherwise there is a hole where the target task can fork() and we'll not inherit the event because it thinks the event is orphaned. Signed-off-by: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 28b8d66e0c1cc6c02b8159ae44aec359e12feefa Author: Nicolai Hähnle Date: Wed Jan 27 11:04:19 2016 -0500 drm/amdgpu: only move pt bos in LRU list on success This fixes a race condition in the error case: since the pt bos have not necessarily been reserved in case of an error, we could move a pt bo that is currently in the middle of being evicted/moved by another process, which then resulted in a BUG_ON in ttm_bo_add_to_lru. Reviewed-by: Christian König Signed-off-by: Nicolai Hähnle Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a89a798a010e8fef66d1a85fa8b1f021304c7246 Merge: d8f00cd 4152b38 Author: Greg Kroah-Hartman Date: Thu Jan 28 08:32:42 2016 -0800 Merge tag 'usb-serial-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.5-rc2 Here are two fixes of crashes in the visor driver that could be triggered using bad (malicious) descriptors, a fix for two memory leaks in the new mxu11x0 driver, and an interface-blacklist fix for the option driver. Included are also some new device ids. Signed-off-by: Johan Hovold commit 2d19fc639516dc7b4184450b315c931d38549e61 Author: Aneesh Kumar K.V Date: Wed Jan 27 12:04:20 2016 +0530 powerpc/mm: Fixup _HPAGE_CHG_MASK This was wrongly updated by commit 7aa9a23c69ea ("powerpc, thp: remove infrastructure for handling splitting PMDs") during the last merge window. Fix it up. This could lead to incorrect behaviour in THP and/or mprotect(), at a minimum. Fixes: 7aa9a23c69ea ("powerpc, thp: remove infrastructure for handling splitting PMDs") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 370f06c88528b3988fe24a372c10e1303bb94cf6 Author: Madhavan Srinivasan Date: Mon Jan 25 14:03:46 2016 +0530 powerpc/perf: Remove PPMU_HAS_SSLOT flag for Power8 Commit 7a7868326d77 ("powerpc/perf: Add an explict flag indicating presence of SLOT field") introduced the PPMU_HAS_SSLOT flag to remove the assumption that MMCRA[SLOT] was present when PPMU_ALT_SIPR was not set. That commit's changelog also mentions that Power8 does not support MMCRA[SLOT]. However when the Power8 PMU support was merged, it errnoeously included the PPMU_HAS_SSLOT flag. So remove PPMU_HAS_SSLOT from the Power8 flags. mpe: On systems where MMCRA[SLOT] exists, the field occupies bits 37:39 (IBM numbering). On Power8 bit 37 is reserved, and 38:39 overlap with the high bits of the Threshold Event Counter Mantissa. I am not aware of any published events which use the threshold counting mechanism, which would cause the mantissa bits to be set. So in practice this bug is unlikely to trigger. Fixes: e05b9b9e5c10 ("powerpc/perf: Power8 PMU support") Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power8-pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 642f0f2a1563b5ab6f5de896f602177ac1f06652 Author: Amitoj Kaur Chawla Date: Mon Jan 25 23:03:57 2016 +0530 drm/amdkfd: Remove unnecessary cast in kfree Remove an unnecassary cast in the argument to kfree. Found using Coccinelle. The semantic patch used to find this is as follows: // @@ type T; expression *f; @@ - kfree((T *)(f)); + kfree(f); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f785d98711925aceb198fb96abd786fd19fad657 Author: Colin Ian King Date: Fri Jan 22 17:35:26 2016 +0000 drm/amdgpu: fix non-ANSI declaration of amdgpu_amdkfd_gfx_*_get_functions() amdgpu_amdkfd_gfx_7_get_functions and amdgpu_amdkfd_gfx_8_0_get_functions have no parameters, so use the normal void parameter convention to make them match their prototypes in the header file drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h Signed-off-by: Colin Ian King Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 39178bb2b3e78cfcb9b6311fa9e2b8d6e3cfe51f Author: Arnd Bergmann Date: Mon Jan 25 16:59:09 2016 +0100 pinctrl: nomadik: hide unused functions The nomadik pinctrl driver has two functions that are only used for debugfs output and are otherwise unused: drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but not used This makes the function definitions conditional to avoid the harmless warnings. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-abx500.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f5d0ca224a071d7077bbdae347cb514949d64fd9 Author: Lucas Stach Date: Tue Jan 12 15:04:30 2016 +0100 ARM: dts: imx6: remove bogus interrupt-parent from CAAM node The interrupt-parent property is not needed as it is inherited from the parent bus and in the case of the CAAM node actively points to the wrong interrupt controller (GIC instead of GPC). This leads to the CAAM IRQs not getting unmasked at the GPC level, leaving them unable to wake the CPU from wait mode, potentially impacting performance of the CAAM unit when CPUidle is enabled. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl.dtsi | 1 - 1 file changed, 1 deletion(-) commit 7ee96216c31aabe1eb42fb91ff50dae9fcd014b2 Author: Takashi Iwai Date: Thu Jan 28 07:54:16 2016 +0100 ALSA: dummy: Disable switching timer backend via sysfs ALSA dummy driver can switch the timer backend between system timer and hrtimer via its hrtimer module option. This can be also switched dynamically via sysfs, but it may lead to a memory corruption when switching is done while a PCM stream is running; the stream instance for the newly switched timer method tries to access the memory that was allocated by another timer method although the sizes differ. As the simplest fix, this patch just disables the switch via sysfs by dropping the writable bit. BugLink: http://lkml.kernel.org/r/CACT4Y+ZGEeEBntHW5WHn2GoeE0G_kRrCmUh6=dWyy-wfzvuJLg@mail.gmail.com Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/drivers/dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac1efcfb35f73657ec1e28b1e8a3c895529c1108 Author: Randy Dunlap Date: Wed Jan 27 18:04:10 2016 -0800 ALSA: timer: fix SND_PCM_TIMER Kconfig text Fix spelling and typos for SND_PCM_TIMER. Signed-off-by: Randy Dunlap Signed-off-by: Takashi Iwai sound/core/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 60dee3ca27b3613e6519df52d02eadf71f853859 Author: Gioh Kim Date: Wed Jan 27 12:02:09 2016 +0100 hwmon: (fam15h_power) Add bit masking for tdp_limit Add bit masking to read ApmTdpLimit precisely Signed-off-by: Gioh Kim Acked-by: Borislav Petkov Acked-by: Huang Rui Signed-off-by: Guenter Roeck drivers/hwmon/fam15h_power.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 2370abdab530718b61afc222c51901bdc2884ee2 Author: Trond Myklebust Date: Wed Jan 27 20:32:50 2016 -0500 NFS: Cleanup - rename NFS_LAYOUT_RETURN_BEFORE_CLOSE NFS_LAYOUT_RETURN_BEFORE_CLOSE is being used to signal that a layoutreturn is needed, either due to a layout recall or to a layout error. Rename it to NFS_LAYOUT_RETURN_REQUESTED in order to clarify its purpose. Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayout.c | 2 +- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +- fs/nfs/pnfs.c | 10 +++++----- fs/nfs/pnfs.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) commit d4f1b06d685d11ebdaccf11c0db1cb3c78736862 Author: Dmitry Torokhov Date: Sat Jan 16 10:04:49 2016 -0800 Input: vmmouse - fix absolute device registration We should set device's capabilities first, and then register it, otherwise various handlers already present in the kernel will not be able to connect to the device. Reported-by: Lauri Kasanen Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/vmmouse.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 015bb5e134544492d840cee17d7442194cfb0fe4 Author: Grygorii Strashko Date: Sat Jan 16 10:35:47 2016 -0800 Input: serio - drop warnings in case of EPROBE_DEFER from serio_find_driver() Now serio_find_driver() will print warnings in case device_attach() returns -EPROBE_DEFER. Those warnings are obsolete, in genral, because: - DD core can report the same if required - since commit 013c074f8642 ("PM / sleep: prohibit devices probing during suspend/hibernation") the devices probing is prohibited during System suspend and deferred device will be carefully reprobed once Resume is finished. Hence, drop warnings in case of EPROBE_DEFER from serio_find_driver(). Signed-off-by: Grygorii Strashko Acked-by: Rafael J. Wysocki Signed-off-by: Dmitry Torokhov drivers/input/serio/serio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 497e1b3f6b6d3cf2206d15687eb7bfa0ab0e968d Author: Amitoj Kaur Chawla Date: Wed Jan 27 15:44:09 2016 -0800 Input: cap11xx - add missing of_node_put for_each_child_of_node performs an of_node_get on each iteration, so to break out of the loop an of_node_put is required. Found using Coccinelle. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cap11xx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit af6e94634d0a77aa42a9fdee35abd00a95b4ca54 Author: Arnd Bergmann Date: Wed Jan 27 15:43:32 2016 -0800 Input: sirfsoc-onkey - allow modular build CONFIG_INPUT may itself be a loadable module, but the sirf power key driver is listed as 'bool', which makes it possible to select a broken configuration with the driver built-in but the subsystem not loaded. In this configuration, we get a link error: drivers/input/built-in.o: In function `sirfsoc_pwrc_isr': drivers/input/misc/sirfsoc-onkey.c:63: undefined reference to `input_event' drivers/input/built-in.o: In function `sirfsoc_pwrc_isr': include/linux/input.h:414: undefined reference to `input_event' drivers/input/built-in.o: In function `sirfsoc_pwrc_probe': drivers/input/misc/sirfsoc-onkey.c:132: undefined reference to `devm_input_allocate_device' drivers/input/misc/sirfsoc-onkey.c:139: undefined reference to `input_set_capability' drivers/input/misc/sirfsoc-onkey.c:161: undefined reference to `input_register_device' drivers/input/built-in.o: In function `sirfsoc_pwrc_report_event': drivers/input/misc/sirfsoc-onkey.c:48: undefined reference to `input_event' drivers/input/built-in.o: In function `sirfsoc_pwrc_report_event': include/linux/input.h:414: undefined reference to `input_event' drivers/input/built-in.o:(.debug_addr+0x24): undefined reference to `input_event' drivers/input/built-in.o:(.debug_addr+0xbc): undefined reference to `devm_input_allocate_device' drivers/input/built-in.o:(.debug_addr+0x104): undefined reference to `input_set_capability' drivers/input/built-in.o:(.debug_addr+0x128): undefined reference to `input_register_device' This marks the driver as 'tristate' so it becomes possible to have it in a loadable module, mainly to help with randconfig builds. We also have to add a missing semicolon here, which ended up not being needed in built-in mode because the following MODULE_DEVICE_TABLE is an empty macro followed by another semicolon then. Signed-off-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov drivers/input/misc/Kconfig | 2 +- drivers/input/misc/sirfsoc-onkey.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a6ed4a18ba6a6f5a01e024b9d221d6439bf6ca4c Author: Arnd Bergmann Date: Wed Jan 27 15:42:25 2016 -0800 Input: xpad - remove unused function There are two definitions of xpad_identify_controller(), one is used when CONFIG_JOYSTICK_XPAD_LEDS is set, but the other one is empty and never used, and we get a gcc warning about it: drivers/input/joystick/xpad.c:1210:13: warning: 'xpad_identify_controller' defined but not used [-Wunused-function] This removes the second definition. Signed-off-by: Arnd Bergmann Fixes: cae705baa40b ("Input: xpad - re-send LED command on present event") Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 1 - 1 file changed, 1 deletion(-) commit 1c1ecf172a4616cd8567182b99efa7a5df77f5d2 Merge: eee0450 103502a Author: James Morris Date: Thu Jan 28 10:53:54 2016 +1100 Merge tag 'seccomp-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into for-linus commit eee045021fb22aeac7f5d6f2092430b530c880ee Author: David Howells Date: Wed Jan 27 01:02:03 2016 +0000 KEYS: Only apply KEY_FLAG_KEEP to a key if a parent keyring has it set KEY_FLAG_KEEP should only be applied to a key if the keyring it is being linked into has KEY_FLAG_KEEP set. To this end, partially revert the following patch: commit 1d6d167c2efcfe9539d9cffb1a1be9c92e39c2c0 Author: Mimi Zohar Date: Thu Jan 7 07:46:36 2016 -0500 KEYS: refcount bug fix to undo the change that made it unconditional (Mimi got it right the first time). Without undoing this change, it becomes impossible to delete, revoke or invalidate keys added to keyrings through __key_instantiate_and_link() where the keyring has itself been linked to. To test this, run the following command sequence: keyctl newring foo @s keyctl add user a a %:foo keyctl unlink %user:a %:foo keyctl clear %:foo With the commit mentioned above the third and fourth commands fail with EPERM when they should succeed. Reported-by: Stephen Gallager Signed-off-by: David Howells Acked-by: Mimi Zohar cc: Mimi Zohar cc: keyrings@vger.kernel.org cc: stable@vger.kernel.org Signed-off-by: James Morris security/keys/key.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 46560388c476c8471fde7712c10f9fad8d0d1875 Author: Ray Jui Date: Wed Jan 27 16:52:24 2016 -0600 PCI: iproc: Allow multiple devices except on PAXC Commit 943ebae781f5 ("PCI: iproc: Add PAXC interface support") only allowed device 0, which is a regression on BCMA-based platforms. All systems support only one device, a Root Port at 00:00.0, on the root bus. PAXC-based systems support only the Root Port (00:00.0) and a single device (with multiple functions) below it, e.g., 01:00.0, 01:00.1, etc. Non-PAXC systems support arbitrary devices below the Root Port. [bhelgaas: changelog, fold in removal of MAX_NUM_PAXC_PF check] Fixes: 943ebae781f5 ("PCI: iproc: Add PAXC interface support") Reported-by: Rafal Milecki Signed-off-by: Ray Jui Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-iproc.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit b331bc20d9281213f7fb67912638e0fb5baeb324 Author: Arnd Bergmann Date: Mon Jan 25 16:45:48 2016 +0100 cpufreq: cpufreq-dt: avoid uninitialized variable warnings: gcc warns quite a bit about values returned from allocate_resources() in cpufreq-dt.c: cpufreq-dt.c: In function 'cpufreq_init': cpufreq-dt.c:327:6: error: 'cpu_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized] cpufreq-dt.c:197:17: note: 'cpu_dev' was declared here cpufreq-dt.c:376:2: error: 'cpu_clk' may be used uninitialized in this function [-Werror=maybe-uninitialized] cpufreq-dt.c:199:14: note: 'cpu_clk' was declared here cpufreq-dt.c: In function 'dt_cpufreq_probe': cpufreq-dt.c:461:2: error: 'cpu_clk' may be used uninitialized in this function [-Werror=maybe-uninitialized] cpufreq-dt.c:447:14: note: 'cpu_clk' was declared here The problem is that it's slightly hard for gcc to follow return codes across PTR_ERR() calls. This patch uses explicit assignments to the "ret" variable to make it easier for gcc to verify that the code is actually correct, without the need to add a bogus initialization. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit fb2a24a1c6457d21df9fae0dd66b20c63ba56077 Author: Arnd Bergmann Date: Mon Jan 25 16:44:38 2016 +0100 cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype There are two definitions of pxa_cpufreq_change_voltage, with slightly different prototypes after one of them had its argument marked 'const'. Now the other one (for !CONFIG_REGULATOR) produces a harmless warning: drivers/cpufreq/pxa2xx-cpufreq.c: In function 'pxa_set_target': drivers/cpufreq/pxa2xx-cpufreq.c:291:36: warning: passing argument 1 of 'pxa_cpufreq_change_voltage' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] ret = pxa_cpufreq_change_voltage(&pxa_freq_settings[idx]); ^ drivers/cpufreq/pxa2xx-cpufreq.c:205:12: note: expected 'struct pxa_freqs *' but argument is of type 'const struct pxa_freqs *' static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq) ^ This changes the prototype in the same way as the other, which avoids the warning. Fixes: 03c229906311 (cpufreq: pxa: make pxa_freqs arrays const) Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Cc: 4.2+ # 4.2+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/pxa2xx-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 993e9fe1e70aedbb6e9670211f1ad56beea8373d Author: Arnd Bergmann Date: Mon Jan 25 16:48:28 2016 +0100 PM: APM_EMULATION does not depend on PM The APM emulation code does multiple things, and some of them depend on PM_SLEEP, while the battery management does not. However, selecting the symbol like SHARPSL_PM does causes a Kconfig warning: warning: (SHARPSL_PM && PMAC_APM_EMU) selects APM_EMULATION which has unmet direct dependencies (PM && SYS_SUPPORTS_APM_EMULATION) From all I can tell, this is completely harmless, and we can simply allow APM_EMULATION to be enabled here, even if PM is not. Signed-off-by: Arnd Bergmann Signed-off-by: Rafael J. Wysocki kernel/power/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2dadfd7564ef28391609c7ef896fd85218799012 Author: Gautham R Shenoy Date: Wed Jan 27 12:02:26 2016 +0530 cpufreq: Use list_is_last() to check last entry of the policy list Currently next_policy() explicitly checks if a policy is the last policy in the cpufreq_policy_list. Use the standard list_is_last primitive instead. Signed-off-by: Gautham R. Shenoy Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e4b133cc4b30b48d488e4e4fffb132f173ce4358 Author: Viresh Kumar Date: Mon Jan 25 22:33:46 2016 +0530 cpufreq: Fix NULL reference crash while accessing policy->governor_data There is a race discovered by Juri, where we are able to: - create and read a sysfs file before policy->governor_data is being set to a non NULL value. OR - set policy->governor_data to NULL, and reading a file before being destroyed. And so such a crash is reported: Unable to handle kernel NULL pointer dereference at virtual address 0000000c pgd = edfc8000 [0000000c] *pgd=bfc8c835 Internal error: Oops: 17 [#1] SMP ARM Modules linked in: CPU: 4 PID: 1730 Comm: cat Not tainted 4.5.0-rc1+ #463 Hardware name: ARM-Versatile Express task: ee8e8480 ti: ee930000 task.ti: ee930000 PC is at show_ignore_nice_load_gov_pol+0x24/0x34 LR is at show+0x4c/0x60 pc : [] lr : [] psr: a0070013 sp : ee931dd0 ip : ee931de0 fp : ee931ddc r10: ee4bc290 r9 : 00001000 r8 : ef2cb000 r7 : ee4bc200 r6 : ef2cb000 r5 : c0af57b0 r4 : ee4bc2e0 r3 : 00000000 r2 : 00000000 r1 : c0928df4 r0 : ef2cb000 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: adfc806a DAC: 00000051 Process cat (pid: 1730, stack limit = 0xee930210) Stack: (0xee931dd0 to 0xee932000) 1dc0: ee931dfc ee931de0 c058ae88 c058f1a4 1de0: edce3bc0 c07bfca4 edce3ac0 00001000 ee931e24 ee931e00 c01fcb90 c058ae48 1e00: 00000001 edce3bc0 00000000 00000001 ee931e50 ee8ff480 ee931e34 ee931e28 1e20: c01fb33c c01fcb0c ee931e8c ee931e38 c01a5210 c01fb314 ee931e9c ee931e48 1e40: 00000000 edce3bf0 befe4a00 ee931f78 00000000 00000000 000001e4 00000000 1e60: c00545a8 edce3ac0 00001000 00001000 befe4a00 ee931f78 00000000 00001000 1e80: ee931ed4 ee931e90 c01fbed8 c01a5038 ed085a58 00020000 00000000 00000000 1ea0: c0ad72e4 ee931f78 ee8ff488 ee8ff480 c077f3fc 00001000 befe4a00 ee931f78 1ec0: 00000000 00001000 ee931f44 ee931ed8 c017c328 c01fbdc4 00001000 00000000 1ee0: ee8ff480 00001000 ee931f44 ee931ef8 c017c65c c03deb10 ee931fac ee931f08 1f00: c0009270 c001f290 c0a8d968 ef2cb000 ef2cb000 ee8ff480 00000020 ee8ff480 1f20: ee8ff480 befe4a00 00001000 ee931f78 00000000 00000000 ee931f74 ee931f48 1f40: c017d1ec c017c2f8 c019c724 c019c684 ee8ff480 ee8ff480 00001000 befe4a00 1f60: 00000000 00000000 ee931fa4 ee931f78 c017d2a8 c017d160 00000000 00000000 1f80: 000a9f20 00001000 befe4a00 00000003 c000ffe4 ee930000 00000000 ee931fa8 1fa0: c000fe40 c017d264 000a9f20 00001000 00000003 befe4a00 00001000 00000000 Unable to handle kernel NULL pointer dereference at virtual address 0000000c 1fc0: 000a9f20 00001000 befe4a00 00000003 00000000 00000000 00000003 00000001 pgd = edfc4000 [0000000c] *pgd=bfcac835 1fe0: 00000000 befe49dc 000197f8 b6e35dfc 60070010 00000003 3065b49d 134ac2c9 [] (show_ignore_nice_load_gov_pol) from [] (show+0x4c/0x60) [] (show) from [] (sysfs_kf_seq_show+0x90/0xfc) [] (sysfs_kf_seq_show) from [] (kernfs_seq_show+0x34/0x38) [] (kernfs_seq_show) from [] (seq_read+0x1e4/0x4e4) [] (seq_read) from [] (kernfs_fop_read+0x120/0x1a0) [] (kernfs_fop_read) from [] (__vfs_read+0x3c/0xe0) [] (__vfs_read) from [] (vfs_read+0x98/0x104) [] (vfs_read) from [] (SyS_read+0x50/0x90) [] (SyS_read) from [] (ret_fast_syscall+0x0/0x1c) Code: e5903044 e1a00001 e3081df4 e34c1092 (e593300c) ---[ end trace 5994b9a5111f35ee ]--- Fix that by making sure, policy->governor_data is updated at the right places only. Cc: 4.2+ # 4.2+ Reported-and-tested-by: Juri Lelli Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_governor.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 75274b33e779ae40a750bcb4bd0b07c4dfef4746 Author: Anders Roxell Date: Wed Jan 27 20:26:54 2016 +0100 cpuidle: coupled: remove unused define cpuidle_coupled_lock This was found with the -RT patch enabled, but the fix should apply to non-RT also. Used multi_v7_defconfig+PREEMPT_RT_FULL=y and this caused a compilation warning without this fix: ../drivers/cpuidle/coupled.c:122:21: warning: 'cpuidle_coupled_lock' defined but not used [-Wunused-variable] Signed-off-by: Anders Roxell Signed-off-by: Rafael J. Wysocki drivers/cpuidle/coupled.c | 1 - 1 file changed, 1 deletion(-) commit a3d09c73492e57a1189e410f67e4d2115b23a3a8 Author: Moritz Fischer Date: Wed Jan 27 08:29:27 2016 +0100 PM / Domains: Fix typo in comment Acked-by: Kevin Hilman Signed-off-by: Moritz Fischer Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdb300a041f5df1dfbde1367f95109b6449d1371 Author: Ulf Hansson Date: Wed Jan 27 09:10:37 2016 +0100 PM / Domains: Fix potential deadlock while adding/removing subdomains We must preserve the same order of how we acquire and release the lock for genpd, as otherwise we may encounter deadlocks. The power on phase of a genpd starts by acquiring its lock. Then it walks the hierarchy of its parent domains to be able to power on these first, as per design of genpd. From a locking perspective this means the locks of the parents becomes acquired after the lock of the subdomain. Let's fix pm_genpd_add|remove_subdomain() to maintain the same order of acquiring/releasing the genpd lock as being applied in the power on/off sequence. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit ee43a1a0cd2a8f33cddfa1323a60b5cfcf865ba0 Author: Aaro Koskinen Date: Sun Jan 24 00:36:40 2016 +0200 ASoC: simple-card: don't fail if sysclk setting is not supported Commit e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk with mclk-fs") added sysclk / SND_SOC_CLOCK_OUT setting, that makes asoc_simple_card_hw_params fail if the operation is not supported, although the intention clearly was to ignore ENOTSUPP. Fix it. The patch fixes audio playback on Kirkwood / OpenRD client, where the following errors are seen: asoc-simple-card sound: ASoC: machine hw_params failed: -524 alsa-lib: /alsa-lib-1.0.28/src/pcm/pcm_hw.c:327:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS failed (-524): Unknown error 524 Fixes: e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk with mclk-fs") Signed-off-by: Aaro Koskinen Reviewed-by: Andrew Lunn Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03c21cb775a313f1ff19be59c5d02df3e3526471 Merge: 075356c 481eaec Author: Linus Torvalds Date: Wed Jan 27 11:56:03 2016 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio tests and fixes from Michael Tsirkin: "This fixes existing tests broken by barrier rework, and adds some new tests. Plus, there's a fix for an old bug in virtio-pci" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: tools/virtio: add ringtest utilities sh: fix smp_store_mb for !SMP tools/virtio: use virt_xxx barriers virtio_pci: fix use after free on release commit b0a119fd990420d84baf8bc802bd2caf85edb464 Author: Ralf Baechle Date: Wed Jan 27 20:50:36 2016 +0100 Revert "MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function" This reverts commit 5bdb102b3f9785cb88467bc7c75fa0f5cacc8dc5. Brian Norris is reporting: Ralf, Please revert this and send it to Linus (or else, I can send it myself). This is causing build failures, because I didn't take the rest of Simon's series yet. drivers/mtd/bcm63xxpart.c: In function 'bcm63xx_parse_cfe_partitions': drivers/mtd/bcm63xxpart.c:93:2: error: implicit declaration of function 'bcm63xx_nvram_get_psi_size' [-Werror=implicit-function-declaration] Signed-off-by: Ralf Baechle References: https://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20160126191607.GA111152%40google.com arch/mips/bcm63xx/nvram.c | 11 +++++++++++ arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h | 2 ++ 2 files changed, 13 insertions(+) commit 075356c1cf59e37368f60cd68bdc99a6e2e46d83 Merge: f0ce3ff 57adec8 Author: Linus Torvalds Date: Wed Jan 27 11:08:30 2016 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The main thing here is to get us booting under qemu again after it turned out that not all of the PMU registers are emulated there, causing us to die early in boot. - Ensure we don't access PMU registers of the PMU is not implemented (fixes booting under QEMU) - Fix BUG_ON triggered during module loading with DEBUG_SET_MODULE_RONX - Ensure the kasan zero page is read-only - Hide __efistub_ symbol aliases from kallsyms, since they otherwise confuse the backtrace code - Ensure !PTE_WRITE kernel ptes are marked as read-only - defconfig updates based on requests and patches on the list - Other minor fixes (typos, build system)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: avoid calling apply_to_page_range on empty range arm64: defconfig: updates for 4.5 arm64: errata: Add -mpc-relative-literal-loads to build flags Eliminate the .eh_frame sections from the aarch64 vmlinux and kernel modules arm64: Fix an enum typo in mm/dump.c arm64: Honour !PTE_WRITE in set_pte_at() for kernel mappings arm64: kernel: fix architected PMU registers unconditional access arm64: kasan: ensure that the KASAN zero page is mapped read-only arm64: hide __efistub_ aliases from kallsyms commit 57480484f9f7631738ef28b952eca3c9081c4291 Author: Jon Medhurst (Tixy) Date: Tue Jan 26 17:59:13 2016 +0000 component: Detach components when deleting master struct component_master_add_with_match calls find_components which, if any components already exist, it attaches to the master struct. However, if we later encounter an error the master struct is deleted, leaving components with a dangling pointer to it. If the error was a temporary one, e.g. for probe deferral, then when the master device is re-probed, it will fail to find the required components as they appear to already be attached to a master. Fix this by nulling components pointers to the master struct when it is deleted. This code is factored out into a separate function so it can be shared with component_master_del. Signed-off-by: Jon Medhurst Signed-off-by: Russell King drivers/base/component.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit f0ce3ff42e1eb2219d151e73219b9ad790ef52fb Merge: 119ae9b ed8e5a2 Author: Linus Torvalds Date: Wed Jan 27 10:50:42 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "s390 and POWER bug fixes, plus enabling the KVM-VFIO interface on s390" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM doc: Fix KVM_SMI chapter number KVM: s390: fix memory overwrites when vx is disabled KVM: s390: Enable the KVM-VFIO device KVM: s390: fix guest fprs memory leak KVM: PPC: Fix ONE_REG AltiVec support KVM: PPC: Increase memslots to 512 KVM: PPC: Book3S PR: Remove unused variable 'vcpu_book3s' KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8 KVM: PPC: Book3S HV: Handle unexpected traps in guest entry/exit code better commit 119ae9b7de212e5b31b09c2500a10096b3b5256f Author: Antonio Ospite Date: Wed Jan 27 13:37:34 2016 +0100 mailmap: redirect inactive address The email address is not active anymore, use Antonio's personal email address in case someone wants to get in touch for the code wrote for Amarula Solutions. Signed-off-by: Antonio Ospite Cc: Michael Trimarchi Signed-off-by: Linus Torvalds .mailmap | 1 + 1 file changed, 1 insertion(+) commit 16ab8a5cbea463e4d14bf0ce698f11fa64b70ae1 Author: Alex Williamson Date: Wed Jan 27 11:22:25 2016 -0700 vfio/noiommu: Don't use iommu_present() to track fake groups Using iommu_present() to determine whether an IOMMU group is real or fake has some problems. First, apparently Power systems don't register an IOMMU on the device bus, so the groups and containers get marked as noiommu and then won't bind to their actual IOMMU driver. Second, I expect we'll run into the same issue as we try to support vGPUs through vfio, since they're likely to emulate this behavior of creating an IOMMU group on a virtual device and then providing a vfio IOMMU backend tailored to the sort of isolation they provide, which won't necessarily be fully compatible with the IOMMU API. The solution here is to use the existing iommudata interface to IOMMU groups, which allows us to easily identify the fake groups we've created for noiommu purposes. The iommudata we set is purely arbitrary since we're only comparing the address, so we use the address of the noiommu switch itself. Reported-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy Tested-by: Alexey Kardashevskiy Tested-by: Anatoly Burakov Tested-by: Santosh Shukla Fixes: 03a76b60f8ba ("vfio: Include No-IOMMU mode") Signed-off-by: Alex Williamson drivers/vfio/vfio.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 03590cb56d5df7367ccb9e6e0127593254401c42 Author: Russell King Date: Wed Jan 27 18:14:13 2016 +0000 ARM: wire up copy_file_range() syscall Add the copy_file_range() syscall to ARM. Signed-off-by: Russell King arch/arm/include/uapi/asm/unistd.h | 1 + arch/arm/kernel/calls.S | 1 + 2 files changed, 2 insertions(+) commit fe6fc1f132b4300c1f6defd43a5d673eb60a820d Author: Slava Grigorev Date: Tue Jan 26 17:35:57 2016 -0500 drm/radeon: fix DP audio support for APU with DCE4.1 display engine Properly setup the DFS divider for DP audio for DCE4.1. Signed-off-by: Slava Grigorev Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/evergreen_hdmi.c | 10 +++++++++ drivers/gpu/drm/radeon/evergreend.h | 5 +++++ drivers/gpu/drm/radeon/radeon_atombios.c | 37 +++++++++++++++++++++++++------- 3 files changed, 44 insertions(+), 8 deletions(-) commit a64c9dab1c4d05c87ec8a1cb9b48915816462143 Author: Slava Grigorev Date: Tue Jan 26 16:56:25 2016 -0500 drm/radeon: Add a common function for DFS handling Move encoding of DFS (digital frequency synthesizer) divider into a separate function and improve calculation precision. Signed-off-by: Slava Grigorev Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/dce6_afmt.c | 12 ++---------- drivers/gpu/drm/radeon/radeon_audio.c | 12 ++++++++++++ drivers/gpu/drm/radeon/radeon_audio.h | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) commit c9a392eac18409f51a071520cf508c0b4ad990e2 Author: Slava Grigorev Date: Tue Jan 26 16:45:10 2016 -0500 drm/radeon: cleaned up VCO output settings for DP audio This is preparation for the fixes in the following patches. Signed-off-by: Slava Grigorev Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/dce6_afmt.c | 2 +- drivers/gpu/drm/radeon/radeon.h | 2 +- drivers/gpu/drm/radeon/radeon_atombios.c | 12 +++++++----- drivers/gpu/drm/radeon/radeon_audio.c | 8 +------- 4 files changed, 10 insertions(+), 14 deletions(-) commit ab342c77fa60a30fce4d4228f88fd1b7bf566055 Author: Dmitry Lifshitz Date: Wed Dec 30 15:39:05 2015 +0200 ARM: dts: am57xx: sbc-am57x: correct Eth PHY settings Update Eth PHY settings to make it possible to run both phys at 1Gbps. Signed-off-by: Dmitry Lifshitz Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2fe8bab2b0b1ab72dc54814c5d904a1044b36acc Author: Dmitry Lifshitz Date: Wed Dec 30 15:39:04 2015 +0200 ARM: dts: am57xx: cl-som-am57x: fix CPSW EMAC pinmux Fix CPSW EMAC pinmux Signed-off-by: Dmitry Lifshitz Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ddfc9fc9b2cd6be71bd002f0f36198d487d5085 Author: Dmitry Lifshitz Date: Wed Dec 30 15:39:03 2015 +0200 ARM: dts: am57xx: sbc-am57x: fix UART3 pinmux Fix UART3 pinmux. Signed-off-by: Dmitry Lifshitz Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-sbc-am57x.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e46c408fc74b96a562590bf7c7c2a2e18f88fb06 Author: Dmitry Lifshitz Date: Wed Dec 30 15:39:02 2015 +0200 ARM: dts: am57xx: cl-som-am57x: update SPI Flash frequency On-board SPI flash cat act at 48Mhz SPI bus frequency. Update the DT frequency property. Signed-off-by: Dmitry Lifshitz Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c71ff38e325fa41a610b051030db41d9cdf011ef Author: Dmitry Lifshitz Date: Wed Dec 30 15:39:01 2015 +0200 ARM: dts: am57xx: cl-som-am57x: set HOST mode for USB2 Setup USB2 to act in "HOST" mode by default. Signed-off-by: Dmitry Lifshitz Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd73da8c3b9dd1cc8957bb2c90757fffb51b1396 Author: Dmitry Lifshitz Date: Wed Dec 30 15:39:00 2015 +0200 ARM: dts: am57xx: sbc-am57x: fix SB-SOM EEPROM I2C address Fix SB-SOM EEPROM I2C address Signed-off-by: Dmitry Lifshitz Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-sbc-am57x.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2dfdc7544219729ddf5c8e8404348b72e0d0d7c5 Author: Adam Ford Date: Fri Jan 1 10:38:28 2016 -0600 ARM: dts: LogicPD Torpedo: Revert Duplicative Entries Revert commit 7cd6ca770d1b ("ARM: dts: Change I2C2 and I2C3 to 400KHz for LogicPD Torpedo DM3730 devkit") It was already done and it is just a duplicate. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 8 -------- 1 file changed, 8 deletions(-) commit 95e7d03e086846df987121e6894f05aae44ff132 Author: Grygorii Strashko Date: Mon Dec 28 15:52:39 2015 +0200 ARM: dts: am437x: pixcir_tangoc: use correct flags for irq types Now IRQs for Pixcir Tangoc touchscreen are defined using IRQ_TYPE_NONE in am437x-gp-evm.dts and am43x-epos-evm.dts wich do not correspond HW. Hence, update am437x-gp-evm.dts and am43x-epos-evm.dts files and use correct flag IRQ_TYPE_EDGE_FALLING for irq types. While here, remove duplicated irq declaration for pixcir_ts@5c node in am437x-gp-evm.dts. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-gp-evm.dts | 4 +--- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) commit 84fb225ad257442d879a1f57c79184e31fb17aea Author: Grygorii Strashko Date: Mon Dec 28 15:52:04 2015 +0200 ARM: dts: am4372: fix irq type for arm twd and global timer As per ARM documentation PPI(0) ID27 - global timer interrupt is rising-edge sensitive. PPI(2) ID29 - twd interrupt is rising-edge sensitive. and the same is proved by GIC distributor register value GIC_DIST_CONFIG(0xC04) = 0x7DC00000. Hence, set IRQ triggering type to IRQ_TYPE_EDGE_RISING for ARM TWD and Global timers. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08b21d30c6f619aa3718620a7de91207d28bdbc5 Author: Rex Zhu Date: Thu Jan 21 19:24:44 2016 +0800 drm/amd/powerplay: Update SMU firmware loading for Stoney Fix firmware init on Stoney when powerplay is enabled. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 41 ++++++++++++++++++------ 1 file changed, 32 insertions(+), 9 deletions(-) commit d10d34aa7c49e75146fc7149363286348e75e530 Author: Marcel Holtmann Date: Mon Jan 25 08:44:03 2016 +0100 Bluetooth: Add missing COMPATIBLE_IOCTL for UART line discipline The HCIUARTGETDEVICE, HCIUARTSETFLAGS and HCIUARTGETFLAGS ioctl are missing the COMPATIBLE_IOCTL declaration. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg fs/compat_ioctl.c | 3 +++ 1 file changed, 3 insertions(+) commit 103502a35cfce0710909da874f092cb44823ca03 Author: Jann Horn Date: Sat Dec 26 06:00:48 2015 +0100 seccomp: always propagate NO_NEW_PRIVS on tsync Before this patch, a process with some permissive seccomp filter that was applied by root without NO_NEW_PRIVS was able to add more filters to itself without setting NO_NEW_PRIVS by setting the new filter from a throwaway thread with NO_NEW_PRIVS. Signed-off-by: Jann Horn Cc: stable@vger.kernel.org Signed-off-by: Kees Cook kernel/seccomp.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit e1c0ebad3f77387c6684f8b7e86a4bbaca7577ac Author: Chris Mason Date: Wed Jan 27 06:38:45 2016 -0800 btrfs: don't use GFP_HIGHMEM for free-space-tree bitmap kzalloc This was copied incorrectly from the __vmalloc call. Signed-off-by: Chris Mason fs/btrfs/free-space-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b6ec8c0a3708f0a54b75ee1200772ec5226ec49 Author: Christian Borntraeger Date: Wed Jan 27 15:37:58 2016 +0100 debugobjects: Allow bigger number of early boot objects On my bigger s390 systems I always get "Out of memory. ODEBUG disabled". Since the number of objects is needed at compile time, we can not change the size dynamically before the caches etc are available. Doubling the size seems to do the trick. Since it is init data it will be freed anyway, this should be ok. Signed-off-by: Christian Borntraeger Link: http://lkml.kernel.org/r/1453905478-13409-1-git-send-email-borntraeger@de.ibm.com Signed-off-by: Thomas Gleixner lib/debugobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a39bb9a0557a3fc860c3c9d67a7326b0d2f1bd66 Author: Chen Gang Date: Thu Jan 7 05:06:13 2016 +0800 include/linux/cleancache.h: Clean up code Let cleancache_fs_enabled() call cleancache_fs_enabled_mapping() directly. Remove redundant variable ret in cleancache_get_page(). Signed-off-by: Chen Gang Signed-off-by: Konrad Rzeszutek Wilk include/linux/cleancache.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit b3c6de492b9ea30a8dcc535d4dc2eaaf0bb3f116 Author: Julia Lawall Date: Thu Jan 21 16:47:29 2016 +0100 cleancache: constify cleancache_ops structure The cleancache_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Konrad Rzeszutek Wilk drivers/xen/tmem.c | 2 +- include/linux/cleancache.h | 2 +- mm/cleancache.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit d32a4e34348869a273a01139112a13fc6870f003 Merge: bf60920 3e4c5ef Author: Chris Mason Date: Wed Jan 27 05:48:23 2016 -0800 Merge branch 'dev/fst-followup' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5 commit bf6092066f80840410e3401cd962b23d54a95713 Author: David Sterba Date: Wed Jan 27 14:06:29 2016 +0100 btrfs: sysfs: check initialization state before updating features If the mount phase is not finished, we can't update the sysfs files. Reported-by: Chris Mason Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/sysfs.c | 3 +++ 1 file changed, 3 insertions(+) commit f212c6d8c2b21c1e1d0158d38a7c37f4427f3848 Author: Mans Rullgard Date: Thu Jan 21 14:55:56 2016 +0000 ASoC: mxs-saif: fix clk_prepare() without matching clk_unprepare() The clk_prepare() call in hw_params() has no matching clk_unprepare(), leaving the clk with an ever-increasing prepare count. Moreover, hw_params() can be called multiple times which would again leave us with a runaway prepare count. Fix this by moving the clk_prepare() call to the startup() function and adding a shutdown() function with a matching clk_unprepare() as these operations are already correctly bracketed by soc-core. Signed-off-by: Mans Rullgard Signed-off-by: Mark Brown sound/soc/mxs/mxs-saif.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 3a5242e648a8d009f0e0fd47867592e5265374b6 Author: Masahiro Yamada Date: Sun Jan 24 04:25:13 2016 +0900 pinctrl: pxa: export pxa2xx_pinctrl_init() Building pinctrl-pxa27x.c as a module causes a link error: ERROR: "pxa2xx_pinctrl_init" [drivers/pinctrl/pxa/pinctrl-pxa27x.ko] undefined! Signed-off-by: Masahiro Yamada Acked-by: Robert Jarzmik Signed-off-by: Linus Walleij drivers/pinctrl/pxa/pinctrl-pxa2xx.c | 1 + 1 file changed, 1 insertion(+) commit 00420a65fa2beb3206090ead86942484df2275f3 Author: Herbert Xu Date: Wed Jan 27 00:16:37 2016 +0800 crypto: shash - Fix has_key setting The has_key logic is wrong for shash algorithms as they always have a setkey function. So we should instead be testing against shash_no_setkey. Fixes: a5596d633278 ("crypto: hash - Add crypto_ahash_has_setkey") Cc: stable@vger.kernel.org Reported-by: Stephan Mueller Signed-off-by: Herbert Xu Tested-by: Stephan Mueller crypto/shash.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f9ead9beef3f44be0db4b542a8c2ce698fb1530e Merge: 36efee8 69c7fda Author: Kalle Valo Date: Wed Jan 27 14:19:18 2016 +0200 Merge tag 'iwlwifi-for-kalle-2016-01-26_2' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * Fix support for 3168 device + NVM version + firmware file name + device IDs * Fix a compilation warning in dvm calibration code * Fix the TPC (reduced Tx Power) code. This fixes performance issues * Device IDs for 8265 commit 49f34134aea74f19ca016f055d25ee55ec359dee Author: Milo Kim Date: Wed Jan 13 16:19:50 2016 +0900 irqchip/atmel-aic: Fix wrong bit operation for IRQ priority Atmel AIC has common structure for SMR (Source Mode Register). bit[6:5] Interrupt source type bit[2:0] Priority level Other bits are unused. To update new priority value, bit[2:0] should be cleared first and then new priority level can be written. However, aic_common_set_priority() helper clears source type bits instead of priority bits. This patch fixes wrong mask bit operation. Fixes: b1479ebb7720 "irqchip: atmel-aic: Add atmel AIC/AIC5 drivers" Signed-off-by: Milo Kim Acked-by: Boris Brezillon Cc: Jason Cooper Cc: Marc Zyngier Cc: Ludovic Desroches Cc: Nicholas Ferre Cc: stable@vger.kernel.org #v3.17+ Link: http://lkml.kernel.org/r/1452669592-3401-2-git-send-email-milo.kim@ti.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-atmel-aic-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ca8ec532fc2d986f1f4a319857bb18e0c9739b4 Author: Wanpeng Li Date: Wed Jan 27 19:26:07 2016 +0800 tick/nohz: Set the correct expiry when switching to nohz/lowres mode commit 0ff53d096422 sets the next tick interrupt to the last jiffies update, i.e. in the past, because the forward operation is invoked before the set operation. There is no resulting damage (yet), but we get an extra pointless tick interrupt. Revert the order so we get the next tick interrupt in the future. Fixes: commit 0ff53d096422 "tick: sched: Force tick interrupt and get rid of softirq magic" Signed-off-by: Wanpeng Li Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1453893967-3458-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Thomas Gleixner kernel/time/tick-sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9954859185c6e8359e71121037b627f1e294057d Author: Lars-Peter Clausen Date: Tue Jan 26 13:54:15 2016 +0100 ASoC: imx-spdif: Fix crash on suspend When registering a ASoC card the driver data of the parent device is set to point to the card. This driver data is used in the snd_soc_suspend()/resume() callbacks. The imx-spdif driver overwrites the driver data with custom data which causes snd_soc_suspend() to crash. Since the custom driver is not used anywhere simply deleting the line which sets the custom driver data fixes the issue. Fixes: 43ac946922b3 ("ASoC: imx-spdif: add snd_soc_pm_ops for spdif machine driver") Tested-by: Fabio Estevam Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown sound/soc/fsl/imx-spdif.c | 2 -- 1 file changed, 2 deletions(-) commit e873cc022ce5e2c04bbc53b5874494b657e29d3f Author: Nicolas Ferre Date: Wed Jan 27 11:03:02 2016 +0100 ARM: dts: at91: sama5d4 xplained: fix phy0 IRQ type For phy0 KSZ8081, the type of GPIO IRQ should be "level low" instead of "edge falling". Signed-off-by: Nicolas Ferre Fixes: 38153a017896 ("ARM: at91/dt: sama5d4: add dts for sama5d4 xplained board") Cc: # 4.1+ arch/arm/boot/dts/at91-sama5d4_xplained.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f505dba762ae826bb68978a85ee5c8ced7dea8d7 Author: Alexandre Belloni Date: Fri Jan 15 09:30:18 2016 +0100 ARM: dts: at91: sama5d4 xplained: properly mux phy interrupt No interrupt were received from the phy because PIOE 1 may not be properly muxed. It prevented proper link detection, especially since commit 321beec5047a ("net: phy: Use interrupts when available in NOLINK state") disables polling. Cc: # 4.4 Signed-off-by: Alexandre Belloni Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91-sama5d4_xplained.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit aae6b18f5c95b9dc78de66d1e27e8afeee2763b7 Author: Wenyou Yang Date: Wed Jan 27 13:16:24 2016 +0800 ARM: dts: at91: sama5d4ek: add phy address and IRQ for macb0 On SAMA5D4EK board, the Ethernet doesn't work after resuming from the suspend state. Signed-off-by: Wenyou Yang [nicolas.ferre@atmel.com: adapt to newer kernel] Fixes: 38153a017896 ("ARM: at91/dt: sama5d4: add dts for sama5d4 xplained board") Cc: # 4.1+ Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91-sama5d4ek.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6c482fd15d4ff211ce0e63a628cbda17201b33a0 Author: Nicolas Ferre Date: Tue Jan 12 15:55:12 2016 +0100 ARM: dts: at91: sama5d2 xplained: add phy address and IRQ for macb0 After 57a38effa598 (net: phy: micrel: disable broadcast for KSZ8081/KSZ8091) the macb0 interface has difficulties to come back from power saving mode if address not explicitly set up. As the micrel phy on the board is actually configured to show up at address 1 we use this explicitly. Adding the phy node and its real address fixes the issue. The phy IRQ and associated pinmux node is also added. Signed-off-by: Nicolas Ferre Acked-by: Alexandre Belloni Cc: stable@vger.kernel.org # 4.4+ // manual merge needed arch/arm/boot/dts/at91-sama5d2_xplained.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 1a469ae2ced763fc0d4edb3c9d7b4188deee950c Author: Alexandre Belloni Date: Tue Jan 19 02:30:59 2016 +0100 ARM: dts: at91: at91sam9n12ek: fix panel compatible string Properly use qiaodian as the vendor prefix for the panel. Signed-off-by: Alexandre Belloni Signed-off-by: Nicolas Ferre arch/arm/boot/dts/at91sam9n12ek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 929e883f2bfdf68d4bd3aec43912e956417005c7 Author: Mohamed Jamsheeth Hajanajubudeen Date: Fri Dec 11 17:06:26 2015 +0530 ARM: dts: at91: sama5d4: fix instance id of DBGU Change instance id of DBGU to 45. Signed-off-by: Mohamed Jamsheeth Hajanajubudeen Fixes: 7c661394c56c ("ARM: at91: dt: add device tree file for SAMA5D4 SoC") Cc: stable@vger.kernel.org # 3.18+ Signed-off-by: Nicolas Ferre arch/arm/boot/dts/sama5d4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73c13c83491142e2ee7850159fc73b5e0967806f Author: Phil Reid Date: Fri Jan 15 11:32:22 2016 +0800 gpio: gpio-altera: Remove gpiochip on probe failure. On failure to setup the irq altera_gpio_probe would return an error but not go to cleanup. This resulted in kernel fault "Unable to handle kernel paging request at virtual address xxxxxxxx" later on in of_gpiochip_find_and_xlate. Signed-off-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-altera.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f4f9edcf9b5289ed96113e79fa65a7bf27ecb096 Author: Peter Hurley Date: Sun Jan 10 22:40:58 2016 -0800 staging/speakup: Use tty_ldisc_ref() for paste kworker As the function documentation for tty_ldisc_ref_wait() notes, it is only callable from a tty file_operations routine; otherwise there is no guarantee the ref won't be NULL. The key difference with the VT's paste_selection() is that is an ioctl, where __speakup_paste_selection() is completely async kworker, kicked off from interrupt context. Fixes: 28a821c30688 ("Staging: speakup: Update __speakup_paste_selection() tty (ab)usage to match vt") Cc: Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/selection.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6d27a63caad3f13e96cf065d2d96828c2006be6b Author: Peter Hurley Date: Sun Jan 10 22:40:56 2016 -0800 n_tty: Fix unsafe reference to "other" ldisc Although n_tty_check_unthrottle() has a valid ldisc reference (since the tty core gets the ldisc ref in tty_read() before calling the line discipline read() method), it does not have a valid ldisc reference to the "other" pty of a pty pair. Since getting an ldisc reference for tty->link essentially open-codes tty_wakeup(), just replace with the equivalent tty_wakeup(). Cc: Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/n_tty.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5c17c861a357e9458001f021a7afa7aab9937439 Author: Peter Hurley Date: Sun Jan 10 22:40:55 2016 -0800 tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the line discipline id directly from the ldisc because the line discipline id (c_line) in termios is untrustworthy; userspace may have set termios via ioctl(TCSETS*) without actually changing the line discipline via ioctl(TIOCSETD). However, directly accessing the current ldisc via tty->ldisc is unsafe; the ldisc ptr dereferenced may be stale if the line discipline is changing via ioctl(TIOCSETD) or hangup. Wait for the line discipline reference (just like read() or write()) to retrieve the "current" line discipline id. Cc: Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 7f22f6c935cda600660e623a411fe380015d28d9 Author: Peter Hurley Date: Sat Jan 9 21:13:45 2016 -0800 tty: Retry failed reopen if tty teardown in-progress A small window exists where a tty reopen will observe the tty just prior to imminent teardown (tty->count == 0); in this case, open() returns EIO to userspace. Instead, retry the open after checking for signals and yielding; this interruptible retry loop allows teardown to commence and initialize a new tty on retry. Never retry the BSD master pty reopen; there is no guarantee the pty pair teardown is imminent since the slave file descriptors may remain open indefinitely. Signed-off-by: Peter Hurley Cc: stable # 4.4 Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0bfd464d3fdd5bb322f9cace4cc47f1796545cf7 Author: Peter Hurley Date: Sat Jan 9 21:13:44 2016 -0800 tty: Wait interruptibly for tty lock on reopen Allow a signal to interrupt the wait for a tty reopen; eg., if the tty has starting final close and is waiting for the device to drain. Signed-off-by: Peter Hurley Cc: stable # 4.4 Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 8 +++++++- drivers/tty/tty_mutex.c | 8 ++++++++ include/linux/tty.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) commit 61595dca742a9ba9a4c998b9af1f468adc816275 Author: Takashi Iwai Date: Wed Jan 27 07:05:56 2016 +0100 ALSA: Add missing dependency on CONFIG_SND_TIMER Since the build of PCM timer may be disabled via Kconfig now, each driver that provides a timer interface needs to set CONFIG_SND_TIMER explicitly. Otherwise it may get a build error due to missing symbol. Fixes: 90bbaf66ee7b ('ALSA: timer: add config item to export PCM timer disabling for expert') Reported-by: kbuild test robot Cc: # v4.4+ Signed-off-by: Takashi Iwai sound/isa/Kconfig | 4 ++++ sound/pci/Kconfig | 3 +++ sound/sparc/Kconfig | 1 + 3 files changed, 8 insertions(+) commit 13c13a6ad71f98c3b6189dfc89a9a743ab02a39a Author: Trond Myklebust Date: Tue Jan 26 23:12:11 2016 -0500 pNFS: Fix missing layoutreturn calls The layoutreturn code currently relies on pnfs_put_lseg() to initiate the RPC call when conditions are right. A problem arises when we want to free the layout segment from inside an inode->i_lock section (e.g. in pnfs_clear_request_commit()), since we cannot sleep. The workaround is to move the actual call to pnfs_send_layoutreturn() to pnfs_put_layout_hdr(), which doesn't have this restriction. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 118 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 56 insertions(+), 62 deletions(-) commit 0f28ede906a8ad44158a6ef9471a5a412343cced Author: John Garry Date: Wed Jan 27 01:31:17 2016 +0800 hisi_sas: fix v1 hw check for slot error Completion header bit CMPLT_HDR_RSPNS_XFRD flags whether the response frame is received into host memory, and not whether the response frame has an error. As such, change the decision on whether a slot has an error. Also redundant check on CMPLT_HDR_CMD_CMPLT_MSK is removed. Fixes: 27a3f229 ("hisi_sas: Add cq interrupt handler") Signed-off-by: John Garry Tested-by: Ricardo Salveti Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 0f92db53c10ab608874eea8bbe59491cea2f9a46 Author: John Garry Date: Tue Jan 26 19:59:12 2016 +0800 hisi_sas: add dependency for HAS_IOMEM Not every arch has io, so fix build by adding necessary dependency. Signed-off-by: John Garry Suggested-by: Richard Weinberger Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6344a5cd3e8acf6e9823046cebd00b16faacdb1a Merge: 13b4389 d0eb20a Author: James Bottomley Date: Tue Jan 26 17:44:42 2016 -0800 Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes commit 13b4389143413a1f18127c07f72c74cad5b563e8 Author: Alan Stern Date: Wed Jan 20 11:26:01 2016 -0500 SCSI: fix crashes in sd and sr runtime PM Runtime suspend during driver probe and removal can cause problems. The driver's runtime_suspend or runtime_resume callbacks may invoked before the driver has finished binding to the device or after the driver has unbound from the device. This problem shows up with the sd and sr drivers, and can cause disk or CD/DVD drives to become unusable as a result. The fix is simple. The drivers store a pointer to the scsi_disk or scsi_cd structure as their private device data when probing is finished, so we simply have to be sure to clear the private data during removal and test it during runtime suspend/resume. This fixes . Signed-off-by: Alan Stern Reported-by: Paul Menzel Reported-by: Erich Schubert Reported-by: Alexandre Rossi Tested-by: Paul Menzel Tested-by: Erich Schubert CC: Signed-off-by: James Bottomley drivers/scsi/sd.c | 7 +++++-- drivers/scsi/sr.c | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 7e56f627768da4e6480986b5145dc3422bc448a5 Author: Gavin Shan Date: Wed Dec 2 16:25:32 2015 +1100 powerpc/eeh: Fix PE location code In eeh_pe_loc_get(), the PE location code is retrieved from the "ibm,loc-code" property of the device node for the bridge of the PE's primary bus. It's not correct because the property indicates the parent PE's location code. This reads the correct PE location code from "ibm,io-base-loc-code" or "ibm,slot-location-code" property of PE parent bus's device node. Cc: stable@vger.kernel.org # v3.16+ Fixes: 357b2f3dd9b7 ("powerpc/eeh: Dump PE location code") Signed-off-by: Gavin Shan Tested-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_pe.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 7f66cd3f5420e7d11abd234033e7cb7a9738fc38 Author: Kees Cook Date: Tue Jan 26 01:18:13 2016 +0100 ARM: 8500/1: fix atags_to_fdt with stack-protector-strong Building with CONFIG_CC_STACKPROTECTOR_STRONG triggers protection code generation under CONFIG_ARM_ATAG_DTB_COMPAT but this is too early for being able to use any of the stack_chk code. Explicitly disable it for only the atags_to_fdt bits. Suggested-by: zhxihu Signed-off-by: Kees Cook Acked-by: Arnd Bergmann Signed-off-by: Russell King arch/arm/boot/compressed/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3625c2c234ef66acf21a72d47a5ffa94f6c5ebf2 Author: Jan Beulich Date: Tue Jan 26 04:15:18 2016 -0700 x86/mm: Fix types used in pgprot cacheability flags translations For PAE kernels "unsigned long" is not suitable to hold page protection flags, since _PAGE_NX doesn't fit there. This is the reason for quite a few W+X pages getting reported as insecure during boot (observed namely for the entire initrd range). Fixes: 281d4078be ("x86: Make page cache mode a real type") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/56A7635602000078000CAFF1@prv-mh.provo.novell.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/pgtable_types.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9a4e7849b5e4e8742d71fa90fbf0722dd0710a56 Author: Russell King Date: Tue Jan 26 14:49:22 2016 +0000 component: fix crash on x86_64 with hda audio drivers Maarten reports that the addition of releasing match data to the component helper results in a general protection fault on x86_64. This is caused by the devm resources being freed in reverse order to their allocation, which caused a use-after-free of the match array. Switch the match array to be a more conventional kmalloc/kfree() affair, explicitly freeing it along with the parent match data structure. Reported-by: Maarten Lankhorst Fixes: ce657b1cddf1 ("component: add support for releasing match data") Signed-off-by: Russell King drivers/base/component.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a0a5ab3e99b8e617221caabf074dcabd1659b9d8 Author: Lucas Stach Date: Mon Jan 25 15:47:28 2016 +0100 drm/etnaviv: call correct function when trying to vmap a DMABUF When trying to get the vmap address of an imported buffer, we must call into the appropriate helper function, to allow the exporter to establish the vmap, instead of trying to vmap the buffer on our own. Add an indirection through etnaviv_gem_ops to allow the correct implementation to be called. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem.c | 36 ++++++++++++++++++++--------- drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 8 +++++++ 3 files changed, 34 insertions(+), 11 deletions(-) commit ce3088fdb51eda7b9ef3d119e7c302c08428f274 Author: Lucas Stach Date: Tue Jan 26 18:10:32 2016 +0100 drm/etnaviv: rename etnaviv_gem_vaddr to etnaviv_gem_vmap This function follows the semantics of vmap() by returning NULL in case of an error. To make things less confusing rename it to make make both functions more closely related. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.h | 2 +- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 9f07bb0d4ada68f05b2e51c10720d4688e6adea4 Author: Lucas Stach Date: Mon Jan 25 15:37:28 2016 +0100 drm/etnaviv: fix get pages error path in etnaviv_gem_vaddr In case that etnaviv_gem_get_pages is unable to get the required pages the object mutex needs to be unlocked. Also return NULL in this case instead of propagating the error, as callers of this function might not be prepared to handle a pointer error, but expect this call to follow the semantics of a plain vmap to return NULL in case of an error. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 45d16a6d94580cd3c6baed69b5fe441ece599fc4 Author: Lucas Stach Date: Mon Jan 25 12:41:05 2016 +0100 drm/etnaviv: fix memory leak in IOMMU init path Plug in error handling to free any allocated ressources in the IOMMU init path. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 602eb48966d7b7f7e64dca8d9ea2842d83bfae73 Author: Russell King Date: Sun Jan 24 17:36:04 2016 +0000 drm/etnaviv: add further minor features and varyings count Export further minor feature bitmasks and the varyings count from the GPU specifications registers to userspace. Acked-by: Christian Gmeiner Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 62 ++++++++++++++++++++++++++++++++++- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 9 +++++ include/uapi/drm/etnaviv_drm.h | 3 ++ 3 files changed, 73 insertions(+), 1 deletion(-) commit 472f79dcf21d34f4d667910002482efe3ca4ba34 Author: Russell King Date: Sun Jan 24 17:35:59 2016 +0000 drm/etnaviv: add helper for comparing model/revision IDs Add and use a helper for comparing the model and revision IDs. Acked-by: Christian Gmeiner Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 52f36ba1d6134f5c1c45deb0da53442a5971358e Author: Russell King Date: Sun Jan 24 17:35:54 2016 +0000 drm/etnaviv: add helper to extract bitfields Add a helper to extract etnaviv bitfields from register values. Acked-by: Christian Gmeiner Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 62 +++++++++++++++-------------------- 1 file changed, 27 insertions(+), 35 deletions(-) commit 507f899137f9e4f1405820b946063a6db78b2295 Author: Russell King Date: Sun Jan 24 17:35:48 2016 +0000 drm/etnaviv: use defined constants for the chip model Use the defined constants in common.xml.h for the chip model rather than coding these as hex numbers. Acked-by: Christian Gmeiner Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit e2a2e263e06a0c153234b3e93fb85612d1c454d3 Author: Russell King Date: Sun Jan 24 17:35:43 2016 +0000 drm/etnaviv: update common and state_hi xml.h files Update the common and state_hi xml.h header files from the etnaviv repository. Acked-by: Christian Gmeiner Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/common.xml.h | 59 +++++++++++++++++++++++++++++----- drivers/gpu/drm/etnaviv/state_hi.xml.h | 26 +++++++++++++-- 2 files changed, 75 insertions(+), 10 deletions(-) commit b98c66887ee1aec661dcb88fe17399d5d112ed98 Author: Russell King Date: Thu Jan 21 15:19:59 2016 +0000 drm/etnaviv: ignore VG GPUs with FE2.0 Ignore GPUs with a 2.0 front end. These have a different register layout for the front end, which provokes imprecise aborts from the register accesses in the 'gpu' debugfs file. Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9c41242817f4b6d908886c0fdb036d9246c50630 Author: Dan Williams Date: Sat Jan 23 15:34:10 2016 -0800 libnvdimm: fix mode determination for e820 devices Correctly display "safe" mode when a btt is established on a e820/memmap defined pmem namespace. Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 25cad69f21f5532d99e2ee73c8ab6512bcab614c Author: Martin Wilck Date: Mon Nov 30 12:50:05 2015 +0100 base/platform: Fix platform drivers with no probe callback Since b8b2c7d845d5, platform_drv_probe() is called for all platform devices. If drv->probe is NULL, and dev_pm_domain_attach() fails, platform_drv_probe() will return the error code from dev_pm_domain_attach(). This causes real_probe() to enter the "probe_failed" path and set dev->driver to NULL. Before b8b2c7d845d5, real_probe() would assume success if both dev->bus->probe and drv->probe were missing. As a result, a device and driver could be "bound" together just by matching their names; this doesn't work any more after b8b2c7d845d5. This may cause problems later for certain usage of platform_driver_register() and platform_device_register_simple(). I observed a panic while loading the tpm_tis driver with parameter "force=1" (i.e. registering tpm_tis as a platform driver), because tpm_tis_init's assumption that the device returned by platform_device_register_simple() was bound didn't hold any more (tpmm_chip_alloc() dereferences chip->pdev->driver, causing panic). This patch restores the previous (4.3.0 and earlier) behavior of platform_drv_probe() in the case when the associated platform driver has no "probe" function. Fixes: b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally") Signed-off-by: Martin Wilck Cc: stable # 4.4 Cc: Martin Fuzzey Acked-by: Jarkko Sakkinen Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 57adec866c0440976c96a4b8f5b59fb411b1cacb Author: Mika Penttilä Date: Tue Jan 26 15:47:25 2016 +0000 arm64: mm: avoid calling apply_to_page_range on empty range Calling apply_to_page_range with an empty range results in a BUG_ON from the core code. This can be triggered by trying to load the st_drv module with CONFIG_DEBUG_SET_MODULE_RONX enabled: kernel BUG at mm/memory.c:1874! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 3 PID: 1764 Comm: insmod Not tainted 4.5.0-rc1+ #2 Hardware name: ARM Juno development board (r0) (DT) task: ffffffc9763b8000 ti: ffffffc975af8000 task.ti: ffffffc975af8000 PC is at apply_to_page_range+0x2cc/0x2d0 LR is at change_memory_common+0x80/0x108 This patch fixes the issue by making change_memory_common (called by the set_memory_* functions) a NOP when numpages == 0, therefore avoiding the erroneous call to apply_to_page_range and bringing us into line with x86 and s390. Cc: Reviewed-by: Laura Abbott Acked-by: David Rientjes Signed-off-by: Mika Penttilä Signed-off-by: Will Deacon arch/arm64/mm/pageattr.c | 3 +++ 1 file changed, 3 insertions(+) commit 18aa60ce2751c95d3412ed06a58b8b6cfb6f88f2 Author: Marc Zyngier Date: Tue Jan 26 14:24:15 2016 +0000 irqchip/gic-v3-its: Recompute the number of pages on page size change When the programming of a GITS_BASERn register fails because of an unsupported ITS page size, we retry it with a smaller page size. Unfortunately, we don't recompute the number of allocated ITS pages, indicating the wrong value computed in the original allocation. A convenient fix is to free the pages we allocated, update the page size, and restart the allocation. This will ensure that we always allocate the right amount in the case of a device table, specially if we have to reduce the allocation order to stay within the boundaries of the ITS maximum allocation. Reported-and-tested-by: Ma Jun Signed-off-by: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1453818255-1289-1-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-gic-v3-its.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bb1a793125d9cc61f2d1cff92fe3927fec45d528 Author: Thomas Petazzoni Date: Tue Jan 26 13:52:27 2016 +0000 base: Export platform_msi_domain_[alloc,free]_irqs The new function platform_msi_domain_{alloc,free}_irqs are meant to be used in platform drivers, which can be built as modules. Therefore, it makes sense to export them to be used from kernel modules. Signed-off-by: Thomas Petazzoni Acked-by: Marc Zyngier Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Frank Rowand Cc: Grant Likely Cc: Jiang Liu Link: http://lkml.kernel.org/r/1453816347-32720-4-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner drivers/base/platform-msi.c | 2 ++ 1 file changed, 2 insertions(+) commit ed8e5a242826004d6dcf1c33775e08aa0d017c41 Author: Alexey Kardashevskiy Date: Tue Jan 19 16:12:28 2016 +1100 KVM doc: Fix KVM_SMI chapter number The KVM_SMI capability is following the KVM_S390_SET_IRQ_STATE capability which is "4.95", this changes the number of the KVM_SMI chapter to 4.96. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8bc3bde9c8c90500c648627d53f846642ff8639 Merge: 171b568 9abc2a0 Author: Paolo Bonzini Date: Tue Jan 26 16:28:36 2016 +0100 Merge tag 'kvm-s390-master-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fixes for kvm/master (targeting 4.5) 1. Fallout of some bigger floating point/vector rework in s390 - memory leak -> stable 4.3+ - memory overwrite -> stable 4.4+ 2. enable KVM-VFIO for s390 commit d7023e62c5128bf9f150d792a3ea8c758cb431a3 Author: Richard Weinberger Date: Mon Jan 25 23:24:19 2016 +0100 clocksource: Fix dependencies for archs w/o HAS_IOMEM Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/1453760661-1444-21-git-send-email-richard@nod.at Signed-off-by: Thomas Gleixner drivers/clocksource/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) commit 2be6d9bfef53d185975b44fd808aece36595e83e Author: Arnd Bergmann Date: Mon Jan 25 17:02:49 2016 +0100 clocksource: Select CLKSRC_MMIO where needed The Tegra clocksource implementation uses the clocksource_mmio helper functions, but currently can be configured without them, which fails: drivers/clocksource/built-in.o: In function `tegra20_init_timer': :(.init.text+0xac): undefined reference to `clocksource_mmio_init' :(.init.text+0x140): undefined reference to `clocksource_mmio_readl_up' The same problem exists for Digicolor: drivers/clocksource/built-in.o: In function `digicolor_timer_init': :(.init.text+0xfa): undefined reference to `clocksource_mmio_init' :(.init.text+0x14c): undefined reference to `clocksource_mmio_readl_down' I've inspected the Kconfig file to look for other cases that I have not yet run into, and added an explicit 'select' to each one to ensure we can successfully link the drivers. Signed-off-by: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/1453737776-1960372-1-git-send-email-arnd@arndb.de Signed-off-by: Thomas Gleixner drivers/clocksource/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 7809998ab1af22602a8463845108edc49dfb9ef0 Author: Arnd Bergmann Date: Mon Jan 25 16:41:49 2016 +0100 tick/sched: Hide unused oneshot timer code A couple of functions in kernel/time/tick-sched.c are only relevant for oneshot timer mode, i.e. when hires-timers or nohz mode are enabled. If both are disabled, we get gcc warnings about them: kernel/time/tick-sched.c:98:16: warning: 'tick_init_jiffy_update' defined but not used [-Wunused-function] static ktime_t tick_init_jiffy_update(void) ^ kernel/time/tick-sched.c:112:13: warning: 'tick_sched_do_timer' defined but not used [-Wunused-function] static void tick_sched_do_timer(ktime_t now) ^ kernel/time/tick-sched.c:134:13: warning: 'tick_sched_handle' defined but not used [-Wunused-function] static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) ^ This encloses the whole set of functions in an appropriate ifdef to avoid the warning and to make it clearer when they are used. Signed-off-by: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1453736525-1959191-1-git-send-email-arnd@arndb.de Signed-off-by: Thomas Gleixner kernel/time/tick-sched.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit e03a58c320e1103ebe97bda8ebdfcc5c9829c53f Author: John Stultz Date: Thu Jan 21 15:03:35 2016 -0800 kselftests: timers: Add adjtimex SETOFFSET validity tests Add some simple tests to check both valid and invalid offsets when using adjtimex's ADJ_SETOFFSET method. Signed-off-by: John Stultz Acked-by: Shuah Khan Cc: Sasha Levin Cc: Richard Cochran Cc: Prarit Bhargava Cc: Harald Hoyer Cc: Kay Sievers Cc: David Herrmann Link: http://lkml.kernel.org/r/1453417415-19110-3-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner tools/testing/selftests/timers/valid-adjtimex.c | 139 +++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) commit 14a0db3cdd114da757197193f66786e63649c91e Author: Marc Zyngier Date: Tue Jan 26 13:52:26 2016 +0000 of: MSI: Simplify irqdomain lookup So far, when trying to associate a device with its MSI domain, we first lookup the domain using a MSI token, and if this doesn't return anything useful, we pick up any domain matching the same node. This logic is broken for two reasons: 1) Only the generic MSI code (PCI or platform) sets this token to PCI/MSI or platform MSI. So we're guaranteed that if there is something to be found, we will find it with the first call. 2) If we have a convoluted situation where: - a single node implements both wired and MSI interrupts - MSI support for that HW hasn't been compiled in we'll end up using the wired domain for MSIs anyway, and things break badly. So let's just remove __of_get_msi_domain, and replace it by a direct call to irq_find_matching_host, because that's what we really want. Signed-off-by: Marc Zyngier Acked-by: Rob Herring Cc: Greg Kroah-Hartman Cc: Frank Rowand Cc: Grant Likely Cc: Thomas Petazzoni Cc: Jiang Liu Link: http://lkml.kernel.org/r/1453816347-32720-3-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner drivers/of/irq.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 530cbe100ef7587aa5b5ac3a4b670cda4d50e598 Author: Marc Zyngier Date: Tue Jan 26 13:52:25 2016 +0000 irqdomain: Allow domain lookup with DOMAIN_BUS_WIRED token Let's take the (outlandish) example of an interrupt controller capable of handling both wired interrupts and PCI MSIs. With the current code, the PCI MSI domain is going to be tagged with DOMAIN_BUS_PCI_MSI, and the wired domain with DOMAIN_BUS_ANY. Things get hairy when we start looking up the domain for a wired interrupt (typically when creating it based on some firmware information - DT or ACPI). In irq_create_fwspec_mapping(), we perform the lookup using DOMAIN_BUS_ANY, which is actually used as a wildcard. This gives us one chance out of two to end up with the wrong domain, and we try to configure a wired interrupt with the MSI domain. Everything grinds to a halt pretty quickly. What we really need to do is to start looking for a domain that would uniquely identify a wired interrupt domain, and only use DOMAIN_BUS_ANY as a fallback. In order to solve this, let's introduce a new DOMAIN_BUS_WIRED token, which is going to be used exactly as described above. Of course, this depends on the irqchip to setup the domain bus_token, and nobody had to implement this so far. Only so far. Signed-off-by: Marc Zyngier Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Frank Rowand Cc: Grant Likely Cc: Thomas Petazzoni Cc: Jiang Liu Link: http://lkml.kernel.org/r/1453816347-32720-2-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner include/linux/irqdomain.h | 1 + kernel/irq/irqdomain.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 0df337cf92c107fb515c9df6907052a97bd484b9 Author: Richard Weinberger Date: Mon Jan 25 23:24:17 2016 +0100 irqchip: Fix dependencies for archs w/o HAS_IOMEM Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jason Cooper Cc: Marc Zyngier Link: http://lkml.kernel.org/r/1453760661-1444-19-git-send-email-richard@nod.at Signed-off-by: Thomas Gleixner drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit eb249a11913d316fc1a27dd07a1e1e43bda9199d Author: Arnd Bergmann Date: Mon Jan 25 16:58:08 2016 +0100 irqchip/s3c24xx: Mark init_eint as __maybe_unused The init_eint array in the s3c24xx irqchip driver is used by every individual chip variant, but Kconfig allows building the driver when they are all disabled, and that leads to a harmless compile-time warning: drivers/irqchip/irq-s3c24xx.c:608:28: error: 'init_eint' defined but not used [-Werror=unused-variable] This marks the array as __maybe_unused to avoid the warning. Signed-off-by: Arnd Bergmann Acked-by: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1453737499-1960073-1-git-send-email-arnd@arndb.de Signed-off-by: Thomas Gleixner drivers/irqchip/irq-s3c24xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9abc2a08a7d665b02bdde974fd6c44aae86e923e Author: David Hildenbrand Date: Thu Jan 14 22:12:47 2016 +0100 KVM: s390: fix memory overwrites when vx is disabled The kernel now always uses vector registers when available, however KVM has special logic if support is really enabled for a guest. If support is disabled, guest_fpregs.fregs will only contain memory for the fpu. The kernel, however, will store vector registers into that area, resulting in crazy memory overwrites. Simply extending that area is not enough, because the format of the registers also changes. We would have to do additional conversions, making the code even more complex. Therefore let's directly use one place for the vector/fpu registers + fpc (in kvm_run). We just have to convert the data properly when accessing it. This makes current code much easier. Please note that vector/fpu registers are now always stored to vcpu->run->s.regs.vrs. Although this data is visible to QEMU and used for migration, we only guarantee valid values to user space when KVM_SYNC_VRS is set. As that is only the case when we have vector register support, we are on the safe side. Fixes: b5510d9b68c3 ("s390/fpu: always enable the vector facility if it is available") Cc: stable@vger.kernel.org # v4.4 d9a3a09af54d s390/kvm: remove dependency on struct save_area definition Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger [adopt to d9a3a09af54d] arch/s390/include/asm/kvm_host.h | 1 - arch/s390/kvm/kvm-s390.c | 126 +++++++++++++-------------------------- 2 files changed, 43 insertions(+), 84 deletions(-) commit 14b0b4ac37cbb3e57f564da30ece5626d1e3767a Author: Dong Jia Shi Date: Wed Jan 20 06:33:42 2016 +0100 KVM: s390: Enable the KVM-VFIO device The KVM-VFIO device is used by the QEMU VFIO device. It is used to record the list of in-use VFIO groups so that KVM can manipulate them. While we don't need this on s390 currently, let's try to be like everyone else. Signed-off-by: Dong Jia Shi Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/Kconfig | 1 + arch/s390/kvm/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 9c7ebb613bffea2feef4ec562ba1dbcaa810942b Author: David Hildenbrand Date: Fri Jan 22 14:55:56 2016 +0100 KVM: s390: fix guest fprs memory leak fprs is never freed, therefore resulting in a memory leak if kvm_vcpu_init() fails or the vcpu is destroyed. Fixes: 9977e886cbbc ("s390/kernel: lazy restore fpu registers") Cc: stable@vger.kernel.org # v4.3+ Reported-by: Eric Farman Signed-off-by: David Hildenbrand Reviewed-by: Eric Farman Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 625b4a982788fefe1361daee2ea160192cd80572 Author: Richard Weinberger Date: Mon Jan 25 23:24:04 2016 +0100 hwrng: stm32 - Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Reviewed-by: Daniel Thompson Signed-off-by: Herbert Xu drivers/char/hw_random/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 578c60fbeb913e0f2aa49f37a04d475b615c8a8d Author: Arnd Bergmann Date: Mon Jan 25 17:51:21 2016 +0100 crypto: ghash,poly1305 - select CRYPTO_HASH where needed The ghash and poly1305 hash implementations can be enabled when CONFIG_CRYPTO_HASH is turned off, causing a link error: crypto/built-in.o: In function `ghash_mod_init': (.init.text+0xd0): undefined reference to `crypto_register_shash' crypto/built-in.o: In function `ghash_mod_exit': (.exit.text+0xb4): undefined reference to `crypto_unregister_shash' crypto/built-in.o: In function `poly1305_mod_init': (.init.text+0xb4): undefined reference to `crypto_register_shash' crypto/built-in.o: In function `poly1305_mod_exit': (.exit.text+0x98): undefined reference to `crypto_unregister_shash' This adds an explicit 'select', like all other hashes have it. Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu crypto/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 3f416f22d1e21709a631189ba169f76fd267b374 Author: Jiri Olsa Date: Wed Jan 20 12:56:34 2016 +0100 perf stat: Do not clean event's private stats Mel reported stddev reporting was broken due to following commit: 106a94a0f8c2 ("perf stat: Introduce read_counters function") This commit merged interval and overall counters reading into single read_counters function. The old interval code cleaned the stddev data for some reason (it's never displayed in interval mode) and the mentioned commit kept on cleaning the stddev data in merged function, which resulted in the stddev not being displayed. Removing the wrong stddev data cleanup init_stats call. Reported-and-Tested-by: Mel Gorman Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: stable@vger.kernel.org # v4.2+ Fixes: 106a94a0f8c2 ("perf stat: Introduce read_counters function") Link: http://lkml.kernel.org/r/1453290995-18485-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat.c | 1 - 1 file changed, 1 deletion(-) commit 0805909f59e02036a4e2660159f27dbf8b6084ac Author: Jiri Olsa Date: Wed Jan 20 12:56:33 2016 +0100 perf hists: Fix HISTC_MEM_DCACHELINE width setting Set correct width for unresolved mem_dcacheline addr. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Don Zickus Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: 9b32ba71ba90 ("perf tools: Add dcacheline sort") Link: http://lkml.kernel.org/r/1453290995-18485-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 2 ++ 1 file changed, 2 insertions(+) commit d4913cbd05bab685e49c8174896e563b2487d054 Author: Markus Trippelsdorf Date: Mon Dec 14 16:44:03 2015 +0100 perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed The issue was pointed out by gcc-6's -Wmisleading-indentation. Signed-off-by: Markus Trippelsdorf Acked-by: Ingo Molnar Cc: Ben Hutchings Cc: Matt Fleming Cc: Peter Zijlstra Fixes: c97cf42219b7 ("perf top: Live TUI Annotation") Link: http://lkml.kernel.org/r/20151214154403.GB1409@x4 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf89813a5b514bff9b3b5e7eaf2090f22fba62e0 Author: Markus Trippelsdorf Date: Mon Dec 14 16:43:35 2015 +0100 perf tests: Remove wrong semicolon in while loop in CQM test The while loop was spinning. Fix by removing a semicolon. The issue was pointed out by gcc-6's -Wmisleading-indentation. Signed-off-by: Markus Trippelsdorf Reviewed-by: Matt Fleming Acked-by: Ingo Molnar Cc: Ben Hutchings Cc: Peter Zijlstra Fixes: 035827e9f2bd ("perf tests: Add Intel CQM test") Link: http://lkml.kernel.org/r/20151214154335.GA1409@x4 Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/intel-cqm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69c7fda40921c125eeeef6a827f6270ac6aa1baa Author: Gregory Greenman Date: Tue Dec 29 11:26:35 2015 +0200 iwlwifi: mvm: rs: fix TPC statistics handling FW behaviour changed and now updates driver about the used TPC reduction in the following cases: 1. In tx response, which is used mostly for a single frame case 2. In BA notification When tx aggregation fails with the initial rate, FW will send to the driver BA notification and will try to transmit with the next rate, but this time without tx power reduction. Thus, in case of a failure with the initial rate, driver will get two BA notifications, the first one with reduced tx power as in the LQ command and the second one with 0 power reduction. This patch adapts the TPC statistics according to the description above: 1. Use BA notifications instead of Tx response 2. For TPC only, drop the optimization which considers empty BA as one MPDU. The reason is that with TPC we want to recover very quickly from a bad power reduction and, therefore we'd like the success ratio to get an immediate hit when failing to get a BA, so we'd switch back to a lower or zero power reduction Signed-off-by: Gregory Greenman Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 74 ++++++++++++++-------- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 5 +- 3 files changed, 56 insertions(+), 29 deletions(-) commit ca296c571f6929e42dc0ac0bb5c81cdb5323362d Author: Oren Givon Date: Thu Jan 14 10:24:10 2016 +0200 iwlwifi: update support for 3168 series firmware and NVM Update the struct which defines the support for 3168 cards. Now it will search for a firmware of this format: iwlwifi-3168-XX.ucode Also, set the minimum version of the ucode to 20. Update the minimum NVM version and minimum NVM calibrations version of the 3168 series. Signed-off-by: Oren Givon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 36efee8e9ccb60ddff95e4e9be6dab3c21b9a334 Merge: c72fc90 65dc1a5 Author: Kalle Valo Date: Tue Jan 26 15:41:30 2016 +0200 Merge ath-current from ath.git commit 9f3d6d7a40a178b8a5b5274f4e55fec8c30147c9 Author: Sebastian Ott Date: Mon Jan 25 10:32:51 2016 +0100 s390/cio: update measurement characteristics Per channel path measurement characteristics are obtained during channel path registration. However if some properties of a channel path change we don't update the measurement characteristics. Make sure to update the characteristics when we change the properties of a channel path or receive a notification from FW about such a change. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/chp.c | 12 +++++------- drivers/s390/cio/chsc.c | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 9 deletions(-) commit 61f0bfcf8020f02eb09adaef96745d1c1d1b3623 Author: Sebastian Ott Date: Mon Jan 25 10:31:33 2016 +0100 s390/cio: ensure consistent measurement state Make sure that in all cases where we could not obtain measurement characteristics the associated fields are set to invalid values. Note: without this change the "shared" capability of a channel path for which we could not obtain the measurement characteristics was incorrectly displayed as 0 (not shared). We will now correctly report "unknown" in this case. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/chp.c | 13 +++++-------- drivers/s390/cio/chsc.c | 12 ++++++++---- 2 files changed, 13 insertions(+), 12 deletions(-) commit 0d9bfe9123cfde59bf5c2e375b59d2a7d5061c4c Author: Sebastian Ott Date: Mon Jan 25 10:30:27 2016 +0100 s390/cio: fix measurement characteristics memleak Measurement characteristics are allocated during channel path registration but not freed during deregistration. Fix this by embedding these characteristics inside struct channel_path. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/chp.c | 6 +++--- drivers/s390/cio/chp.h | 2 +- drivers/s390/cio/chsc.c | 16 ++-------------- 3 files changed, 6 insertions(+), 18 deletions(-) commit d8f51227f33fbb34e1e54e315175268f54e573e7 Author: Ingo Tuchscherer Date: Fri Jan 22 16:18:29 2016 +0100 s390/zcrypt: Fix cryptographic device id in kernel messages Currently, on card response failures a combination of card domain and domain id is recorded in the kernel messages. According to the message description only the card id will be recorded. The domain id is not relevant, since the whole card including all domains is set offline. Signed-off-by: Ingo Tuchscherer Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_error.h | 15 +++++++++------ drivers/s390/crypto/zcrypt_msgtype50.c | 9 +++++---- drivers/s390/crypto/zcrypt_msgtype6.c | 20 ++++++++++---------- 3 files changed, 24 insertions(+), 20 deletions(-) commit f5e44f82c1848d8e55fb0061308f14c0884e5483 Author: Sebastian Ott Date: Fri Jan 22 14:11:21 2016 +0100 s390/pci: remove iomap sanity checks Since each iomap_entry handles only one bar of one pci function (even when disjunct ranges of a bar are mapped) the sanity check in pci_iomap_range is not needed and can be removed. Also convert the remaining BUG_ONs to WARN_ONs. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 8ead7efb6379354d0d31efb39342f4399c87cb67 Author: Sebastian Ott Date: Fri Jan 22 14:04:18 2016 +0100 s390/pci: set error state for unusable functions We receive special notifications from firmware when an error was detected and a pci function became unusable. Set the error_state accordingly to give device drivers a hint that they don't need to try error recovery. Suggested-by: Alexander Schmidt Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci_event.c | 5 +++++ 1 file changed, 5 insertions(+) commit c0cabaddeeeab13db8ef4e275ab5c7c0e8746324 Author: Sebastian Ott Date: Fri Jan 22 14:03:06 2016 +0100 s390/pci: fix bar check Fix the check which bar space we should map to allow available bars only. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c506fff3d3a8a632e8eb2270680548ec415f0357 Author: Sebastian Ott Date: Fri Jan 22 14:01:44 2016 +0100 s390/pci: resize iomap On s390 we need to maintain a mapping between iomem addresses and arch specific function identifiers. Currently the mapping table is created as such that we could span the whole iomem address space. Since we can only map each bar space from each possible function we have an upper bound for the number of mapping entries. This reduces the size of the iomap from 256K to less than 4K (using the defconfig). Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit bf19c94d5caa100f22c20d756c57e3550c01cdb8 Author: Sebastian Ott Date: Fri Jan 22 13:59:35 2016 +0100 s390/pci: improve ZPCI_* macros Most of the constants defined in pci_io.h depend on each other and thus can be calculated. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci_io.h | 15 +++++++++------ arch/s390/pci/pci.c | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) commit 9e00caaea14b90a788c17a2e0c32108a3d7008ec Author: Sebastian Ott Date: Fri Jan 22 13:58:42 2016 +0100 s390/pci: provide ZPCI_ADDR macro Provide and use a ZPCI_ADDR macro as the complement of ZPCI_IDX to get rid of some constants in the code. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci_io.h | 1 + arch/s390/pci/pci.c | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) commit c2e1fcf3ec39de092e3e84b489b5c0cc39f6dd05 Author: Sebastian Ott Date: Fri Jan 22 13:57:34 2016 +0100 s390/pci: adjust IOMAP_MAX_ENTRIES ZPCI_IOMAP_MAX_ENTRIES is off by one. Let's adjust this for the sake of correctness. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci_io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d0f76a6ca1f2cdcffca7ce130f67ec61caa0999 Author: Michael Holzheu Date: Wed Jan 20 19:22:16 2016 +0100 s390/numa: move numa_init_late() from device to arch_initcall Commit 3e89e1c5ea ("hugetlb: make mm and fs code explicitly non-modular") moves hugetlb_init() from module_init to subsys_initcall. The hugetlb_init()->hugetlb_register_node() code accesses "node->dev.kobj" which is initialized in numa_init_late(). Since numa_init_late() is a device_initcall which is called *after* subsys_initcall the above mentioned patch breaks NUMA on s390. So fix this and move numa_init_late() to arch_initcall. Fixes: 3e89e1c5ea ("hugetlb: make mm and fs code explicitly non-modular") Reviewed-by: Heiko Carstens Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/numa/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 531d3067314f63d80936c565dcd0fa01c7a1760f Author: Will Deacon Date: Mon Jan 25 18:25:59 2016 +0000 arm64: defconfig: updates for 4.5 Based on requests, update our defconfig so that: - We don't build any modules - PL031 is enabled (RTC emulated by qemu) - Xen guest support is enabled - The Uniphier built-in I2C controller is enabled - PCI host controller drivers for the various arm64 SoCs are enabled - Device passthrough works on Seattle using SMMU and VFIO - The Hisilicon IRQ controller (mbigen) is enabled Signed-off-by: Will Deacon arch/arm64/configs/defconfig | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) commit 67dfa1751ce71e629aad7c438e1678ad41054677 Author: dann frazier Date: Mon Jan 25 16:52:16 2016 -0700 arm64: errata: Add -mpc-relative-literal-loads to build flags GCC6 (and Linaro's 2015.12 snapshot of GCC5) has a new default that uses adrp/ldr or adrp/add to address literal pools. When CONFIG_ARM64_ERRATUM_843419 is enabled, modules built with this toolchain fail to load: module libahci: unsupported RELA relocation: 275 This patch fixes the problem by passing '-mpc-relative-literal-loads' to the compiler. Cc: stable@vger.kernel.org Fixes: df057cc7b4fa ("arm64: errata: add module build workaround for erratum #843419") BugLink: http://bugs.launchpad.net/bugs/1533009 Acked-by: Ard Biesheuvel Suggested-by: Christophe Lyon Signed-off-by: Dann Frazier Signed-off-by: Will Deacon arch/arm64/Makefile | 1 + 1 file changed, 1 insertion(+) commit 728dabd6d1751cf5e0f8e0535891393da62396e9 Author: William Cohen Date: Thu Jan 21 22:56:26 2016 -0500 Eliminate the .eh_frame sections from the aarch64 vmlinux and kernel modules By default the aarch64 gcc generates .eh_frame sections. Unlike .debug_frame sections, the .eh_frame sections are loaded into memory when the associated code is loaded. On an example kernel being built with this default the .eh_frame section in vmlinux used an extra 1.7MB of memory. The x86 disables the creation of the .eh_frame section. The aarch64 should probably do the same to save some memory. Signed-off-by: William Cohen Signed-off-by: Will Deacon arch/arm64/Makefile | 1 + 1 file changed, 1 insertion(+) commit 07905298e4d5777eb58516cdc242f7ac1ca387a2 Author: Lucas Tanure Date: Mon Jan 25 19:30:23 2016 -0200 ALSA: bebob: Use a signed return type for get_formation_index The return type "unsigned int" was used by the get_formation_index function despite of the aspect that it will eventually return a negative error code. So, change to signed int and get index by reference in the parameters. Done with the help of Coccinelle. [Fix the missing braces suggested by Julia Lawall -- tiwai] Signed-off-by: Lucas Tanure Reviewed-by: Takashi Sakamoto Tested-by: Takashi Sakamoto Cc: Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_stream.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 6736fde9672ff6717ac576e9bba2fd5f3dfec822 Author: Johannes Berg Date: Tue Jan 26 11:29:03 2016 +0100 rfkill: fix rfkill_fop_read wait_event usage The code within wait_event_interruptible() is called with !TASK_RUNNING, so mustn't call any functions that can sleep, like mutex_lock(). Since we re-check the list_empty() in a loop after the wait, it's safe to simply use list_empty() without locking. This bug has existed forever, but was only discovered now because all userspace implementations, including the default 'rfkill' tool, use poll() or select() to get a readable fd before attempting to read. Cc: stable@vger.kernel.org Fixes: c64fb01627e24 ("rfkill: create useful userspace interface") Reported-by: Dmitry Vyukov Signed-off-by: Johannes Berg net/rfkill/core.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 4fa11ec726a32ea6dd768dbb2e2af3453a98ec0a Author: Sachin Kulkarni Date: Tue Jan 12 14:30:19 2016 +0530 mac80211: Requeue work after scan complete for all VIF types. During a sw scan ieee80211_iface_work ignores work items for all vifs. However after the scan complete work is requeued only for STA, ADHOC and MESH iftypes. This occasionally results in event processing getting delayed/not processed for iftype AP when it coexists with a STA. This can result in data halt and eventually disconnection on the AP interface. Cc: stable@vger.kernel.org Signed-off-by: Sachin Kulkarni Signed-off-by: Johannes Berg net/mac80211/ibss.c | 1 - net/mac80211/mesh.c | 11 ----------- net/mac80211/mesh.h | 4 ---- net/mac80211/mlme.c | 2 -- net/mac80211/scan.c | 12 +++++++++++- 5 files changed, 11 insertions(+), 19 deletions(-) commit b4abf91047cf054f203dcfac97e1038388826937 Author: Thomas Gleixner Date: Wed Jan 13 11:25:38 2016 +0100 rtmutex: Make wait_lock irq safe Sasha reported a lockdep splat about a potential deadlock between RCU boosting rtmutex and the posix timer it_lock. CPU0 CPU1 rtmutex_lock(&rcu->rt_mutex) spin_lock(&rcu->rt_mutex.wait_lock) local_irq_disable() spin_lock(&timer->it_lock) spin_lock(&rcu->mutex.wait_lock) --> Interrupt spin_lock(&timer->it_lock) This is caused by the following code sequence on CPU1 rcu_read_lock() x = lookup(); if (x) spin_lock_irqsave(&x->it_lock); rcu_read_unlock(); return x; We could fix that in the posix timer code by keeping rcu read locked across the spinlocked and irq disabled section, but the above sequence is common and there is no reason not to support it. Taking rt_mutex.wait_lock irq safe prevents the deadlock. Reported-by: Sasha Levin Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Paul McKenney kernel/futex.c | 18 +++---- kernel/locking/rtmutex.c | 135 +++++++++++++++++++++++++---------------------- 2 files changed, 81 insertions(+), 72 deletions(-) commit 481eaec37e91e2b33f17275901172f50ce2c71e8 Author: Michael S. Tsirkin Date: Thu Jan 21 14:44:10 2016 +0200 tools/virtio: add ringtest utilities This adds micro-benchmarks useful for tuning virtio ring layouts. Three layouts are currently implemented: - virtio 0.9 compatible one - an experimental extension bypassing the ring index, polling ring itself instead - an experimental extension bypassing avail and used ring completely Typical use: sh run-on-all.sh perf stat -r 10 --log-fd 1 -- ./ring It doesn't depend on the kernel directly, but it's handy to have as much virtio stuff as possible in one tree. Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/Makefile | 22 ++ tools/virtio/ringtest/README | 2 + tools/virtio/ringtest/main.c | 366 +++++++++++++++++++++++++++++++ tools/virtio/ringtest/main.h | 119 ++++++++++ tools/virtio/ringtest/ring.c | 272 +++++++++++++++++++++++ tools/virtio/ringtest/run-on-all.sh | 24 ++ tools/virtio/ringtest/virtio_ring_0_9.c | 316 ++++++++++++++++++++++++++ tools/virtio/ringtest/virtio_ring_poll.c | 2 + 8 files changed, 1123 insertions(+) commit fb9b050ce9695cf2769a850d94aa2ab39c8c3cd5 Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 sh: fix smp_store_mb for !SMP sh variant of smp_store_mb() calls xchg() on !SMP which is stronger than implied by both the name and the documentation. commit 90a3ccb0be538a914e6a5c51ae919762261563ad ("sh: define __smp_xxx, fix smp_store_mb for !SMP") was supposed to fix it but left the bug in place. Drop smp_store_mb, so that code in asm-generic/barrier.h will define it correctly depending on CONFIG_SMP. Signed-off-by: Michael S. Tsirkin arch/sh/include/asm/barrier.h | 1 - 1 file changed, 1 deletion(-) commit a7c490333df3cff5086ddf19a0837529304fa097 Author: Michael S. Tsirkin Date: Wed Jan 20 21:12:58 2016 +0200 tools/virtio: use virt_xxx barriers Fix build after API changes. Reported-by: Kamal Mostafa Signed-off-by: Michael S. Tsirkin tools/virtio/asm/barrier.h | 22 +++++++++++++--------- tools/virtio/linux/compiler.h | 9 +++++++++ tools/virtio/linux/kernel.h | 1 + 3 files changed, 23 insertions(+), 9 deletions(-) commit 2989be09a8a9d62a785137586ad941f916e08f83 Author: Michael S. Tsirkin Date: Thu Jan 14 16:00:41 2016 +0200 virtio_pci: fix use after free on release KASan detected a use-after-free error in virtio-pci remove code. In virtio_pci_remove(), vp_dev is still used after being freed in unregister_virtio_device() (in virtio_pci_release_dev() more precisely). To fix, keep a reference until cleanup is done. Fixes: 63bd62a08ca4 ("virtio_pci: defer kfree until release callback") Reported-by: Jerome Marchand Cc: stable@vger.kernel.org Cc: Sasha Levin Signed-off-by: Michael S. Tsirkin Tested-by: Jerome Marchand drivers/virtio/virtio_pci_common.c | 2 ++ 1 file changed, 2 insertions(+) commit 3b9e9488098a7cd91f4111962a49457cfc6557d2 Merge: c85e492 79febbc Author: David S. Miller Date: Mon Jan 25 22:51:42 2016 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2016-01-25 This series contains updates to i40e only and so I won't continue receiving patches to fix the same issue (again). Arnd fixes the driver from causing the compiler whining about uninitialized variables, so initialize those variables. Eric fixes the build errors/warnings which were introduced by Anjali when she added geneve support to i40e. ==================== Signed-off-by: David S. Miller commit 08c6e8cc66282a082484480c1a5641bc27d26c55 Author: Andy Shevchenko Date: Fri Jan 15 22:02:12 2016 +0200 i2c: designware-pci: use IRQF_COND_SUSPEND flag This is effectively reapplies the commit b0898fdaffb2 ("i2c: designware-pci: use IRQF_COND_SUSPEND flag") after the commit d80d134182ba ("i2c: designware: Move common probe code into i2c_dw_probe()"). Original message as follows. The mentioned flag fixes a warning on Intel Edison board since one of the I2C controller shares IRQ line with watchdog timer. Fixes: d80d134182ba (i2c: designware: Move common probe code into i2c_dw_probe()) Signed-off-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5a4ff9ec8d6edd2ab1cfe8ce6a080d6e57cbea9a Author: Guillaume Fougnies Date: Tue Jan 26 00:28:27 2016 +0100 ALSA: usb-audio: Fix TEAC UD-501/UD-503/NT-503 usb delay TEAC UD-501/UD-503/NT-503 fail to switch properly between different rate/format. Similar to 'Playback Design', this patch corrects the invalid clock source error for TEAC products and avoids complete freeze of the usb interface of 503 series. Signed-off-by: Guillaume Fougnies Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 83c60158ebf16417af28b338bc0380cf17f2b9f9 Author: Jean Delvare Date: Mon Jan 25 12:17:07 2016 +0100 i2c: piix4: Fully initialize SB800 before it is registered This closes a race window where I2C device drivers attempt to access I2C buses which aren't fully initialized yet. Signed-off-by: Jean Delvare Tested-by: Christian Fetzer Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-piix4.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit a28e35171cb1ff84197e8d271b65aaeb8c404827 Author: Jean Delvare Date: Fri Jan 22 14:12:02 2016 +0100 i2c: piix4: Fix SB800 locking We need a single mutex for all 4 shared SMBus ports on the SB800. A per-port mutex doesn't protect us from concurrent access. In theory the mutex should be per PCI device, however in practice we know that there's only ever a single instance of the device in a given system so we can use a global. Also take the mutex during initialization, as first port may be already in use when second port is initialized. Signed-off-by: Jean Delvare Tested-by: Christian Fetzer Reviewed-by: Mika Westerberg [wsa: made mutex static] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-piix4.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit f49d45c973984eb805eb989b6220aa7c1ee30bc2 Author: Alex Deucher Date: Tue Jan 26 00:30:33 2016 -0500 drm/amdgpu: don't init fbdev if we don't have any connectors Don't init fbdev if we don't have connectors. E.g., if you have a PX laptop with the displays attached to an IGP with no driver support, you may end up with a blank screen rather than falling back to vesa, etc. Based on a similar radeon patch from Rob Clark. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++++ 1 file changed, 4 insertions(+) commit f95429eccc570dc45d589c327bfcfddcdc3e8228 Author: Rob Clark Date: Mon Jan 25 18:06:48 2016 -0500 drm/radeon: only init fbdev if we have connectors This fixes an issue that was noticed on an optimus/prime laptop with a kernel that was old enough to not support the integrated intel gfx (which was driving all the outputs), but did have support for the discrete radeon gpu. The end result was not falling back to VESA and leaving the user with a black screen. (Plus it is kind of silly to create an framebuffer device if there are no outputs hooked up to the gpu.) Signed-off-by: Rob Clark Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 80ad623edd2d0ccb47d85357ee31c97e6c684e82 Author: David Sterba Date: Mon Jan 25 11:02:06 2016 +0100 Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()" This reverts commit 696249132158014d594896df3a81390616069c5c. The cleaner thread can block freezing when there's a snapshot cleaning in progress and the other threads get suspended first. From the logs provided by Martin we're waiting for reading extent pages: kernel: PM: Syncing filesystems ... done. kernel: Freezing user space processes ... (elapsed 0.015 seconds) done. kernel: Freezing remaining freezable tasks ... kernel: Freezing of tasks failed after 20.003 seconds (1 tasks refusing to freeze, wq_busy=0): kernel: btrfs-cleaner D ffff88033dd13bc0 0 152 2 0x00000000 kernel: ffff88032ebc2e00 ffff88032e750000 ffff88032e74fa50 7fffffffffffffff kernel: ffffffff814a58df 0000000000000002 ffffea000934d580 ffffffff814a5451 kernel: 7fffffffffffffff ffffffff814a6e8f 0000000000000000 0000000000000020 kernel: Call Trace: kernel: [] ? bit_wait+0x2c/0x2c kernel: [] ? schedule+0x6f/0x7c kernel: [] ? schedule_timeout+0x2f/0xd8 kernel: [] ? timekeeping_get_ns+0xa/0x2e kernel: [] ? ktime_get+0x36/0x44 kernel: [] ? io_schedule_timeout+0x94/0xf2 kernel: [] ? io_schedule_timeout+0x94/0xf2 kernel: [] ? bit_wait_io+0x2c/0x30 kernel: [] ? __wait_on_bit+0x41/0x73 kernel: [] ? wait_on_page_bit+0x6d/0x72 kernel: [] ? autoremove_wake_function+0x2a/0x2a kernel: [] ? read_extent_buffer_pages+0x1bd/0x203 kernel: [] ? free_root_pointers+0x4c/0x4c kernel: [] ? btree_read_extent_buffer_pages.constprop.57+0x5a/0xe9 kernel: [] ? read_tree_block+0x2d/0x45 kernel: [] ? read_block_for_search.isra.34+0x22a/0x26b kernel: [] ? btrfs_set_path_blocking+0x1e/0x4a kernel: [] ? btrfs_search_slot+0x648/0x736 kernel: [] ? btrfs_lookup_extent_info+0xb7/0x2c7 kernel: [] ? walk_down_proc+0x9c/0x1ae kernel: [] ? walk_down_tree+0x40/0xa4 kernel: [] ? btrfs_drop_snapshot+0x2da/0x664 kernel: [] ? finish_task_switch+0x126/0x167 kernel: [] ? btrfs_clean_one_deleted_snapshot+0xa6/0xb0 kernel: [] ? cleaner_kthread+0x13e/0x17b kernel: [] ? btrfs_item_end+0x33/0x33 kernel: [] ? kthread+0x95/0x9d kernel: [] ? kthread_parkme+0x16/0x16 kernel: [] ? ret_from_fork+0x3f/0x70 kernel: [] ? kthread_parkme+0x16/0x16 As this affects a released kernel (4.4) we need a minimal fix for stable kernels. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=108361 Reported-by: Martin Ziegler CC: stable@vger.kernel.org # 4.4 CC: Jiri Kosina Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/disk-io.c | 1 - 1 file changed, 1 deletion(-) commit 0a95b851370b84a4b9d92ee6d1fa0926901d0454 Author: Qu Wenruo Date: Fri Jan 22 09:28:38 2016 +0800 btrfs: async-thread: Fix a use-after-free error for trace Parameter of trace_btrfs_work_queued() can be freed in its workqueue. So no one use use that pointer after queue_work(). Fix the user-after-free bug by move the trace line before queue_work(). Reported-by: Dave Jones Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/async-thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de0ee0edb21fbab4c7afa3e94573ecfebfb0244e Author: Filipe Manana Date: Thu Jan 21 10:17:54 2016 +0000 Btrfs: fix race between fsync and lockless direct IO writes An fsync, using the fast path, can race with a concurrent lockless direct IO write and end up logging a file extent item that points to an extent that wasn't written to yet. This is because the fast fsync path collects ordered extents into a local list and then collects all the new extent maps to log file extent items based on them, while the direct IO write path creates the new extent map before it creates the corresponding ordered extent (and submitting the respective bio(s)). So fix this by making the direct IO write path create ordered extents before the extent maps and make the fast fsync path collect any new ordered extents after it collects the extent maps. Note that making the fsync handler call inode_dio_wait() (after acquiring the inode's i_mutex) would not work and lead to a deadlock when doing AIO, as through AIO we end up in a path where the fsync handler is called (through dio_aio_complete_work() -> dio_complete() -> vfs_fsync_range()) before the inode's dio counter is decremented (inode_dio_wait() waits for this counter to have a value of zero). Signed-off-by: Filipe Manana Signed-off-by: Chris Mason fs/btrfs/inode.c | 36 ++++++++++++++++++++++++++++-------- fs/btrfs/tree-log.c | 14 +++++++++++--- 2 files changed, 39 insertions(+), 11 deletions(-) commit 6b5aa88c861cf0e4156e490009e2018d4fc81109 Merge: a6111d1 14e46e0 Author: Chris Mason Date: Mon Jan 25 16:43:13 2016 -0800 Merge branch 'fix/fst-sysfs' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5 Signed-off-by: Chris Mason commit 79febbc19b81b5242339bffb90e4dbea15015dde Author: Arnd Bergmann Date: Wed Jan 20 19:53:17 2016 -0800 net: i40e: shut up uninitialized variable warnings intel/i40e/i40e_txrx.c: In function 'i40e_xmit_frame_ring': intel/i40e/i40e_txrx.c:2367:20: error: 'oiph' may be used uninitialized in this function [-Werror=maybe-uninitialized] intel/i40e/i40e_txrx.c:2317:16: note: 'oiph' was declared here intel/i40e/i40e_txrx.c:2367:17: error: 'oudph' may be used uninitialized in this function [-Werror=maybe-uninitialized] intel/i40e/i40e_txrx.c:2316:17: note: 'oudph' was declared here Signed-off-by: Arnd Bergmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5cae7615b613381a04d3dd06b8237234cc3f7cc9 Author: Eric Dumazet Date: Wed Jan 20 19:53:02 2016 -0800 i40e: fix build warnings Fixes following build warnings : drivers/net/ethernet/intel/i40e/i40e_main.c:7057:13: warning: 'i40e_sync_udp_filters_subtask' defined but not used [-Wunused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:8524:13: warning: 'i40e_add_vxlan_port' defined but not used [-Wunused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:8569:13: warning: 'i40e_del_vxlan_port' defined but not used [-Wunused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:8604:13: warning: 'i40e_add_geneve_port' defined but not used [-Wunused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:8651:13: warning: 'i40e_del_geneve_port' defined but not used [-Wunused-function] Fixes: 6a899024058d ("i40e: geneve tunnel offload support") Signed-off-by: Eric Dumazet Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 566d1827df2ef0cbe921d3d6946ac3007b1a6938 Author: Tejun Heo Date: Fri Jan 15 15:13:05 2016 -0500 libata: disable forced PORTS_IMPL for >= AHCI 1.3 Some early controllers incorrectly reported zero ports in PORTS_IMPL register and the ahci driver fabricates PORTS_IMPL from the number of ports in those cases. This hasn't mattered but with the new nvme controllers there are cases where zero PORTS_IMPL is valid and should be honored. Disable the workaround for >= AHCI 1.3. Signed-off-by: Tejun Heo Reported-by: Andy Lutomirski Link: http://lkml.kernel.org/g/CALCETrU7yMvXEDhjAUShoHEhDwifJGapdw--BKxsP0jmjKGmRw@mail.gmail.com Cc: Sergei Shtylyov Cc: stable@vger.kernel.org drivers/ata/libahci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b00622fc34e9d45069bd6e328dfd47ea2ef61468 Author: Shikha Jain Date: Mon Jan 11 14:55:45 2016 -0800 libata: blacklist a Viking flash model for MWDMA corruption Viking flash model VRFDFC22048UCHC-TE causes data corruption in MWDMA mode. Cc: xe-kernel@external.cisco.com Signed-off-by: Shikha Jain Signed-off-by: Anil Veliyankara Madam Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 1 + 1 file changed, 1 insertion(+) commit fb3296335500aaff61333df8eabbccf28761c79d Author: Danesh Petigara Date: Mon Jan 11 13:22:26 2016 -0800 drivers: ata: wake port before DMA stop for ALPM The AHCI driver code stops and starts port DMA engines at will without considering the power state of the particular port. The AHCI specification isn't very clear on how to handle this scenario, leaving implementation open to interpretation. Broadcom's STB SATA host controller is unable to handle port DMA controller restarts when the port in question is in low power mode. When a port enters partial or slumber mode, its PHY is powered down. When a controller restart is requested, the controller's internal state machine expects the PHY to be brought back up by software which never happens in this case, resulting in failures. To avoid this situation, logic is added to manually wake up the port just before its DMA engine is stopped, if the port happens to be in a low power state. HBA initiated power management ensures that the port eventually returns to its configured low power state, when the link is idle (as per the conditions listed in the spec). A new host flag is also added to ensure this logic is only exercised for hosts with the above limitation. tj: Formatting changes. Signed-off-by: Danesh Petigara Reviewed-by: Markus Mayer Signed-off-by: Tejun Heo drivers/ata/ahci.h | 1 + drivers/ata/ahci_brcmstb.c | 1 + drivers/ata/libahci.c | 23 ++++++++++++++++++++++- include/linux/libata.h | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) commit 462b3f161beb62eeb290f4ec52f5ead29a2f8ac7 Author: Takashi Iwai Date: Mon Jan 25 13:59:21 2016 +0100 ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures Some architectures like PowerPC can handle the maximum struct size in an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit. This problem was revealed recently by a powerpc change, as it's now treated as a fatal build error. This patch is a stop-gap for that: for architectures with less than 14 bit ioctl struct size, get rid of the handling of the relevant ioctl. We should provide an alternative equivalent ioctl code later, but for now just paper over it. Luckily, the compress API hasn't been used on such architectures, so the impact must be effectively zero. Reviewed-by: Mark Brown Acked-by: Sudip Mukherjee Cc: Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0ea24daae053a9ba65d2f3eb20523002c1a8af38 Author: Adam Ford Date: Thu Jan 21 11:03:20 2016 -0600 ARM: dts: Fix wl12xx missing clocks that cause hangs The tcxo-clock-frequency binding is listed as optional, but without it the wl12xx used on the torpedo + wireless may hang. Scanning also appears broken without this patch. Signed-off-by: Adam Ford Fixes: 687c27676151 ("ARM: dts: Add minimal support for LogicPD Torpedo DM3730 devkit") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 1 + 1 file changed, 1 insertion(+) commit c85e4924452ae8225c8829f3fa8a2f7baa34bc5c Author: Haiyang Zhang Date: Mon Jan 25 09:49:31 2016 -0800 hv_netvsc: Fix book keeping of skb during batching process Since eliminating send_completion_tid from struct hv_netvsc_packet, we haven't add proper book keeping for the skb of the batched packet. This patch fixes this issue and allows the previous skb is properly freed. Otherwise, a panic may happen. Thanks to Simon Xiao for bisecting and analysis. Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 1 + drivers/net/hyperv/netvsc.c | 33 ++++++++++++++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) commit 757647e10e55c01fb7a9c4356529442e316a7c72 Author: Vitaly Kuznetsov Date: Mon Jan 25 16:00:41 2016 +0100 hv_netvsc: use skb_get_hash() instead of a homegrown implementation Recent changes to 'struct flow_keys' (e.g commit d34af823ff40 ("net: Add VLAN ID to flow_keys")) introduced a performance regression in netvsc driver. Is problem is, however, not the above mentioned commit but the fact that netvsc_set_hash() function did some assumptions on the struct flow_keys data layout and this is wrong. Get rid of netvsc_set_hash() by switching to skb_get_hash(). This change will also imply switching to Jenkins hash from the currently used Toeplitz but it seems there is no good excuse for Toeplitz to stay. Signed-off-by: Vitaly Kuznetsov Acked-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 67 ++--------------------------------------- 1 file changed, 3 insertions(+), 64 deletions(-) commit 87e57399e9d3606b08b0e1b2dd0f4aaa1d8ba365 Author: Thadeu Lima de Souza Cascardo Date: Mon Jan 25 11:29:19 2016 -0200 sit: set rtnl_link_ops before calling register_netdevice When creating a SIT tunnel with ip tunnel, rtnl_link_ops is not set before ipip6_tunnel_create is called. When register_netdevice is called, there is no linkinfo attribute in the NEWLINK message because of that. Setting rtnl_link_ops before calling register_netdevice fixes that. Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: David S. Miller net/ipv6/sit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 05f3b50ea81d7af5479b55147ef98f8bbcd4a8b9 Author: Johannes Berg Date: Mon Jan 25 11:40:50 2016 +0100 net: fec: use CONFIG_ARM instead of CONFIG_ARCH_MXC/SOC_IMX28 As Arnd Bergmann points out, using CONFIG_ARCH_MXC and/or SOC_IMX28 is wrong if some other ARM platform uses this device - the operation of the driver would depend on an unrelated ARM platform that might or might not be set for multi-platform kernels. Prior to my previous patch, any other platforms using it would have been broken already due to having the cbd_datlen/cbd_sc fields in the wrong order, but byte ordering correctly, so no such platforms can exist and work today. In any case, it seems likely that only Freescale SoCs use this part, and those are little-endian on ARM, so CONFIG_ARM is safe for them. Signed-off-by: Johannes Berg Reviewed-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec.h | 8 +++----- drivers/net/ethernet/freescale/fec_main.c | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) commit 62f2aaabcf41b9e69d0356a7c1716b173241c105 Author: Sudip Mukherjee Date: Mon Jan 25 13:05:20 2016 +0530 defxx: fix build warning We are getting many build warnings about: 'bar_start' may be used uninitialized and 'bar_len' may be used uninitialized They are not actually uninitialized as dfx_get_bars() will initialize them properly. But still lets have them initialized just to satisfy the compiler (gcc 4.8.2). Signed-off-by: Sudip Mukherjee Acked-by: Maciej W. Rozycki Signed-off-by: David S. Miller drivers/net/fddi/defxx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 36df745536ab81956cf68329c8049ad07f4a0cf0 Author: Sudip Mukherjee Date: Mon Jan 25 11:43:09 2016 +0530 net: macb: fix build warning We are getting build warning about: macb.c:2889:13: warning: 'tx_clk' may be used uninitialized in this function macb.c:2888:11: warning: 'hclk' may be used uninitialized in this function In reality they are not used uninitialized as clk_init() will initialize them, this patch will just silence the warning. Signed-off-by: Sudip Mukherjee Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cfa30397bc3677250a3e71aebde7b40ecb2b25a Author: Johannes Berg Date: Sun Jan 24 16:52:37 2016 +0100 net: fec: make driver endian-safe The driver treats the device descriptors as CPU-endian, which appears to be correct with the default endianness on both ARM (typically LE) and PowerPC (typically BE) SoCs, indicating that the hardware block is generated differently. Add endianness annotations and byteswaps as necessary. It's not clear that the ifdef there really is correct and shouldn't just be #ifdef CONFIG_ARM, but I also can't test on anything but the i.MX6 HummingBoard where this gets it working with a BE kernel. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller drivers/net/ethernet/freescale/Makefile | 3 + drivers/net/ethernet/freescale/fec.h | 40 ++++++--- drivers/net/ethernet/freescale/fec_main.c | 130 ++++++++++++++++-------------- 3 files changed, 101 insertions(+), 72 deletions(-) commit db0e51afa481088e6396f11e02018d64113a6578 Author: Russell King Date: Sun Jan 24 09:22:05 2016 +0000 net: dsa: fix mv88e6xxx switches Since commit 76e398a62712 ("net: dsa: use switchdev obj for VLAN add/del ops"), the Marvell 88E6xxx switch has been unable to pass traffic between ports - any received traffic is discarded by the switch. Taking a port out of bridge mode and configuring a vlan on it also the port to start passing traffic. With the debugfs files re-instated to allow debug of this issue by comparing the register settings between the working and non-working case, the reason becomes clear: GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6 - 7: 1111 707f 2001 2 2 2 2 2 0 2 + 7: 1111 707f 2001 1 1 1 1 1 0 1 Register 7 for the ports is the default vlan tag register, and in the non-working setup, it has been set to 2, despite vlan 2 not being configured. This causes the switch to drop all packets coming in to these ports. The working setup has the default vlan tag register set to 1, which is the default vlan when none is configured. Inspection of the code reveals why. The code prior to this commit was: - for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { ... - if (!err && vlan->flags & BRIDGE_VLAN_INFO_PVID) - err = ds->drv->port_pvid_set(ds, p->port, vid); but the new code is: + for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { ... + } ... + if (pvid) + err = _mv88e6xxx_port_pvid_set(ds, port, vid); This causes the new code to always set the default vlan to one higher than the old code. Fix this. Fixes: 76e398a62712 ("net: dsa: use switchdev obj for VLAN add/del ops") Cc: Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 426f04684b30ced3632b29b41cb5c97dca500dca Author: Martin Roth Date: Sun Jan 24 00:56:19 2016 +0200 82xx: FCC: Fixing a bug causing to FCC port lock-up (second try) This is an additional patch to the one already submitted recently. The previous patch was not complete, and the FCC port lock-up scenario has been reproduced in lab. I had an opportunity to check the current patch in lab and the FCC port lock no longer freezes, while the previous patch still locks-up the FCC port. The current patch fixes a pointer arithmetic bug (second bug in the same line), which leads FCC port lock-up during underrun/collision handling. Within the tx_startup() function in mac-fcc.c, the address of last BD is not calculated correctly. As a result of wrong calculation of the last BD address, the next transmitted BD may be set to an area out of the transmit BD ring. This actually causes to port lock-up and it is not recoverable. Signed-off-by: Martin Roth Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e3b1207705c10ada363bbc7d0235730ce1f5b79 Merge: 143c6fe 20437f7 Author: Tony Lindgren Date: Mon Jan 25 10:46:21 2016 -0800 Merge branch 'enable-devices' into omap-for-v4.5/fixes commit 32b6170ca59ccf07d0e394561e54b2cd9726038c Author: Thomas Egerer Date: Mon Jan 25 12:58:44 2016 +0100 ipv4+ipv6: Make INET*_ESP select CRYPTO_ECHAINIV The ESP algorithms using CBC mode require echainiv. Hence INET*_ESP have to select CRYPTO_ECHAINIV in order to work properly. This solves the issues caused by a misconfiguration as described in [1]. The original approach, patching crypto/Kconfig was turned down by Herbert Xu [2]. [1] https://lists.strongswan.org/pipermail/users/2015-December/009074.html [2] http://marc.info/?l=linux-crypto-vger&m=145224655809562&w=2 Signed-off-by: Thomas Egerer Acked-by: Herbert Xu Signed-off-by: David S. Miller net/ipv4/Kconfig | 1 + net/ipv6/Kconfig | 1 + 2 files changed, 2 insertions(+) commit 20437f79f6627a31752f422688a6047c25cefcf1 Author: Neil Armstrong Date: Fri Jan 22 17:15:51 2016 +0100 ARM: OMAP: Add PWM dmtimer platform data quirks In order to set the currently platform dependent dmtimer functions pointers as platform data for the pwm-omap-dmtimer platform driver, add it to plat-omap auxdata_lookup table. Suggested-by: Tony Lindgren Signed-off-by: Neil Armstrong Signed-off-by: Tony Lindgren arch/arm/mach-omap2/pdata-quirks.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 4ae2182b1e3407de369f8c5d799543b7db74221b Author: Sebastian Andrzej Siewior Date: Mon Jan 25 10:08:00 2016 -0600 PCI/AER: Flush workqueue on device remove to avoid use-after-free A Root Port's AER structure (rpc) contains a queue of events. aer_irq() enqueues AER status information and schedules aer_isr() to dequeue and process it. When we remove a device, aer_remove() waits for the queue to be empty, then frees the rpc struct. But aer_isr() references the rpc struct after dequeueing and possibly emptying the queue, which can cause a use-after-free error as in the following scenario with two threads, aer_isr() on the left and a concurrent aer_remove() on the right: Thread A Thread B -------- -------- aer_irq(): rpc->prod_idx++ aer_remove(): wait_event(rpc->prod_idx == rpc->cons_idx) # now blocked until queue becomes empty aer_isr(): # ... rpc->cons_idx++ # unblocked because queue is now empty ... kfree(rpc) mutex_unlock(&rpc->rpc_mutex) To prevent this problem, use flush_work() to wait until the last scheduled instance of aer_isr() has completed before freeing the rpc struct in aer_remove(). I reproduced this use-after-free by flashing a device FPGA and re-enumerating the bus to find the new device. With SLUB debug, this crashes with 0x6b bytes (POISON_FREE, the use-after-free magic number) in GPR25: pcieport 0000:00:00.0: AER: Multiple Corrected error received: id=0000 Unable to handle kernel paging request for data at address 0x27ef9e3e Workqueue: events aer_isr GPR24: dd6aa000 6b6b6b6b 605f8378 605f8360 d99b12c0 604fc674 606b1704 d99b12c0 NIP [602f5328] pci_walk_bus+0xd4/0x104 [bhelgaas: changelog, stable tag] Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org drivers/pci/pcie/aer/aerdrv.c | 4 +--- drivers/pci/pcie/aer/aerdrv.h | 1 - drivers/pci/pcie/aer/aerdrv_core.c | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) commit 7fd13615992ae0fc132c9abb24511be43f3b5d9d Author: Gustavo Padovan Date: Thu Jan 21 09:48:14 2016 -0200 tracing/dma-buf/fence: Fix timeline str value on fence_annotate_wait_on timeline was wrongly assigned with ->get_driver_name(). Link: http://lkml.kernel.org/r/1453376895-30747-1-git-send-email-gustavo@padovan.org Signed-off-by: Gustavo Padovan Signed-off-by: Steven Rostedt include/trace/events/fence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 186bac815227a4c26a0ad2f18c7450015d93ed0a Author: Matthew Dawson Date: Mon Jan 25 10:34:12 2016 -0500 drm/radeon: Ensure radeon bo is unreserved in radeon_gem_va_ioctl Found with lockdep while testing gpu reset. Reviewed-by: Christian König Signed-off-by: Matthew Dawson Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_gem.c | 1 + 1 file changed, 1 insertion(+) commit 3e4c5efbb3ac7c9c4fb5f33b659fa98afe568ab1 Author: David Sterba Date: Mon Jan 25 16:47:10 2016 +0100 btrfs: add free space tree to the cow-only list Signed-off-by: David Sterba fs/btrfs/relocation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6b20e0ad2e39b77b7d4a48cc06c4de39768c7bb8 Author: David Sterba Date: Mon Jan 25 16:30:22 2016 +0100 btrfs: add free space tree to lockdep classes Signed-off-by: David Sterba fs/btrfs/disk-io.c | 1 + 1 file changed, 1 insertion(+) commit 5c408fee254633a5be69505bc86c6b034f871ab4 Author: Maciej S. Szmigiero Date: Mon Jan 18 20:07:44 2016 +0100 ASoC: fsl_ssi: remove explicit register defaults There is no guarantee that on fsl_ssi module load SSI registers will have their power-on-reset values. In fact, if the driver is reloaded the values in registers will be whatever they were set to previously. However, the cache needs to be fully populated at probe time to avoid non-atomic allocations during register access. Special case here is imx21-class SSI, since according to datasheet it don't have SACC{ST,EN,DIS} regs. This fixes hard lockup on fsl_ssi module reload, at least in AC'97 mode. Fixes: 05cf237972fe ("ASoC: fsl_ssi: Add driver suspend and resume to support MEGA Fast") Signed-off-by: Maciej S. Szmigiero Tested-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit ff61ee84e7aa5842d9e33c0b442f0b43a6a44eaf Author: Roger Shimizu Date: Fri Jan 22 00:00:36 2016 +0900 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl Here're a few gpio pin related fixes: - remove pinctrl-0 definition from pinctrl, since those pins are used in other places such as gpio-fan and regulators. - keep initial state of power led - fix for alarm pin of gpio-fan. Fixes: dc57844a736f ("ARM: dts: orion5x: add buffalo linkstation ls-wtgl") Signed-off-by: Roger Shimizu Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a63abe389d56f6f7b1541c2084b453c9dfdb89dc Author: Arnd Bergmann Date: Fri Dec 4 20:20:09 2015 -0200 [media] exynos4-is: make VIDEO_SAMSUNG_EXYNOS4_IS tristate With CONFIG_V4L2=m and VIDEO_SAMSUNG_EXYNOS4_IS=y, we can select the individual drivers as built-in code when that should not be possible: drivers/built-in.o: In function `s5pcsis_set_fmt': policy.c:(.text+0x13afdc): undefined reference to `v4l_bound_align_image' drivers/built-in.o: In function `s5pcsis_probe': policy.c:(.text+0x13b440): undefined reference to `v4l2_of_parse_endpoint' policy.c:(.text+0x13b72c): undefined reference to `v4l2_subdev_init' Changing VIDEO_SAMSUNG_EXYNOS4_IS to tristate means that the dependency from CONFIG_V4L2 propates to the individual Kconfig symbols and they can only be built as loadable modules if V4L2 or any other of the dependencies itself is a module. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71f50c6d9a2276f3ec85384bffe2aee1962f4669 Author: Masahiro Yamada Date: Fri Jan 22 01:33:51 2016 +0900 of: drop symbols declared by _OF_DECLARE() from modules The users of this macro (OF_EARLYCON_DECLARE, CLK_OF_DECLARE, IRQCHIP_DECLARE, etc.) are only parsed in the early boot stage. Such symbols contained in modules are never used. This commit fixes the link error introduced by commit b8d20e06eaad ("serial: 8250_uniphier: add earlycon support"); the combination of CONFIG_SERIAL_8250_UNIPHIER=m and CONFIG_SERIAL_8250_CONSOLE=y fails to link: ERROR: "early_serial8250_setup" [drivers/tty/serial/8250/8250_uniphier.ko] undefined! Fixes: b8d20e06eaad ("serial: 8250_uniphier: add earlycon support") Signed-off-by: Masahiro Yamada Acked-by: Arnd Bergmann Signed-off-by: Rob Herring include/linux/of.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e68d7c143a62f372303f132cc69510eaaa4f1e04 Author: Rob Herring Date: Thu Dec 10 17:38:23 2015 -0600 MAINTAINERS: Add missing platform maintainers for dts files Platform dts files need to be reviewed primarily by the platform maintainers as dts files typically go in thru their trees. Add the missing paths where there are existing maintainers listed. Signed-off-by: Rob Herring Acked-by: Krzysztof Kozlowski Acked-by: Santosh Shilimkar Reviewed-by: Viresh Kumar Acked-by: Florian Fainelli Acked-by: Robert Jarzmik Acked-by: Andy Gross Acked-by: Sudeep Holla Acked-by: Sebastian Hesselbarth Acked-by: Arnd Bergmann Acked-by: Dinh Nguyen MAINTAINERS | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 0418138e2ffd90f4a00b263593f2e199db87321d Author: Roger Shimizu Date: Thu Jan 21 23:38:47 2016 +0900 ARM: dts: kirkwood: gpio-leds fixes for linkstation ls-wvl/vl The GPIOs controlling the LEDs, listed below, are active high, not low: - gpio-leds: "lswvl:red:alarm" pin - gpio-leds: "lswvl:red:func" pin - gpio-leds: "lswvl:amber:info" pin - gpio-leds: "lswvl:blue:func" pin - gpio-leds: "lswvl:red:hdderr{0,1}" pin Fixes: c43379e150aa ("ARM: dts: add buffalo linkstation ls-wvl/vl") Signed-off-by: Roger Shimizu Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-lswvl.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e98bd707e39d52d8bef8622e6e7b0ab4bd0ed8d0 Author: Roger Shimizu Date: Thu Jan 21 23:38:46 2016 +0900 ARM: dts: kirkwood: gpio-leds fixes for linkstation ls-wxl/wsxl The GPIOs controlling the LEDs, listed below, are active high, not low: - gpio-leds: "lswxl:blue:power" pin - gpio-leds: "lswxl:red:func" pin - gpio-leds: "lswxl:red:hdderr{0,1}" pin Fixes: e54e4b1b622e ("ARM: dts: add buffalo linkstation ls-wxl/wsxl") Signed-off-by: Roger Shimizu Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-lswxl.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6f86e9adc53b4c0a2a4283692216d119019f0b8d Author: Roger Shimizu Date: Thu Jan 21 23:38:45 2016 +0900 ARM: dts: kirkwood: gpio pin fixes for linkstation ls-wvl/vl For kirkwood, gpio pins starts from 32 are in the 2nd bank, so it should be converted to "gpio1 " in dts file. e.g. gpio 40 should be "gpio1 8" The pin/bank issue was found when discussing Debian Bug #810894 [https://bugs.debian.org/810894#47] Fixes: c43379e150aa ("ARM: dts: add buffalo linkstation ls-wvl/vl") Reported-by: Arnaud Patard (Rtp) Signed-off-by: Roger Shimizu Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-lswvl.dts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 144e08abe80080c9c2cf0a06e40f1bc8150674eb Author: Roger Shimizu Date: Thu Jan 21 23:38:44 2016 +0900 ARM: dts: kirkwood: gpio pin fixes for linkstation ls-wxl/wsxl For kirkwood, gpio pins starts from 32 are in the 2nd bank, so it should be converted to "gpio1 " in dts file. e.g. gpio 40 should be "gpio1 8" Besides, a few other pin fixes for ls-wxl/wsxl, to match with mpp pin definition: - gpio-leds: "lswxl:blue:power" pin - gpio-leds: "lswxl:red:func" pin - gpio-leds: "lswxl:red:hdderr0" pin - gpio-leds: "lswxl:red:hdderr1" pin - gpio-fan: low/high/alarm pin The pin/bank issue was found when discussing Debian Bug #810894 [https://bugs.debian.org/810894#47] Fixes: e54e4b1b622e ("ARM: dts: add buffalo linkstation ls-wxl/wsxl") Reported-by: Arnaud Patard (Rtp) Signed-off-by: Roger Shimizu Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-lswxl.dts | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit cbe09bd51bf23b42c3a94c5fb6815e1397c5fc3f Author: Eli Cooper Date: Fri Jan 22 00:24:08 2016 +0800 crypto: chacha20-ssse3 - Align stack pointer to 64 bytes This aligns the stack pointer in chacha20_4block_xor_ssse3 to 64 bytes. Fixes general protection faults and potential kernel panics. Cc: stable@vger.kernel.org Signed-off-by: Eli Cooper Acked-by: Martin Willi Signed-off-by: Herbert Xu arch/x86/crypto/chacha20-ssse3-x86_64.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7ee7014d0eb6bcac679c0bd5fe9ce65bc4325648 Author: Peter Jones Date: Mon Jan 18 10:49:58 2016 -0500 PKCS#7: Don't require SpcSpOpusInfo in Authenticode pkcs7 signatures Dave Young reported: > Hi, > > I saw the warning "Missing required AuthAttr" when testing kexec, > known issue? Idea about how to fix it? > > The kernel is latest linus tree plus sevral patches from Toshi to > cleanup io resource structure. > > in function pkcs7_sig_note_set_of_authattrs(): > if (!test_bit(sinfo_has_content_type, &sinfo->aa_set) || > !test_bit(sinfo_has_message_digest, &sinfo->aa_set) || > (ctx->msg->data_type == OID_msIndirectData && > !test_bit(sinfo_has_ms_opus_info, &sinfo->aa_set))) { > pr_warn("Missing required AuthAttr\n"); > return -EBADMSG; > } > > The third condition below is true: > (ctx->msg->data_type == OID_msIndirectData && > !test_bit(sinfo_has_ms_opus_info, &sinfo->aa_set)) > > I signed the kernel with redhat test key like below: > pesign -c 'Red Hat Test Certificate' -i arch/x86/boot/bzImage -o /boot/vmlinuz-4.4.0-rc8+ -s --force And right he is! The Authenticode specification is a paragon amongst technical documents, and has this pearl of wisdom to offer: --------------------------------- Authenticode-Specific SignerInfo UnauthenticatedAttributes Structures The following Authenticode-specific data structures are present in SignerInfo authenticated attributes. SpcSpOpusInfo SpcSpOpusInfo is identified by SPC_SP_OPUS_INFO_OBJID (1.3.6.1.4.1.311.2.1.12) and is defined as follows: SpcSpOpusInfo ::= SEQUENCE { programName [0] EXPLICIT SpcString OPTIONAL, moreInfo [1] EXPLICIT SpcLink OPTIONAL, } --#public-- SpcSpOpusInfo has two fields: programName This field contains the program description: If publisher chooses not to specify a description, the SpcString structure contains a zero-length program name. If the publisher chooses to specify a description, the SpcString structure contains a Unicode string. moreInfo This field is set to an SPCLink structure that contains a URL for a Web site with more information about the signer. The URL is an ASCII string. --------------------------------- Which is to say that this is an optional *unauthenticated* field which may be present in the Authenticated Attribute list. This is not how pkcs7 is supposed to work, so when David implemented this, he didn't appreciate the subtlety the original spec author was working with, and missed the part of the sublime prose that says this Authenticated Attribute is an Unauthenticated Attribute. As a result, the code in question simply takes as given that the Authenticated Attributes should be authenticated. But this one should not, individually. Because it says it's not authenticated. It still has to hash right so the TBS digest is correct. So it is both authenticated and unauthenticated, all at once. Truly, a wonder of technical accomplishment. Additionally, pesign's implementation has always attempted to be compatible with the signatures emitted from contemporary versions of Microsoft's signtool.exe. During the initial implementation, Microsoft signatures always produced the same values for SpcSpOpusInfo - {U"Microsoft Windows", "http://www.microsoft.com"} - without regard to who the signer was. Sometime between Windows 8 and Windows 8.1 they stopped including the field in their signatures altogether, and as such pesign stopped producing them in commits c0c4da6 and d79cb0c, sometime around June of 2012. The theory here is that anything that breaks with pesign signatures would also be breaking with signtool.exe sigs as well, and that'll be a more noticed problem for firmwares parsing it, so it'll get fixed. The fact that we've done exactly this bug in Linux code is first class, grade A irony. So anyway, we should not be checking this field for presence or any particular value: if the field exists, it should be at the right place, but aside from that, as long as the hash matches the field is good. Signed-off-by: Peter Jones Tested-by: Dave Young Signed-off-by: Herbert Xu crypto/asymmetric_keys/pkcs7_parser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e7a7104e432c0db8469ca3568daf4f1d1afe3e73 Author: Horia Geant? Date: Tue Jan 12 17:59:29 2016 +0200 crypto: caam - make write transactions bufferable on PPC platforms Previous change (see "Fixes" tag) to the MCFGR register clears AWCACHE[0] ("bufferable" AXI3 attribute) (which is "1" at POR). This makes all writes non-bufferable, causing a ~ 5% performance drop for PPC-based platforms. Rework previous change such that MCFGR[AWCACHE]=4'b0011 (bufferable + cacheable) for all platforms. Note: For ARM-based platforms, AWCACHE[0] is ignored by the interconnect IP. Cc: # 4.3+ Fixes: f10967495144 ("crypto: caam - fix snooping for write transactions") Signed-off-by: Horia Geant? Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65dc1a5d1efb0ec54ffb715468070890d27d63fc Author: Felix Fietkau Date: Thu Jan 21 16:34:08 2016 +0100 ath9k_hw: ignore eeprom magic mismatch on flash based devices Many AR913x based devices (maybe others too) do not have a valid EEPROM magic in their calibration data partition. Fixes: 6fa658fd5ab2 ("ath9k: Simplify and fix eeprom endianness swapping") Signed-off-by: Felix Fietkau Acked-by: Martin Blumenstingl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/eeprom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f6427760a29ba3fd968e27ea567b1ebdd500740b Author: Russell King Date: Sun Jan 24 17:32:13 2016 +0000 drm/etnaviv: fix failure path if model is zero Fix the failure path to call pm_runtime_mark_last_busy() when failing due to the model field being zero. Acked-by: Christian Gmeiner Signed-off-by: Russell King Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 339073ef77e45e87ec4cc8671b2d2328dcfd31f0 Author: Lucas Stach Date: Fri Jan 22 12:03:03 2016 +0100 drm/etnaviv: hold object lock while getting pages for coredump While all objects that get coredumped have an active IOVA and thus pages already populated, etnaviv_gem_get_pages() still requires the object lock to be held. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 ++ 1 file changed, 2 insertions(+) commit 23a9d5dcb6ae114733fac4757b0b154571c21129 Author: Fabio Estevam Date: Fri Jan 8 11:52:04 2016 -0200 drm/etnaviv: remove owner assignment from platform_driver This platform_driver does not need to set an owner as it will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.c | 1 - 1 file changed, 1 deletion(-) commit c72fc9093718a3f8597249863a1bac345ba00859 Author: Larry Finger Date: Wed Jan 20 21:58:39 2016 -0600 rtlwifi: rtl8821ae: Fix 5G failure when EEPROM is incorrectly encoded Recently, it has been reported that D-Link DWA-582 cards, which use an RTL8812AE chip are not able to scan for 5G networks. The problems started with kernel 4.2, which is the first version that had commit d10101a60372 ("rtlwifi: rtl8821ae: Fix problem with regulatory information"). With this patch, the driver went from setting a default channel plan to using the value derived from EEPROM. Bug reports at https://bugzilla.kernel.org/show_bug.cgi?id=111031 and https://bugzilla.redhat.com/show_bug.cgi?id=1279653 are examples of this problem. The problem was solved once I learned that the internal country code was resulting in a regulatory set with only 2.4 GHz channels. With the RTL8821AE chips available to me, the country code was such that both 2.4 and 5 GHz channels are allowed. The fix is to allow both bands even when the EEPROM is incorrectly encoded. Fixes: d10101a60372 ("rtlwifi: rtl8821ae: Fix problem with regulatory information") Signed-off-by: Larry Finger Cc: littlesmartguy@gmail.com Cc: gabe@codehaus.org Cc: Stable [v4.2+] Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/regd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 262c741e0825b29447a9e53b6582afd6b14c3706 Author: Eli Cooper Date: Mon Jan 18 19:30:19 2016 +0800 rt2x00: fix monitor mode regression Since commit df1404650ccb ("mac80211: remove support for IFF_PROMISC") monitor mode for rt2x00 has been made effectively useless because the hardware filter is configured to drop packets whose intended recipient is not the device, regardless of the presence of monitor mode interfaces. This patch fixes this regression by adding explicit monitor mode support, and by configuring the hardware filter accordingly. Signed-off-by: Eli Cooper Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 4 +++- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 4 +++- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 4 +++- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + drivers/net/wireless/ralink/rt2x00/rt2x00config.c | 5 +++++ drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 5 ----- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 4 +++- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 4 +++- 9 files changed, 23 insertions(+), 11 deletions(-) commit 14050118afee4d8bd81d22fefa3e986172b08bc6 Author: Rhyland Klein Date: Thu Jan 14 14:24:31 2016 -0500 clk: tegra: Remove improper flags for lock_enable Most PLL's don't actually have LOCK_ENABLE bits. However, most PLL's also had that flag set, which meant that the clk code was trying to enable locks, and inadvertantly flipping bits in other fields. For PLLM, ensure the correct register is used for the misc_register. PLL_MISC0 contains the EN_LCKDET bit which should be used for enabling the lock, and PLLM_MISC1 shouldn't be used at all. Lastly, remove some of the settings which would point to the EN_LCKDET bits for some PLLs. There is no need to enable the locks, and that is done as part of the set_defaults logic already. Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 42 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) commit 4152b387da81617c80cb2946b2d56e3958906b3e Author: John Ernberg Date: Mon Jan 25 12:27:17 2016 +0000 USB: option: fix Cinterion AHxx enumeration In certain kernel configurations where the cdc_ether and option drivers are compiled as modules there can occur a race condition in enumeration. This causes the option driver to enumerate the ethernet(wwan) interface as usb-serial interfaces. usb-devices output for the modem: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1e2d ProdID=0055 Rev=00.00 S: Manufacturer=Cinterion S: Product=AHx C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=10mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether Signed-off-by: John Ernberg Fixes: 1941138e1c02 ("USB: added support for Cinterion's products...") Cc: stable # v3.9: 8ff10bdb14a52 Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 420520766a796d36076111139ba1e4fb1aadeadd Author: Sudip Mukherjee Date: Wed Dec 30 11:26:03 2015 -0200 [media] media: Kconfig: add dependency of HAS_DMA The build of m32r allmodconfig fails with the error: drivers/media/v4l2-core/videobuf2-dma-contig.c:484:2: error: implicit declaration of function 'dma_get_cache_alignment' The build of videobuf2-dma-contig.c depends on HAS_DMA and it is correctly mentioned in the Kconfig but the symbol VIDEO_STI_BDISP also selects VIDEOBUF2_DMA_CONTIG, so it is trying to compile videobuf2-dma-contig.c even though HAS_DMA is not defined. Signed-off-by: Sudip Mukherjee Acked-by: Sakari Ailus Acked-by: Geert Uytterhoeven Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a13ddcae4f0bc5e1de761895d0cae2010e1934af Author: Jacek Anaszewski Date: Mon Jan 18 14:10:27 2016 -0200 [media] exynos4-is: Wait for 100us before opening sensor Some user space use cases result in kernel hangup on the HIC_OPEN_SENSOR command write. In case when a minimalistic application is used for setting up the streaming, the hangups occur only occasionally. In case of GStreamer use cases it is always the case. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-is.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 76775776a6e3dbe2dc8a84345dca4540969bc014 Author: Jacek Anaszewski Date: Mon Jan 18 14:10:26 2016 -0200 [media] exynos4-is: Open shouldn't fail when sensor entity is not linked In order to allow for automatic media device entities linking from the level of libv4l plugin the open system call shouldn't fail, as the libv4l plugins can begin their job not until it succeeds. This patch allows for leaving the pipeline not linked on open and postpones verifying it to the moment when streamon callback is called. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/media-dev.c | 95 +++++++++++++++++++++------ 1 file changed, 76 insertions(+), 19 deletions(-) commit 4e63959e3773276cc49b488238bd583c53cf54e8 Author: Jacek Anaszewski Date: Mon Jan 18 14:10:25 2016 -0200 [media] s5k6a3: Fix VIDIOC_SUBDEV_G_FMT ioctl for TRY format VIDIOC_SUBDEV_G_FMT ioctl should return TRY format previously set with VIDIOC_SUBDEV_S_FMT. Currently it is not the case as only ACTIVE formats are saved in the driver. Since the driver doesn't alter hardware state in the set_fmt op anyway, the op can save the format in both TRY and ACTIVE case. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5k6a3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 21e4903246029e221ee92e3be3653f2805fac898 Author: Rhyland Klein Date: Thu Jan 14 14:24:30 2016 -0500 clk: tegra: Fix divider on VI_I2C VI-I2C has 16 bits available for its divider. Switch the divider width to 16 instead of 8 so correct rates can be set. Signed-off-by: Rhyland Klein Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-periph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 293de94cd66cded940849545f47c701cc36c0931 Author: Geert Uytterhoeven Date: Mon Dec 21 11:33:45 2015 +0100 ARM: mvebu: ix4-300d: Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. Signed-off-by: Geert Uytterhoeven Acked-by: Brian Norris Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 1 + 1 file changed, 1 insertion(+) commit 84d92dd3b6b785a6737f0409a920de31fb83343a Author: Geert Uytterhoeven Date: Mon Dec 21 11:33:46 2015 +0100 ARM: mvebu: kirkwood: Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. Signed-off-by: Geert Uytterhoeven Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts | 1 + 1 file changed, 1 insertion(+) commit b3122023df935cf14bf951da98ca598d71b9f826 Author: Masanari Iida Date: Sun Jan 24 15:24:12 2016 +0900 arm64: Fix an enum typo in mm/dump.c This patch fixes a typo in mm/dump.c: "MODUELS_END_NR" should be "MODULES_END_NR". Signed-off-by: Masanari Iida Signed-off-by: Will Deacon arch/arm64/mm/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 028635d6b5b42de0e0fe5f5c92e1b99868e81a29 Author: Mathieu OTHACEHE Date: Mon Jan 4 19:49:36 2016 +0100 USB: mxu11x0: fix memory leak on usb_serial private data On nominal execution, private data allocated on port_probe and attach are never freed. Add port_remove and release callbacks to free them respectively. Signed-off-by: Mathieu OTHACEHE Signed-off-by: Johan Hovold drivers/usb/serial/mxu11x0.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 76a563675485849f6f9ad5b30df220438b3628c1 Author: Rasmus Villemoes Date: Tue Dec 8 12:15:54 2015 -0200 [media] exynos4-is: fix a format string bug Ironically, 7d4020c3c400 ("[media] exynos4-is: fix some warnings when compiling on arm64") fixed some format string bugs but introduced a new one. buf_index is a simple int, so it should be printed with %d, not %pad (which is correctly used for dma_addr_t). Fixes: 7d4020c3c400 ("[media] exynos4-is: fix some warnings when compiling on arm64") Signed-off-by: Rasmus Villemoes Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-isp-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b4ca5aa9e0867f5cec40f9508dac7414f3b6998 Author: Anders Roxell Date: Thu Jan 14 22:09:43 2016 -0200 [media] drivers/media: vsp1_video: fix compile error This was found with the -RT patch enabled, but the fix should apply to non-RT also. Compilation error without this fix: ../drivers/media/platform/vsp1/vsp1_video.c: In function 'vsp1_pipeline_stopped': ../drivers/media/platform/vsp1/vsp1_video.c:524:2: error: expected expression before 'do' spin_unlock_irqrestore(&pipe->irqlock, flags); ^ Signed-off-by: Anders Roxell Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac15bd63bbb24238f763ec5b24ee175ec301e8cd Author: Catalin Marinas Date: Thu Jan 7 16:07:20 2016 +0000 arm64: Honour !PTE_WRITE in set_pte_at() for kernel mappings Currently, set_pte_at() only checks the software PTE_WRITE bit for user mappings when it sets or clears the hardware PTE_RDONLY accordingly. The kernel ptes are written directly without any modification, relying solely on the protection bits in macros like PAGE_KERNEL. However, modifying kernel pte attributes via pte_wrprotect() would be ignored by set_pte_at(). Since pte_wrprotect() does not set PTE_RDONLY (it only clears PTE_WRITE), the new permission is not taken into account. This patch changes set_pte_at() to adjust the read-only permission for kernel ptes as well. As a side effect, existing PROT_* definitions used for kernel ioremap*() need to include PTE_DIRTY | PTE_WRITE. (additionally, white space fix for PTE_KERNEL_ROX) Acked-by: Andrey Ryabinin Tested-by: Ard Biesheuvel Signed-off-by: Catalin Marinas Reported-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit f436b2ac90a095746beb6729b8ee8ed87c9eaede Author: Lorenzo Pieralisi Date: Wed Jan 13 14:50:03 2016 +0000 arm64: kernel: fix architected PMU registers unconditional access The Performance Monitors extension is an optional feature of the AArch64 architecture, therefore, in order to access Performance Monitors registers safely, the kernel should detect the architected PMU unit presence through the ID_AA64DFR0_EL1 register PMUVer field before accessing them. This patch implements a guard by reading the ID_AA64DFR0_EL1 register PMUVer field to detect the architected PMU presence and prevent accessing PMU system registers if the Performance Monitors extension is not implemented in the core. Cc: Peter Maydell Cc: Mark Rutland Cc: Fixes: 60792ad349f3 ("arm64: kernel: enforce pmuserenr_el0 initialization and restore") Signed-off-by: Lorenzo Pieralisi Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 5 +++++ arch/arm64/mm/proc-macros.S | 12 ++++++++++++ arch/arm64/mm/proc.S | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) commit 7b1af9795773d745c2a8c7d4ca5f2936e8b6adfb Author: Ard Biesheuvel Date: Mon Jan 11 14:50:21 2016 +0100 arm64: kasan: ensure that the KASAN zero page is mapped read-only When switching from the early KASAN shadow region, which maps the entire shadow space read-write, to the permanent KASAN shadow region, which uses a zero page to shadow regions that are not subject to instrumentation, the lowest level table kasan_zero_pte[] may be reused unmodified, which means that the mappings of the zero page that it contains will still be read-write. So update it explicitly to map the zero page read only when we activate the permanent mapping. Acked-by: Andrey Ryabinin Acked-by: Catalin Marinas Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/mm/kasan_init.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 75feee3d9d51775072d3a04f47d4a439a4c4590e Author: Ard Biesheuvel Date: Fri Jan 15 13:28:57 2016 +0100 arm64: hide __efistub_ aliases from kallsyms Commit e8f3010f7326 ("arm64/efi: isolate EFI stub from the kernel proper") isolated the EFI stub code from the kernel proper by prefixing all of its symbols with __efistub_, and selectively allowing access to core kernel symbols from the stub by emitting __efistub_ aliases for functions and variables that the stub can access legally. As an unintended side effect, these aliases are emitted into the kallsyms symbol table, which means they may turn up in backtraces, e.g., ... PC is at __efistub_memset+0x108/0x200 LR is at fixup_init+0x3c/0x48 ... [] __efistub_memset+0x108/0x200 [] free_initmem+0x2c/0x40 [] kernel_init+0x20/0xe0 [] ret_from_fork+0x10/0x40 The backtrace in question has nothing to do with the EFI stub, but simply returns one of the several aliases of memset() that have been recorded in the kallsyms table. This is undesirable, since it may suggest to people who are not aware of this that the issue they are seeing is somehow EFI related. So hide the __efistub_ aliases from kallsyms, by emitting them as absolute linker symbols explicitly. The distinction between those and section relative symbols is completely irrelevant to these definitions, and to the final link we are performing when these definitions are being taken into account (the distinction is only relevant to symbols defined inside a section definition when performing a partial link), and so the resulting values are identical to the original ones. Since absolute symbols are ignored by kallsyms, this will result in these values to be omitted from its symbol table. After this patch, the backtrace generated from the same address looks like this: ... PC is at __memset+0x108/0x200 LR is at fixup_init+0x3c/0x48 ... [] __memset+0x108/0x200 [] free_initmem+0x2c/0x40 [] kernel_init+0x20/0xe0 [] ret_from_fork+0x10/0x40 Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/image.h | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) commit 9b4b92645c5edf16b9e77c5956e13b040ba5ed0f Author: Josh Wu Date: Mon Nov 30 07:20:15 2015 -0200 [media] atmel-isi: fix debug message which only show the first format Correct the debug output message to show correct format. Signed-off-by: Josh Wu Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/atmel-isi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e920ebc2f85848f7c21b2fe27a6ea9e798c63568 Author: Wolfram Sang Date: Mon Jan 4 10:48:24 2016 -0200 [media] soc_camera: cleanup control device on async_unbind I got the following WARN on a simple unbind/bind cycle: root@Lager:/sys/bus/i2c/drivers/adv7180# echo 6-0020 > unbind root@Lager:/sys/bus/i2c/drivers/adv7180# echo 6-0020 > bind [ 31.097652] adv7180 6-0020: chip found @ 0x20 (e6520000.i2c) [ 31.123744] ------------[ cut here ]------------ [ 31.128413] WARNING: CPU: 3 PID: 873 at drivers/media/platform/soc_camera/soc_camera.c:1463 soc_camera_async_bound+0x40/0xa0() [ 31.139896] CPU: 3 PID: 873 Comm: sh Not tainted 4.4.0-rc3-00062-ge8ae2c0b6bca2a #172 [ 31.147815] Hardware name: Generic R8A7790 (Flattened Device Tree) [ 31.154056] Backtrace: [ 31.156575] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 31.164233] r6:c05c5b33 r5:00000009 r4:00000000 r3:00404100 [ 31.170017] [] (show_stack) from [] (dump_stack+0x78/0x94) [ 31.177344] [] (dump_stack) from [] (warn_slowpath_common+0x98/0xc4) [ 31.185518] r4:00000000 r3:00000000 [ 31.189172] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x2c/0x34) [ 31.198043] r8:eb38df28 r7:eb38c5d0 r6:eb38de80 r5:e6962810 r4:eb38de80 [ 31.204898] [] (warn_slowpath_null) from [] (soc_camera_async_bound+0x40/0xa0) [ 31.213955] [] (soc_camera_async_bound) from [] (v4l2_async_test_notify+0x9c/0x108) [ 31.223430] r5:eb38c5ec r4:eb38de80 [ 31.227084] [] (v4l2_async_test_notify) from [] (v4l2_async_register_subdev+0x88/0xd0) [ 31.236822] r7:c07115c8 r6:c071160c r5:eb38c5ec r4:eb38de80 [ 31.242622] [] (v4l2_async_register_subdev) from [] (adv7180_probe+0x2c8/0x3a4) [ 31.251753] r8:00000000 r7:00000001 r6:eb38de80 r5:ea973400 r4:eb38de10 r3:00000000 [ 31.259660] [] (adv7180_probe) from [] (i2c_device_probe+0x1a0/0x1e4) This gets fixed by clearing the control device pointer on async_unbind. Signed-off-by: Wolfram Sang Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/soc_camera.c | 2 ++ 1 file changed, 2 insertions(+) commit e03cdf22a2727c60307be6a729233edab3bfda9c Author: Greg Kroah-Hartman Date: Tue Jan 19 23:43:13 2016 -0800 USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable Harald Linden reports that the ftdi_sio driver works properly for the Yaesu SCU-18 cable if the device ids are added to the driver. So let's add them. Reported-by: Harald Linden Cc: stable Signed-off-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 1 + 2 files changed, 2 insertions(+) commit da10816e3d923565b470fec78a674baba794ed33 Author: Takashi Iwai Date: Mon Jan 25 11:24:56 2016 +0100 ALSA: seq: Degrade the error message for too many opens ALSA OSS sequencer spews a kernel error message ("ALSA: seq_oss: too many applications") when user-space tries to open more than the limit. This means that it can easily fill the log buffer. Since it's merely a normal error, it's safe to suppress it via pr_debug() instead. Cc: Signed-off-by: Takashi Iwai sound/core/seq/oss/seq_oss_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 599151336638d57b98d92338aa59c048e3a3e97d Author: Takashi Iwai Date: Mon Jan 25 11:01:47 2016 +0100 ALSA: seq: Fix incorrect sanity check at snd_seq_oss_synth_cleanup() ALSA sequencer OSS emulation code has a sanity check for currently opened devices, but there is a thinko there, eventually it spews warnings and skips the operation wrongly like: WARNING: CPU: 1 PID: 7573 at sound/core/seq/oss/seq_oss_synth.c:311 Fix this off-by-one error. Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/oss/seq_oss_synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff4e2494dc17b173468e1713fdf6237fd8578bc7 Author: Daniele Palmas Date: Tue Jan 12 17:22:06 2016 +0100 USB: serial: option: Adding support for Telit LE922 This patch adds support for two PIDs of LE922. Signed-off-by: Daniele Palmas Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit cb3232138e37129e88240a98a1d2aba2187ff57c Author: Vladis Dronov Date: Tue Jan 12 15:10:50 2016 +0100 USB: serial: visor: fix crash on detecting device without write_urbs The visor driver crashes in clie_5_attach() when a specially crafted USB device without bulk-out endpoint is detected. This fix adds a check that the device has proper configuration expected by the driver. Reported-by: Ralf Spenneberg Signed-off-by: Vladis Dronov Fixes: cfb8da8f69b8 ("USB: visor: fix initialisation of UX50/TH55 devices") Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/visor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cac9b50b0d75a1d50d6c056ff65c005f3224c8e0 Author: Johan Hovold Date: Tue Jan 12 12:05:20 2016 +0100 USB: visor: fix null-deref at probe Fix null-pointer dereference at probe should a (malicious) Treo device lack the expected endpoints. Specifically, the Treo port-setup hack was dereferencing the bulk-in and interrupt-in urbs without first making sure they had been allocated by core. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/visor.c | 5 +++++ 1 file changed, 5 insertions(+) commit f487c54ddd544e1c9172cd510954f697b77b76e3 Author: Peter Dedecker Date: Fri Jan 8 12:34:41 2016 +0100 USB: cp210x: add ID for IAI USB to RS485 adaptor Added the USB serial console device ID for IAI Corp. RCB-CV-USB USB to RS485 adaptor. Signed-off-by: Peter Dedecker Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 5017e1b15d4ca8dcc170dc6914f6b2d8cd492bdf Author: Javier Martinez Canillas Date: Tue Jan 19 11:45:12 2016 -0200 [media] v4l: vsp1: Fix wrong entities links creation The Media Control framework now requires entities to be registered with the media device before creating links so commit c7621b3044f7 ("[media] v4l: vsp1: separate links creation from entities init") separated link creation from entities init. But unfortunately that patch introduced a regression since wrong links were created causing a boot failure on Renesas boards. This patch fixes the boot issue and also the media graph was compared by Geert Uytterhoeven to make sure that the driver changes required by the Media Control framework next generation did not affect the graph. Reported-by: Geert Uytterhoeven Signed-off-by: Javier Martinez Canillas Tested-by: Geert Uytterhoeven Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 27f7ed2b11d42ab6d796e96533c2076ec220affc Author: Marcelo Ricardo Leitner Date: Fri Jan 22 18:29:49 2016 -0200 sctp: allow setting SCTP_SACK_IMMEDIATELY by the application This patch extends commit b93d6471748d ("sctp: implement the sender side for SACK-IMMEDIATELY extension") as it didn't white list SCTP_SACK_IMMEDIATELY on sctp_msghdr_parse(), causing it to be understood as an invalid flag and returning -EINVAL to the application. Note that the actual handling of the flag is already there in sctp_datamsg_from_user(). https://tools.ietf.org/html/rfc7053#section-7 Fixes: b93d6471748d ("sctp: implement the sender side for SACK-IMMEDIATELY extension") Signed-off-by: Marcelo Ricardo Leitner Acked-by: Vlad Yasevich Signed-off-by: David S. Miller net/sctp/socket.c | 2 ++ 1 file changed, 2 insertions(+) commit facc432faa59414bd7c60c307ff1645154a66c98 Author: Arnd Bergmann Date: Fri Jan 22 11:43:44 2016 +0100 net: simplify napi_synchronize() to avoid warnings The napi_synchronize() function is defined twice: The definition for SMP builds waits for other CPUs to be done, while the uniprocessor variant just contains a barrier and ignores its argument. In the mvneta driver, this leads to a warning about an unused variable when we lookup the NAPI struct of another CPU and then don't use it: ethernet/marvell/mvneta.c: In function 'mvneta_percpu_notifier': ethernet/marvell/mvneta.c:2910:30: error: unused variable 'other_port' [-Werror=unused-variable] There are no other CPUs on a UP build, so that code never runs, but gcc does not know this. The nicest solution seems to be to turn the napi_synchronize() helper into an inline function for the UP case as well, as that leads gcc to not complain about the argument being unused. Once we do that, we can also combine the two cases into a single function definition and use if(IS_ENABLED()) rather than #ifdef to make it look a bit nicer. The warning first came up in linux-4.4, but I failed to catch it earlier. Signed-off-by: Arnd Bergmann Fixes: f86428854480 ("net: mvneta: Statically assign queues to CPUs") Signed-off-by: David S. Miller include/linux/netdevice.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9a368aff9cb370298fa02feeffa861f2db497c18 Author: Hannes Frederic Sowa Date: Fri Jan 22 01:39:43 2016 +0100 pptp: fix illegal memory access caused by multiple bind()s Several times already this has been reported as kasan reports caused by syzkaller and trinity and people always looked at RCU races, but it is much more simple. :) In case we bind a pptp socket multiple times, we simply add it to the callid_sock list but don't remove the old binding. Thus the old socket stays in the bucket with unused call_id indexes and doesn't get cleaned up. This causes various forms of kasan reports which were hard to pinpoint. Simply don't allow multiple binds and correct error handling in pptp_bind. Also keep sk_state bits in place in pptp_connect. Fixes: 00959ade36acad ("PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol)") Cc: Dmitry Kozlov Cc: Sasha Levin Cc: Dmitry Vyukov Reported-by: Dmitry Vyukov Cc: Dave Jones Reported-by: Dave Jones Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/ppp/pptp.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit b5d7a06906a4875524f5c61c0b312828bf6737de Author: Iyappan Subramanian Date: Thu Jan 21 16:07:41 2016 -0800 drivers: net: xgene: fix extra IRQ issue For interrupt controller that doesn't support irq_disable and hardware with level interrupt, an extra interrupt may be pending. This patch fixes the issue by setting IRQ_DISABLE_UNLAZY flag for the interrupt line, as suggested by, 'commit e9849777d0e2 ("genirq: Add flag to force mask in disable_irq[_nosync]()")' Signed-off-by: Iyappan Subramanian Tested-by: Toan Le Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 12 +++++++++--- drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) commit fa0dc04df259ba2df3ce1920e9690c7842f8fa4b Author: Eric Dumazet Date: Sun Jan 24 13:53:50 2016 -0800 af_unix: fix struct pid memory leak Dmitry reported a struct pid leak detected by a syzkaller program. Bug happens in unix_stream_recvmsg() when we break the loop when a signal is pending, without properly releasing scm. Fixes: b3ca9b02b007 ("net: fix multithreaded signal handling in unix recv routines") Reported-by: Dmitry Vyukov Signed-off-by: Eric Dumazet Cc: Rainer Weikusat Signed-off-by: David S. Miller net/unix/af_unix.c | 1 + 1 file changed, 1 insertion(+) commit e256caa7d0515e301f8c8c6e7d1204a2b67b1381 Author: Vasant Hegde Date: Thu Jan 21 21:45:31 2016 +0530 powerpc/mm: Allow user space to map rtas_rmo_buf With commit 90a545e9 (restrict /dev/mem to idle io memory ranges) mapping rtas_rmo_buf from user space is failing. Hence we are not able to make RTAS syscall. This patch calls page_is_rtas_user_buf before calling iomem_is_exclusive in devmem_is_allowed(). This will allow user space to map rtas_rmo_buf and we are able to make RTAS syscall. Reported-by: Bharata B Rao CC: Nathan Fontenot Signed-off-by: Vasant Hegde Acked-by: Dan Williams Signed-off-by: Michael Ellerman arch/powerpc/mm/mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d8f00cd685f5c8e0def8593e520a7fef12c22407 Author: Du, Changbin Date: Mon Jan 18 21:02:42 2016 +0800 usb: hub: do not clear BOS field during reset device In function usb_reset_and_verify_device, the old BOS descriptor may still be used before allocating a new one. (usb_unlocked_disable_lpm function uses it under the situation that it fails to disable lpm.) So we cannot set the udev->bos to NULL before that, just keep what it was. It will be overwrite when allocating a new one. Crash log: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: [] usb_enable_link_state+0x2d/0x2f0 Call Trace: [] ? usb_set_lpm_timeout+0x12b/0x140 [] usb_enable_lpm+0x81/0xa0 [] usb_disable_lpm+0xa8/0xc0 [] usb_unlocked_disable_lpm+0x2c/0x50 [] usb_reset_and_verify_device+0xc3/0x710 [] ? usb_sg_wait+0x13d/0x190 [] usb_reset_device+0x133/0x280 [] usb_stor_port_reset+0x61/0x70 [] usb_stor_invoke_transport+0x88/0x520 Signed-off-by: Du, Changbin Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e912e685f372ab62a2405a1acd923597f524e94a Author: Oliver Neukum Date: Mon Jan 18 15:45:18 2016 +0100 cdc-acm:exclude Samsung phone 04e8:685d This phone needs to be handled by a specialised firmware tool and is reported to crash irrevocably if cdc-acm takes it. Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 5 +++++ 1 file changed, 5 insertions(+) commit ffdb1e369a73b380fce95b05f8498d92c43842b4 Author: Lu Baolu Date: Wed Jan 6 15:10:04 2016 +0800 usb: cdc-acm: send zero packet for intel 7260 modem For Intel 7260 modem, it is needed for host side to send zero packet if the BULK OUT size is equal to USB endpoint max packet length. Otherwise, modem side may still wait for more data and cannot give response to host side. Signed-off-by: Konrad Leszczynski Signed-off-by: Lu Baolu Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 6 ++++++ drivers/usb/class/cdc-acm.h | 1 + 2 files changed, 7 insertions(+) commit 19454462acb1bdef80542061bdc9b410e4ed1ff6 Author: Lu Baolu Date: Wed Dec 30 12:59:08 2015 +0800 usb: cdc-acm: handle unlinked urb in acm read callback In current acm driver, the bulk-in callback function ignores the URBs unlinked in usb core. This causes unexpected data loss in some cases. For example, runtime suspend entry will unlinked all urbs and set urb->status to -ENOENT even those urbs might have data not processed yet. Hence, data loss occurs. This patch lets bulk-in callback function handle unlinked urbs to avoid data loss. Signed-off-by: Tang Jian Qiang Signed-off-by: Lu Baolu Cc: stable@vger.kernel.org Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6220f4ebd7b4db499238c2dc91268a9c473fd01c Author: Thorsten Leemhuis Date: Sun Jan 17 16:03:04 2016 +0100 hwmon: (dell-smm) Blacklist Dell Studio XPS 8000 Since Linux 4.0 the CPU fan speed is going up and down on Dell Studio XPS 8000 and 8100 for unknown reasons. The 8100 was already blacklisted in commit a4b45b25f18d ("hwmon: (dell-smm) Blacklist Dell Studio XPS 8100"). This patch blacklists the XPS 8000. Without further debugging on the affected machine, it is not possible to find the problem. For more details see https://bugzilla.kernel.org/show_bug.cgi?id=100121 Signed-off-by: Thorsten Leemhuis Acked-by: Pali Rohár Cc: stable@vger.kernel.org # v4.0+, will need backport Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fc2561ec0afcd89e2ec6f28a82a9219582844964 Author: Shaohua Li Date: Fri Jan 22 16:40:02 2016 -0800 md-cluster: delete useless code page->index already considers node offset. The node_offset calculation in write_sb_page is useless and confusion. Cc: Goldwyn Rodrigues Cc: NeilBrown Acked-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/bitmap.c | 4 ---- 1 file changed, 4 deletions(-) commit 4ac7a65f8070098187b1e2afa992848366aae079 Author: Shaohua Li Date: Fri Jan 22 15:54:42 2016 -0800 md-cluster: fix missing memory free There are several places we allocate dlm_lock_resource, but not free it. leave() need free a lock resource too (from Guoqing) Cc: Goldwyn Rodrigues Cc: Guoqing Jiang Cc: NeilBrown Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6327f35a2010c06a3bc2bfb14202a38764fb9920 Author: Shannon Zhao Date: Wed Jan 13 17:16:41 2016 +0800 arm64: KVM: Fix guest dead loop when register accessor returns false Currently emulate_cp will return 0 (Handled) no matter what the accessor returns. If register accessor returns false, it will not skip current PC while emulate_cp return handled. Then guest will stuck in a dead loop. Reviewed-by: Marc Zyngier Signed-off-by: Shannon Zhao Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7769db905bd2df08e844b645437f4729fc1c4d20 Author: Shannon Zhao Date: Wed Jan 13 17:16:40 2016 +0800 arm64: KVM: Fix comments of the CP handler Make sure the documentation reflects the actual name of the functions. Acked-by: Marc Zyngier Signed-off-by: Shannon Zhao Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9586a2ea6806599c819a9e800581c2a698ef7467 Author: Shannon Zhao Date: Wed Jan 13 17:16:39 2016 +0800 arm64: KVM: Fix wrong use of the CPSR MODE mask for 32bit guests The values of CPSR MODE mask are different between aarch32 and aarch64. It should use the right one according to the execution state. Reviewed-by: Marc Zyngier Signed-off-by: Shannon Zhao Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_emulate.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a7e0ac295d964086af3bf98352614f33c381213e Author: Dave Martin Date: Tue Jan 19 16:20:18 2016 +0000 arm64: KVM: Obey RES0/1 reserved bits when setting CPTR_EL2 Some bits in CPTR are defined as RES1 in the architecture. Setting these bits to zero may unintentionally enable future architecture extensions, allowing guests to use them without supervision by the host. This would be bad: for forwards compatibility, this patch makes sure the affected bits are always written with 1, not 0. This patch only addresses CPTR_EL2. Initialisation of other system registers may still need review. Reviewed-by: Marc Zyngier Signed-off-by: Dave Martin Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_arm.h | 1 + arch/arm64/kvm/hyp/switch.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 8fc153cda9c9e6aed2a4a7235970dd6c6cb6e954 Author: Marc Zyngier Date: Wed Jan 6 18:29:19 2016 +0000 arm64: KVM: Fix AArch64 guest userspace exception injection At the moment, our fault injection is pretty limited. We always generate a SYNC exception into EL1, as if the fault was actually from EL1h, no matter how it was generated. This is obviously wrong, as EL0 can generate faults of its own (not to mention the pretty-much unused EL1t mode). This patch fixes it by implementing section D1.10.2 of the ARMv8 ARM, and in particular table D1-7 ("Vector offsets from vector table base address"), which describes which vector to use depending on the source exception level and type (synchronous, IRQ, FIQ or SError). Reviewed-by: Christoffer Dall Tested-by: Shannon Zhao Signed-off-by: Marc Zyngier arch/arm64/kvm/inject_fault.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) commit 92e963f50fc74041b5e9e744c330dca48e04f08d Author: Linus Torvalds Date: Sun Jan 24 13:06:47 2016 -0800 Linux 4.5-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9baa03982b06a62ac817b4983f2da7ca66d4f331 Author: Oren Givon Date: Thu Jan 21 11:11:11 2016 +0200 iwlwifi: add device ID for 8265 Signed-off-by: Oren Givon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 1 file changed, 1 insertion(+) commit 7b08c67fa5ae66c2d07fd506de57de67b7a7e5d6 Author: Oren Givon Date: Thu Jan 21 11:18:34 2016 +0200 iwlwifi: add new 3168 series devices support Add new sub-system PCI IDs to the 3168 series. Added 0x2010, 0x2050 and 0x2150 sub-system IDs. Signed-off-by: Oren Givon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 +++ 1 file changed, 3 insertions(+) commit e2464688b59c6ae9928f385dabf5355e30cff298 Merge: e1c1087 07d17f0 Author: Linus Torvalds Date: Sun Jan 24 12:50:56 2016 -0800 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS updates from Ralf Baechle: "This is the main pull request for MIPS for 4.5 plus some 4.4 fixes. The executive summary: - ATH79 platform improvments, use DT bindings for the ATH79 USB PHY. - Avoid useless rebuilds for zboot. - jz4780: Add NEMC, BCH and NAND device tree nodes - Initial support for the MicroChip's DT platform. As all the device drivers are missing this is still of limited use. - Some Loongson3 cleanups. - The unavoidable whitespace polishing. - Reduce clock skew when synchronizing the CPU cycle counters on CPU startup. - Add MIPS R6 fixes. - Lots of cleanups across arch/mips as fallout from KVM. - Lots of minor fixes and changes for IEEE 754-2008 support to the FPU emulator / fp-assist software. - Minor Ralink, BCM47xx and bcm963xx platform support improvments. - Support SMP on BCM63168" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (84 commits) MIPS: zboot: Add support for serial debug using the PROM MIPS: zboot: Avoid useless rebuilds MIPS: BMIPS: Enable ARCH_WANT_OPTIONAL_GPIOLIB MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function MIPS: bcm963xx: Update bcm_tag field image_sequence MIPS: bcm963xx: Move extended flash address to bcm_tag header file MIPS: bcm963xx: Move Broadcom BCM963xx image tag data structure MIPS: bcm63xx: nvram: Use nvram structure definition from header file MIPS: bcm963xx: Add Broadcom BCM963xx board nvram data structure MAINTAINERS: Add KVM for MIPS entry MIPS: KVM: Add missing newline to kvm_err() MIPS: Move KVM specific opcodes into asm/inst.h MIPS: KVM: Use cacheops.h definitions MIPS: Break down cacheops.h definitions MIPS: Use EXCCODE_ constants with set_except_vector() MIPS: Update trap codes MIPS: Move Cause.ExcCode trap codes to mipsregs.h MIPS: KVM: Make kvm_mips_{init,exit}() static MIPS: KVM: Refactor added offsetof()s MIPS: KVM: Convert EXPORT_SYMBOL to _GPL ... commit e1c10879ed59436cde537b723545430b04d4dec0 Merge: 81f05fe 6b31de3 Author: Linus Torvalds Date: Sun Jan 24 12:45:35 2016 -0800 Merge tag 'platform-drivers-x86-v4.5-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Emergency travel prevented me from completing my final testing on this until today. Nothing here that couldn't wait until RC1 fixes, but I thought it best to get it out sooner rather than later as it does contain a build warning fix. Summary: A build warning fix, MAINTAINERS cleanup, and a new DMI quirk: ideapad-laptop: - Add Lenovo Yoga 700 to no_hw_rfkill dmi list MAINTAINERS: - Combine multiple telemetry entries intel_telemetry_debugfs: - Fix unused warnings in telemetry debugfs" * tag 'platform-drivers-x86-v4.5-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list MAINTAINERS: Combine multiple telemetry entries intel_telemetry_debugfs: Fix unused warnings in telemetry debugfs commit 81f05fee8c063cfc1614ddba1ce88cb1129f263d Merge: c52cb43 98d9450 Author: Linus Torvalds Date: Sun Jan 24 12:43:06 2016 -0800 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: "The top merge commit was re-generated yesterday because two topic branches were dropped from this pull request in the last minute due to some unaddressed comments. All the other material has been in linux-next for quite a while. Specifics: - Enhance thermal core to handle unexpected device cooling states after fresh boot and system resume. From Zhang Rui and Chen Yu. - Several fixes and cleanups on Rockchip and RCAR thermal drivers. From Caesar Wang and Kuninori Morimoto. - Add Broxton support for Intel processor thermal reporting device driver. From Amy Wiles" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: trip_point_temp_store() calls thermal_zone_device_update() thermal: rcar: rcar_thermal_get_temp() return error if strange temp thermal: rcar: check irq possibility in rcar_thermal_irq_xxx() thermal: rcar: check every rcar_thermal_update_temp() return value thermal: rcar: move rcar_thermal_dt_ids to upside thermal: rockchip: Support the RK3399 SoCs in thermal driver thermal: rockchip: Support the RK3228 SoCs in thermal driver dt-bindings: rockchip-thermal: Support the RK3228/RK3399 SoCs compatible thermal: rockchip: fix a trivial typo Thermal: Enable Broxton SoC thermal reporting device thermal: constify pch_dev_ops structure Thermal: do thermal zone update after a cooling device registered Thermal: handle thermal zone device properly during system sleep Thermal: initialize thermal zone device correctly commit c52cb4311f20538fcb69420e55a19ac622546a08 Merge: 00e3f5c a333e4b Author: Linus Torvalds Date: Sun Jan 24 12:39:09 2016 -0800 Merge tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs Pull 9p updates from Eric Van Hensbergen: "Sorry for the last minute pull request, there's was a change that didn't get pulled into for-next until two weeks ago and I wanted to give it some bake time. Summary: Rework and error handling fixes, primarily in the fscatch and fd transports" * tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: fs/9p: use fscache mutex rather than spinlock 9p: trans_fd, bail out if recv fcall if missing 9p: trans_fd, read rework to use p9_parse_header net/9p: Add device name details on error commit 00e3f5cc305c8a056a22cecedab3a71d59dae1fc Merge: 772950e 7e01726 Author: Linus Torvalds Date: Sun Jan 24 12:34:13 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull Ceph updates from Sage Weil: "The two main changes are aio support in CephFS, and a series that fixes several issues in the authentication key timeout/renewal code. On top of that are a variety of cleanups and minor bug fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: libceph: remove outdated comment libceph: kill off ceph_x_ticket_handler::validity libceph: invalidate AUTH in addition to a service ticket libceph: fix authorizer invalidation, take 2 libceph: clear messenger auth_retry flag if we fault libceph: fix ceph_msg_revoke() libceph: use list_for_each_entry_safe ceph: use i_size_{read,write} to get/set i_size ceph: re-send AIO write request when getting -EOLDSNAP error ceph: Asynchronous IO support ceph: Avoid to propagate the invalid page point ceph: fix double page_unlock() in page_mkwrite() rbd: delete an unnecessary check before rbd_dev_destroy() libceph: use list_next_entry instead of list_entry_next ceph: ceph_frag_contains_value can be boolean ceph: remove unused functions in ceph_frag.h commit 772950ed21c36f4157ff34e7d10fb61975f64558 Merge: 587198b 01b9b0b Author: Linus Torvalds Date: Sun Jan 24 12:31:12 2016 -0800 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull SMB3 fixes from Steve French: "A collection of CIFS/SMB3 fixes. It includes a couple bug fixes, a few for improved debugging of cifs.ko and some improvements to the way cifs does key generation. I do have some additional bug fixes I expect in the next week or two (to address a problem found by xfstest, and some fixes for SMB3.11 dialect, and a couple patches that just came in yesterday that I am reviewing)" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: cifs_dbg() outputs an uninitialized buffer in cifs_readdir() cifs: fix race between call_async() and reconnect() Prepare for encryption support (first part). Add decryption and encryption key generation. Thanks to Metze for helping with this. cifs: Allow using O_DIRECT with cache=loose cifs: Make echo interval tunable cifs: Check uniqueid for SMB2+ and return -ESTALE if necessary Print IP address of unresponsive server cifs: Ratelimit kernel log messages commit 6b31de3e698582fe0b8f7f4bab15831b73204800 Author: Josh Boyer Date: Sun Jan 24 10:46:42 2016 -0500 ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list Like the Yoga 900 models the Lenovo Yoga 700 does not have a hw rfkill switch, and trying to read the hw rfkill switch through the ideapad module causes it to always reported blocking breaking wifi. This commit adds the Lenovo Yoga 700 to the no_hw_rfkill dmi list, fixing the wifi breakage. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1295272 Tested-by: Cc: stable@vger.kernel.org Signed-off-by: Josh Boyer Signed-off-by: Darren Hart drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f1fc3cd8984d9e6bd77c342be1aba1c883de16d8 Author: Souvik Kumar Chakravarty Date: Thu Jan 21 09:30:50 2016 +0530 MAINTAINERS: Combine multiple telemetry entries This patch combines all the telemetry file entries in MAINTAINERS via wildcard. Signed-off-by: Souvik Kumar Chakravarty Signed-off-by: Darren Hart MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7885f2f94489d566559274891cc1400cbc059b10 Author: Souvik Kumar Chakravarty Date: Wed Jan 20 12:20:46 2016 +0530 intel_telemetry_debugfs: Fix unused warnings in telemetry debugfs This patch fixes compile time warnings when CONFIG_PM_SLEEP is undefined. In this case sleep related counters are unused. Signed-off-by: Souvik Kumar Chakravarty Signed-off-by: Darren Hart drivers/platform/x86/intel_telemetry_debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 587198ba5206cdf0d30855f7361af950a4172cd6 Author: Christoph Lameter Date: Fri Jan 22 10:46:14 2016 -0600 vmstat: Remove BUG_ON from vmstat_update If we detect that there is nothing to do just set the flag and do not check if it was already set before. Races really do not matter. If the flag is set by any code then the shepherd will start dealing with the situation and reenable the vmstat workers when necessary again. Since commit 0eb77e988032 ("vmstat: make vmstat_updater deferrable again and shut down on idle") quiet_vmstat might update cpu_stat_off and mark a particular cpu to be handled by vmstat_shepherd. This might trigger a VM_BUG_ON in vmstat_update because the work item might have been sleeping during the idle period and see the cpu_stat_off updated after the wake up. The VM_BUG_ON is therefore misleading and no more appropriate. Moreover it doesn't really suite any protection from real bugs because vmstat_shepherd will simply reschedule the vmstat_work anytime it sees a particular cpu set or vmstat_update would do the same from the worker context directly. Even when the two would race the result wouldn't be incorrect as the counters update is fully idempotent. Reported-by: Sasha Levin Signed-off-by: Christoph Lameter Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Tetsuo Handa Cc: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 07d17f09691e549fac0101333eebe0161a472b50 Merge: dbb9831 2549cc9 Author: Ralf Baechle Date: Sun Jan 24 04:14:40 2016 +0100 Merge branch '4.4-fixes' into mips-for-linux-next commit dbb983145312efba5f7928af1b180a0d83423150 Author: Alban Bedel Date: Thu Dec 10 10:57:21 2015 +0100 MIPS: zboot: Add support for serial debug using the PROM As most platforms implement the PROM serial interface prom_putchar() add a simple bridge to allow re-using this code for zboot. Signed-off-by: Alban Bedel Cc: Alex Smith Cc: Andrew Bresticker Cc: Wu Zhangjin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11811/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 4 ++++ arch/mips/boot/compressed/Makefile | 1 + arch/mips/boot/compressed/uart-prom.c | 7 +++++++ 3 files changed, 12 insertions(+) commit 25f66096ac0cbb8e757e6ce3f78665eedb946b17 Author: Alban Bedel Date: Thu Dec 10 10:57:20 2015 +0100 MIPS: zboot: Avoid useless rebuilds Add dummy.o to the targets list, and fill targets automatically from $(vmlinuzobjs) to avoid having to maintain two lists. When building with XZ compression copy ashldi3.c to the build directory to use a different object file for the kernel and zboot. Without this the same object file need to be build with different flags which cause a rebuild at every run. Signed-off-by: Alban Bedel Cc: linux-mips@linux-mips.org Cc: Alex Smith Cc: Wu Zhangjin Cc: Andrew Bresticker Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11810/ Signed-off-by: Ralf Baechle arch/mips/boot/compressed/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a7b43812ae5ec90afde8ed540b1a92405a54a519 Author: Florian Fainelli Date: Wed Jan 6 10:51:05 2016 -0800 MIPS: BMIPS: Enable ARCH_WANT_OPTIONAL_GPIOLIB Allow BMIPS_GENERIC supported platforms to build GPIO controller drivers. Signed-off-by: Florian Fainelli Reviewed-by: Dragan Stancevic Cc: cernekee@gmail.com Cc: jaedon.shin@gmail.com Cc: gregory.0xf0@gmail.com Cc: Florian Fainelli Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12019/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5bdb102b3f9785cb88467bc7c75fa0f5cacc8dc5 Author: Simon Arlott Date: Sun Dec 13 22:50:13 2015 +0000 MIPS: bcm63xx: nvram: Remove unused bcm63xx_nvram_get_psi_size() function Remove bcm63xx_nvram_get_psi_size() as it now has no users. Signed-off-by: Simon Arlott Cc: David Woodhouse Cc: Brian Norris Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Jonas Gorski Cc: Linux Kernel Mailing List Cc: MIPS Mailing List Cc: MTD Maling List Patchwork: https://patchwork.linux-mips.org/patch/11836/ Signed-off-by: Ralf Baechle arch/mips/bcm63xx/nvram.c | 11 ----------- arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h | 2 -- 2 files changed, 13 deletions(-) commit 696569f759cdebc7da67666fc4f962eaee13562b Author: Simon Arlott Date: Sun Dec 13 22:48:44 2015 +0000 MIPS: bcm963xx: Update bcm_tag field image_sequence The "dual_image" and "inactive_flag" fields should be merged into a single "image_sequence" field. Signed-off-by: Simon Arlott Cc: David Woodhouse Cc: Brian Norris Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Jonas Gorski Cc: Linux Kernel Mailing List Cc: MIPS Mailing List Cc: MTD Maling List Patchwork: https://patchwork.linux-mips.org/patch/11834/ Signed-off-by: Ralf Baechle include/linux/bcm963xx_tag.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 1f29cb19cb7c3bea870d7da02ec23823af9d636e Author: Simon Arlott Date: Sun Dec 13 22:47:55 2015 +0000 MIPS: bcm963xx: Move extended flash address to bcm_tag header file The extended flash address needs to be subtracted from bcm_tag flash image offsets. Move this value to the bcm_tag header file. Renamed define name to consistently use bcm963xx for flash layout which should be considered a property of the board and not the SoC (i.e. bcm63xx could theoretically be used on a board without CFE or any flash). Signed-off-by: Simon Arlott Cc: David Woodhouse Cc: Brian Norris Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Jonas Gorski Cc: Linux Kernel Mailing List Cc: MIPS Mailing List Cc: MTD Maling List Patchwork: https://patchwork.linux-mips.org/patch/11833/ Signed-off-by: Ralf Baechle drivers/mtd/bcm63xxpart.c | 6 ++---- include/linux/bcm963xx_tag.h | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) commit 8fce60b8d0c62363c29d64efb0cceb98519f0350 Author: Simon Arlott Date: Sun Dec 13 22:46:59 2015 +0000 MIPS: bcm963xx: Move Broadcom BCM963xx image tag data structure Move Broadcom BCM963xx image tag data structure to include/linux/ so that drivers outside of mach-bcm63xx can use it. Signed-off-by: Simon Arlott Cc: David Woodhouse Cc: Brian Norris Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Jonas Gorski Cc: Linux Kernel Mailing List Cc: MIPS Mailing List Cc: MTD Maling List Patchwork: https://patchwork.linux-mips.org/patch/11832/ Signed-off-by: Ralf Baechle MAINTAINERS | 1 + arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h | 96 ---------------------- drivers/mtd/bcm63xxpart.c | 2 +- include/linux/bcm963xx_tag.h | 98 +++++++++++++++++++++++ 4 files changed, 100 insertions(+), 97 deletions(-) commit 5a8b0b13b66608650e41994f4b9d3c8b9d258e8f Author: Simon Arlott Date: Sun Dec 13 22:46:15 2015 +0000 MIPS: bcm63xx: nvram: Use nvram structure definition from header file Use the common definition of the nvram structure from the header file include/linux/bcm963xx_nvram.h instead of maintaining a separate copy. Read the version 5 size of nvram data from memory and then call the new checksum verification function from the header file. Signed-off-by: Simon Arlott Cc: David Woodhouse Cc: Brian Norris Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Jonas Gorski Cc: Linux Kernel Mailing List Cc: MIPS Mailing List Cc: MTD Maling List Patchwork: https://patchwork.linux-mips.org/patch/11831/ Signed-off-by: Ralf Baechle arch/mips/bcm63xx/nvram.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) commit 3271e6103189c5294acb06ffa504cc5495457fbf Author: Simon Arlott Date: Sun Dec 13 22:45:30 2015 +0000 MIPS: bcm963xx: Add Broadcom BCM963xx board nvram data structure Broadcom BCM963xx boards have multiple nvram variants across different SoCs with additional checksum fields added whenever the size of the nvram was extended. Add this structure as a header file so that multiple drivers can use it. Signed-off-by: Simon Arlott Cc: David Woodhouse Cc: Brian Norris Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Jonas Gorski Cc: Linux Kernel Mailing List Cc: MIPS Mailing List Cc: MTD Maling List Patchwork: https://patchwork.linux-mips.org/patch/11830/ Signed-off-by: Ralf Baechle MAINTAINERS | 1 + include/linux/bcm963xx_nvram.h | 112 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) commit 048ccca8c1c8f583deec3367d7df521bb1f542ae Merge: b3e27d5 34356f6 Author: Linus Torvalds Date: Sat Jan 23 18:45:06 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "Initial roundup of 4.5 merge window patches - Remove usage of ib_query_device and instead store attributes in ib_device struct - Move iopoll out of block and into lib, rename to irqpoll, and use in several places in the rdma stack as our new completion queue polling library mechanism. Update the other block drivers that already used iopoll to use the new mechanism too. - Replace the per-entry GID table locks with a single GID table lock - IPoIB multicast cleanup - Cleanups to the IB MR facility - Add support for 64bit extended IB counters - Fix for netlink oops while parsing RDMA nl messages - RoCEv2 support for the core IB code - mlx4 RoCEv2 support - mlx5 RoCEv2 support - Cross Channel support for mlx5 - Timestamp support for mlx5 - Atomic support for mlx5 - Raw QP support for mlx5 - MAINTAINERS update for mlx4/mlx5 - Misc ocrdma, qib, nes, usNIC, cxgb3, cxgb4, mlx4, mlx5 updates - Add support for remote invalidate to the iSER driver (pushed through the RDMA tree due to dependencies, acknowledged by nab) - Update to NFSoRDMA (pushed through the RDMA tree due to dependencies, acknowledged by Bruce)" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (169 commits) IB/mlx5: Unify CQ create flags check IB/mlx5: Expose Raw Packet QP to user space consumers {IB, net}/mlx5: Move the modify QP operation table to mlx5_ib IB/mlx5: Support setting Ethernet priority for Raw Packet QPs IB/mlx5: Add Raw Packet QP query functionality IB/mlx5: Add create and destroy functionality for Raw Packet QP IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types IB/mlx5: Allocate a Transport Domain for each ucontext net/mlx5_core: Warn on unsupported events of QP/RQ/SQ net/mlx5_core: Add RQ and SQ event handling net/mlx5_core: Export transport objects IB/mlx5: Expose CQE version to user-space IB/mlx5: Add CQE version 1 support to user QPs and SRQs IB/mlx5: Fix data validation in mlx5_ib_alloc_ucontext IB/sa: Fix netlink local service GFP crash IB/srpt: Remove redundant wc array IB/qib: Improve ipoib UD performance IB/mlx4: Advertise RoCE v2 support IB/mlx4: Create and use another QP1 for RoCEv2 IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers ... commit bfd3d532e23f23cdc7101e85fcd8eb70c40d627c Author: James Hogan Date: Wed Dec 16 23:49:41 2015 +0000 MAINTAINERS: Add KVM for MIPS entry I've pretty much been maintaining KVM for MIPS for a while now. Lets make it more official (and make sure I get Cc'd on relevant patches). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11898/ Signed-off-by: Ralf Baechle MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit f7fdcb601051883f0b4df2797d92035849424c4e Author: James Hogan Date: Wed Dec 16 23:49:39 2015 +0000 MIPS: KVM: Add missing newline to kvm_err() Add missing newline to end of kvm_err string when guest PMAP couldn't be allocated. Signed-off-by: James Hogan Cc: Gleb Natapov Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11896/ Signed-off-by: Ralf Baechle arch/mips/kvm/mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2c5963577efdaef7bf2445c06e8048926c472a5 Author: James Hogan Date: Wed Dec 16 23:49:38 2015 +0000 MIPS: Move KVM specific opcodes into asm/inst.h The header arch/mips/kvm/opcode.h defines a few extra opcodes which aren't in arch/mips/include/uapi/asm/inst.h. There's nothing KVM specific about them, so lets move them into inst.h where they belong and delete the header. Note that mfmcz_op is renamed to mfmc0_op to match the instruction set manual, and wait_op was already added to inst.h in commit b0a3eae2b943 ("MIPS: inst.h: define COP0 wait op"), merged in v3.16-rc1. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11895/ Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/inst.h | 3 ++- arch/mips/kvm/emulate.c | 7 +++---- arch/mips/kvm/opcode.h | 22 ---------------------- arch/mips/kvm/trap_emul.c | 1 - 4 files changed, 5 insertions(+), 28 deletions(-) commit f4956f620d065d8fa4d7a890cad548549e0b91ea Author: James Hogan Date: Wed Dec 16 23:49:37 2015 +0000 MIPS: KVM: Use cacheops.h definitions Drop the custom cache operation code definitions used by KVM for emulating guest CACHE instructions, and switch to use the existing definitions in . Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11893/ Signed-off-by: Ralf Baechle arch/mips/kvm/emulate.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit 5fa393c8571953d6d428062c3572ec3ddbb1eec8 Author: James Hogan Date: Wed Dec 16 23:49:36 2015 +0000 MIPS: Break down cacheops.h definitions Most of the cache op codes defined in cacheops.h are split into a 2-bit cache identifier, and a 3-bit cache op code which does largely the same thing semantically regardless of the cache identifier. To allow the use of these definitions by KVM for decoding cache ops, break the definitions down into parts where it makes sense to do so, and add masks for the Cache and Op field within the cache op. Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11892/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cacheops.h | 106 +++++++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 42 deletions(-) commit 1b505defe051749150ae699483cfcde3191d9a76 Author: James Hogan Date: Wed Dec 16 23:49:35 2015 +0000 MIPS: Use EXCCODE_ constants with set_except_vector() The first argument to set_except_vector is the ExcCode, which we now have definitions for. Lets make use of them. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11894/ Signed-off-by: Ralf Baechle arch/mips/kernel/cpu-bugs64.c | 8 +++---- arch/mips/kernel/traps.c | 52 +++++++++++++++++++++---------------------- 2 files changed, 30 insertions(+), 30 deletions(-) commit 044c9bb816433c196a5776ac4834c23eced205e7 Author: James Hogan Date: Wed Dec 16 23:49:34 2015 +0000 MIPS: Update trap codes Add a few missing trap codes. [ralf@linux-mips.org: Drop removal of exception codes. I don't care what the incomplete architecture spec says; it can't change existing hardware and VCEI is supported indeed.] Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11890/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mipsregs.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 16d100db245ab34d975e080f39e4cc4ed09b3820 Author: James Hogan Date: Wed Dec 16 23:49:33 2015 +0000 MIPS: Move Cause.ExcCode trap codes to mipsregs.h Move the Cause.ExcCode trap code definitions from kvm_host.h to mipsregs.h, since they describe architectural bits rather than KVM specific constants, and change the prefix from T_ to EXCCODE_. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11891/ Signed-off-by: Ralf Baechle arch/mips/include/asm/kvm_host.h | 28 ---------------- arch/mips/include/asm/mipsregs.h | 24 ++++++++++++++ arch/mips/kvm/emulate.c | 71 ++++++++++++++++++++-------------------- arch/mips/kvm/interrupt.c | 8 ++--- arch/mips/kvm/mips.c | 32 +++++++++--------- 5 files changed, 80 insertions(+), 83 deletions(-) commit 2db9d233860e638fecd4b6c519c880bee98ba5eb Author: James Hogan Date: Wed Dec 16 23:49:32 2015 +0000 MIPS: KVM: Make kvm_mips_{init,exit}() static The module init and exit functions have no need to be global, so make them static. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11889/ Signed-off-by: Ralf Baechle arch/mips/kvm/mips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 088ec208d69474c784ed969206f6af323dea025b Author: James Hogan Date: Wed Dec 16 23:49:31 2015 +0000 MIPS: KVM: Refactor added offsetof()s When calculating the offsets into the commpage for dynamically translated mtc0/mfc0 guest instructions, multiple offsetof()s are added together to find the offset of the specific register in the mips_coproc, within the commpage. Simplify each of these cases to a single offsetof() to find the offset of the specific register within the commpage. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11888/ Signed-off-by: Ralf Baechle arch/mips/kvm/dyntrans.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit cb1b447f0c369a248895aa28ec668dc3dd130f3f Author: James Hogan Date: Wed Dec 16 23:49:30 2015 +0000 MIPS: KVM: Convert EXPORT_SYMBOL to _GPL Export symbols only to GPL modules to match other KVM symbols in virt/kvm/ and arch/*/kvm/. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11887/ Signed-off-by: Ralf Baechle arch/mips/kvm/callback.c | 2 +- arch/mips/kvm/tlb.c | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) commit e318f0fd37b630ea02dd9147beb1224789dc197f Author: James Hogan Date: Wed Dec 16 23:49:29 2015 +0000 MIPS: KVM: Drop unused kvm_mips_host_tlb_inv_index() The function kvm_mips_host_tlb_inv_index() is unused, so drop it completely. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Gleb Natapov Cc: Paolo Bonzini Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11886/ Signed-off-by: Ralf Baechle arch/mips/include/asm/kvm_host.h | 1 - arch/mips/kvm/tlb.c | 37 ------------------------------------- 2 files changed, 38 deletions(-) commit 9fd4af639b8585a0c9949e6e3ffc8e2c829dedb5 Author: James Hogan Date: Wed Dec 16 23:49:28 2015 +0000 MIPS: Move definition of DC bit to mipsregs.h The CAUSEB_DC and CAUSEF_DC definitions used by KVM are defined in asm/kvm_host.h, but all the other Cause register field definitions are found in asm/mipsregs.h. Lets reunite the DC bit definitions with its friends in mipsregs.h. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11885/ Signed-off-by: Ralf Baechle arch/mips/include/asm/kvm_host.h | 3 --- arch/mips/include/asm/mipsregs.h | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) commit 4c53e6b985c65aa7e6e038ed83d0ba10e72201e8 Author: James Hogan Date: Wed Dec 16 23:49:27 2015 +0000 MIPS: KVM: Drop some unused definitions from kvm_host.h Some definitions in the MIPS asm/kvm_host.h are completely unused, so lets drop them. MS_TO_NS is no longer used since commit e30492bbe95a ("MIPS: KVM: Rewrite count/compare timer emulation"). The others don't appear ever to have been used. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11884/ Signed-off-by: Ralf Baechle arch/mips/include/asm/kvm_host.h | 5 ----- 1 file changed, 5 deletions(-) commit caa1faa7aba68feed22129f68e4de499846a971b Author: James Hogan Date: Wed Dec 16 23:49:26 2015 +0000 MIPS: KVM: Trivial whitespace and style fixes A bunch of misc whitespace and style fixes within arch/mips/kvm/. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11883/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 3 ++- arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kvm/emulate.c | 8 +++----- arch/mips/kvm/locore.S | 12 ++++++------ arch/mips/kvm/tlb.c | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) commit 097d5638cb4289c86a4a47bda6a0fe8c2b338ae7 Author: Joshua Henderson Date: Wed Jan 13 18:15:47 2016 -0700 MIPS: pic32mzda: Add initial PIC32MZDA Starter Kit defconfig This adds an initial default config that enables all available PIC32 drivers and is enough for booting a PIC32MZDA Starter Kit. Signed-off-by: Joshua Henderson Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12105/ Signed-off-by: Ralf Baechle arch/mips/configs/pic32mzda_defconfig | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit 842b6b16f5178c66da0959a935dafa80a979b745 Author: Joshua Henderson Date: Wed Jan 13 18:15:46 2016 -0700 MIPS: dts: Add initial DTS for the PIC32MZDA Starter Kit This adds basic DTS configuration for the PIC32MZDA chip and in turn the PIC32MZDA Starter Kit. Signed-off-by: Joshua Henderson Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Cc: Andrew Bresticker Cc: Paul Burton Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12104/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/Makefile | 1 + arch/mips/boot/dts/pic32/Makefile | 12 ++ arch/mips/boot/dts/pic32/pic32mzda-clk.dtsi | 236 +++++++++++++++++++++++ arch/mips/boot/dts/pic32/pic32mzda.dtsi | 281 ++++++++++++++++++++++++++++ arch/mips/boot/dts/pic32/pic32mzda_sk.dts | 151 +++++++++++++++ arch/mips/pic32/Kconfig | 16 ++ 6 files changed, 697 insertions(+) commit 2572f00db8a68bb46001678c1c98ad8b70e04b31 Author: Joshua Henderson Date: Wed Jan 13 18:15:39 2016 -0700 MIPS: Add support for PIC32MZDA platform This adds support for the Microchip PIC32 MIPS microcontroller with the specific variant PIC32MZDA. PIC32MZDA is based on the MIPS m14KEc core and boots using device tree. This includes an early pin setup and early clock setup needed prior to device tree being initialized. In additon, an interface is provided to synchronize access to registers shared across several peripherals. Signed-off-by: Joshua Henderson Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12097/ Signed-off-by: Ralf Baechle arch/mips/Kbuild.platforms | 1 + arch/mips/Kconfig | 9 + .../include/asm/mach-pic32/cpu-feature-overrides.h | 32 +++ arch/mips/include/asm/mach-pic32/irq.h | 22 ++ arch/mips/include/asm/mach-pic32/pic32.h | 44 ++++ arch/mips/include/asm/mach-pic32/spaces.h | 24 ++ arch/mips/pic32/Kconfig | 35 +++ arch/mips/pic32/Makefile | 6 + arch/mips/pic32/Platform | 7 + arch/mips/pic32/common/Makefile | 5 + arch/mips/pic32/common/irq.c | 21 ++ arch/mips/pic32/common/reset.c | 62 +++++ arch/mips/pic32/pic32mzda/Makefile | 9 + arch/mips/pic32/pic32mzda/config.c | 126 ++++++++++ arch/mips/pic32/pic32mzda/early_clk.c | 106 ++++++++ arch/mips/pic32/pic32mzda/early_console.c | 171 +++++++++++++ arch/mips/pic32/pic32mzda/early_pin.c | 275 +++++++++++++++++++++ arch/mips/pic32/pic32mzda/early_pin.h | 241 ++++++++++++++++++ arch/mips/pic32/pic32mzda/init.c | 156 ++++++++++++ arch/mips/pic32/pic32mzda/pic32mzda.h | 29 +++ arch/mips/pic32/pic32mzda/time.c | 73 ++++++ include/linux/platform_data/sdhci-pic32.h | 22 ++ 22 files changed, 1476 insertions(+) commit 9b9c2cd44322ed9bc536eedf7d9a5e38e1eb4081 Author: Joshua Henderson Date: Wed Jan 13 18:15:38 2016 -0700 dt/bindings: Add bindings for PIC32/MZDA platforms This adds support for the Microchip PIC32 platform along with the specific variant PIC32MZDA on a PIC32MZDA Starter Kit. Signed-off-by: Joshua Henderson Acked-by: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12096/ Signed-off-by: Ralf Baechle .../bindings/mips/pic32/microchip,pic32mzda.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit aaa8666ada780e8a4a60870aa4379e5e29e395f3 Author: Cristian Birsan Date: Wed Jan 13 18:15:35 2016 -0700 IRQCHIP: irq-pic32-evic: Add support for PIC32 interrupt controller This adds support for the interrupt controller present on PIC32 class devices. It handles all internal and external interrupts. This controller exists outside of the CPU core and is the arbitrator of all interrupts (including interrupts from the CPU itself) before they are presented to the CPU. The following features are supported: - DT properties for EVIC and for devices/peripherals that use interrupt lines - Persistent and non-persistent interrupt handling - irqdomain and generic chip support - Configuration of external interrupt edge polarity Signed-off-by: Cristian Birsan Signed-off-by: Joshua Henderson Acked-by: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12092/ Signed-off-by: Ralf Baechle drivers/irqchip/Kconfig | 5 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-pic32-evic.c | 324 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 330 insertions(+) commit edf2194dc9b9b527d003c47051bd4b09b61ddd55 Author: Cristian Birsan Date: Wed Jan 13 18:15:34 2016 -0700 dt/bindings: Add bindings for PIC32 interrupt controller Document the devicetree bindings for the interrupt controller on Microchip PIC32 class devices. Signed-off-by: Cristian Birsan Signed-off-by: Joshua Henderson Acked-by: Rob Herring Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12093/ Signed-off-by: Ralf Baechle .../interrupt-controller/microchip,pic32-evic.txt | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 70ce14bfc9fdb9b6af84ac492e9d3311551618a5 Author: Álvaro Fernández Rojas Date: Sun Jan 17 11:02:35 2016 +0100 MIPS: bmips: Improve BCM6368 device tree Add brcm,bcm6358-leds node to bcm6368.dtsi Add reboot support (syscon-reboot as defined in BCM6328) Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Álvaro Fernández Rojas Patchwork: https://patchwork.linux-mips.org/patch/12117/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm6368.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit db66dbbbfd8ded204a97d090357aff582968fcf5 Author: Álvaro Fernández Rojas Date: Sun Jan 17 11:02:34 2016 +0100 MIPS: bmips: Improve BCM6328 device tree Adds bcm6328-leds node to bcm6328.dtsi Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Álvaro Fernández Rojas Patchwork: https://patchwork.linux-mips.org/patch/12116/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/brcm/bcm6328.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 555fae60b2bbb2d6282d82c5321d3adfa85b22ae Author: James Hogan Date: Tue Dec 22 13:56:39 2015 +0000 MIPS: ptrace: Drop cp0_tcstatus from regoffset_table[] The cp0_tcstatus member of struct pt_regs was removed along with the rest of SMTC in v3.16, commit b633648c5ad3 ("MIPS: MT: Remove SMTC support"), however recent uprobes support in v4.3 added back a reference to it in the regoffset_table[] in ptrace.c. Remove it. Signed-off-by: James Hogan Fixes: 40e084a506eb ("MIPS: Add uprobes support.") Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11920/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 3 --- 1 file changed, 3 deletions(-) commit 8cbe4b5cbc6fe7cecfc74af82559f50ee3a7e417 Author: Linus Walleij Date: Tue Dec 22 15:41:44 2015 +0100 MIPS: TXx9: iocled: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij Cc: linux-mips@linux-mips.org Cc: linux-gpio@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11925/ Signed-off-by: Ralf Baechle arch/mips/txx9/generic/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8eb248fa8b3a3ff4174a33b797f2712fe4fed660 Author: Linus Walleij Date: Tue Dec 22 15:41:19 2015 +0100 MIPS: RB532: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij Cc: linux-mips@linux-mips.org Cc: linux-gpio@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11924/ Signed-off-by: Ralf Baechle arch/mips/rb532/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ea6b7faf0fbc7f2bb55277befe478c0a66659fc Author: Linus Walleij Date: Tue Dec 22 15:41:01 2015 +0100 MIPS: TXx9: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij Cc: linux-mips@linux-mips.org Cc: linux-gpio@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11923/ Signed-off-by: Ralf Baechle arch/mips/kernel/gpio_txx9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 249e573d99ab590e19bd23f084f8c6540daa7b06 Author: Linus Walleij Date: Tue Dec 22 15:40:27 2015 +0100 MIPS: ar7: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij Acked-by: Florian Fainelli Cc: Alban Bedel Cc: linux-mips@linux-mips.org Cc: linux-gpio@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11922/ Signed-off-by: Ralf Baechle arch/mips/ar7/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b42c00a95c02d962b18f8ed8bf59b65ae58d3ee Author: Linus Walleij Date: Tue Dec 22 15:40:02 2015 +0100 MIPS: Alchemy: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij Cc: linux-mips@linux-mips.org Cc: linux-gpio@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11921/ Signed-off-by: Ralf Baechle arch/mips/alchemy/common/gpiolib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2549cc967ebb4043f3507b55e3dc579f44d3b516 Author: Jaedon Shin Date: Mon Dec 21 12:47:35 2015 +0900 MIPS: Fix macro typo Change the CONFIG_MIPS_CMDLINE_EXTEND to CONFIG_MIPS_CMDLINE_DTB_EXTEND to resolve the EXTEND_WITH_PROM macro. Signed-off-by: Jaedon Shin Fixes: 2024972ef533 ("MIPS: Make the kernel arguments from dtb available") Reviewed-by: Alexander Sverdlin Cc: Jonas Gorski Cc: Masahiro Yamada Cc: Paul Burton Cc: Aaro Koskinen Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11909/ Signed-off-by: Ralf Baechle arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 497e803ebf98ea88c7191e67333bfcc6ffd64bc6 Author: Matt Redfearn Date: Fri Dec 18 12:47:00 2015 +0000 MIPS: smp-cps: Ensure secondary cores start with EVA disabled The kernel currently assumes that a core will start up in legacy mode using the exception base provided through the CM GCR registers. If a core has been configured in hardware to start in EVA mode, these assumptions will fail. This patch ensures that secondary cores are initialized to meet these assumptions. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11907/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mips-cm.h | 4 ++++ arch/mips/kernel/smp-cps.c | 3 +++ 2 files changed, 7 insertions(+) commit 2c3033a0664dfae91e1dee7fabac10f24354b958 Author: Insu Yun Date: Sat Jan 23 15:44:19 2016 -0500 ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot() In acpiphp_enable_slot(), there is a missing unlock path when error occurred. It needs to be unlocked before returning an error. Signed-off-by: Insu Yun Cc: All applicable Signed-off-by: Rafael J. Wysocki drivers/pci/hotplug/acpiphp_glue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a68f376844605399cbd28b662d5ed213639f46f7 Author: Maciej W. Rozycki Date: Sat Jan 9 02:05:31 2016 +0000 MIPS: io.h: Define `ioremap_cache' Signed-off-by: Maciej W. Rozycki Cc: Brian Norris Cc: Rafał Miłecki Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12040/ Signed-off-by: Ralf Baechle arch/mips/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) commit 6d7b14151d7510ed434f2e587cdae9eca82fc123 Author: Maciej W. Rozycki Date: Fri Jan 22 05:21:47 2016 +0000 MIPS: math-emu: dsemul: Reduce `get_isa16_mode' clutter Signed-off-by: Maciej W. Rozycki Cc: Aurelien Jarno Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12178/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dsemul.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 29e280034810efeb84ca67a535817cf45e7cd7fe Author: Maciej W. Rozycki Date: Fri Jan 22 05:21:34 2016 +0000 MIPS: inst.h: Fix some instruction descriptions Fix the description of the microMIPS NOP16 encoding or MM_NOP16, which is not equivalent to the MIPS16 NOP instruction. This is 0x0c00 and represents the microMIPS `MOVE16 $0, $0' operation, whereas MIPS16 NOP is encoded as 0x6500, representing `MOVE $0, $16'. Also fix a typo in `mm_fp0_format' description. Signed-off-by: Maciej W. Rozycki Cc: Aurelien Jarno Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12177/ Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/inst.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e1715f7c34d00dc94f3cecb2526ae3ff0b0649f Author: Maciej W. Rozycki Date: Fri Jan 22 05:21:13 2016 +0000 MIPS: math-emu: dsemul: Correct description of the emulation frame Remove irrelevant content from the description of the emulation frame in `mips_dsemul', referring to bare-metal configurations. Update the text, reflecting the change made with commit ba3049ed4086 ("MIPS: Switch FPU emulator trap to BREAK instruction."), where we switched from using an address error exception on an unaligned access to the use of a BREAK 514 instruction causing a breakpoint exception instead. Signed-off-by: Maciej W. Rozycki Cc: Aurelien Jarno Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12176/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dsemul.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 69a1e6cbdf1f40d5dcae84c5a538d390b6d2c307 Author: Maciej W. Rozycki Date: Fri Jan 22 05:21:00 2016 +0000 MIPS: math-emu: Correct the emulation of microMIPS ADDIUPC instruction Emulate the microMIPS ADDIUPC instruction directly in `mips_dsemul'. If executed in the emulation frame, this instruction produces an incorrect result, because the value of the PC there is not the same as where the instruction originated. Reshape code so as to handle all microMIPS cases together. Signed-off-by: Maciej W. Rozycki Cc: Aurelien Jarno Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12175/ Signed-off-by: Ralf Baechle arch/mips/include/uapi/asm/inst.h | 8 ++++++++ arch/mips/math-emu/dsemul.c | 24 ++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) commit 733b8bc183f491e8263009edf8ef184fb44a6882 Author: Maciej W. Rozycki Date: Fri Jan 22 05:20:46 2016 +0000 MIPS: math-emu: Make microMIPS branch delay slot emulation work Complement commit 102cedc32a6e ("MIPS: microMIPS: Floating point support.") which introduced microMIPS FPU emulation, but did not adjust the encoding of the BREAK instruction used to terminate the branch delay slot emulation frame. Consequently the execution of any such frame is indeterminate and, depending on CPU configuration, will result in random code execution or an offending program being terminated with SIGILL. This is because the regular MIPS BREAK instruction is encoded with the 0 major and the 0xd minor opcode, however in the microMIPS instruction set this major/minor opcode pair denotes an encoding reserved for the DSP ASE. Instead the microMIPS BREAK instruction is encoded with the 0 major and the 0x7 minor opcode. Use the correct BREAK encoding for microMIPS FPU emulation then. Signed-off-by: Maciej W. Rozycki Cc: Aurelien Jarno Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12174/ Signed-off-by: Ralf Baechle arch/mips/include/asm/fpu_emulator.h | 2 +- arch/mips/include/asm/mips-r2-to-r6-emul.h | 2 +- arch/mips/math-emu/dsemul.c | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) commit a87265cfedce49fa362030ae3e6ef047e08bc12c Author: Maciej W. Rozycki Date: Fri Jan 22 05:20:37 2016 +0000 MIPS: math-emu: dsemul: Fix ill formatting of microMIPS part Correct formatting breakage introduced with commit 102cedc32a6e ("MIPS: microMIPS: Floating point support."), so that further changes to this code can be consistent. Signed-off-by: Maciej W. Rozycki Cc: Aurelien Jarno Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12173/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dsemul.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit e4553573b37c3f72533683cb5f3a1ad300b18d37 Author: Maciej W. Rozycki Date: Fri Jan 22 05:20:26 2016 +0000 MIPS: math-emu: Correctly handle NOP emulation Fix an issue introduced with commit 9ab4471c9f1b ("MIPS: math-emu: Correct delay-slot exception propagation") where the emulation of a NOP instruction signals the need to terminate the emulation loop. This in turn, if the PC has not changed from the entry to the loop, will cause the kernel to terminate the program with SIGILL. Consider this program: static double div(double d) { do d /= 2.0; while (d > .5); return d; } int main(int argc, char **argv) { return div(argc); } which gets compiled to the following binary code: 00400490
: 400490: 44840000 mtc1 a0,$f0 400494: 3c020040 lui v0,0x40 400498: d44207f8 ldc1 $f2,2040(v0) 40049c: 46800021 cvt.d.w $f0,$f0 4004a0: 46220002 mul.d $f0,$f0,$f2 4004a4: 4620103c c.lt.d $f2,$f0 4004a8: 4501fffd bc1t 4004a0 4004ac: 00000000 nop 4004b0: 4620000d trunc.w.d $f0,$f0 4004b4: 03e00008 jr ra 4004b8: 44020000 mfc1 v0,$f0 4004bc: 00000000 nop Where the FPU emulator is used, depending on the number of command-line arguments this code will either run to completion or terminate with SIGILL. If no arguments are specified, then BC1T will not be taken, NOP will not be emulated and code will complete successfully. If one argument is specified, then BC1T will be taken once and NOP will be emulated. At this point the entry PC value will be 0x400498 and the new PC value, set by `mips_dsemul' will be 0x4004a0, the target of BC1T. The emulation loop will terminate, but SIGILL will not be issued, because the PC has changed. The FPU emulator will be entered again and on the second execution BC1T will not be taken, NOP will not be emulated and code will complete successfully. If two or more arguments are specified, then the first execution of BC1T will proceed as above. Upon reentering the FPU emulator the emulation loop will continue to BC1T, at which point the branch will be taken and NOP emulated again. At this point however the entry PC value will be 0x4004a0, the same as the target of BC1T. This will make the emulator conclude that execution has not advanced and therefore an unsupported FPU instruction has been encountered, and SIGILL will be sent to the process. Fix the problem by extending the internal API of `mips_dsemul', making it return -1 if no delay slot emulation frame has been made, the instruction has been handled and execution of the emulation loop needs to continue as if nothing happened. Remove code from `mips_dsemul' to reproduce steps made by the emulation loop at the conclusion of each iteration, as those will be reached normally now. Adjust call sites accordingly. Document the API. Signed-off-by: Maciej W. Rozycki Cc: Aurelien Jarno Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12172/ Signed-off-by: Ralf Baechle arch/mips/math-emu/cp1emu.c | 4 ++++ arch/mips/math-emu/dsemul.c | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) commit 4f33f6c522948fffc345261896042b58dea23754 Author: Huacai Chen Date: Thu Jan 21 21:09:52 2016 +0800 MIPS: Fix some missing CONFIG_CPU_MIPSR6 #ifdefs Commit be0c37c985eddc4 (MIPS: Rearrange PTE bits into fixed positions.) defines fixed PTE bits for MIPS R2. Then, commit d7b631419b3d230a4d383 (MIPS: pgtable-bits: Fix XPA damage to R6 definitions.) adds the MIPS R6 definitions in the same way as MIPS R2. But some R6 #ifdefs in the later commit are missing, so in this patch I fix that. Signed-off-by: Huacai Chen Cc: Aurelien Jarno Cc: Steven J. Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12164/ Signed-off-by: Ralf Baechle arch/mips/include/asm/pgtable.h | 4 ++-- arch/mips/mm/tlbex.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit db0dbd57d59ad02c8343c69e8c73e749c0515ec3 Author: Huacai Chen Date: Thu Jan 21 21:09:51 2016 +0800 MIPS: sync-r4k: reduce skew while synchronization While synchronization, count register will go backwards for the master. If synchronise_count_master() runs before synchronise_count_slave(), skew becomes even more. The skew is very harmful for CPU hotplug (CPU0 do synchronization with CPU1, then CPU0 do synchronization with CPU2 and CPU0's count goes backwards, so it will be out of sync with CPU1). After the commit cf9bfe55f24973a8f40e2 (MIPS: Synchronize MIPS count one CPU at a time), we needn't evaluate count_reference at the beginning of synchronise_count_master() any more. Thus, we evaluate the initcount (It seems like count_reference is redundant) in the 2nd loop. Since we write the count register in the last loop, we don't need additional barriers (the existing memory barriers are enough). Moreover, I think we loop 3 times is enough to get a primed instruction cache, this can also get less skew than looping 5 times. Comments are also updated in this patch. Signed-off-by: Huacai Chen Cc: Aurelien Jarno Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Patchwork: https://patchwork.linux-mips.org/patch/12163/ Signed-off-by: Ralf Baechle arch/mips/kernel/sync-r4k.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit b3e27d5d4a29bcc8e057b496d5ef5194addaaac0 Merge: cc67375 03beaec Author: Linus Torvalds Date: Sat Jan 23 16:00:52 2016 -0800 Merge tag 'ntb-4.5' of git://github.com/jonmason/ntb Pull NTB updates from Jon Mason: "A new driver to support AMD NTB, a NTB performance test driver, NTB bugs fixes, and the ability to recover from running out of DMA descriptors" * tag 'ntb-4.5' of git://github.com/jonmason/ntb: NTB: Fix macro parameter conflict with field name NTB: Add support for AMD PCI-Express Non-Transparent Bridge ntb: ntb perf tool NTB: Address out of DMA descriptor issue with NTB NTB: Clear property bits in BAR value NTB: ntb_process_tx error path bug commit cc673757e24d018d64ff8038e28835db1e2902c4 Merge: fa7d9a1 e62e560 Author: Linus Torvalds Date: Sat Jan 23 12:24:56 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull final vfs updates from Al Viro: - The ->i_mutex wrappers (with small prereq in lustre) - a fix for too early freeing of symlink bodies on shmem (they need to be RCU-delayed) (-stable fodder) - followup to dedupe stuff merged this cycle * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: abort dedupe loop if fatal signals are pending make sure that freeing shmem fast symlinks is RCU-delayed wrappers for ->i_mutex access lustre: remove unused declaration commit fa7d9a1d286e6bab49ffa59cbd3c8b394ce54339 Merge: 20c759c 6d45c04 Author: Linus Torvalds Date: Sat Jan 23 11:47:13 2016 -0800 Merge tag 'nfs-for-4.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes and cleanups from Trond Myklebust: "Bugfixes: - pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn - pNFS/flexfiles: Improve merging of errors in LAYOUTRETURN Cleanups: - NFS: Simplify nfs_request_add_commit_list() arguments" * tag 'nfs-for-4.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn NFS: Simplify nfs_request_add_commit_list() arguments pNFS/flexfiles: Improve merging of errors in LAYOUTRETURN commit 20c759ca98468d96d1fff8bd5e6753f458dbbfbd Merge: b82dde0 114bf37 Author: Linus Torvalds Date: Sat Jan 23 11:13:56 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge small final update from Andrew Morton: - DAX feature work: add fsync/msync support - kfree cleanup, MAINTAINERS update * emailed patches from Andrew Morton : MAINTAINERS: return arch/sh to maintained state, with new maintainers tree wide: use kvfree() than conditional kfree()/vfree() dax: never rely on bh.b_dev being set by get_block() xfs: call dax_pfn_mkwrite() for DAX fsync/msync ext4: call dax_pfn_mkwrite() for DAX fsync/msync ext2: call dax_pfn_mkwrite() for DAX fsync/msync dax: add support for fsync/sync mm: add find_get_entries_tag() dax: support dirty DAX entries in radix tree pmem: add wb_cache_pmem() to the PMEM API dax: fix conversion of holes to PMDs dax: fix NULL pointer dereference in __dax_dbg() commit 87f5fedb3bebbbb566f847dd0c567fcea49a36a6 Author: Lukasz Duda Date: Wed Jan 13 16:57:48 2016 +0100 Bluetooth: 6lowpan: Fix handling of uncompressed IPv6 packets This patch fixes incorrect handling of the 6lowpan packets that contain uncompressed IPv6 header. RFC4944 specifies a special dispatch for 6lowpan to carry uncompressed IPv6 header. This dispatch (1 byte long) has to be removed during reception and skb data pointer has to be moved. To correctly point in the beginning of the IPv6 header the dispatch byte has to be pulled off before packet can be processed by netif_rx_in(). Test scenario: IPv6 packets are not correctly interpreted by the network layer when IPv6 header is not compressed (e.g. ICMPv6 Echo Reply is not propagated correctly to the ICMPv6 layer because the extra byte will make the header look corrupted). Similar approach is done for IEEE 802.15.4. Signed-off-by: Lukasz Duda Signed-off-by: Glenn Ruben Bakke Acked-by: Jukka Rissanen Signed-off-by: Johan Hedberg Cc: stable@vger.kernel.org # 4.4+ net/bluetooth/6lowpan.c | 3 +++ 1 file changed, 3 insertions(+) commit 4c58f3282e3de43d34f8955f8eca676294380bf9 Author: Glenn Ruben Bakke Date: Wed Jan 13 16:41:42 2016 +0100 Bluetooth: 6lowpan: Fix kernel NULL pointer dereferences The fixes provided in this patch assigns a valid net_device structure to skb before dispatching it for further processing. Scenario #1: ============ Bluetooth 6lowpan receives an uncompressed IPv6 header, and dispatches it to netif. The following error occurs: Null pointer dereference error #1 crash log: [ 845.854013] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048 [ 845.855785] IP: [] enqueue_to_backlog+0x56/0x240 ... [ 845.909459] Call Trace: [ 845.911678] [] netif_rx_internal+0x44/0xf0 The first modification fixes the NULL pointer dereference error by assigning dev to the local_skb in order to set a valid net_device before processing the skb by netif_rx_ni(). Scenario #2: ============ Bluetooth 6lowpan receives an UDP compressed message which needs further decompression by nhc_udp. The following error occurs: Null pointer dereference error #2 crash log: [ 63.295149] BUG: unable to handle kernel NULL pointer dereference at 0000000000000840 [ 63.295931] IP: [] udp_uncompress+0x320/0x626 [nhc_udp] The second modification fixes the NULL pointer dereference error by assigning dev to the local_skb in the case of a udp compressed packet. The 6lowpan udp_uncompress function expects that the net_device is set in the skb when checking lltype. Signed-off-by: Glenn Ruben Bakke Signed-off-by: Lukasz Duda Acked-by: Jukka Rissanen Signed-off-by: Johan Hedberg Cc: stable@vger.kernel.org # 4.4+ net/bluetooth/6lowpan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 98d94507e10c3c0a5cfc1c3ac4df23e761f1b874 Merge: 20bbfaf 4511f71 ad74e46 Author: Zhang Rui Date: Sat Jan 23 11:43:27 2016 +0800 Merge branches 'thermal-intel', 'thermal-suspend-fix' and 'thermal-soc' into next commit d0e5fbb01a67e400e82fefe4896ea40c6447ab98 Author: Ming Lei Date: Sat Jan 23 08:05:33 2016 +0800 block: fix bio splitting on max sectors After commit e36f62042880(block: split bios to maxpossible length), bio can be splitted in the middle of a vector entry, then it is easy to split out one bio which size isn't aligned with block size, especially when the block size is bigger than 512. This patch fixes the issue by making the max io size aligned to logical block size. Fixes: e36f62042880(block: split bios to maxpossible length) Reported-by: Stefan Haberland Cc: Keith Busch Suggested-by: Linus Torvalds Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-merge.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit b186b4dcb79b1914c3dadb27ac72dafaa4267998 Author: Hans de Goede Date: Fri Jan 22 11:41:05 2016 +0100 ACPI: Revert "ACPI / video: Add Dell Inspiron 5737 to the blacklist" The quirk to get "acpi_backlight=vendor" behavior by default on the Dell Inspiron 5737 was added before we started doing "acpi_backlight=native" by default on Win8 ready machines. Since we now avoid using acpi-video as backlight driver on these machines by default (using the native driver instead) we no longer need this quirk. Moreover the vendor driver does not work after a suspend/resume where as the native driver does. This reverts commit 08a56226d847 (ACPI / video: Add Dell Inspiron 5737 to the blacklist). Link: https://bugzilla.kernel.org/show_bug.cgi?id=111061 Cc: 3.19+ # 3.19+ Reported-and-tested-by: erusan@gmail.com Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/video_detect.c | 8 -------- 1 file changed, 8 deletions(-) commit b82dde0230439215b55e545880e90337ee16f51a Merge: 79d2453 884a12a Author: Linus Torvalds Date: Fri Jan 22 17:35:38 2016 -0800 Merge tag 'please-pull-copy_file_range' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 copy_file_range syscall update from Tony Luck: "Another release, another new syscall to wire up" * tag 'please-pull-copy_file_range' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: [IA64] Enable copy_file_range syscall for ia64 commit 79d245327f61ff21e7b9427c61fded5442734233 Merge: 1b8ee1e 5f4900b Author: Linus Torvalds Date: Fri Jan 22 17:30:52 2016 -0800 Merge tag 'armsoc-tegra' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC support for Tegra platforms from Olof Johansson: "Here's a single-SoC topic branch that we've staged separately. Mainly because it was hard to sort the branch contents in a way that fit our existing branches due to some refactorings. The code has been in -next for quite a while, but we staged it in arm-soc a bit late, which is why we've kept it separate from the other updates and are sending it separately here" * tag 'armsoc-tegra' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: tegra: Add NVIDIA Jetson TX1 Developer Kit support arm64: tegra: Add NVIDIA P2597 I/O board support arm64: tegra: Add NVIDIA Jetson TX1 support arm64: tegra: Add NVIDIA P2571 board support arm64: tegra: Add NVIDIA P2371 board support arm64: tegra: Add NVIDIA P2595 I/O board support arm64: tegra: Add NVIDIA P2530 main board support arm64: tegra: Add Tegra210 support arm64: tegra: Add NVIDIA Tegra132 Norrin support arm64: tegra: Add Tegra132 support ARM: tegra: select USB_ULPI from EHCI rather than platform ARM: tegra: Ensure entire dcache is flushed on entering LP0/1 amba: Hide TEGRA_AHB symbol soc/tegra: Add Tegra210 support soc/tegra: Provide per-SoC Kconfig symbols commit e62e560fc8b65ef5debc9041a792d18a8f98b2ca Author: Darrick J. Wong Date: Fri Jan 22 16:58:28 2016 -0800 vfs: abort dedupe loop if fatal signals are pending If the program running dedupe receives a fatal signal during the dedupe loop, we should bail out to avoid tying up the system. Signed-off-by: Darrick J. Wong Signed-off-by: Al Viro fs/read_write.c | 3 +++ 1 file changed, 3 insertions(+) commit 1b8ee1ec413bce16b0fc0e43816588c288fdc229 Merge: 5430dfe 53c517a Author: Linus Torvalds Date: Fri Jan 22 17:26:00 2016 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A few fixes for fallout that we didn't catch in time in -next, or smaller warning fixes that have been discovered since" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: soc: qcom/spm: shut up uninitialized variable warning ARM: realview: fix device tree build ARM: debug-ll: fix BCM63xx entry for multiplatform ARM: dts: armadillo800eva Correct extal1 frequency to 24 MHz commit 5430dfe90db8a4443fa7f9b62c77e82f768dd797 Merge: 4adea1f b26a95d Author: Linus Torvalds Date: Fri Jan 22 17:20:30 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull more input updates from Dmitry Torokhov: "The second round of updates for the input subsystem, mainly changes to xpad driver to better hanlde Xbox One controllers" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: gpio-keys - allow disabling individual buttons in DT Input: gpio-keys - allow setting input device name in DT Input: xpad - correct xbox one pad device name Input: atmel_mxt_ts - improve touchscreen size/orientation handling Input: xpad - use LED API when identifying wireless controllers Input: xpad - workaround dead irq_out after suspend/ resume Input: xpad - update Xbox One Force Feedback Support Input: xpad - correctly handle concurrent LED and FF requests Input: xpad - handle "present" and "gone" correctly Input: xpad - remove spurious events of wireless xpad 360 controller commit 4adea1fd2773a88c30ecd77d4e5d256fa40908e2 Merge: 2c9b3eb 60539fa Author: Linus Torvalds Date: Fri Jan 22 17:13:15 2016 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "This is mostly stuff which missed the first pull request because it needed to incubate longer. It's mainly made up of the ncr 5380 rework but also has a few assorted bug fixes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (88 commits) imm: Use new parport device model megaraid: Fix possible NULL pointer deference in mraid_mm_ioctl storvsc: Fix typo in MODULE_PARM_DESC cxgbi: Typo in MODULE_PARM_DESC 3w-xxxx: Pass through compat mode ioctls hisi_sas: Use u64 for qw0 in free_device_v1_hw() hisi_sas: Fix typo in setup_itct_v1_hw() hisi_sas: Fix v1 itct masks ipr: Fix out-of-bounds null overwrite scsi: add Synology to 1024 sector blacklist ncr5380: Add support for HP C2502 ncr5380: Fix wait for 53C80 registers registers after PDMA ncr5380: Enable PDMA for DTC chips ncr5380: Enable PDMA for NCR53C400A ncr5380: Use runtime register mapping ncr5380: Fix pseudo DMA transfers on 53C400 ncr5380: Cleanup whitespace and parentheses atari_NCR5380: Merge changes from NCR5380.c ncr5380: Merge changes from atari_NCR5380.c ncr5380: Fix whitespace in comments using regexp ... commit 114bf37e04d839b555b3dc460b5e6ce156f49cf0 Author: Rich Felker Date: Fri Jan 22 15:11:05 2016 -0800 MAINTAINERS: return arch/sh to maintained state, with new maintainers Add Yoshinori Sato and Rich Felker as maintainers for arch/sh (SUPERH). Signed-off-by: Rich Felker Signed-off-by: Yoshinori Sato Acked-by: D. Jeff Dionne Acked-by: Rob Landley Acked-by: Peter Zijlstra (Intel) Acked-by: Simon Horman Acked-by: Geert Uytterhoeven Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1d5cfdb076288df5eb95545a547a39905e95c930 Author: Tetsuo Handa Date: Fri Jan 22 15:11:02 2016 -0800 tree wide: use kvfree() than conditional kfree()/vfree() There are many locations that do if (memory_was_allocated_by_vmalloc) vfree(ptr); else kfree(ptr); but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory using is_vmalloc_addr(). Unless callers have special reasons, we can replace this branch with kvfree(). Please check and reply if you found problems. Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Acked-by: Jan Kara Acked-by: Russell King Reviewed-by: Andreas Dilger Acked-by: "Rafael J. Wysocki" Acked-by: David Rientjes Cc: "Luck, Tony" Cc: Oleg Drokin Cc: Boris Petkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/dma-mapping.c | 11 ++------- drivers/acpi/apei/erst.c | 6 ++--- drivers/block/drbd/drbd_bitmap.c | 26 ++++++---------------- drivers/block/drbd/drbd_int.h | 3 --- drivers/char/mspec.c | 15 +++---------- drivers/gpu/drm/drm_hashtab.c | 5 +---- .../lustre/include/linux/libcfs/libcfs_private.h | 8 ++----- fs/coda/coda_linux.h | 3 +-- fs/jffs2/build.c | 8 ++----- fs/jffs2/fs.c | 5 +---- fs/jffs2/super.c | 5 +---- fs/udf/super.c | 7 +----- ipc/sem.c | 2 +- ipc/util.c | 11 +++------ ipc/util.h | 2 +- mm/percpu.c | 18 ++++++--------- net/ipv4/fib_trie.c | 4 +--- 17 files changed, 36 insertions(+), 103 deletions(-) commit eab95db69d334745d3034072f4a7204084136c88 Author: Ross Zwisler Date: Fri Jan 22 15:10:59 2016 -0800 dax: never rely on bh.b_dev being set by get_block() Previously in DAX we assumed that calls to get_block() would set bh.b_bdev, and we would then use that value even in error cases for debugging. This caused a NULL pointer dereference in __dax_dbg() which was fixed by a previous commit, but that commit only changed the one place where we were hitting an error. Instead, update dax.c so that we always initialize bh.b_bdev as best we can based on the information that DAX has. get_block() may or may not update to a new value, but this at least lets us get something helpful from bh.b_bdev for error messages and not have to worry about whether it was set by get_block() or not. Signed-off-by: Ross Zwisler Reported-by: Jan Kara Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 3 +++ 1 file changed, 3 insertions(+) commit 5eb88dca9ce4546bdfca6e5defcd50fbe8ea8411 Author: Ross Zwisler Date: Fri Jan 22 15:10:56 2016 -0800 xfs: call dax_pfn_mkwrite() for DAX fsync/msync To properly support the new DAX fsync/msync infrastructure filesystems need to call dax_pfn_mkwrite() so that DAX can track when user pages are dirtied. Signed-off-by: Ross Zwisler Cc: "H. Peter Anvin" Cc: "J. Bruce Fields" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Dave Chinner Cc: Ingo Molnar Cc: Jan Kara Cc: Jeff Layton Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Dan Williams Cc: Matthew Wilcox Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/xfs/xfs_file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d5be7a03b002a0faec136687ec03dbee6c579930 Author: Ross Zwisler Date: Fri Jan 22 15:10:53 2016 -0800 ext4: call dax_pfn_mkwrite() for DAX fsync/msync To properly support the new DAX fsync/msync infrastructure filesystems need to call dax_pfn_mkwrite() so that DAX can track when user pages are dirtied. Signed-off-by: Ross Zwisler Cc: "H. Peter Anvin" Cc: "J. Bruce Fields" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Dave Chinner Cc: Ingo Molnar Cc: Jan Kara Cc: Jeff Layton Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Dan Williams Cc: Matthew Wilcox Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext4/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 80b4adcafc076d4179431656b7e83afea99ddec8 Author: Ross Zwisler Date: Fri Jan 22 15:10:50 2016 -0800 ext2: call dax_pfn_mkwrite() for DAX fsync/msync To properly support the new DAX fsync/msync infrastructure filesystems need to call dax_pfn_mkwrite() so that DAX can track when user pages are dirtied. Signed-off-by: Ross Zwisler Cc: "H. Peter Anvin" Cc: "J. Bruce Fields" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Dave Chinner Cc: Ingo Molnar Cc: Jan Kara Cc: Jeff Layton Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Dan Williams Cc: Matthew Wilcox Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext2/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9973c98ecfda3a1dfcab981665b5f1e39bcde64a Author: Ross Zwisler Date: Fri Jan 22 15:10:47 2016 -0800 dax: add support for fsync/sync To properly handle fsync/msync in an efficient way DAX needs to track dirty pages so it is able to flush them durably to media on demand. The tracking of dirty pages is done via the radix tree in struct address_space. This radix tree is already used by the page writeback infrastructure for tracking dirty pages associated with an open file, and it already has support for exceptional (non struct page*) entries. We build upon these features to add exceptional entries to the radix tree for DAX dirty PMD or PTE pages at fault time. [dan.j.williams@intel.com: fix dax_pmd_dbg build warning] Signed-off-by: Ross Zwisler Cc: "H. Peter Anvin" Cc: "J. Bruce Fields" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Dave Chinner Cc: Ingo Molnar Cc: Jan Kara Cc: Jeff Layton Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Dave Hansen Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 274 +++++++++++++++++++++++++++++++++++++++++++++++++--- include/linux/dax.h | 2 + mm/filemap.c | 6 ++ 3 files changed, 266 insertions(+), 16 deletions(-) commit 7e7f774984cd88c45c18e7ffaf0256c3e9118043 Author: Ross Zwisler Date: Fri Jan 22 15:10:44 2016 -0800 mm: add find_get_entries_tag() Add find_get_entries_tag() to the family of functions that include find_get_entries(), find_get_pages() and find_get_pages_tag(). This is needed for DAX dirty page handling because we need a list of both page offsets and radix tree entries ('indices' and 'entries' in this function) that are marked with the PAGECACHE_TAG_TOWRITE tag. Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: "H. Peter Anvin" Cc: "J. Bruce Fields" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Dave Chinner Cc: Ingo Molnar Cc: Jeff Layton Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Dan Williams Cc: Matthew Wilcox Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 3 +++ mm/filemap.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit f9fe48bece3af2d60e1bad65db4825f5a025dd36 Author: Ross Zwisler Date: Fri Jan 22 15:10:40 2016 -0800 dax: support dirty DAX entries in radix tree Add support for tracking dirty DAX entries in the struct address_space radix tree. This tree is already used for dirty page writeback, and it already supports the use of exceptional (non struct page*) entries. In order to properly track dirty DAX pages we will insert new exceptional entries into the radix tree that represent dirty DAX PTE or PMD pages. These exceptional entries will also contain the writeback addresses for the PTE or PMD faults that we can use at fsync/msync time. There are currently two types of exceptional entries (shmem and shadow) that can be placed into the radix tree, and this adds a third. We rely on the fact that only one type of exceptional entry can be found in a given radix tree based on its usage. This happens for free with DAX vs shmem but we explicitly prevent shadow entries from being added to radix trees for DAX mappings. The only shadow entries that would be generated for DAX radix trees would be to track zero page mappings that were created for holes. These pages would receive minimal benefit from having shadow entries, and the choice to have only one type of exceptional entry in a given radix tree makes the logic simpler both in clear_exceptional_entry() and in the rest of DAX. Signed-off-by: Ross Zwisler Cc: "H. Peter Anvin" Cc: "J. Bruce Fields" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Dave Chinner Cc: Ingo Molnar Cc: Jan Kara Cc: Jeff Layton Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Dan Williams Cc: Matthew Wilcox Cc: Dave Hansen Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 2 +- fs/inode.c | 2 +- include/linux/dax.h | 5 ++++ include/linux/fs.h | 3 +- include/linux/radix-tree.h | 9 ++++++ mm/filemap.c | 17 ++++++++---- mm/truncate.c | 69 ++++++++++++++++++++++++++-------------------- mm/vmscan.c | 9 +++++- mm/workingset.c | 4 +-- 9 files changed, 78 insertions(+), 42 deletions(-) commit 3f4a2670deea53e3765e24a7f46aafe6f077cb68 Author: Ross Zwisler Date: Fri Jan 22 15:10:37 2016 -0800 pmem: add wb_cache_pmem() to the PMEM API __arch_wb_cache_pmem() was already an internal implementation detail of the x86 PMEM API, but this functionality needs to be exported as part of the general PMEM API to handle the fsync/msync case for DAX mmaps. One thing worth noting is that we really do want this to be part of the PMEM API as opposed to a stand-alone function like clflush_cache_range() because of ordering restrictions. By having wb_cache_pmem() as part of the PMEM API we can leave it unordered, call it multiple times to write back large amounts of memory, and then order the multiple calls with a single wmb_pmem(). Signed-off-by: Ross Zwisler Cc: "H. Peter Anvin" Cc: "J. Bruce Fields" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Dave Chinner Cc: Ingo Molnar Cc: Jan Kara Cc: Jeff Layton Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Dan Williams Cc: Matthew Wilcox Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pmem.h | 11 ++++++----- include/linux/pmem.h | 22 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 6 deletions(-) commit de14b9cb5e02b5daaea139590393af5ccccc4229 Author: Ross Zwisler Date: Fri Jan 22 15:10:34 2016 -0800 dax: fix conversion of holes to PMDs When we get a DAX PMD fault for a write it is possible that there could be some number of 4k zero pages already present for the same range that were inserted to service reads from a hole. These 4k zero pages need to be unmapped from the VMAs and removed from the struct address_space radix tree before the real DAX PMD entry can be inserted. For PTE faults this same use case also exists and is handled by a combination of unmap_mapping_range() to unmap the VMAs and delete_from_page_cache() to remove the page from the address_space radix tree. For PMD faults we do have a call to unmap_mapping_range() (protected by a buffer_new() check), but nothing clears out the radix tree entry. The buffer_new() check is also incorrect as the current ext4 and XFS filesystem code will never return a buffer_head with BH_New set, even when allocating new blocks over a hole. Instead the filesystem will zero the blocks manually and return a buffer_head with only BH_Mapped set. Fix this situation by removing the buffer_new() check and adding a call to truncate_inode_pages_range() to clear out the radix tree entries before we insert the DAX PMD. Signed-off-by: Ross Zwisler Reported-by: Dan Williams Tested-by: Dan Williams Reviewed-by: Jan Kara Cc: "H. Peter Anvin" Cc: "J. Bruce Fields" Cc: "Theodore Ts'o" Cc: Alexander Viro Cc: Andreas Dilger Cc: Dave Chinner Cc: Ingo Molnar Cc: Jeff Layton Cc: Matthew Wilcox Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit d4bbe7068b60e9263f08c54e6c2a0166c0f37317 Author: Ross Zwisler Date: Fri Jan 22 15:10:31 2016 -0800 dax: fix NULL pointer dereference in __dax_dbg() In __dax_pmd_fault() we currently assume that get_block() will always set bh.b_bdev and we unconditionally dereference it in __dax_dbg(). This assumption isn't always true - when called for reads of holes ext4_dax_mmap_get_block() returns a buffer head where bh->b_bdev is never set. I hit this BUG while testing the DAX PMD fault path. Instead, initialize bh.b_bdev before passing bh into get_block(). It is possible that the filesystem's get_block() will update bh.b_bdev, and this is fine - we just want to initialize bh.b_bdev to something reasonable so that the calls to __dax_dbg() work and print something useful. Signed-off-by: Ross Zwisler Reported-by: Dan Williams Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 1 + 1 file changed, 1 insertion(+) commit 800dc4f49cc002879e1e5e6b79926f86b60528e6 Author: Dan Williams Date: Fri Jan 22 09:20:37 2016 -0800 Revert "MIPS: Fix PAGE_MASK definition" This reverts commit 22b14523994588279ae9c5ccfe64073c1e5b3c00. It was originally sent in an earlier revision of the pfn_t patchset. Besides being broken, the warning is also fixed by PFN_FLAGS_MASK casting the PAGE_MASK to an unsigned long. Reported-by: Manuel Lauss Signed-off-by: Dan Williams Cc: linux-kernel@vger.kernel.org Cc: Linux-MIPS Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12182/ Signed-off-by: Ralf Baechle arch/mips/include/asm/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ed47db34f480df7caf44436e3e63e555351ae9a Author: Al Viro Date: Fri Jan 22 18:08:52 2016 -0500 make sure that freeing shmem fast symlinks is RCU-delayed Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Al Viro include/linux/shmem_fs.h | 5 +---- mm/shmem.c | 9 ++++----- 2 files changed, 5 insertions(+), 9 deletions(-) commit 5955102c9984fa081b2d570cfac75c97eecf8f3b Author: Al Viro Date: Fri Jan 22 15:40:57 2016 -0500 wrappers for ->i_mutex access parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested}, inode_foo(inode) being mutex_foo(&inode->i_mutex). Please, use those for access to ->i_mutex; over the coming cycle ->i_mutex will become rwsem, with ->lookup() done with it held only shared. Signed-off-by: Al Viro arch/powerpc/platforms/cell/spufs/file.c | 4 +- arch/powerpc/platforms/cell/spufs/inode.c | 12 ++-- arch/s390/hypfs/inode.c | 8 +-- block/ioctl.c | 4 +- drivers/base/devtmpfs.c | 12 ++-- drivers/block/aoe/aoecmd.c | 4 +- drivers/block/drbd/drbd_debugfs.c | 4 +- drivers/char/mem.c | 4 +- drivers/char/ps3flash.c | 4 +- drivers/infiniband/hw/qib/qib_fs.c | 12 ++-- drivers/mtd/ubi/cdev.c | 4 +- drivers/oprofile/oprofilefs.c | 16 +++--- drivers/staging/lustre/lustre/llite/dir.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 16 +++--- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 +- drivers/staging/lustre/lustre/llite/llite_nfs.c | 4 +- drivers/staging/lustre/lustre/llite/lloop.c | 4 +- drivers/staging/lustre/lustre/llite/rw.c | 4 +- drivers/staging/lustre/lustre/llite/rw26.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 10 ++-- drivers/staging/rdma/ipath/ipath_fs.c | 8 +-- drivers/usb/gadget/function/f_printer.c | 4 +- drivers/usb/gadget/legacy/inode.c | 4 +- drivers/usb/gadget/udc/atmel_usba_udc.c | 12 ++-- drivers/video/fbdev/core/fb_defio.c | 4 +- fs/9p/vfs_file.c | 8 +-- fs/affs/file.c | 8 +-- fs/afs/flock.c | 4 +- fs/afs/write.c | 4 +- fs/attr.c | 2 +- fs/binfmt_misc.c | 12 ++-- fs/block_dev.c | 20 +++---- fs/btrfs/file.c | 42 +++++++------- fs/btrfs/inode.c | 4 +- fs/btrfs/ioctl.c | 38 ++++++------- fs/btrfs/relocation.c | 4 +- fs/btrfs/scrub.c | 4 +- fs/btrfs/xattr.c | 2 +- fs/cachefiles/interface.c | 4 +- fs/cachefiles/namei.c | 40 ++++++------- fs/ceph/cache.c | 4 +- fs/ceph/caps.c | 4 +- fs/ceph/dir.c | 4 +- fs/ceph/export.c | 4 +- fs/ceph/file.c | 18 +++--- fs/cifs/cifsfs.c | 4 +- fs/cifs/file.c | 12 ++-- fs/coda/dir.c | 4 +- fs/coda/file.c | 8 +-- fs/configfs/dir.c | 58 +++++++++---------- fs/configfs/file.c | 8 +-- fs/configfs/inode.c | 4 +- fs/dax.c | 6 +- fs/dcache.c | 4 +- fs/debugfs/inode.c | 22 ++++---- fs/devpts/inode.c | 12 ++-- fs/direct-io.c | 8 +-- fs/ecryptfs/inode.c | 32 +++++------ fs/ecryptfs/mmap.c | 4 +- fs/efivarfs/file.c | 4 +- fs/efivarfs/super.c | 4 +- fs/exec.c | 4 +- fs/exofs/file.c | 4 +- fs/exportfs/expfs.c | 12 ++-- fs/ext2/ioctl.c | 12 ++-- fs/ext4/ext4.h | 2 +- fs/ext4/extents.c | 20 +++---- fs/ext4/file.c | 18 +++--- fs/ext4/inode.c | 12 ++-- fs/ext4/ioctl.c | 20 +++---- fs/ext4/namei.c | 4 +- fs/ext4/super.c | 4 +- fs/f2fs/data.c | 4 +- fs/f2fs/file.c | 20 +++---- fs/fat/dir.c | 4 +- fs/fat/file.c | 12 ++-- fs/fuse/dir.c | 10 ++-- fs/fuse/file.c | 36 ++++++------ fs/gfs2/file.c | 4 +- fs/gfs2/inode.c | 4 +- fs/gfs2/quota.c | 8 +-- fs/hfs/dir.c | 4 +- fs/hfs/inode.c | 8 +-- fs/hfsplus/dir.c | 4 +- fs/hfsplus/inode.c | 8 +-- fs/hfsplus/ioctl.c | 4 +- fs/hostfs/hostfs_kern.c | 4 +- fs/hpfs/dir.c | 6 +- fs/hugetlbfs/inode.c | 12 ++-- fs/inode.c | 8 +-- fs/ioctl.c | 4 +- fs/jffs2/file.c | 4 +- fs/jfs/file.c | 6 +- fs/jfs/ioctl.c | 6 +- fs/jfs/super.c | 6 +- fs/kernfs/dir.c | 4 +- fs/libfs.c | 10 ++-- fs/locks.c | 6 +- fs/logfs/file.c | 8 +-- fs/namei.c | 74 ++++++++++++------------- fs/namespace.c | 10 ++-- fs/ncpfs/dir.c | 8 +-- fs/ncpfs/file.c | 4 +- fs/nfs/dir.c | 8 +-- fs/nfs/direct.c | 12 ++-- fs/nfs/file.c | 4 +- fs/nfs/inode.c | 8 +-- fs/nfs/nfs42proc.c | 8 +-- fs/nfs/nfs4file.c | 24 ++++---- fs/nfsd/nfs4proc.c | 4 +- fs/nfsd/nfs4recover.c | 12 ++-- fs/nfsd/nfsfh.h | 4 +- fs/nfsd/vfs.c | 4 +- fs/nilfs2/inode.c | 4 +- fs/nilfs2/ioctl.c | 4 +- fs/ntfs/dir.c | 4 +- fs/ntfs/file.c | 8 +-- fs/ntfs/quota.c | 6 +- fs/ntfs/super.c | 12 ++-- fs/ocfs2/alloc.c | 32 +++++------ fs/ocfs2/aops.c | 4 +- fs/ocfs2/dir.c | 4 +- fs/ocfs2/file.c | 12 ++-- fs/ocfs2/inode.c | 12 ++-- fs/ocfs2/ioctl.c | 12 ++-- fs/ocfs2/journal.c | 8 +-- fs/ocfs2/localalloc.c | 16 +++--- fs/ocfs2/move_extents.c | 16 +++--- fs/ocfs2/namei.c | 28 +++++----- fs/ocfs2/quota_global.c | 4 +- fs/ocfs2/refcounttree.c | 12 ++-- fs/ocfs2/resize.c | 8 +-- fs/ocfs2/suballoc.c | 12 ++-- fs/ocfs2/xattr.c | 14 ++--- fs/open.c | 12 ++-- fs/overlayfs/copy_up.c | 4 +- fs/overlayfs/dir.c | 12 ++-- fs/overlayfs/inode.c | 4 +- fs/overlayfs/readdir.c | 20 +++---- fs/overlayfs/super.c | 14 ++--- fs/proc/kcore.c | 4 +- fs/proc/self.c | 4 +- fs/proc/thread_self.c | 4 +- fs/pstore/inode.c | 6 +- fs/quota/dquot.c | 20 +++---- fs/read_write.c | 4 +- fs/readdir.c | 2 +- fs/reiserfs/dir.c | 4 +- fs/reiserfs/file.c | 4 +- fs/reiserfs/ioctl.c | 2 +- fs/reiserfs/xattr.c | 64 ++++++++++----------- fs/tracefs/inode.c | 34 ++++++------ fs/ubifs/dir.c | 18 +++--- fs/ubifs/file.c | 4 +- fs/ubifs/xattr.c | 4 +- fs/udf/file.c | 10 ++-- fs/udf/inode.c | 2 +- fs/utimes.c | 4 +- fs/xattr.c | 8 +-- fs/xfs/xfs_file.c | 6 +- fs/xfs/xfs_pnfs.c | 4 +- include/linux/fs.h | 29 +++++++++- ipc/mqueue.c | 8 +-- kernel/audit_fsnotify.c | 2 +- kernel/audit_watch.c | 2 +- kernel/events/core.c | 4 +- kernel/relay.c | 4 +- kernel/sched/core.c | 4 +- mm/filemap.c | 4 +- mm/shmem.c | 12 ++-- mm/swapfile.c | 12 ++-- net/sunrpc/cache.c | 10 ++-- net/sunrpc/rpc_pipe.c | 60 ++++++++++---------- security/inode.c | 10 ++-- security/integrity/ima/ima_main.c | 8 +-- security/selinux/selinuxfs.c | 4 +- 177 files changed, 908 insertions(+), 883 deletions(-) commit 884a12a5972fc867a93f7adf7a8ac2ade5d38fff Author: Tony Luck Date: Fri Jan 22 14:20:01 2016 -0800 [IA64] Enable copy_file_range syscall for ia64 New system call added in: 29732938a6289a15e907da234d6692a2ead71855 vfs: add copy_file_range syscall and vfs helper Signed-off-by: Tony Luck arch/ia64/include/asm/unistd.h | 2 +- arch/ia64/include/uapi/asm/unistd.h | 1 + arch/ia64/kernel/entry.S | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 57b8f112cfe6622ddddb8c2641206bb5fa8a112d Author: Al Viro Date: Fri Jan 22 15:34:16 2016 -0500 lustre: remove unused declaration Signed-off-by: Al Viro drivers/staging/lustre/lustre/llite/llite_internal.h | 2 -- 1 file changed, 2 deletions(-) commit 2c9b3ebd5913c2d1371b749a8057ac32972b410d Merge: 48162a2 64a67d4 Author: Linus Torvalds Date: Fri Jan 22 12:04:21 2016 -0800 Merge tag 'mmc-v4.5-rc1' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fixes from Ulf Hansson: "Here are some mmc fixes intended for v4.5 rc1. MMC core: - Restore reset-gpios to be optional in pwrseq_simple - Allow SDIO tuple for CISTPL_SDIO_STD - Print correct voltage value in debugfs - Enable tuning according to the actual timing - Limit SD card power limit according to cards capabilities MMC host: - tmio_mmc_dma: don't print invalid DMA cookie - mmci: Pick the correct variant and allow 8-bit mode for Nomadik" * tag 'mmc-v4.5-rc1' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: pwrseq_simple: Make reset-gpios optional to match doc mmc: sdio_cis: fix unknown tuple for CISTPL_SDIO_STD mmc: debugfs: correct wrong voltage value mmc: tmio_mmc_dma: don't print invalid DMA cookie mmc: core: Enable tuning according to the actual timing mmc: mmci: support 8bit mode on the Nomadik mmc: mmci: fix an ages old detection error mmc: sd: limit SD card power limit according to cards capabilities commit 48162a203e1d0762569d9e7d2de153d9135b35f8 Merge: e7cc3ed 202736d Author: Linus Torvalds Date: Fri Jan 22 11:58:43 2016 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes the following issues: API: - A large number of bug fixes for the af_alg interface, credit goes to Dmitry Vyukov for discovering and reporting these issues. Algorithms: - sw842 needs to select crc32. - The soft dependency on crc32c is now in the correct spot. Drivers: - The atmel AES driver needs HAS_DMA. - The atmel AES driver was a missing break statement, fortunately it's only a debug function. - A number of bug fixes for the Intel qat driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (24 commits) crypto: algif_skcipher - sendmsg SG marking is off by one crypto: crc32c - Fix crc32c soft dependency crypto: algif_skcipher - Load TX SG list after waiting crypto: atmel-aes - Add missing break to atmel_aes_reg_name crypto: algif_skcipher - Fix race condition in skcipher_check_key crypto: algif_hash - Fix race condition in hash_check_key crypto: CRYPTO_DEV_ATMEL_AES should depend on HAS_DMA lib: sw842: select crc32 crypto: af_alg - Forbid bind(2) when nokey child sockets are present crypto: algif_skcipher - Remove custom release parent function crypto: algif_hash - Remove custom release parent function crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path crypto: qat - update init_esram for C3xxx dev type crypto: qat - fix timeout issues crypto: qat - remove to call get_sram_bar_id for qat_c3xxx crypto: algif_skcipher - Add key check exception for cipher_null crypto: skcipher - Add crypto_skcipher_has_setkey crypto: algif_hash - Require setkey before accept(2) crypto: hash - Add crypto_ahash_has_setkey crypto: algif_skcipher - Add nokey compatibility path ... commit e7cc3edd1758f9aab39f5afcd988ffed55cb26ca Merge: 2101ae4 40ed944 Author: Linus Torvalds Date: Fri Jan 22 11:53:56 2016 -0800 Merge tag 'sound-fix-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are lots of small fixes that have been collected since the previous pull. This time, not only trivial ones but fixes for some serious bugs are included: - Fix for CPU lockups by snd-hrtimer accesses - Fix for unsafe disconnection handling in ALSA timer code - Fix for Oops due to race at HD-audio module removal - Fixes for possible memory corruption via 32bit PCM and sequencer compat ioctls - Fix for regression in HD-audio generic model handling - Suppress kernel warnings for invalid TLV ioctls that may flood up - Fix the missing SSC clock handling for at73c213 - A pin fixup for ASUS N550JX" * tag 'sound-fix-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: timer: Introduce disconnect op to snd_timer_instance ALSA: timer: Handle disconnection more safely ALSA: hda - Flush the pending probe work at remove ALSA: hda - Fix missing module loading with model=generic option ALSA: hda - Degrade i915 binding failure message ALSA: at73c213: manage SSC clock ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode ALSA: hrtimer: Fix stall by hrtimer_cancel() ALSA: hda - Fix bass pin fixup for ASUS N550JX commit 2101ae42899a14fe7caa73114e2161e778328661 Merge: 391f2a1 a6111d1 Author: Linus Torvalds Date: Fri Jan 22 11:49:21 2016 -0800 Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull more btrfs updates from Chris Mason: "These are mostly fixes that we've been testing, but also we grabbed and tested a few small cleanups that had been on the list for a while. Zhao Lei's patchset also fixes some early ENOSPC buglets" * 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (21 commits) btrfs: raid56: Use raid_write_end_io for scrub btrfs: Remove unnecessary ClearPageUptodate for raid56 btrfs: use rbio->nr_pages to reduce calculation btrfs: Use unified stripe_page's index calculation btrfs: Fix calculation of rbio->dbitmap's size calculation btrfs: Fix no_space in write and rm loop btrfs: merge functions for wait snapshot creation btrfs: delete unused argument in btrfs_copy_from_user btrfs: Use direct way to determine raid56 write/recover mode btrfs: Small cleanup for get index_srcdev loop btrfs: Enhance chunk validation check btrfs: Enhance super validation check Btrfs: fix deadlock running delayed iputs at transaction commit time Btrfs: fix typo in log message when starting a balance btrfs: remove duplicate const specifier btrfs: initialize the seq counter in struct btrfs_device Btrfs: clean up an error code in btrfs_init_space_info() btrfs: fix iterator with update error in backref.c Btrfs: fix output of compression message in btrfs_parse_options() Btrfs: Initialize btrfs_root->highest_objectid when loading tree root and subvolume roots ... commit 41f2d9905646b1cd4be5852b273c06b6a6d23a80 Author: Christian König Date: Thu Jan 21 12:56:52 2016 +0100 drm/amdgpu: fix next_rptr handling for debugfs That somehow got lost. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Acked-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 391f2a16b74b95da2f05a607f53213fc8ed24b8e Merge: d5ffdf8 68ce7bf Author: Linus Torvalds Date: Fri Jan 22 11:23:35 2016 -0800 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Some locking and page fault bug fixes from Jan Kara, some ext4 encryption fixes from me, and Li Xi's Project Quota commits" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: fs: clean up the flags definition in uapi/linux/fs.h ext4: add FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support ext4: add project quota support ext4: adds project ID support ext4 crypto: simplify interfaces to directory entry insert functions ext4 crypto: add missing locking for keyring_key access ext4: use pre-zeroed blocks for DAX page faults ext4: implement allocation of pre-zeroed blocks ext4: provide ext4_issue_zeroout() ext4: get rid of EXT4_GET_BLOCKS_NO_LOCK flag ext4: document lock ordering ext4: fix races of writeback with punch hole and zero range ext4: fix races between buffered IO and collapse / insert range ext4: move unlocked dio protection from ext4_alloc_file_blocks() ext4: fix races between page faults and hole punching commit d5ffdf8b4ac6e6db5702ba31870c476d5fa30660 Merge: eadee0c ee3804d Author: Linus Torvalds Date: Fri Jan 22 10:54:13 2016 -0800 Merge tag 'xfs-for-linus-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull more xfs updates from Dave Chinner: "This is the second update for XFS that I mentioned in the original pull request last week. It contains a revert for a suspend regression in 4.4 and a fix for a long standing log recovery issue that has been further exposed by all the log recovery changes made in the original 4.5 merge. There is one more thing in this pull request - one that I forgot to merge into the origin. That is, pulling the XFS_IOC_FS[GS]ETXATTR ioctl up to the VFS level so that other filesystems can also use it for modifying project quota IDs Summary: - promotion of XFS_IOC_FS[GS]ETXATTR ioctl to the vfs level so that it can be shared with other filesystems. The ext4 project quota functionality is the first target for this. The commits in this series have not been updated with review or final SOB tags because the branch they were originally published in was needed by ext4. Those tags are: Reviewed-by: Theodore Ts'o Signed-off-by: Dave Chinner - Revert a change that is causing suspend failures. - Fix a use-after-free that can occur on log mount failures. Been around forever, but now exposed by other changes to log recovery made in the first 4.5 merge" * tag 'xfs-for-linus-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: log mount failures don't wait for buffers to be released Revert "xfs: clear PF_NOFREEZE for xfsaild kthread" xfs: introduce per-inode DAX enablement xfs: use FS_XFLAG definitions directly fs: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion commit eadee0ce6fd33defe449c97e671bf83fa230b5de Merge: 6fb11e6 117aa41 Author: Linus Torvalds Date: Fri Jan 22 10:24:03 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more vfs updates from Al Viro: "Embarrassing braino fix + pipe page accounting + fixing an eyesore in find_filesystem() (checking that s1 is equal to prefix of s2 of given length can be done in many ways, but "compare strlen(s1) with length and then do strncmp()" is not a good one...)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: [regression] fix braino in fs/dlm/user.c pipe: limit the per-user amount of pages allocated in pipes find_filesystem(): simplify comparison commit 6fb11e6508eac9d2e01ba748fc13afdd657224ab Merge: 3e1e21c b1b1e15 Author: Linus Torvalds Date: Fri Jan 22 09:54:34 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "Six fixes" * emailed patches from Andrew Morton : ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock reiserfs: fix dereference of ERR_PTR ratelimit: fix bug in time interval by resetting right begin time mm: fix kernel crash in khugepaged thread mm: fix mlock accouting thp: change pmd_trans_huge_lock() interface to return ptl commit 5cfa1e4e0deced0cccedb4b30facb8a8e68e209b Author: Hou Zhiqiang Date: Fri Jan 22 18:58:26 2016 +0800 spi/fsl-espi: Correct the maximum transaction length The maximum length during one transcation is 64KiB. Signed-off-by: Hou Zhiqiang Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8efca2f1783050368c71e978ee32d3aa692637b Author: Gao Pan Date: Mon Jan 18 15:44:01 2016 +0800 spi: imx: fix spi resource leak with dma transfer In spi_imx_dma_transfer(), when desc_rx = dmaengine_prep_slave_sg() fails, the context goes to label no_dma and then return. However, the memory allocated for desc_tx has not been freed yet, which leads to resource leak. Signed-off-by: Gao Pan Reviewed-by: Fugang Duan Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6bb7451429084cefcb3a18fff809f7992595d2af Author: Stuart Henderson Date: Tue Jan 19 13:09:09 2016 +0000 ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode With the introduction of WM8960_SYSCLK_AUTO mode, WM8960_SYSCLK_PLL mode was made unusable. Ensure we're not PLL mode before trying to use MCLK. Fixes: 3176bf2d7ccd ("ASoC: wm8960: update pll and clock setting function") Signed-off-by: Stuart Henderson Reviewed-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 95826a37991de87659e21b3649f265a049724aa2 Author: Stuart Henderson Date: Tue Jan 19 13:09:08 2016 +0000 ASoC: wm8960: Fix input boost mixer left/right naming INBMIX1 controls LINPUTs and INBMIX2 controls RINPUTs, so fix the naming accordingly. Signed-off-by: Stuart Henderson Reviewed-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f5ede8dcc3ec1fe5344f0d30717931a44e630631 Author: Richard Fitzgerald Date: Thu Jan 21 14:41:12 2016 +0000 ASoC: wm5110: Unregister compressed platform when driver is removed The driver was not unregistering the compressed platform in wm5110_remove(). If the codec is built as a module, this would lead to a NULL pointer deref if the module was unloaded and then re-probed. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/wm5110.c | 1 + 1 file changed, 1 insertion(+) commit c14a82c781f8df50c4c5215ab92affdc60d72c01 Author: Sudip Mukherjee Date: Thu Jan 21 17:27:59 2016 +0530 ASoC: Intel: Skylake: Fix memory leak If snd_soc_tplg_component_load() fails we just printed an error message and returned the error code but we missed releasing the firmware. Signed-off-by: Sudip Mukherjee Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 1 + 1 file changed, 1 insertion(+) commit 53c517a83741718e35dd0494eb271c3c6e3820e5 Merge: 00affca c61f30a Author: Olof Johansson Date: Fri Jan 22 08:28:23 2016 -0800 Merge tag 'renesas-fixes-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Renesas ARM Based SoC Fixes for v4.5 Correct extal1 frequency of armadillo800eva board * tag 'renesas-fixes-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: armadillo800eva Correct extal1 frequency to 24 MHz Signed-off-by: Olof Johansson commit 143c6fe3a415edf2dde3f507b3a00998b4c4001e Author: Tony Lindgren Date: Tue Jan 12 08:11:04 2016 -0800 ARM: omap2plus_defconfig: Enable ARM_KERNMEM_PERMS and few loadable modules With recent omap assembly fixes for CONFIG_DEBUG_RODATA, we can now use DEBUG_RODATA. Let's enable ARM_KERNMEM_PERMS so that DEBUG_RODATA gets selected by default. This way we can make sure any related issues are caught early. And while testing things on various devices, I noticed we're missing few loadable modules to make things more usable: - USB Ethernet for smsc75xx, we only have smsc97xx right now - Basic USB serial drivers for things like ftdi and pl2303 ports - Blinking leds with pca963x Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4da597d16602d14405b71a18d45e1c59f28f0fd2 Author: Tony Lindgren Date: Thu Jan 14 12:20:48 2016 -0800 ARM: OMAP2+: Fix ppa_zero_params and ppa_por_params for rodata We don't want to write to .text so let's move ppa_zero_params and ppa_por_params to .data and access them via pointers. Note that I have not been able to test as we I don't have a HS omap4 to test with. The code has been changed in similar way as for omap3 though. Cc: Kees Cook Cc: Laura Abbott Cc: Nishanth Menon Cc: Richard Woodruff Cc: Russell King Cc: Tero Kristo Acked-by: Nicolas Pitre Cc: stable@vger.kernel.org # v4.0+ Fixes: 1e6b48116a95 ("ARM: mm: allow non-text sections to be non-executable") Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sleep44xx.S | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 0a0b13275558c32bbf6241464a7244b1ffd5afb3 Author: Tony Lindgren Date: Thu Jan 14 12:20:47 2016 -0800 ARM: OMAP2+: Fix l2_inv_api_params for rodata We don't want to write to .text, so let's move l2_inv_api_params to .data and access it via a pointer. Cc: Kees Cook Cc: Laura Abbott Cc: Nishanth Menon Cc: Richard Woodruff Cc: Russell King Cc: Tero Kristo Acked-by: Nicolas Pitre Cc: stable@vger.kernel.org # v4.0+ Fixes: 1e6b48116a95 ("ARM: mm: allow non-text sections to be non-executable") Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sleep34xx.S | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a5311d4d13df80bd71a9e47f9ecaf327f478fab1 Author: Tony Lindgren Date: Thu Jan 14 12:20:47 2016 -0800 ARM: OMAP2+: Fix save_secure_ram_context for rodata We don't want to write to .text and we can move save_secure_ram_context into .data as it all gets copied into SRAM anyways. Cc: Kees Cook Cc: Laura Abbott Cc: Nishanth Menon Cc: Richard Woodruff Cc: Russell King Cc: Sergei Shtylyov Cc: Tero Kristo Acked-by: Nicolas Pitre Cc: stable@vger.kernel.org # v4.0+ Fixes: 1e6b48116a95 ("ARM: mm: allow non-text sections to be non-executable") Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sleep34xx.S | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit eeaf9646aca89d097861caa24d9818434e48810e Author: Tony Lindgren Date: Thu Jan 14 12:20:47 2016 -0800 ARM: OMAP2+: Fix l2dis_3630 for rodata We don't want to write to .text section. Let's move l2dis_3630 to .data and access it via a pointer. For calculating the offset, let's optimize out the add and do it in ldr/str as suggested by Nicolas Pitre . Cc: Kees Cook Cc: Laura Abbott Cc: Nishanth Menon Cc: Richard Woodruff Cc: Russell King Cc: Tero Kristo Cc: stable@vger.kernel.org # v4.0+ Acked-by: Nicolas Pitre Cc: stable@vger.kernel.org # v4.0+ Fixes: 1e6b48116a95 ("ARM: mm: allow non-text sections to be non-executable") Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sleep34xx.S | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit d9db59103305eb5ec2a86369f32063e9921b6ac5 Author: Tony Lindgren Date: Thu Jan 14 12:20:47 2016 -0800 ARM: OMAP2+: Fix wait_dll_lock_timed for rodata We don't want to be writing to .text so it can be set rodata. Fix error "Unable to handle kernel paging request at virtual address c012396c" in wait_dll_lock_timed if CONFIG_DEBUG_RODATA is selected. As these counters are for debugging only and unused, we can just remove them. Cc: Kees Cook Cc: Laura Abbott Cc: Nishanth Menon Cc: Richard Woodruff Cc: Russell King Cc: Tero Kristo Acked-by: Nicolas Pitre Cc: stable@vger.kernel.org # v4.0+ Fixes: 1e6b48116a95 ("ARM: mm: allow non-text sections to be non-executable") Signed-off-by: Tony Lindgren arch/arm/mach-omap2/sleep34xx.S | 22 ---------------------- 1 file changed, 22 deletions(-) commit 79b134a22b6fc45f48bcc1c27d6bf05b3ede5e06 Author: David Sterba Date: Fri Jan 22 17:16:18 2016 +0100 btrfs: tweak free space tree bitmap allocation The requested bitmap size varies, observed numbers were < 4K up to 16K. Using vmalloc unconditionally would be too heavy, we'll try contiguous allocations first and fall back to vmalloc if there's no contig memory. Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 6d45c042f35ea9b27bf946380f74ff75d32280c9 Merge: 6272dcc 082fa37 Author: Trond Myklebust Date: Fri Jan 22 11:02:36 2016 -0500 Merge branch 'bugfixes' * bugfixes: pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn pNFS/flexfiles: Improve merging of errors in LAYOUTRETURN commit 082fa37d1351a41afc491d44a1d095cb8d919aa2 Author: Trond Myklebust Date: Thu Jan 21 15:39:40 2016 -0500 pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn We must not skip encoding the statistics, or the server will see an XDR encoding error. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # 4.0+ fs/nfs/flexfilelayout/flexfilelayout.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cc78eb22885bba64445cde438ba098de0104920f Author: Alex Deucher Date: Fri Jan 22 00:13:15 2016 -0500 drm/radeon: properly byte swap vce firmware setup Firmware is LE. Need to properly byteswap some of the fields so they are interpreted correctly by the driver on BE systems. Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/vce_v1_0.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9441f964f8e39374ab175e0a8fe870e1a2f02af1 Author: Alex Deucher Date: Wed Jan 20 12:15:09 2016 -0500 drm/amdgpu: add a message to indicate when powerplay is enabled (v2) Makes it clear to the user which power management path is in use. v2: make consistent with dpm Reviewed-by: Rex Zhu Reviewed-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 5 +++++ 1 file changed, 5 insertions(+) commit 78d0e182b6c1f5336f6e8cbb197f403276dabc7f Author: Christian König Date: Tue Jan 19 12:48:14 2016 +0100 drm/amdgpu: fix amdgpu_bo_pin_restricted VRAM placing v2 We could pin BOs into invisible VRAM otherwise. v2: make logic more readable as suggested by Michel Cc: stable@vger.kernel.org Signed-off-by: Christian König Reviewed-by: Alex Deucher (v1) Reviewed-by: Rex Zhu (v1) Reviewed-by: Michel Dänzer drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4b5ece24ce564176f8ad786ad02b681a373bc615 Author: Eric Huang Date: Tue Jan 19 14:28:56 2016 -0500 drm/amd/amdgpu: Improve amdgpu_dpm* macros to avoid unexpected result (v2) The two macros returns are values which probably are used in the expression of calculation. Without the brackets the result of the expression may be wrong. v2: agd: squash both patches together Reviewed-by: Alex Deucher Signed-off-by: Eric Huang drivers/gpu/drm/amd/amdgpu/amdgpu.h | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 8bb5ef79bc0f4016ecf79e8dce6096a3c63603e4 Author: Tejun Heo Date: Thu Jan 21 15:32:15 2016 -0500 cgroup: make sure a parent css isn't freed before its children There are three subsystem callbacks in css shutdown path - css_offline(), css_released() and css_free(). Except for css_released(), cgroup core didn't guarantee the order of invocation. css_offline() or css_free() could be called on a parent css before its children. This behavior is unexpected and led to bugs in cpu and memory controller. The previous patch updated ordering for css_offline() which fixes the cpu controller issue. While there currently isn't a known bug caused by misordering of css_free() invocations, let's fix it too for consistency. css_free() ordering can be trivially fixed by moving putting of the parent css below css_free() invocation. Signed-off-by: Tejun Heo Cc: Peter Zijlstra kernel/cgroup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit aa226ff4a1ce79f229c6b7a4c0a14e17fececd01 Author: Tejun Heo Date: Thu Jan 21 15:31:11 2016 -0500 cgroup: make sure a parent css isn't offlined before its children There are three subsystem callbacks in css shutdown path - css_offline(), css_released() and css_free(). Except for css_released(), cgroup core didn't guarantee the order of invocation. css_offline() or css_free() could be called on a parent css before its children. This behavior is unexpected and led to bugs in cpu and memory controller. This patch updates offline path so that a parent css is never offlined before its children. Each css keeps online_cnt which reaches zero iff itself and all its children are offline and offline_css() is invoked only after online_cnt reaches zero. This fixes the memory controller bug and allows the fix for cpu controller. Signed-off-by: Tejun Heo Reported-and-tested-by: Christian Borntraeger Reported-by: Brian Christiansen Link: http://lkml.kernel.org/g/5698A023.9070703@de.ibm.com Link: http://lkml.kernel.org/g/CAKB58ikDkzc8REt31WBkD99+hxNzjK4+FBmhkgS+NVrC9vjMSg@mail.gmail.com Cc: Heiko Carstens Cc: Peter Zijlstra Cc: stable@vger.kernel.org include/linux/cgroup-defs.h | 6 ++++++ kernel/cgroup.c | 22 +++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) commit e93ad19d05648397ef3bcb838d26aec06c245dc0 Author: Tejun Heo Date: Tue Jan 19 12:18:41 2016 -0500 cpuset: make mm migration asynchronous If "cpuset.memory_migrate" is set, when a process is moved from one cpuset to another with a different memory node mask, pages in used by the process are migrated to the new set of nodes. This was performed synchronously in the ->attach() callback, which is synchronized against process management. Recently, the synchronization was changed from per-process rwsem to global percpu rwsem for simplicity and optimization. Combined with the synchronous mm migration, this led to deadlocks because mm migration could schedule a work item which may in turn try to create a new worker blocking on the process management lock held from cgroup process migration path. This heavy an operation shouldn't be performed synchronously from that deep inside cgroup migration in the first place. This patch punts the actual migration to an ordered workqueue and updates cgroup process migration and cpuset config update paths to flush the workqueue after all locks are released. This way, the operations still seem synchronous to userland without entangling mm migration with process management synchronization. CPU hotplug can also invoke mm migration but there's no reason for it to wait for mm migrations and thus doesn't synchronize against their completions. Signed-off-by: Tejun Heo Reported-and-tested-by: Christian Borntraeger Cc: stable@vger.kernel.org # v4.4+ include/linux/cpuset.h | 6 +++++ kernel/cgroup.c | 2 ++ kernel/cpuset.c | 71 ++++++++++++++++++++++++++++++++++---------------- 3 files changed, 57 insertions(+), 22 deletions(-) commit 1dff76b92f69051e579bdc131e01500da9fa2a91 Author: Gavin Guo Date: Wed Jan 20 12:36:58 2016 +0800 sched/numa: Fix use-after-free bug in the task_numa_compare The following message can be observed on the Ubuntu v3.13.0-65 with KASan backported: ================================================================== BUG: KASan: use after free in task_numa_find_cpu+0x64c/0x890 at addr ffff880dd393ecd8 Read of size 8 by task qemu-system-x86/3998900 ============================================================================= BUG kmalloc-128 (Tainted: G B ): kasan: bad access detected ----------------------------------------------------------------------------- INFO: Allocated in task_numa_fault+0xc1b/0xed0 age=41980 cpu=18 pid=3998890 __slab_alloc+0x4f8/0x560 __kmalloc+0x1eb/0x280 task_numa_fault+0xc1b/0xed0 do_numa_page+0x192/0x200 handle_mm_fault+0x808/0x1160 __do_page_fault+0x218/0x750 do_page_fault+0x1a/0x70 page_fault+0x28/0x30 SyS_poll+0x66/0x1a0 system_call_fastpath+0x1a/0x1f INFO: Freed in task_numa_free+0x1d2/0x200 age=62 cpu=18 pid=0 __slab_free+0x2ab/0x3f0 kfree+0x161/0x170 task_numa_free+0x1d2/0x200 finish_task_switch+0x1d2/0x210 __schedule+0x5d4/0xc60 schedule_preempt_disabled+0x40/0xc0 cpu_startup_entry+0x2da/0x340 start_secondary+0x28f/0x360 Call Trace: [] dump_stack+0x45/0x56 [] print_trailer+0xfd/0x170 [] object_err+0x36/0x40 [] kasan_report_error+0x1e9/0x3a0 [] kasan_report+0x40/0x50 [] ? task_numa_find_cpu+0x64c/0x890 [] __asan_load8+0x69/0xa0 [] ? find_next_bit+0xd8/0x120 [] task_numa_find_cpu+0x64c/0x890 [] task_numa_migrate+0x4ac/0x7b0 [] numa_migrate_preferred+0xb3/0xc0 [] task_numa_fault+0xb88/0xed0 [] do_numa_page+0x192/0x200 [] handle_mm_fault+0x808/0x1160 [] ? sched_clock_cpu+0x10d/0x160 [] ? native_load_tls+0x82/0xa0 [] __do_page_fault+0x218/0x750 [] ? hrtimer_try_to_cancel+0x76/0x160 [] ? schedule_hrtimeout_range_clock.part.24+0xf7/0x1c0 [] do_page_fault+0x1a/0x70 [] page_fault+0x28/0x30 [] ? do_sys_poll+0x1c4/0x6d0 [] ? enqueue_task_fair+0x4b6/0xaa0 [] ? sched_clock+0x9/0x10 [] ? resched_task+0x7a/0xc0 [] ? check_preempt_curr+0xb3/0x130 [] ? poll_select_copy_remaining+0x170/0x170 [] ? wake_up_state+0x10/0x20 [] ? drop_futex_key_refs.isra.14+0x1f/0x90 [] ? futex_requeue+0x3de/0xba0 [] ? do_futex+0xbe/0x8f0 [] ? read_tsc+0x9/0x20 [] ? ktime_get_ts+0x12d/0x170 [] ? timespec_add_safe+0x59/0xe0 [] SyS_poll+0x66/0x1a0 [] system_call_fastpath+0x1a/0x1f As commit 1effd9f19324 ("sched/numa: Fix unsafe get_task_struct() in task_numa_assign()") points out, the rcu_read_lock() cannot protect the task_struct from being freed in the finish_task_switch(). And the bug happens in the process of calculation of imp which requires the access of p->numa_faults being freed in the following path: do_exit() current->flags |= PF_EXITING; release_task() ~~delayed_put_task_struct()~~ schedule() ... ... rq->curr = next; context_switch() finish_task_switch() put_task_struct() __put_task_struct() task_numa_free() The fix here to get_task_struct() early before end of dst_rq->lock to protect the calculation process and also put_task_struct() in the corresponding point if finally the dst_rq->curr somehow cannot be assigned. Additional credit to Liang Chen who helped fix the error logic and add the put_task_struct() to the place it missed. Signed-off-by: Gavin Guo Signed-off-by: Peter Zijlstra (Intel) Cc: Andrea Arcangeli Cc: Andrew Morton Cc: Hugh Dickins Cc: Linus Torvalds Cc: Mel Gorman Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: jay.vosburgh@canonical.com Cc: liang.chen@canonical.com Link: http://lkml.kernel.org/r/1453264618-17645-1-git-send-email-gavin.guo@canonical.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit cbfe74a753e877b49dc54e9b04d5d42230ca0aed Author: Vineet Gupta Date: Fri Jan 8 12:29:10 2016 +0530 ARCv2: STAR 9000950267: Handle return from intr to Delay Slot #2 Returning to delay slot, riding an interrupti, had one loose end. AUX_USER_SP used for restoring user mode SP upon RTIE was not being setup from orig task's saved value, causing task to use wrong SP, leading to ProtV errors. The reason being: - INTERRUPT_EPILOGUE returns to a kernel trampoline, thus not expected to restore it - EXCEPTION_EPILOGUE is not used at all Fix that by restoring AUX_USER_SP explicitly in the trampoline. This was broken in the original workaround, but the error scenarios got reduced considerably since v3.14 due to following: 1. The Linuxthreads.old based userspace at the time caused many more exceptions in delay slot than the current NPTL based one. Infact with current userspace the error doesn't happen at all. 2. Return from interrupt (delay slot or otherwise) doesn't get exercised much after commit 4de0e52867d8 ("Really Re-enable interrupts to avoid deadlocks") since IRQ_ACTIVE.active being clear means most returns are as if from pure kernel (even for active interrupts) Infact the issue only happened in an experimental branch where I was tinkering with reverted 4de0e52867d8 Cc: stable@kernel.org # v4.2+ Fixes: 4255b07f2c9c ("ARCv2: STAR 9000793984: Handle return from intr to Delay Slot") Signed-off-by: Vineet Gupta arch/arc/kernel/entry-arcv2.S | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit dd4e17ab704269bce71402285f5e8b9ac24b1eff Author: John Stultz Date: Thu Jan 21 15:03:34 2016 -0800 ntp: Fix ADJ_SETOFFSET being used w/ ADJ_NANO Recently, in commit 37cf4dc3370f I forgot to check if the timeval being passed was actually a timespec (as is signaled with ADJ_NANO). This resulted in that patch breaking ADJ_SETOFFSET users who set ADJ_NANO, by rejecting valid timespecs that were compared with valid timeval ranges. This patch addresses this by checking for the ADJ_NANO flag and using the timepsec check instead in that case. Reported-by: Harald Hoyer Reported-by: Kay Sievers Fixes: 37cf4dc3370f "time: Verify time values in adjtimex ADJ_SETOFFSET to avoid overflow" Signed-off-by: John Stultz Cc: Sasha Levin Cc: Richard Cochran Cc: Prarit Bhargava Cc: David Herrmann Link: http://lkml.kernel.org/r/1453417415-19110-2-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner kernel/time/ntp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 00affcac69c7aae6c2cfcbc71f724e1c16d0b445 Author: Arnd Bergmann Date: Sun Jan 17 01:02:56 2016 +0100 soc: qcom/spm: shut up uninitialized variable warning gcc warns about the 'found' variable possibly being used uninitialized: drivers/soc/qcom/spm.c: In function 'spm_dev_probe': drivers/soc/qcom/spm.c:305:5: error: 'found' may be used uninitialized in this function [-Werror=maybe-uninitialized] However, the code is correct because we know that there is always at least one online CPU. This initializes the 'found' variable to zero before the loop so the compiler knows it does not have to warn about it. Signed-off-by: Arnd Bergmann drivers/soc/qcom/spm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cce83ba5062a301a09e0920df813bbbdd3e9dbf Author: David Sterba Date: Fri Jan 22 10:28:24 2016 +0100 btrfs: tests: switch to GFP_KERNEL There's no reason to do GFP_NOFS in tests, it's not data-heavy and memory allocation failures would affect only developers or testers. Signed-off-by: David Sterba fs/btrfs/tests/btrfs-tests.c | 10 +++++----- fs/btrfs/tests/extent-io-tests.c | 12 ++++++------ fs/btrfs/tests/inode-tests.c | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) commit 3e1e21c7bfcfa9bf06c07f48a13faca2f62b3339 Merge: 0a13dae a9cf828 Author: Linus Torvalds Date: Thu Jan 21 19:58:02 2016 -0800 Merge branch 'for-4.5/nvme' of git://git.kernel.dk/linux-block Pull NVMe updates from Jens Axboe: "Last branch for this series is the nvme changes. It's in a separate branch to avoid splitting too much between core and NVMe changes, since NVMe is still helping drive some blk-mq changes. That said, not a huge amount of core changes in here. The grunt of the work is the continued split of the code" * 'for-4.5/nvme' of git://git.kernel.dk/linux-block: (67 commits) uapi: update install list after nvme.h rename NVMe: Export NVMe attributes to sysfs group NVMe: Shutdown controller only for power-off NVMe: IO queue deletion re-write NVMe: Remove queue freezing on resets NVMe: Use a retryable error code on reset NVMe: Fix admin queue ring wrap nvme: make SG_IO support optional nvme: fixes for NVME_IOCTL_IO_CMD on the char device nvme: synchronize access to ctrl->namespaces nvme: Move nvme_freeze/unfreeze_queues to nvme core PCI/AER: include header file NVMe: Export namespace attributes to sysfs NVMe: Add pci error handlers block: remove REQ_NO_TIMEOUT flag nvme: merge iod and cmd_info nvme: meta_sg doesn't have to be an array nvme: properly free resources for cancelled command nvme: simplify completion handling nvme: special case AEN requests ... commit 0a13daedf7ffc71b0c374a036355da7fddb20d6d Merge: 6412035 a7fd9a4 Author: Linus Torvalds Date: Thu Jan 21 19:01:55 2016 -0800 Merge branch 'for-4.5/lightnvm' of git://git.kernel.dk/linux-block Pull lightnvm fixes and updates from Jens Axboe: "This should have been part of the drivers branch, but it arrived a bit late and wasn't based on the official core block driver branch. So they got a small scolding, but got a pass since it's still new. Hence it's in a separate branch. This is mostly pure fixes, contained to lightnvm/, and minor feature additions" * 'for-4.5/lightnvm' of git://git.kernel.dk/linux-block: (26 commits) lightnvm: ensure that nvm_dev_ops can be used without CONFIG_NVM lightnvm: introduce factory reset lightnvm: use system block for mm initialization lightnvm: introduce ioctl to initialize device lightnvm: core on-disk initialization lightnvm: introduce mlc lower page table mappings lightnvm: add mccap support lightnvm: manage open and closed blocks separately lightnvm: fix missing grown bad block type lightnvm: reference rrpc lun in rrpc block lightnvm: introduce nvm_submit_ppa lightnvm: move rq->error to nvm_rq->error lightnvm: support multiple ppas in nvm_erase_ppa lightnvm: move the pages per block check out of the loop lightnvm: sectors first in ppa list lightnvm: fix locking and mempool in rrpc_lun_gc lightnvm: put block back to gc list on its reclaim fail lightnvm: check bi_error in gc lightnvm: return the get_bb_tbl return value lightnvm: refactor end_io functions for sync ... commit 641203549a21ba6a701aecd05c3dfc969ec670cc Merge: 404a474 e93d12a Author: Linus Torvalds Date: Thu Jan 21 18:19:38 2016 -0800 Merge branch 'for-4.5/drivers' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: "This is the block driver pull request for 4.5, with the exception of NVMe, which is in a separate branch and will be posted after this one. This pull request contains: - A set of bcache stability fixes, which have been acked by Kent. These have been used and tested for more than a year by the community, so it's about time that they got in. - A set of drbd updates from the drbd team (Andreas, Lars, Philipp) and Markus Elfring, Oleg Drokin. - A set of fixes for xen blkback/front from the usual suspects, (Bob, Konrad) as well as community based fixes from Kiri, Julien, and Peng. - A 2038 time fix for sx8 from Shraddha, with a fix from me. - A small mtip32xx cleanup from Zhu Yanjun. - A null_blk division fix from Arnd" * 'for-4.5/drivers' of git://git.kernel.dk/linux-block: (71 commits) null_blk: use sector_div instead of do_div mtip32xx: restrict variables visible in current code module xen/blkfront: Fix crash if backend doesn't follow the right states. xen/blkback: Fix two memory leaks. xen/blkback: make st_ statistics per ring xen/blkfront: Handle non-indirect grant with 64KB pages xen-blkfront: Introduce blkif_ring_get_request xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule() xen/blkback: Free resources if connect_ring failed. xen/blocks: Return -EXX instead of -1 xen/blkback: make pool of persistent grants and free pages per-queue xen/blkback: get the number of hardware queues/rings from blkfront xen/blkback: pseudo support for multi hardware queues/rings xen/blkback: separate ring information out of struct xen_blkif xen/blkfront: correct setting for xen_blkif_max_ring_order xen/blkfront: make persistent grants pool per-queue xen/blkfront: Remove duplicate setting of ->xbdev. xen/blkfront: Cleanup of comments, fix unaligned variables, and syntax errors. xen/blkfront: negotiate number of queues/rings to be used with backend xen/blkfront: split per device io_lock ... commit 6f16886b7c050c934305b1f285c3458ff1b6e4e4 Author: Sudeep Holla Date: Thu Jan 21 11:19:29 2016 +0000 cpuidle: fix fallback mechanism for suspend to idle in absence of enter_freeze Commit 51164251f5c3 "sched / idle: Drop default_idle_call() fallback from call_cpuidle()" made find_deepest_state() return non-negative value and check all the states with index > 0. Also as a result, find_deepest_state() returns 0 even when enter_freeze callbacks are not implemented and enter_freeze_proper() is called which ends up crashing the kernel. This patch updates the check for index > 0 in cpuidle_enter_freeze and cpuidle_idle_call(when idle_should_freeze is true) to restore the suspend-to-idle functionality in absence of enter_freeze callback. Fixes: 51164251f5c3 "sched / idle: Drop default_idle_call() fallback from call_cpuidle()" Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle.c | 2 +- kernel/sched/idle.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0106ef5146f9e89e4dc9354f308ecaddb9617310 Author: Marek Szyprowski Date: Wed Jan 20 10:13:42 2016 +0100 PM / domains: fix lockdep issue for all subdomains During genpd_poweron, genpd->lock is acquired recursively for each parent (master) domain, which are separate objects. This confuses lockdep, which considers every operation on genpd->lock as being done on the same lock class. This leads to the following false positive warning: ============================================= [ INFO: possible recursive locking detected ] 4.4.0-rc4-xu3s #32 Not tainted --------------------------------------------- swapper/0/1 is trying to acquire lock: (&genpd->lock){+.+...}, at: [] __genpd_poweron+0x64/0x108 but task is already holding lock: (&genpd->lock){+.+...}, at: [] genpd_dev_pm_attach+0x168/0x1b8 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&genpd->lock); lock(&genpd->lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by swapper/0/1: #0: (&dev->mutex){......}, at: [] __driver_attach+0x48/0x98 #1: (&dev->mutex){......}, at: [] __driver_attach+0x58/0x98 #2: (&genpd->lock){+.+...}, at: [] genpd_dev_pm_attach+0x168/0x1b8 stack backtrace: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc4-xu3s #32 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x84/0xc4) [] (dump_stack) from [] (__lock_acquire+0x1f88/0x215c) [] (__lock_acquire) from [] (lock_acquire+0xa4/0xd0) [] (lock_acquire) from [] (mutex_lock_nested+0x70/0x4d4) [] (mutex_lock_nested) from [] (__genpd_poweron+0x64/0x108) [] (__genpd_poweron) from [] (genpd_dev_pm_attach+0x170/0x1b8) [] (genpd_dev_pm_attach) from [] (platform_drv_probe+0x2c/0xac) [] (platform_drv_probe) from [] (driver_probe_device+0x208/0x2fc) [] (driver_probe_device) from [] (__driver_attach+0x94/0x98) [] (__driver_attach) from [] (bus_for_each_dev+0x68/0x9c) [] (bus_for_each_dev) from [] (bus_add_driver+0x1a0/0x218) [] (bus_add_driver) from [] (driver_register+0x78/0xf8) [] (driver_register) from [] (exynos_drm_register_drivers+0x28/0x74) [] (exynos_drm_register_drivers) from [] (exynos_drm_init+0x6c/0xc4) [] (exynos_drm_init) from [] (do_one_initcall+0x90/0x1dc) [] (do_one_initcall) from [] (kernel_init_freeable+0x158/0x1f8) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xe8) [] (kernel_init) from [] (ret_from_fork+0x14/0x24) This patch replaces mutex_lock with mutex_lock_nested() and uses recursion depth to annotate each genpd->lock operation with separate lockdep subclass. Reported-by: Anand Moon Signed-off-by: Marek Szyprowski Tested-by: Anand Moon Tested-by: Tobias Jakobi Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit b26a95d435190a44483f7fbad1328f825b7901d0 Merge: 009f773 809d951 Author: Dmitry Torokhov Date: Thu Jan 21 17:27:27 2016 -0800 Merge branch 'next' into for-linus Prepare second round of input updates for 4.5 merge window. commit b1b1e15ef6b80facf76d6757649dfd7295eda29f Author: Tariq Saeed Date: Thu Jan 21 16:40:39 2016 -0800 ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock NFS on a 2 node ocfs2 cluster each node exporting dir. The lock causing the hang is the global bit map inode lock. Node 1 is master, has the lock granted in PR mode; Node 2 is in the converting list (PR -> EX). There are no holders of the lock on the master node so it should downconvert to NL and grant EX to node 2 but that does not happen. BLOCKED + QUEUED in lock res are set and it is on osb blocked list. Threads are waiting in __ocfs2_cluster_lock on BLOCKED. One thread wants EX, rest want PR. So it is as though the downconvert thread needs to be kicked to complete the conv. The hang is caused by an EX req coming into __ocfs2_cluster_lock on the heels of a PR req after it sets BUSY (drops l_lock, releasing EX thread), forcing the incoming EX to wait on BUSY without doing anything. PR has called ocfs2_dlm_lock, which sets the node 1 lock from NL -> PR, queues ast. At this time, upconvert (PR ->EX) arrives from node 2, finds conflict with node 1 lock in PR, so the lock res is put on dlm thread's dirty listt. After ret from ocf2_dlm_lock, PR thread now waits behind EX on BUSY till awoken by ast. Now it is dlm_thread that serially runs dlm_shuffle_lists, ast, bast, in that order. dlm_shuffle_lists ques a bast on behalf of node 2 (which will be run by dlm_thread right after the ast). ast does its part, sets UPCONVERT_FINISHING, clears BUSY and wakes its waiters. Next, dlm_thread runs bast. It sets BLOCKED and kicks dc thread. dc thread runs ocfs2_unblock_lock, but since UPCONVERT_FINISHING set, skips doing anything and reques. Inside of __ocfs2_cluster_lock, since EX has been waiting on BUSY ahead of PR, it wakes up first, finds BLOCKED set and skips doing anything but clearing UPCONVERT_FINISHING (which was actually "meant" for the PR thread), and this time waits on BLOCKED. Next, the PR thread comes out of wait but since UPCONVERT_FINISHING is not set, it skips updating the l_ro_holders and goes straight to wait on BLOCKED. So there, we have a hang! Threads in __ocfs2_cluster_lock wait on BLOCKED, lock res in osb blocked list. Only when dc thread is awoken, it will run ocfs2_unblock_lock and things will unhang. One way to fix this is to wake the dc thread on the flag after clearing UPCONVERT_FINISHING Orabug: 20933419 Signed-off-by: Tariq Saeed Signed-off-by: Santosh Shilimkar Reviewed-by: Wengang Wang Reviewed-by: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Reviewed-by: Joseph Qi Cc: Eric Ren Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlmglue.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ff7d080e528d8faf5bc175fd9909889af03e1566 Author: Sudip Mukherjee Date: Thu Jan 21 16:40:36 2016 -0800 reiserfs: fix dereference of ERR_PTR reiserfs_iget() returns either NULL or error code in ERR_PTR. And we were only checking for NULL, so in case of some other error we will try to dereference the ERR_PTR(-errno) thinking it to be a valid pointer. Signed-off-by: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/reiserfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2594bc37f4464bc74f2c119eb3269a643400aa0 Author: Jaewon Kim Date: Thu Jan 21 16:55:07 2016 -0800 ratelimit: fix bug in time interval by resetting right begin time rs->begin in ratelimit is set in two cases. 1) when rs->begin was not initialized 2) when rs->interval was passed For case #2, current ratelimit sets the begin to 0. This incurrs improper suppression. The begin value will be set in the next ratelimit call by 1). Then the time interval check will be always false, and rs->printed will not be initialized. Although enough time passed, ratelimit may return 0 if rs->printed is not less than rs->burst. To reset interval properly, begin should be jiffies rather than 0. For an example code below: static DEFINE_RATELIMIT_STATE(mylimit, 1, 1); for (i = 1; i <= 10; i++) { if (__ratelimit(&mylimit)) printk("ratelimit test count %d\n", i); msleep(3000); } test result in the current code shows suppression even there is 3 seconds sleep. [ 78.391148] ratelimit test count 1 [ 81.295988] ratelimit test count 2 [ 87.315981] ratelimit test count 4 [ 93.336267] ratelimit test count 6 [ 99.356031] ratelimit test count 8 [ 105.376367] ratelimit test count 10 Signed-off-by: Jaewon Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/ratelimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16fd0fe4aa92d0d621ecfe21de86f7fdcfa41947 Author: yalin wang Date: Thu Jan 21 16:40:30 2016 -0800 mm: fix kernel crash in khugepaged thread This crash is caused by NULL pointer deference, in page_to_pfn() marco, when page == NULL : Unable to handle kernel NULL pointer dereference at virtual address 00000000 Internal error: Oops: 94000006 [#1] SMP Modules linked in: CPU: 1 PID: 26 Comm: khugepaged Tainted: G W 4.3.0-rc6-next-20151022ajb-00001-g32f3386-dirty #3 PC is at khugepaged+0x378/0x1af8 LR is at khugepaged+0x418/0x1af8 Process khugepaged (pid: 26, stack limit = 0xffffffc079638020) Call trace: khugepaged+0x378/0x1af8 kthread+0xdc/0xf4 ret_from_fork+0xc/0x40 Code: 35001700 f0002c60 aa0703e3 f9009fa0 (f94000e0) ---[ end trace 637503d8e28ae69e ]--- Kernel panic - not syncing: Fatal exception CPU2: stopping CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D W 4.3.0-rc6-next-20151022ajb-00001-g32f3386-dirty #3 Hardware name: linux,dummy-virt (DT) [akpm@linux-foundation.org: fix fat-fingered merge resolution] Signed-off-by: yalin wang Acked-by: Vlastimil Babka Acked-by: Kirill A. Shutemov Acked-by: David Rientjes Cc: Cyrill Gorcunov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/huge_memory.h | 12 ++++++------ mm/huge_memory.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit 7162a1e87b3e380133dadc7909081bb70d0a7041 Author: Kirill A. Shutemov Date: Thu Jan 21 16:40:27 2016 -0800 mm: fix mlock accouting Tetsuo Handa reported underflow of NR_MLOCK on munlock. Testcase: #include #include #include #define BASE ((void *)0x400000000000) #define SIZE (1UL << 21) int main(int argc, char *argv[]) { void *addr; system("grep Mlocked /proc/meminfo"); addr = mmap(BASE, SIZE, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_LOCKED | MAP_FIXED, -1, 0); if (addr == MAP_FAILED) printf("mmap() failed\n"), exit(1); munmap(addr, SIZE); system("grep Mlocked /proc/meminfo"); return 0; } It happens on munlock_vma_page() due to unfortunate choice of nr_pages data type: __mod_zone_page_state(zone, NR_MLOCK, -nr_pages); For unsigned int nr_pages, implicitly casted to long in __mod_zone_page_state(), it becomes something around UINT_MAX. munlock_vma_page() usually called for THP as small pages go though pagevec. Let's make nr_pages signed int. Similar fixes in 6cdb18ad98a4 ("mm/vmstat: fix overflow in mod_zone_page_state()") used `long' type, but `int' here is OK for a count of the number of sub-pages in a huge page. Fixes: ff6a6da60b89 ("mm: accelerate munlock() treatment of THP pages") Signed-off-by: Kirill A. Shutemov Reported-by: Tetsuo Handa Tested-by: Tetsuo Handa Cc: Michel Lespinasse Acked-by: Michal Hocko Cc: [4.4+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6ec57f4b92e9bae4617f7d98a054d45370284bb Author: Kirill A. Shutemov Date: Thu Jan 21 16:40:25 2016 -0800 thp: change pmd_trans_huge_lock() interface to return ptl After THP refcounting rework we have only two possible return values from pmd_trans_huge_lock(): success and failure. Return-by-pointer for ptl doesn't make much sense in this case. Let's convert pmd_trans_huge_lock() to return ptl on success and NULL on failure. Signed-off-by: Kirill A. Shutemov Suggested-by: Linus Torvalds Cc: Minchan Kim Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 12 ++++++++---- include/linux/huge_mm.h | 16 ++++++++-------- mm/huge_memory.c | 24 ++++++++++++++---------- mm/memcontrol.c | 6 ++++-- mm/mincore.c | 3 ++- 5 files changed, 36 insertions(+), 25 deletions(-) commit 5610b1254e3689b6ef8ebe2db260709a74da06c8 Author: Huacai Chen Date: Thu Jan 21 21:09:50 2016 +0800 MIPS: hpet: Choose a safe value for the ETIME check This patch is borrowed from x86 hpet driver and explaind below: Due to the overly intelligent design of HPETs, we need to workaround the problem that the compare value which we write is already behind the actual counter value at the point where the value hits the real compare register. This happens for two reasons: 1) We read out the counter, add the delta and write the result to the compare register. When a NMI hits between the read out and the write then the counter can be ahead of the event already. 2) The write to the compare register is delayed by up to two HPET cycles in AMD chipsets. We can work around this by reading back the compare register to make sure that the written value has hit the hardware. But that is bad performance wise for the normal case where the event is far enough in the future. As we already know that the write can be delayed by up to two cycles we can avoid the read back of the compare register completely if we make the decision whether the delta has elapsed already or not based on the following calculation: cmp = event - actual_count; If cmp is less than 64 HPET clock cycles, then we decide that the event has happened already and return -ETIME. That covers the above #1 and #2 problems which would cause a wait for HPET wraparound (~306 seconds). Signed-off-by: Huacai Chen Cc: Aurelien Jarno Cc: Steven J. Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12162/ Signed-off-by: Ralf Baechle arch/mips/loongson64/loongson-3/hpet.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 5754843225f78ac7cbe142a6899890a9733a5a5d Author: Huacai Chen Date: Thu Jan 21 21:09:49 2016 +0800 MIPS: Loongson-3: Fix SMP_ASK_C0COUNT IPI handler When Core-0 handle SMP_ASK_C0COUNT IPI, we should make other cores to see the result as soon as possible (especially when Store-Fill-Buffer is enabled). Otherwise, C0_Count syncronization makes no sense. BTW, array is more suitable than per-cpu variable for syncronization, and there is a corner case should be avoid: C0_Count of Core-0 can be really 0. Signed-off-by: Huacai Chen Cc: Aurelien Jarno Cc: Steven J. Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen Cc: linux-mips@linux-mips.org Cc: Patchwork: https://patchwork.linux-mips.org/patch/12160/ Signed-off-by: Ralf Baechle arch/mips/loongson64/loongson-3/smp.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 5188129b8c9f58ba089bfd3809a163a8c087c797 Author: Huacai Chen Date: Thu Jan 21 21:09:48 2016 +0800 MIPS: Loongson-3: Improve -march option and move it to Platform If GCC >= 4.9 and Binutils >=2.25, we use -march=loongson3a, otherwise we use -march=mips64r2, this can slightly improve performance. Besides, arch/mips/loongson64/Platform is a better location rather than arch/ mips/Makefile. Signed-off-by: Huacai Chen Cc: Aurelien Jarno Cc: Steven J. Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12161/ Signed-off-by: Ralf Baechle arch/mips/Makefile | 10 ---------- arch/mips/loongson64/Platform | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 10 deletions(-) commit 6e52684467b2c135e07e638469cd1d78bd8286ac Author: Huacai Chen Date: Thu Jan 21 21:09:47 2016 +0800 MIPS: Cleanup the unused __arch_local_irq_restore() function In history, __arch_local_irq_restore() is only used by SMTC. However, SMTC support has been removed since 3.16, this patch remove the unused function. Signed-off-by: Huacai Chen Cc: Aurelien Jarno Cc: Steven J. Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12159/ Signed-off-by: Ralf Baechle arch/mips/include/asm/irqflags.h | 30 ------------------------------ arch/mips/lib/mips-atomic.c | 30 +----------------------------- 2 files changed, 1 insertion(+), 59 deletions(-) commit 03beaec80d57e7a540b1990188f8a97a076da6de Author: Allen Hubbe Date: Thu Jan 21 12:53:50 2016 -0500 NTB: Fix macro parameter conflict with field name If the parameter given to the macro is replaced throughout the macro as it is evaluated. The intent is that the macro parameter should replace the only the first parameter to container_of(). However, the way the macro was written, it would also inadvertantly replace a structure field name. If a parameter of any other name is given to the macro, it will fail to compile, if the structure does not contain a field of the same name. At worst, it will compile, and hide improper access of an unintended field in the structure. Change the macro parameter name, so it does not conflict with the structure field name. Signed-off-by: Allen Hubbe Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_intel.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a1b3695820aa490e58915d720a1438069813008b Author: Xiangliang Yu Date: Thu Jan 21 19:47:05 2016 +0800 NTB: Add support for AMD PCI-Express Non-Transparent Bridge This adds support for AMD's PCI-Express Non-Transparent Bridge (NTB) device on the Zeppelin platform. The driver connnects to the standard NTB sub-system interface, with modification to add hooks for power management in a separate patch. The AMD NTB device has 3 memory windows, 16 doorbell, 16 scratch-pad registers, and supports up to 16 PCIe lanes running a Gen3 speeds. Signed-off-by: Xiangliang Yu Reviewed-by: Allen Hubbe Signed-off-by: Jon Mason MAINTAINERS | 6 + drivers/ntb/hw/Kconfig | 1 + drivers/ntb/hw/Makefile | 1 + drivers/ntb/hw/amd/Kconfig | 7 + drivers/ntb/hw/amd/Makefile | 1 + drivers/ntb/hw/amd/ntb_hw_amd.c | 1143 +++++++++++++++++++++++++++++++++++++++ drivers/ntb/hw/amd/ntb_hw_amd.h | 217 ++++++++ 7 files changed, 1376 insertions(+) commit f0442df2156a2171e40f1643c60103e6333f4e7e Author: John Keeping Date: Thu Jan 21 18:19:34 2016 +0000 drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION If DRM_FBDEV_EMULATION is not selected in the config then we can save a bit of space by not including the framebuffer code. Signed-off-by: John Keeping drivers/gpu/drm/rockchip/Makefile | 3 ++- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit 1a40b95374f680625318ab61d81958e949e0afe3 Author: Mike Frysinger Date: Mon Jan 18 06:32:30 2016 -0500 sparc: Fix system call tracing register handling. A system call trace trigger on entry allows the tracing process to inspect and potentially change the traced process's registers. Account for that by reloading the %g1 (syscall number) and %i0-%i5 (syscall argument) values. We need to be careful to revalidate the range of %g1, and reload the system call table entry it corresponds to into %l7. Reported-by: Mike Frysinger Signed-off-by: David S. Miller Tested-by: Mike Frysinger arch/sparc/kernel/entry.S | 17 +++++++++++++++++ arch/sparc/kernel/syscalls.S | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit c10910c323bb9e7fc53ba25c83d1adeb9fb20878 Author: David S. Miller Date: Thu Jan 21 15:51:17 2016 -0800 sparc: Hook up copy_file_range syscall. Signed-off-by: David S. Miller arch/sparc/include/uapi/asm/unistd.h | 3 ++- arch/sparc/kernel/systbls_32.S | 2 +- arch/sparc/kernel/systbls_64.S | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) commit 6a84f57241e1fb9fb6772256f538d1073359a32d Author: Gayatri Kammela Date: Thu Jan 21 14:02:39 2016 -0800 raid6/algos.c : bug fix : Add the missing definitions to the pq.h file Adding these pr_info and pr_err definitions so as to allow code to be compiled successfully for testing in userspace, since the printk has been replaced by pr_info and pr_err in algos.c Absence of these definitions result in the compilation errors such as ' undefined reference to `pr_info' ' ' undefined reference to `pr_err' ' Cc: NeilBrown Cc: Anton Blanchard Cc: Fenghua Yu Signed-off-by: Gayatri Kammela Signed-off-by: Shaohua Li include/linux/raid/pq.h | 2 ++ 1 file changed, 2 insertions(+) commit 117aa41e8020fe493bbb677ebe828c3a4b380185 Author: Al Viro Date: Thu Jan 21 17:41:23 2016 -0500 [regression] fix braino in fs/dlm/user.c it's "bugger off if we got ERR_PTR", not the other way round... Signed-off-by: Bob Peterson Signed-off-by: Al Viro fs/dlm/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4877be9019baaf1432f9117bff4873e4ad518d91 Author: Johannes Weiner Date: Thu Jan 21 15:56:28 2016 -0500 net: sock: remove dead cgroup methods from struct proto The cgroup methods are no longer used after baac50bbc3cd ("net: tcp_memcontrol: simplify linkage between socket and page counter"). The hunk to delete them was included in the original patch but must have gotten lost during conflict resolution on the way upstream. Fixes: baac50bbc3cd ("net: tcp_memcontrol: simplify linkage between socket and page counter") Signed-off-by: Johannes Weiner Signed-off-by: David S. Miller include/net/sock.h | 12 ------------ 1 file changed, 12 deletions(-) commit 4850d43143e72563556b9ba371e26b2b48599321 Author: Suman Anna Date: Mon Sep 14 18:37:12 2015 -0500 ARM: OMAP2+: Remove legacy mailbox device instantiation The legacy-style mailbox device creation is supported currently only for OMAP3, as all other SoCs are DT-boot only. Even on this SoC, there are no client drivers that utilize these mailbox devices. So, clean up the legacy-style mailbox device instantiation logic. The mailbox devices are already present and supported for the DT boot on OMAP3. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren arch/arm/mach-omap2/devices.c | 28 ---------------------------- 1 file changed, 28 deletions(-) commit cf19f3ab89de1c088387ce744b0d4723be35b068 Author: Keerthy Date: Fri Jul 17 16:08:02 2015 -0500 ARM: dts: AM4372: Add ti,mbox-send-noirq to wkup_m3 mailbox Add ti,mbox-send-noirq to wkup_m3 mailbox so that messages using wkup_m3 mailbox are sent without triggering any further interrupts. This is required to be able to send multiple messages to the WkupM3 after the mailbox usage logic adjustment in the wkup_m3_ipc driver. Signed-off-by: Keerthy Acked-by: Dave Gerlach [s-anna@ti.com: revise commit description] Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 1 + 1 file changed, 1 insertion(+) commit 2800971f731e4491b71f44bf311452ab0f94a062 Author: Dave Gerlach Date: Fri Jul 17 16:08:01 2015 -0500 ARM: dts: AM33xx: Add ti,mbox-send-noirq to wkup_m3 mailbox Add ti,mbox-send-noirq to wkup_m3 mailbox so that messages using wkup_m3 mailbox are sent without triggering any further interrupts. This is needed to achieve lower power numbers during CPU idle on AM33xx. Signed-off-by: Dave Gerlach [s-anna@ti.com: revise commit description] Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 1 + 1 file changed, 1 insertion(+) commit 404a47410c26a115123885977053e9a1a4460929 Merge: eae2177 9fd4470 Author: Linus Torvalds Date: Thu Jan 21 13:02:41 2016 -0800 Merge branch 'uaccess' (batched user access infrastructure) Expose an interface to allow users to mark several accesses together as being user space accesses, allowing batching of the surrounding user space access markers (SMAP on x86, PAN on arm64, domain register switching on arm). This is currently only used for the user string lenth and copying functions, where the SMAP overhead on x86 drowned the actual user accesses (only noticeable on newer microarchitectures that support SMAP in the first place, of course). * user access batching branch: Use the new batched user accesses in generic user string handling Add 'unsafe' user access functions for batched accesses x86: reorganize SMAP handling in user space accesses commit 6272dcc6beebbc2d8cf4165b628169e878f143e0 Author: Anna Schumaker Date: Fri Jan 15 16:54:15 2016 -0500 NFS: Simplify nfs_request_add_commit_list() arguments I noticed that all the callers of this function pass cinfo->mds->list as an argument in addition to the cinfo structure itself. Let's get rid of the extra argument, since it doesn't seem to be adding anything. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/filelayout/filelayout.c | 2 +- fs/nfs/internal.h | 2 +- fs/nfs/write.c | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) commit b819ed4b2afcaf86a370a004d7b2252f981f0c50 Author: Trond Myklebust Date: Thu Jan 21 14:48:49 2016 -0500 pNFS/flexfiles: Improve merging of errors in LAYOUTRETURN When we hit 22 errors, we start to overflow the memory buffers allocated to the LAYOUTRETURN errors. The issue is that currently, RPC call reply ordering determines how successful we are in merging errors that refer to contiguous READ or WRITE requests. Fix is to use an insertion sort to help detect contiguity. Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayoutdev.c | 99 +++++++++++++------------------ 1 file changed, 40 insertions(+), 59 deletions(-) commit eae21770b4fed5597623aad0d618190fa60426ff Merge: e9f57eb 9f273c2 Author: Linus Torvalds Date: Thu Jan 21 12:32:08 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge third patch-bomb from Andrew Morton: "I'm pretty much done for -rc1 now: - the rest of MM, basically - lib/ updates - checkpatch, epoll, hfs, fatfs, ptrace, coredump, exit - cpu_mask simplifications - kexec, rapidio, MAINTAINERS etc, etc. - more dma-mapping cleanups/simplifications from hch" * emailed patches from Andrew Morton : (109 commits) MAINTAINERS: add/fix git URLs for various subsystems mm: memcontrol: add "sock" to cgroup2 memory.stat mm: memcontrol: basic memory statistics in cgroup2 memory controller mm: memcontrol: do not uncharge old page in page cache replacement Documentation: cgroup: add memory.swap.{current,max} description mm: free swap cache aggressively if memcg swap is full mm: vmscan: do not scan anon pages if memcg swap limit is hit swap.h: move memcg related stuff to the end of the file mm: memcontrol: replace mem_cgroup_lruvec_online with mem_cgroup_online mm: vmscan: pass memcg to get_scan_count() mm: memcontrol: charge swap to cgroup2 mm: memcontrol: clean up alloc, online, offline, free functions mm: memcontrol: flatten struct cg_proto mm: memcontrol: rein in the CONFIG space madness net: drop tcp_memcontrol.c mm: memcontrol: introduce CONFIG_MEMCG_LEGACY_KMEM mm: memcontrol: allow to disable kmem accounting for cgroup2 mm: memcontrol: account "kmem" consumers in cgroup2 memory controller mm: memcontrol: move kmem accounting code to CONFIG_MEMCG mm: memcontrol: separate kmem code from legacy tcp accounting code ... commit e9f57ebcba563e0cd532926cab83c92bb4d79360 Merge: 5c89e9e 84889d4 Author: Linus Torvalds Date: Thu Jan 21 12:20:46 2016 -0800 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "This contains several bug fixes and a new mount option 'default_permissions' that allows read-only exported NFS filesystems to be used as lower layer" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: check dentry positiveness in ovl_cleanup_whiteouts() ovl: setattr: check permissions before copy-up ovl: root: copy attr ovl: move super block magic number to magic.h ovl: use a minimal buffer in ovl_copy_xattr ovl: allow zero size xattr ovl: default permissions commit 5c89e9ea7ef1feaa147325b2ab47a89a147fb903 Merge: d434215 0b5da8d Author: Linus Torvalds Date: Thu Jan 21 12:14:24 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: "This adds SEEK_HOLE and SEEK_DATA support in lseek" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: add support for SEEK_HOLE and SEEK_DATA in lseek commit 0a9c453eef65fed569757e21423400cfcd55e206 Author: Teresa Remmet Date: Wed Jan 20 13:40:35 2016 +0100 net: phy: smsc: Fix disabling energy detect mode When the lan87xx_read_status function is getting called the energy detect mode is enabled again even if it has been disabled by device tree. Added private struct to check the energy detect status. Signed-off-by: Teresa Remmet Signed-off-by: David S. Miller drivers/net/phy/smsc.c | 54 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 10 deletions(-) commit 8e0c2ab262b804f87d26499695e6bfa5f366780c Merge: 2c83229 e308cb8 Author: David S. Miller Date: Thu Jan 21 12:04:59 2016 -0800 Merge branch 'mvneta-multi-clk' Jisheng Zhang says: ==================== net: mvneta: support more than one clk Some platforms may provide more than one clk for the mvneta IP, for example Marvell BG4CT provides "core" clk for the mac core, and "axi" clk for the AXI bus logic. This series tries to addess the "more than one clk" issue. Note: to support BG4CT, we have lots of refactor work to do, eg. BG4CT doesn't have mbus concept etc. Since v2: - Name the optional clock as "bus", which is a bit more flexible. Since v1: - Add Thomas Acks to patch1 and patch2. - make sure the headers are really sorted (some headers are still unsorted in v1). - disable axi clk before disabling core clk, Thank Thomas. - update dt binding as Thomas suggested. ==================== Signed-off-by: David S. Miller commit e308cb835c56e7a8b93664797925549a42df8e68 Author: Jisheng Zhang Date: Wed Jan 20 19:27:25 2016 +0800 net: mvneta: update clocks property and document additional clock-names Signed-off-by: Jisheng Zhang Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 15cc4a4a99ebfbbb696e85dca30680b522811a44 Author: Jisheng Zhang Date: Wed Jan 20 19:27:24 2016 +0800 net: mvneta: get optional bus clk Some platforms may provide more than one clk for the mvneta IP, for example Marvell BG4CT provides one clk for the mac core, and one clk for the AXI bus logic. Obviously this bus clk also need to be enabled. This patch adds this optional "bus" clk support. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2804ba4edef5b4de01d4c580eb9ab4000f822a53 Author: Jisheng Zhang Date: Wed Jan 20 19:27:23 2016 +0800 net: mvneta: Try to get named core clock first Some platforms may provide more than one clk for the mvneta IP, for example Marvell BG4CT provides one clk for the mac core, and one clk for the AXI bus logic. To support for more than one clock, we'll need to distinguish between the clock by name. Change clock probing to first try to get "core" clock before falling back to unnamed clock. Signed-off-by: Jisheng Zhang Acked-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0e03f563a04207cc8e5db6afe63309a585995de7 Author: Jisheng Zhang Date: Wed Jan 20 19:27:22 2016 +0800 net: mvneta: sort the headers in alphabetic order Sorting the headers in alphabetic order will help to reduce the conflict when adding new headers in the future. Signed-off-by: Jisheng Zhang Acked-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 2c832293e09be2f998ea916650927c8ccd5b4b3b Author: Jisheng Zhang Date: Wed Jan 20 16:36:25 2016 +0800 net: mvneta: fix trivial cut-off issue in mvneta_ethtool_update_stats When s->type is T_REG_64, the high 32bits are lost in val. This patch fixes this trivial issue. Signed-off-by: Jisheng Zhang Fixes: 9b0cdefa4cd5 ("net: mvneta: add ethtool statistics") Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 48189d6aaf1ed1b382666289a94a50e5269a8946 Author: yankejian Date: Wed Jan 20 16:00:19 2016 +0800 net: hns: enet specifies a reference to dsaf This patch replace the assoication between dsaf and enet from string matching to object reference. It requires the DTS to be updated within BIOS. Thanks god it can be done for all released boards. Signed-off-by: Kejian Yan Acked-by: Rob Herring Acked-by: Yisen Zhuang Signed-off-by: David S. Miller .../devicetree/bindings/net/hisilicon-hns-dsaf.txt | 5 +---- .../devicetree/bindings/net/hisilicon-hns-nic.txt | 7 ++++--- arch/arm64/boot/dts/hisilicon/hip05_hns.dtsi | 19 +++++++++---------- drivers/net/ethernet/hisilicon/hns/hnae.c | 17 +++++++---------- drivers/net/ethernet/hisilicon/hns/hnae.h | 7 +++++-- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 4 ++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 10 +--------- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 1 + drivers/net/ethernet/hisilicon/hns/hns_enet.c | 15 +++++++++------ drivers/net/ethernet/hisilicon/hns/hns_enet.h | 2 +- 10 files changed, 42 insertions(+), 45 deletions(-) commit d43421565bf0510d35e6a39ebf96586ad486f3aa Merge: 859e762 9662e32 Author: Linus Torvalds Date: Thu Jan 21 11:52:16 2016 -0800 Merge tag 'pci-v4.5-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "PCI changes for the v4.5 merge window: Enumeration: - Simplify config space size computation (Bjorn Helgaas) - Avoid iterating through ROM outside the resource window (Edward O'Callaghan) - Support PCIe devices with short cfg_size (Jason S. McMullan) - Add Netronome vendor and device IDs (Jason S. McMullan) - Limit config space size for Netronome NFP6000 family (Jason S. McMullan) - Add Netronome NFP4000 PF device ID (Simon Horman) - Limit config space size for Netronome NFP4000 (Simon Horman) - Print warnings for all invalid expansion ROM headers (Vladis Dronov) Resource management: - Fix minimum allocation address overwrite (Christoph Biedl) PCI device hotplug: - acpiphp_ibm: Fix null dereferences on null ibm_slot (Colin Ian King) - pciehp: Always protect pciehp_disable_slot() with hotplug mutex (Guenter Roeck) - shpchp: Constify hpc_ops structure (Julia Lawall) - ibmphp: Remove unneeded NULL test (Julia Lawall) Power management: - Make ASPM sysfs link_state_store() consistent with link_state_show() (Andy Lutomirski) Virtualization - Add function 1 DMA alias quirk for Lite-On/Plextor M6e/Marvell 88SS9183 (Tim Sander) MSI: - Remove empty pci_msi_init_pci_dev() (Bjorn Helgaas) - Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD (Grygorii Strashko) - Initialize MSI capability for all architectures (Guilherme G. Piccoli) - Relax msi_domain_alloc() to support parentless MSI irqdomains (Liu Jiang) ARM Versatile host bridge driver: - Remove unused pci_sys_data structures (Lorenzo Pieralisi) Broadcom iProc host bridge driver: - Hide CONFIG_PCIE_IPROC (Arnd Bergmann) - Do not use 0x in front of %pap (Dmitry V. Krivenok) - Update iProc PCIe device tree binding (Ray Jui) - Add PAXC interface support (Ray Jui) - Add iProc PCIe MSI device tree binding (Ray Jui) - Add iProc PCIe MSI support (Ray Jui) Freescale i.MX6 host bridge driver: - Use gpio_set_value_cansleep() (Fabio Estevam) - Add support for active-low reset GPIO (Petr Štetiar) HiSilicon host bridge driver: - Add support for HiSilicon Hip06 PCIe host controllers (Gabriele Paoloni) Intel VMD host bridge driver: - Export irq_domain_set_info() for module use (Keith Busch) - x86/PCI: Allow DMA ops specific to a PCI domain (Keith Busch) - Use 32 bit PCI domain numbers (Keith Busch) - Add driver for Intel Volume Management Device (VMD) (Keith Busch) Qualcomm host bridge driver: - Document PCIe devicetree bindings (Stanimir Varbanov) - Add Qualcomm PCIe controller driver (Stanimir Varbanov) - dts: apq8064: add PCIe devicetree node (Stanimir Varbanov) - dts: ifc6410: enable PCIe DT node for this board (Stanimir Varbanov) Renesas R-Car host bridge driver: - Add support for R-Car H3 to pcie-rcar (Harunobu Kurokawa) - Allow DT to override default window settings (Phil Edworthy) - Convert to DT resource parsing API (Phil Edworthy) - Revert "PCI: rcar: Build pcie-rcar.c only on ARM" (Phil Edworthy) - Remove unused pci_sys_data struct from pcie-rcar (Phil Edworthy) - Add runtime PM support to pcie-rcar (Phil Edworthy) - Add Gen2 PHY setup to pcie-rcar (Phil Edworthy) - Add gen2 fallback compatibility string for pci-rcar-gen2 (Simon Horman) - Add gen2 fallback compatibility string for pcie-rcar (Simon Horman) Synopsys DesignWare host bridge driver: - Simplify control flow (Bjorn Helgaas) - Make config accessor override checking symmetric (Bjorn Helgaas) - Ensure ATU is enabled before IO/conf space accesses (Stanimir Varbanov) Miscellaneous: - Add of_pci_get_host_bridge_resources() stub (Arnd Bergmann) - Check for PCI_HEADER_TYPE_BRIDGE equality, not bitmask (Bjorn Helgaas) - Fix all whitespace issues (Bogicevic Sasa) - x86/PCI: Simplify pci_bios_{read,write} (Geliang Tang) - Use to_pci_dev() instead of open-coding it (Geliang Tang) - Use kobj_to_dev() instead of open-coding it (Geliang Tang) - Use list_for_each_entry() to simplify code (Geliang Tang) - Fix typos in (Thomas Petazzoni) - x86/PCI: Clarify AMD Fam10h config access restrictions comment (Tomasz Nowicki)" * tag 'pci-v4.5-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (58 commits) PCI: Add function 1 DMA alias quirk for Lite-On/Plextor M6e/Marvell 88SS9183 PCI: Limit config space size for Netronome NFP4000 PCI: Add Netronome NFP4000 PF device ID x86/PCI: Add driver for Intel Volume Management Device (VMD) PCI/AER: Use 32 bit PCI domain numbers x86/PCI: Allow DMA ops specific to a PCI domain irqdomain: Export irq_domain_set_info() for module use PCI: host: Add of_pci_get_host_bridge_resources() stub genirq/MSI: Relax msi_domain_alloc() to support parentless MSI irqdomains PCI: rcar: Add Gen2 PHY setup to pcie-rcar PCI: rcar: Add runtime PM support to pcie-rcar PCI: designware: Make config accessor override checking symmetric PCI: ibmphp: Remove unneeded NULL test ARM: dts: ifc6410: enable PCIe DT node for this board ARM: dts: apq8064: add PCIe devicetree node PCI: hotplug: Use list_for_each_entry() to simplify code PCI: rcar: Remove unused pci_sys_data struct from pcie-rcar PCI: hisi: Add support for HiSilicon Hip06 PCIe host controllers PCI: Avoid iterating through memory outside the resource window PCI: acpiphp_ibm: Fix null dereferences on null ibm_slot ... commit 859e762544902c3e09b3f8d994aab80ea5ff5042 Merge: 96461fd ff01c94 Author: Linus Torvalds Date: Thu Jan 21 11:45:02 2016 -0800 Merge tag 'pwm/for-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This set of changes contains a new driver for OMAP (using the dual-mode timers) as well as an assortment of fixes all across the board" * tag 'pwm/for-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: Mark all devices as "might sleep" pwm: omap-dmtimer: Potential NULL dereference on error pwm: add HAS_IOMEM dependency to PWM_FSL_FTM pwm: Add PWM driver for OMAP using dual-mode timers pwm: rcar: Improve accuracy of frequency division setting pwm: lpc32xx: return ERANGE, if requested period is not supported pwm: lpc32xx: fix and simplify duty cycle and period calculations pwm: lpc32xx: make device usable with common clock framework pwm: lpc32xx: correct number of PWM channels from 2 to 1 dt: lpc32xx: pwm: update documentation of LPC32xx PWM device dt: lpc32xx: pwm: correct LPC32xx PWM device node example pwm: fsl-ftm: Fix clock enable/disable when using PM pwm: lpss: Rework the sequence of programming PWM_SW_UPDATE pwm: lpss: Select core part automatically pwm: lpss: Update PWM setting for Broxton pwm: bcm2835: Fix email address specification pwm: bcm2835: Prevent division by zero pwm: bcm2835: Calculate scaler in ->config() pwm: lpss: Remove ->free() callback commit 96461fdb3ace6753d29eaa43387bcd6d540710e9 Merge: 278e5ac f9f3f86 Author: Linus Torvalds Date: Thu Jan 21 11:33:36 2016 -0800 Merge tag 'cris-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris Pull CRIS updates from Jesper Nilsson: "Just some fixups for section mismatches from Guenter" * tag 'cris-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris: cris: Fix section mismatches in architecture startup code cris: debugport: Fix section mismatches commit 278e5acae1321978686e85ca92906054a36aa19b Merge: 30f0530 2f1b007 Author: Linus Torvalds Date: Thu Jan 21 11:27:34 2016 -0800 Merge tag 'for-4.5' of git://git.osdn.jp/gitroot/uclinux-h8/linux Pull h8300 updates from Yoshinori Sato: - Add KGDB support - zImage fix - various cleanup * tag 'for-4.5' of git://git.osdn.jp/gitroot/uclinux-h8/linux: h8300: System call entry enable interrupt. h8300: show_stack cleanup h8300: Restraint of warning. h8300: Add KGDB support. irqchip: renesas-h8s: Replace ctrl_outw/ctrl_inw with writew/readw h8300: signal stack fix h8300: Add LZO compression h8300: zImage alignment fix clk: h8300: Remove "sh73a0-" part from compatible value h8300: zImage alignment fix commit e62a123b8ef7c5dc4db2c16383d506860ad21b47 Author: Eric Dumazet Date: Thu Jan 21 08:02:54 2016 -0800 tcp: fix NULL deref in tcp_v4_send_ack() Neal reported crashes with this stack trace : RIP: 0010:[] tcp_v4_send_ack+0x41/0x20f ... CR2: 0000000000000018 CR3: 000000044005c000 CR4: 00000000001427e0 ... [] tcp_v4_reqsk_send_ack+0xa5/0xb4 [] tcp_check_req+0x2ea/0x3e0 [] tcp_rcv_state_process+0x850/0x2500 [] tcp_v4_do_rcv+0x141/0x330 [] sk_backlog_rcv+0x21/0x30 [] tcp_recvmsg+0x75d/0xf90 [] inet_recvmsg+0x80/0xa0 [] sock_aio_read+0xee/0x110 [] do_sync_read+0x6f/0xa0 [] SyS_read+0x1e1/0x290 [] system_call_fastpath+0x16/0x1b The problem here is the skb we provide to tcp_v4_send_ack() had to be parked in the backlog of a new TCP fastopen child because this child was owned by the user at the time an out of window packet arrived. Before queuing a packet, TCP has to set skb->dev to NULL as the device could disappear before packet is removed from the queue. Fix this issue by using the net pointer provided by the socket (being a timewait or a request socket). IPv6 is immune to the bug : tcp_v6_send_response() already gets the net pointer from the socket if provided. Fixes: 168a8f58059a ("tcp: TCP Fast Open Server - main code path") Reported-by: Neal Cardwell Signed-off-by: Eric Dumazet Cc: Jerry Chu Cc: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 35e2d1152b22eae99c961affbe85374bef05a775 Author: Jesse Gross Date: Wed Jan 20 16:22:47 2016 -0800 tunnels: Allow IPv6 UDP checksums to be correctly controlled. When configuring checksums on UDP tunnels, the flags are different for IPv4 vs. IPv6 (and reversed). However, when lightweight tunnels are enabled the flags used are always the IPv4 versions, which are ignored in the IPv6 code paths. This uses the correct IPv6 flags, so checksums can be controlled appropriately. Fixes: a725e514 ("vxlan: metadata based tunneling for IPv6") Fixes: abe492b4 ("geneve: UDP checksum configuration via netlink") Signed-off-by: Jesse Gross Acked-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/geneve.c | 4 ++-- drivers/net/vxlan.c | 23 ++++++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) commit 4f2aaf7dd95b2f82a01469049d4aee8071bcd935 Merge: ceb6560 49f7a47 Author: David S. Miller Date: Thu Jan 21 10:48:51 2016 -0800 Merge branch 'fix-phy-ignore-interrupts' Florian Fainelli says: ==================== net: phy: Finally fix PHY_IGNORE_INTERRUPTS This patch series finally fixes how PHY_IGNORE_INTERRUPTS are treated by avoiding to poll the PHY *and* getting notified from link state changes by the Ethernet MAC interrupt service routine. Tested with bcmgenet since this is the HW that I have access to. Targetting the "net" tree since these are bugfixes, but I would like Woojun and Andrew to take a look and test that on their respective HW setups as well. ==================== Signed-off-by: David S. Miller commit 49f7a471e4d172fc80140beccf6b3409b117b130 Author: Florian Fainelli Date: Mon Jan 18 19:33:08 2016 -0800 net: bcmgenet: Properly configure PHY to ignore interrupt By the time we execute bcmgenet_mii_probe(), the MDIO bus structure has long been allocated and registered. Overirring the PHY interrupt using the MDIO bus structure has no chance to work anymore, because of_mdiobus_register() has call phy_device_create() for use, which copied the MDIO bus address's irq for the PHY into the PHY device "irq" member. Since we do have a proper reference to a PHY device in bcmgenet_mii_probe(), just assign the desired IRQ value here. Fixes: aa09677cba42 ("net: bcmgenet: add MDIO routines") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit deccd16f91f930af8e91ffbbfc839d0ad8da999d Author: Florian Fainelli Date: Mon Jan 18 19:33:07 2016 -0800 net: phy: Fix phy_mac_interrupt() Commit 5ea94e7686a3 ("phy: add phy_mac_interrupt()") to use with PHY_IGNORE_INTERRUPT added a cancel_work_sync() into phy_mac_interrupt() which is allowed to sleep, whereas phy_mac_interrupt() is expected to be callable from interrupt context. Now that we have fixed how the PHY state machine treats PHY_IGNORE_INTERRUPT with respect to state changes, we can just set the new link state, and queue the PHY state machine for execution so it is going to read the new link state. For that to work properly, we need to update phy_change() not to try to invoke any interrupt callbacks if we have configured the PHY device for PHY_IGNORE_INTERRUPT, because that PHY device and its driver are not required to implement those. Fixes: 5ea94e7686a3 ("phy: add phy_mac_interrupt() to use with PHY_IGNORE_INTERRUPT") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit d5c3d84657db57bd23ecd58b97f1c99dd42a7b80 Author: Florian Fainelli Date: Mon Jan 18 19:33:06 2016 -0800 net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS Commit 2c7b49212a86 ("phy: fix the use of PHY_IGNORE_INTERRUPT") changed a hunk in phy_state_machine() in the PHY_RUNNING case which was not needed. The change essentially makes the PHY library treat PHY devices with PHY_IGNORE_INTERRUPT to keep polling for the PHY device, even though the intent is not to do it. Fix this by reverting that specific hunk, which makes the PHY state machine wait for state changes, and stay in the PHY_RUNNING state for as long as needed. Fixes: 2c7b49212a86 ("phy: fix the use of PHY_IGNORE_INTERRUPT") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit ceb6560a4cf3a2667209e6869f4fb8f6da6ef55f Author: Sudip Mukherjee Date: Thu Jan 21 10:42:31 2016 +0530 net/irda: bfin_sir: remove duplicate defines The defconfig build of blackfin is failing with the error: arch/blackfin/include/asm/bfin_serial.h:269:0: warning: "port_membase" redefined drivers/net/irda/bfin_sir.h:85:0: note: this is the location of the previous definition arch/blackfin/include/asm/bfin_serial.h:382:0: warning: "get_lsr_cache" redefined drivers/net/irda/bfin_sir.h:86:0: note: this is the location of the previous definition arch/blackfin/include/asm/bfin_serial.h:383:0: warning: "put_lsr_cache" redefined drivers/net/irda/bfin_sir.h:87:0: note: this is the location of the previous definition port_membase, get_lsr_cache, put_lsr_cache are already defined in the architecture files, no need to define them again in the driver. Signed-off-by: Sudip Mukherjee Signed-off-by: David S. Miller drivers/net/irda/bfin_sir.h | 3 --- 1 file changed, 3 deletions(-) commit 7e01726a6853e032536ed7e75c1e1232872ff318 Author: Ilya Dryomov Date: Mon Jan 18 16:53:31 2016 +0100 libceph: remove outdated comment MClientMount{,Ack} are long gone. The receipt of bare monmap doesn't actually indicate a mount success as we are yet to authenticate at that point in time. Signed-off-by: Ilya Dryomov net/ceph/mon_client.c | 4 ---- 1 file changed, 4 deletions(-) commit f6cdb2928df87c2277ec691101e5843db6cb96ea Author: Ilya Dryomov Date: Fri Jan 15 13:20:01 2016 +0100 libceph: kill off ceph_x_ticket_handler::validity With it gone, no need to preserve ceph_timespec in process_one_ticket() either. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/auth_x.c | 6 ++---- net/ceph/auth_x.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) commit 187d131dd983fb1ab1c5d0d9ee98ab6511f252cd Author: Ilya Dryomov Date: Thu Jan 14 17:31:51 2016 +0100 libceph: invalidate AUTH in addition to a service ticket If we fault due to authentication, we invalidate the service ticket we have and request a new one - the idea being that if a service rejected our authorizer, it must have expired, despite mon_client's attempts at periodic renewal. (The other possibility is that our ticket is too new and the service hasn't gotten it yet, in which case invalidating isn't necessary but doesn't hurt.) Invalidating just the service ticket is not enough, though. If we assume a failure on mon_client's part to renew a service ticket, we have to assume the same for the AUTH ticket. If our AUTH ticket is bad, we won't get any service tickets no matter how hard we try, so invalidate AUTH ticket along with the service ticket. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/auth_x.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 6abe097db59e1a5af7f082709f38bd95c54ccca1 Author: Ilya Dryomov Date: Thu Jan 14 16:35:35 2016 +0100 libceph: fix authorizer invalidation, take 2 Back in 2013, commit 4b8e8b5d78b8 ("libceph: fix authorizer invalidation") tried to fix authorizer invalidation issues by clearing validity field. However, nothing ever consults this field, so it doesn't force us to request any new secrets in any way and therefore we never get out of the exponential backoff mode: [ 129.973812] libceph: osd2 192.168.122.1:6810 connect authorization failure [ 130.706785] libceph: osd2 192.168.122.1:6810 connect authorization failure [ 131.710088] libceph: osd2 192.168.122.1:6810 connect authorization failure [ 133.708321] libceph: osd2 192.168.122.1:6810 connect authorization failure [ 137.706598] libceph: osd2 192.168.122.1:6810 connect authorization failure ... AFAICT this was the case at the time 4b8e8b5d78b8 was merged, too. Using timespec solely as a bool isn't nice, so introduce a new have_key flag, specifically for this purpose. Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/auth_x.c | 27 ++++++++++++++++++++++----- net/ceph/auth_x.h | 1 + 2 files changed, 23 insertions(+), 5 deletions(-) commit f6330cc1f04b7dcb84b572d402cdacf7e275a022 Author: Ilya Dryomov Date: Wed Jan 13 14:32:57 2016 +0100 libceph: clear messenger auth_retry flag if we fault Commit 20e55c4cc758 ("libceph: clear messenger auth_retry flag when we authenticate") got us only half way there. We clear the flag if the second attempt succeeds, but it also needs to be cleared if that attempt fails, to allow for the exponential backoff to kick in. Otherwise, if ->should_authenticate() thinks our keys are valid, we will busy loop, incrementing auth_retry to no avail: process_connect ffff880079a63830 got BADAUTHORIZER attempt 1 process_connect ffff880079a63830 got BADAUTHORIZER attempt 2 process_connect ffff880079a63830 got BADAUTHORIZER attempt 3 process_connect ffff880079a63830 got BADAUTHORIZER attempt 4 process_connect ffff880079a63830 got BADAUTHORIZER attempt 5 ... Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil net/ceph/messenger.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 67645d7619738e51c668ca69f097cb90b5470422 Author: Ilya Dryomov Date: Mon Dec 28 13:18:34 2015 +0300 libceph: fix ceph_msg_revoke() There are a number of problems with revoking a "was sending" message: (1) We never make any attempt to revoke data - only kvecs contibute to con->out_skip. However, once the header (envelope) is written to the socket, our peer learns data_len and sets itself to expect at least data_len bytes to follow front or front+middle. If ceph_msg_revoke() is called while the messenger is sending message's data portion, anything we send after that call is counted by the OSD towards the now revoked message's data portion. The effects vary, the most common one is the eventual hang - higher layers get stuck waiting for the reply to the message that was sent out after ceph_msg_revoke() returned and treated by the OSD as a bunch of data bytes. This is what Matt ran into. (2) Flat out zeroing con->out_kvec_bytes worth of bytes to handle kvecs is wrong. If ceph_msg_revoke() is called before the tag is sent out or while the messenger is sending the header, we will get a connection reset, either due to a bad tag (0 is not a valid tag) or a bad header CRC, which kind of defeats the purpose of revoke. Currently the kernel client refuses to work with header CRCs disabled, but that will likely change in the future, making this even worse. (3) con->out_skip is not reset on connection reset, leading to one or more spurious connection resets if we happen to get a real one between con->out_skip is set in ceph_msg_revoke() and before it's cleared in write_partial_skip(). Fixing (1) and (3) is trivial. The idea behind fixing (2) is to never zero the tag or the header, i.e. send out tag+header regardless of when ceph_msg_revoke() is called. That way the header is always correct, no unnecessary resets are induced and revoke stands ready for disabled CRCs. Since ceph_msg_revoke() rips out con->out_msg, introduce a new "message out temp" and copy the header into it before sending. Cc: stable@vger.kernel.org # 4.0+ Reported-by: Matt Conner Signed-off-by: Ilya Dryomov Tested-by: Matt Conner Reviewed-by: Sage Weil include/linux/ceph/messenger.h | 2 +- net/ceph/messenger.c | 76 ++++++++++++++++++++++++++++++++---------- 2 files changed, 59 insertions(+), 19 deletions(-) commit 10bcee149f62e7c5122f79aefc30d610b413280b Author: Geliang Tang Date: Fri Dec 18 23:33:30 2015 +0800 libceph: use list_for_each_entry_safe Use list_for_each_entry_safe() instead of list_for_each_safe() to simplify the code. Signed-off-by: Geliang Tang [idryomov@gmail.com: nuke call to list_splice_init() as well] Signed-off-by: Ilya Dryomov net/ceph/messenger.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 99c88e6900fb05d267ae9f6d5e15dc7192ba6f8d Author: Yan, Zheng Date: Wed Dec 30 11:32:46 2015 +0800 ceph: use i_size_{read,write} to get/set i_size Cap message from MDS can update i_size. In that case, we don't hold i_mutex. So it's unsafe to directly access inode->i_size while holding i_mutex. Signed-off-by: Yan, Zheng fs/ceph/addr.c | 5 ++--- fs/ceph/cache.c | 8 +++----- fs/ceph/file.c | 30 ++++++++++++++++-------------- fs/ceph/inode.c | 8 ++++---- 4 files changed, 25 insertions(+), 26 deletions(-) commit 5be0389dac662995eade757ec678931f0be23d33 Author: Yan, Zheng Date: Thu Dec 24 08:44:20 2015 +0800 ceph: re-send AIO write request when getting -EOLDSNAP error When receiving -EOLDSNAP from OSD, we need to re-send corresponding write request. Due to locking issue, we can send new request inside another OSD request's complete callback. So we use worker to re-send request for AIO write. Signed-off-by: Yan, Zheng fs/ceph/file.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 4 deletions(-) commit c8fe9b17d055fe80e1a1591f5900ce41fbf6b796 Author: Yan, Zheng Date: Wed Dec 23 21:23:38 2015 +0800 ceph: Asynchronous IO support The basic idea of AIO support is simple, just call kiocb::ki_complete() in OSD request's complete callback. But there are several special cases. when IO span multiple objects, we need to wait until all OSD requests are complete, then call kiocb::ki_complete(). Error handling in this case is tricky too. For simplify, AIO both span multiple objects and extends i_size are not allowed. Another special case is check EOF for reading (other client can write to the file and extend i_size concurrently). For simplify, the direct-IO/AIO code path does do the check, fallback to normal syn read instead. Signed-off-by: Yan, Zheng fs/ceph/file.c | 397 ++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 278 insertions(+), 119 deletions(-) commit 458c4703aea04674f0b5f63b43cf5669a602a110 Author: Minfei Huang Date: Sat Dec 19 10:54:59 2015 +0800 ceph: Avoid to propagate the invalid page point The variant pagep will still get the invalid page point, although ceph fails in function ceph_update_writeable_page. To fix this issue, Assigne the page to pagep until there is no failure in function ceph_update_writeable_page. Signed-off-by: Minfei Huang Signed-off-by: Yan, Zheng fs/ceph/addr.c | 1 - 1 file changed, 1 deletion(-) commit f9cac5ac08b630c87c56671ce99a80310cffb2c6 Author: Yan, Zheng Date: Thu Dec 17 15:36:39 2015 +0800 ceph: fix double page_unlock() in page_mkwrite() ceph_update_writeable_page() unlocks the page on errors, so page_mkwrite() should not unlock the page again. Signed-off-by: Yan, Zheng fs/ceph/addr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1761b22966e61494f51be76bc3b10e9c1ff809ad Author: Markus Elfring Date: Mon Nov 23 20:16:45 2015 +0100 rbd: delete an unnecessary check before rbd_dev_destroy() The rbd_dev_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 17ddc49b9c5c8847be745d13d91259248d59114b Author: Geliang Tang Date: Mon Nov 16 21:46:32 2015 +0800 libceph: use list_next_entry instead of list_entry_next list_next_entry has been defined in list.h, so I replace list_entry_next with it. Signed-off-by: Geliang Tang Signed-off-by: Ilya Dryomov net/ceph/messenger.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 79a3ed2e98557a2844e75c203e742f9c229ad1d3 Author: Yaowei Bai Date: Tue Nov 17 14:52:19 2015 +0800 ceph: ceph_frag_contains_value can be boolean This patch makes ceph_frag_contains_value return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai Signed-off-by: Yan, Zheng include/linux/ceph/ceph_frag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eade1fe75fd3ad89c10d011969c0eed8f13e28e0 Author: Yaowei Bai Date: Tue Nov 17 14:52:18 2015 +0800 ceph: remove unused functions in ceph_frag.h These functions were introduced in commit 3d14c5d2b ("ceph: factor out libceph from Ceph file system"). Howover, there's no user of these functions since then, so remove them for simplicity. Signed-off-by: Yaowei Bai Signed-off-by: Yan, Zheng include/linux/ceph/ceph_frag.h | 35 ----------------------------------- 1 file changed, 35 deletions(-) commit 14e46e04958df740c6c6a94849f176159a333f13 Author: David Sterba Date: Thu Jan 21 18:54:41 2016 +0100 btrfs: synchronize incompat feature bits with sysfs files The files under /sys/fs/UUID/features get out of sync with the actual incompat bits set for the filesystem if they change after mount (eg. the LZO compression). Synchronize the feature bits with the sysfs files representing them right after we set/clear them. Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 7 +++++++ fs/btrfs/ioctl.c | 4 ++++ fs/btrfs/super.c | 4 ++++ fs/btrfs/volumes.c | 2 ++ 4 files changed, 17 insertions(+) commit 45c815f06b80031659c63d7b93e580015d6024dd Author: Alexander Shishkin Date: Tue Jan 19 17:14:29 2016 +0200 perf: Synchronously free aux pages in case of allocation failure We are currently using asynchronous deallocation in the error path in AUX mmap code, which is unnecessary and also presents a problem for users that wish to probe for the biggest possible buffer size they can get: they'll get -EINVAL on all subsequent attemts to allocate a smaller buffer before the asynchronous deallocation callback frees up the pages from the previous unsuccessful attempt. Currently, gdb does that for allocating AUX buffers for Intel PT traces. More specifically, overwrite mode of AUX pmus that don't support hardware sg (some implementations of Intel PT, for instance) is limited to only one contiguous high order allocation for its buffer and there is no way of knowing its size without trying. This patch changes error path freeing to be synchronous as there won't be any contenders for the AUX pages at that point. Reported-by: Markus Metzger Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/1453216469-9509-1-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/ring_buffer.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 0e1eb0a1f5530bd751fe5bd2c62caa470aaa9643 Author: Stephane Eranian Date: Thu Jan 7 08:25:46 2016 +0100 perf/x86: add Intel SkyLake uncore IMC PMU support This patch enables the uncore_imc PMU for Intel SkyLake Desktop processors (Core i7-6700, model 94). It is possible to compute memory read/write bandwidth using: $ perf stat -a -e uncore_imc/data_reads/,uncore_imc/data_writes/ .... Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: kan.liang@intel.com Link: http://lkml.kernel.org/r/1452151546-8853-1-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_uncore.c | 3 +++ arch/x86/kernel/cpu/perf_event_intel_uncore.h | 1 + arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+) commit 63b6da39bb38e8f1a1ef3180d32a39d6baf9da84 Author: Peter Zijlstra Date: Thu Jan 14 16:05:37 2016 +0100 perf: Fix perf_event_exit_task() race There is a race against perf_event_exit_task() vs event_function_call(),find_get_context(),perf_install_in_context() (iow, everyone). Since there is no permanent marker on a context that its dead, it is quite possible that we access (and even modify) a context after its passed through perf_event_exit_task(). For instance, find_get_context() might find the context still installed, but by the time we get to perf_install_in_context() it might already have passed through perf_event_exit_task() and be considered dead, we will however still add the event to it. Solve this by marking a ctx dead by setting its ctx->task value to -1, it must be !0 so we still know its a (former) task context. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 151 +++++++++++++++++++++++++++++---------------------- 1 file changed, 85 insertions(+), 66 deletions(-) commit c97f473643a9d3e618c0f0426b926bc3a3e23944 Author: Peter Zijlstra Date: Thu Jan 14 10:51:03 2016 +0100 perf: Add more assertions Try to trigger warnings before races do damage. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fae3fde65138b6071b1b0e0b567d4058a8b6a88c Author: Peter Zijlstra Date: Mon Jan 11 15:00:50 2016 +0100 perf: Collapse and fix event_function_call() users There is one common bug left in all the event_function_call() users, between loading ctx->task and getting to the remote_function(), ctx->task can already have been changed. Therefore we need to double check and retry if ctx->task != current. Insert another trampoline specific to event_function_call() that checks for this and further validates state. This also allows getting rid of the active/inactive functions. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar include/linux/perf_event.h | 2 +- kernel/events/core.c | 365 +++++++++++++++++++----------------------- kernel/events/hw_breakpoint.c | 2 +- 3 files changed, 168 insertions(+), 201 deletions(-) commit 32132a3d0d5d6f127388be3e3fd7759f798c2eb4 Author: Peter Zijlstra Date: Mon Jan 11 15:40:59 2016 +0100 perf: Specialize perf_event_exit_task() The perf_remove_from_context() usage in __perf_event_exit_task() is different from the other usages in that this site has already detached and scheduled out the task context. This will stand in the way of stronger assertions checking the (task) context scheduling invariants. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 39a4364076921511e212bc42f94fbf062c989576 Author: Peter Zijlstra Date: Mon Jan 11 12:46:35 2016 +0100 perf: Fix task context scheduling There is a very nasty problem wrt disabling the perf task scheduling hooks. Currently we {set,clear} ctx->is_active on every __perf_event_task_sched_{in,out}, _however_ this means that if we disable these calls we'll have task contexts with ->is_active set that are not active and 'active' task contexts without ->is_active set. This can result in event_function_call() looping on the ctx->is_active condition basically indefinitely. Resolve this by changing things such that contexts without events do not set ->is_active like we used to. From this invariant it trivially follows that if there are no (task) events, every task ctx is inactive and disabling the context switch hooks is harmless. This leaves two places that need attention (and already had accumulated weird and wonderful hacks to work around, without recognising this actual problem). Namely: - perf_install_in_context() will need to deal with installing events in an inactive context, meaning it cannot rely on ctx-is_active for its IPIs. - perf_remove_from_context() will have to mark a context as inactive when it removes the last event. For specific detail, see the patch/comments. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Dmitry Vyukov Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 155 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 91 insertions(+), 64 deletions(-) commit 63e30d3e52d4d85854ce6c761ffc6ab55209a630 Author: Peter Zijlstra Date: Fri Jan 8 11:39:10 2016 +0100 perf: Make ctx->is_active and cpuctx->task_ctx consistent For no apparent reason and to great confusion the rules for ctx->is_active and cpuctx->task_ctx are different. This means that its not always possible to find all active (task) contexts. Fix this such that if ctx->is_active gets set, we also set (or verify) cpuctx->task_ctx. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 25432ae96a9889774a05bf5f0f6fd8dbcdec5e72 Author: Peter Zijlstra Date: Fri Jan 8 11:05:09 2016 +0100 perf: Optimize perf_sched_events() usage It doesn't make sense to take up-to _4_ references on perf_sched_events() per event, avoid doing this. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit aee7dbc45f8aa976913de9b352fa6da816f1f3cd Author: Peter Zijlstra Date: Fri Jan 8 10:45:11 2016 +0100 perf: Simplify/fix perf_event_enable() event scheduling Like perf_enable_on_exec(), perf_event_enable() event scheduling has problems respecting the context hierarchy when trying to schedule events (for example, it will try and add a pinned event without first removing existing flexible events). So simplify it by using the new ctx_resched() call which will DTRT. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) commit 8833d0e286c12fd4456089a7a553faf4921e4b08 Author: Peter Zijlstra Date: Fri Jan 8 10:02:37 2016 +0100 perf: Use task_ctx_sched_out() We have a function that does exactly what we want here, use it. This reduces the amount of cpuctx->task_ctx muckery. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3e349507d12de93b08b0aa814fc2aa0dee91c5ba Author: Peter Zijlstra Date: Fri Jan 8 10:01:18 2016 +0100 perf: Fix perf_enable_on_exec() event scheduling There are two problems with the current perf_enable_on_exec() event scheduling: - the newly enabled events will be immediately scheduled irrespective of their ctx event list order. - there's a hole in the ctx->lock between scheduling the events out and putting them back on. Esp. the latter issue is a real problem because a hole in event scheduling leaves the thing in an observable inconsistent state, confusing things. Fix both issues by first doing the enable iteration and at the end, when there are newly enabled events, reschedule the ctx in one go. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) commit 5947f6576e2edee1189b00bf5b2a3f2c653caa6b Author: Peter Zijlstra Date: Fri Jan 8 09:43:38 2016 +0100 perf: Remove stale comment The comment here is horribly out of date, remove it. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 7 ------- 1 file changed, 7 deletions(-) commit 70a0165752944e0be0b1de4a9020473079962c18 Author: Peter Zijlstra Date: Fri Jan 8 09:29:16 2016 +0100 perf: Fix cgroup scheduling in perf_enable_on_exec() There is a comment that states that perf_event_context_sched_in() will also switch in the cgroup events, I cannot find it does so. Therefore all the resulting logic goes out the window too. Clean that up. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) commit 7e41d17753e6e0da55d343997454dd4fbe8d28a8 Author: Peter Zijlstra Date: Fri Jan 8 09:21:40 2016 +0100 perf: Fix cgroup event scheduling There appears to be a problem in __perf_event_task_sched_in() wrt cgroup event scheduling. The normal event scheduling order is: CPU pinned Task pinned CPU flexible Task flexible And since perf_cgroup_sched*() only schedules the cpu context, we must call this _before_ adding the task events. Note: double check what happens on the ctx switch optimization where the task ctx isn't scheduled. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit c994d6136738fd8b24a79f5ad8df40a6a79e2cf7 Author: Peter Zijlstra Date: Fri Jan 8 09:20:23 2016 +0100 perf: Add lockdep assertions Make various bugs easier to see. Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 444e75169872f668eb890f19ec1f32dfc632e704 Author: David Sterba Date: Thu Jan 21 18:50:40 2016 +0100 btrfs: sysfs: introduce helper for syncing bits with sysfs files The files under /sys/fs/UUID/features get out of sync with the actual incompat bits set for the filesystem if they change after mount. We're going to sync them and need a helper to do that. Signed-off-by: David Sterba fs/btrfs/sysfs.c | 30 ++++++++++++++++++++++++++++++ fs/btrfs/sysfs.h | 3 +++ 2 files changed, 33 insertions(+) commit 3b5bb73bd88d1d90163c91e7cad50b12725dbb1c Author: David Sterba Date: Thu Jan 21 18:36:46 2016 +0100 btrfs: sysfs: add free-space-tree bit attribute The incompat bit representing the newly added free space tree feature is missing. Right now it will be listed only among features supported by the module, not per-fs. Signed-off-by: David Sterba fs/btrfs/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 34356f64ac0df2326fa50e2d4bca6f7c03ed16c1 Author: Leon Romanovsky Date: Tue Dec 29 17:01:30 2015 +0200 IB/mlx5: Unify CQ create flags check The create_cq() can receive creation flags which were used differently by two commits which added create_cq extended command and cross-channel. The merged code caused to not accept any flags at all. This patch unifies the check into one function and one return error code. Fixes: 972ecb821379 ("IB/mlx5: Add create_cq extended command") Fixes: 051f263098a9 ("IB/mlx5: Add driver cross-channel support") Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 9 +-------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 ++- 2 files changed, 3 insertions(+), 9 deletions(-) commit ad5f8e964cd0a88c746577aab2c6ea26e3b26673 Author: majd@mellanox.com Date: Thu Jan 14 19:13:08 2016 +0200 IB/mlx5: Expose Raw Packet QP to user space consumers Added Raw Packet QP modify functionality which will enable user space consumers to use it. Since Raw Packet QP is built of SQ and RQ sub-objects, therefore Raw Packet QP state changes are implemented by changing the state of the sub-objects. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 139 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 127 insertions(+), 12 deletions(-) commit 427c1e7bcd7e5cd62160fcda0ce215ebbe0da3a1 Author: majd@mellanox.com Date: Thu Jan 14 19:13:07 2016 +0200 {IB, net}/mlx5: Move the modify QP operation table to mlx5_ib When modifying a QP, the desired operation was determined in the mlx5_core using a transition table that takes the current state, the final state, and returns the desired operation. Since this logic will be used for Raw Packet QP, move the operation table to the mlx5_ib. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 53 ++++++++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 48 ++----------------------- include/linux/mlx5/qp.h | 3 +- 3 files changed, 50 insertions(+), 54 deletions(-) commit 75850d0bcece42416ba81bd38e4c719f101c832d Author: majd@mellanox.com Date: Thu Jan 14 19:13:06 2016 +0200 IB/mlx5: Support setting Ethernet priority for Raw Packet QPs When the user changes the Address Vector(AV) in the modify QP, he provides an SL. This SL should be translated to Ethernet Priority by taking the 3 LSB bits, and modify the QP's TIS according to this Ethernet priority. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 38 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 12 +++++++ include/linux/mlx5/mlx5_ifc.h | 9 ++++- include/linux/mlx5/transobj.h | 2 ++ 4 files changed, 57 insertions(+), 4 deletions(-) commit 6d2f89df04b796e7dcc4f9f8dc0d8f04ad7f144b Author: majd@mellanox.com Date: Thu Jan 14 19:13:05 2016 +0200 IB/mlx5: Add Raw Packet QP query functionality Since Raw Packet QP is composed of RQ and SQ, the IB QP's state is derived from the sub-objects. Therefore we need to query each one of the sub-objects, and decide on the IB QP's state. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 191 ++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 24 +++ include/linux/mlx5/qp.h | 11 +- include/linux/mlx5/transobj.h | 2 + 4 files changed, 205 insertions(+), 23 deletions(-) commit 0fb2ed66a14c8c34096d6a8cff5112356c5e9ea2 Author: majd@mellanox.com Date: Thu Jan 14 19:13:04 2016 +0200 IB/mlx5: Add create and destroy functionality for Raw Packet QP This patch adds support for Raw Packet QP for the mlx5 device. Raw Packet QP, unlike other QP types, has no matching mlx5_core_qp object but rather it is built of RQ/SQ/TIR/TIS/TD mlx5_core object. Since the SQ and RQ work-queue (WQ) buffers are not contiguous like other QPs, we allocate separate buffers in the user-space and pass the address of each one of them separately to the kernel. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 28 ++- drivers/infiniband/hw/mlx5/qp.c | 354 +++++++++++++++++++++++++++++++++-- drivers/infiniband/hw/mlx5/user.h | 1 + 3 files changed, 365 insertions(+), 18 deletions(-) commit 19098df2da784c851532c78bd570cb1c8f4aff52 Author: majd@mellanox.com Date: Thu Jan 14 19:13:03 2016 +0200 IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types Extract specific IB QP fields to mlx5_ib_qp_trans structure. The mlx5_core QP object resides in mlx5_ib_qp_base, which all QP types inherit from. When we need to find mlx5_ib_qp using mlx5_core QP (event handling and co), we use a pointer that resides in mlx5_ib_qp_base. In addition, we delete all redundant fields that weren't used anywhere in the code: -doorbell_qpn -sq_max_wqes_per_wr -sq_spare_wqes Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 38 +++++--- drivers/infiniband/hw/mlx5/odp.c | 29 +++--- drivers/infiniband/hw/mlx5/qp.c | 175 +++++++++++++++++++++-------------- 3 files changed, 147 insertions(+), 95 deletions(-) commit 146d2f1af3245a10b13eef263687e54f4e253d1d Author: majd@mellanox.com Date: Thu Jan 14 19:13:02 2016 +0200 IB/mlx5: Allocate a Transport Domain for each ucontext Transport Domain groups several TIS and TIR object. By grouping these object, it defines wheather local loopback packets that are sent from the TIS objects in the group are received by the TIR objects in the same group. Allocate a Transport Domain(TD) for each user context to be used in the future by Raw Packet QP for Self-Loopback Control. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 16 +++++++++++++++- drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) commit a14c2d4beee5633081d344f130b81e5ee76e4585 Author: majd@mellanox.com Date: Thu Jan 14 19:13:01 2016 +0200 net/mlx5_core: Warn on unsupported events of QP/RQ/SQ When an event arrives on QP/RQ/SQ, check whether it's supported, and print a warning message otherwise. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/qp.c | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit e2013b212f9f201c71fc5826ce41f39ebece0852 Author: majd@mellanox.com Date: Thu Jan 14 19:13:00 2016 +0200 net/mlx5_core: Add RQ and SQ event handling RQ/SQ will be used to implement IB verbs QPs, so the IB QP affiliated events are affiliated also with SQs and RQs. Since SQ, RQ and QP resource numbers do not share the same name space, a queue type field was added to the event data to specify the SW object that the event is affiliated with. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/eq.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/qp.c | 126 +++++++++++++++++++++++---- include/linux/mlx5/device.h | 12 ++- include/linux/mlx5/driver.h | 8 +- include/linux/mlx5/qp.h | 8 ++ 5 files changed, 132 insertions(+), 23 deletions(-) commit 8d7f9ecb371a15e48754fa816e3f716517df7b13 Author: majd@mellanox.com Date: Thu Jan 14 19:12:59 2016 +0200 net/mlx5_core: Export transport objects To be used by mlx5_ib in the following patches for implementing RAW PACKET QP. Add mlx5_core_ prefix to alloc and delloc transport_domain since they are exposed now. Signed-off-by: Majd Dibbiny Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +- drivers/net/ethernet/mellanox/mlx5/core/srq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 14 +++- drivers/net/ethernet/mellanox/mlx5/core/transobj.h | 72 --------------------- include/linux/mlx5/transobj.h | 74 ++++++++++++++++++++++ 6 files changed, 90 insertions(+), 80 deletions(-) commit f72300c56c3bedac5fdb22cdc90f6633dc858c84 Author: Haggai Abramovsky Date: Thu Jan 14 19:12:58 2016 +0200 IB/mlx5: Expose CQE version to user-space Per user context, work with CQE version that both the user-space and the kernel support. Report this CQE version via the response of the alloc_ucontext command. Signed-off-by: Haggai Abramovsky Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 15 +++++++++++---- drivers/infiniband/hw/mlx5/user.h | 8 +++++++- 2 files changed, 18 insertions(+), 5 deletions(-) commit cfb5e088e26ae0e12064171f645ed022cf6d55b9 Author: Haggai Abramovsky Date: Thu Jan 14 19:12:57 2016 +0200 IB/mlx5: Add CQE version 1 support to user QPs and SRQs Enforce working with CQE version 1 when the user supports CQE version 1 and asked to work this way. If the user still works with CQE version 0, then use the default CQE version to tell the Firmware that the user still works in the older mode. After this patch, the kernel still reports CQE version 0. Signed-off-by: Haggai Abramovsky Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 23 ++++++++++++++ drivers/infiniband/hw/mlx5/qp.c | 14 ++++++++ drivers/infiniband/hw/mlx5/srq.c | 41 ++++++++++++++++++++---- drivers/infiniband/hw/mlx5/user.h | 44 +++++++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 --- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 7 ---- drivers/net/ethernet/mellanox/mlx5/core/srq.c | 2 -- 7 files changed, 114 insertions(+), 21 deletions(-) commit dfbee8598d24668b882bcc97d28d5108441cc88a Author: Haggai Abramovsky Date: Thu Jan 14 19:12:56 2016 +0200 IB/mlx5: Fix data validation in mlx5_ib_alloc_ucontext The wrong buffer size was passed to ib_is_udata_cleared. Signed-off-by: Haggai Abramovsky Reviewed-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2deeb4772971e56d5bdac0bd3375d5eadaa827fd Author: Kaike Wan Date: Thu Jan 21 08:41:31 2016 -0500 IB/sa: Fix netlink local service GFP crash The rdma netlink local service registers a handler to handle RESOLVE response and another handler to handle SET_TIMEOUT request. The first thing these handlers do is to call netlink_capable() to check the access right of the received skb to make sure that the sender has root access. Under normal conditions, such responses and requests will be directly forwarded to the handlers without going through the netlink_dump pathway (see ibnl_rcv_msg() in drivers/infiniband/core/netlink.c). However, a user application could send a RESOLVE request (not response) to the local service, which will fall into the netlink_dump pathway, where a new skb will be created without initializing the control block. This new skb will be eventually forwarded to the local service RESOLVE response handler. Unfortunately, netlink_capable() will cause general protection fault if the skb's control block is not initialized. This patch will address the problem by checking the skb first. Signed-off-by: Kaike Wan Reported-by: Dmitry Vyukov Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 40ed9444cd2421cceedb35bb8d8ff913a5ae1ac3 Author: Takashi Iwai Date: Thu Jan 21 17:43:08 2016 +0100 ALSA: timer: Introduce disconnect op to snd_timer_instance Instead of the previous ugly hack, introduce a new op, disconnect, to snd_timer_instance object for handling the wake up of pending tasks more cleanly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109431 Signed-off-by: Takashi Iwai include/sound/timer.h | 1 + sound/core/timer.c | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 230323dac060123c340cf75997971145a42661ee Author: Takashi Iwai Date: Thu Jan 21 17:19:31 2016 +0100 ALSA: timer: Handle disconnection more safely Currently ALSA timer device doesn't take the disconnection into account very well; it merely unlinks the timer device at disconnection callback but does nothing else. Because of this, when an application accessing the timer device is disconnected, it may release the resource before actually closed. In most cases, it results in a warning message indicating a leftover timer instance like: ALSA: timer xxxx is busy? But basically this is an open race. This patch tries to address it. The strategy is like other ALSA devices: namely, - Manage card's refcount at each open/close - Wake up the pending tasks at disconnection - Check the shutdown flag appropriately at each possible call Note that this patch has one ugly hack to handle the wakeup of pending tasks. It'd be cleaner to introduce a new disconnect op to snd_timer_instance ops. But since it would lead to internal ABI breakage and it eventually increase my own work when backporting to stable kernels, I took a different path to implement locally in timer.c. A cleanup patch will follow at next for 4.5 kernel. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109431 Cc: # v3.15+ Signed-off-by: Takashi Iwai sound/core/timer.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit ff01c944cfa939f3474c28d88223213494aedf0b Author: Thierry Reding Date: Thu Jan 21 15:04:59 2016 +0100 pwm: Mark all devices as "might sleep" Commit d1cd21427747 ("pwm: Set enable state properly on failed call to enable") introduced a mutex that is needed to protect internal state of PWM devices. Since that mutex is acquired in pwm_set_polarity() and in pwm_enable() and might potentially block, all PWM devices effectively become "might sleep". It's rather pointless to keep the .can_sleep field around, but given that there are external users let's postpone the removal for the next release cycle. Signed-off-by: Thierry Reding drivers/pwm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64a67d4762ce3ce4c9466eadd152d825fbf84967 Author: Martin Fuzzey Date: Wed Jan 20 16:08:03 2016 +0100 mmc: pwrseq_simple: Make reset-gpios optional to match doc The DT binding doc says reset-gpios is an optional property but the code currently bails out if it is omitted. This is a regression since it breaks previously working device trees. Fix it by restoring the original documented behaviour. Fixes: ce037275861e ("mmc: pwrseq_simple: use GPIO descriptors array API") Tested-by: Tony Lindgren Signed-off-by: Martin Fuzzey Signed-off-by: Ulf Hansson drivers/mmc/core/pwrseq_simple.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 6551b8c9b76ec3cee1386dbeeab528c019fd732c Author: Linus Walleij Date: Thu Jan 21 13:04:47 2016 +0100 ARM: realview: fix device tree build As it happens, two obj-$(CONFIG_FOO) += foo.o variables are above obj-y := core.o, which doesn't work: the += directives need to add something to the build and doesn't work if obj-y is not set first, so move the obj-y to be on top and everything builds nicely again. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/mach-realview/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2256b8d2ff6c8e994161ab15b6e6d0314d3174ae Author: Arnd Bergmann Date: Wed Jan 20 12:46:24 2016 +0100 ASoC: rt5659: avoid unused variable warning for rt5659_acpi_match The newly added rt5659 codec driver unconditionally defines an ACPI device match table but then uses ACPI_PTR() to remove the only reference to it, so we get a harmless build warning: sound/soc/codecs/rt5659.c:4200:30: warning: 'rt5659_acpi_match' defined but not used [-Wunused-variable] static struct acpi_device_id rt5659_acpi_match[] = { This changes both the OF match table and the ACPI match table to follow the same style, using ACPI_PTR/of_match_ptr to make the reference conditional, and using an #ifdef to hide the table. This also adds the missing MODULE_DEVICE_TABLE for the OF case and adapts the formatting to the same style. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit b28785fa9cede0d4f47310ca0dd2a4e1d50478b5 Author: Bard Liao Date: Thu Jan 21 13:13:40 2016 +0800 ASoC: rt5645: fix the shift bit of IN1 boost The shift bit of IN1 boost gain control is 12. Signed-off-by: Bard Liao Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/rt5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d514c720219a4c0e1c2612c1d830592bfaf5a03 Author: Bard Liao Date: Thu Jan 21 14:10:48 2016 +0800 ASoC: rt286: fix capture doesn't work at some cases RT286_CBJ_CTRL1(0x4f) bit 10 is needed for headset capture. It will be turned off when "VREF" widget is on and be turned on when bias level is ON. It is odd. And if "VREF" is turned on in bias level is ON, RT286_CBJ_CTRL1(0x4f) bit 10 will be turned off. This patch move the bit control from rt286_set_bias_level and rt298_vref_event to rt286_jack_detect. So it will be turned on once a jack is plugged in. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt286.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) commit 22c43f36b5cf22a7e4506cb3a53f3ad2a43f60f7 Author: Andy Shevchenko Date: Wed Jan 20 22:13:41 2016 +0200 x86/platform/quark: Print boundaries correctly When we print values, such as @size, we have to understand that it's derived from [begin .. end] as: size = end - begin + 1 On the opposite the @end is derived from the rest as: end = begin + size - 1 Correct the IMR code to print values correctly. Note that @__end_rodata actually points to the next address after the aligned .rodata section. Signed-off-by: Andy Shevchenko Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Ong, Boon Leong Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1453320821-64328-1-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-quark/imr.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 0e2bce7411542fa336ef49041471ea3e7dc911f8 Author: Stephen Rothwell Date: Thu Jan 21 13:05:20 2016 +1100 powerpc: Remove newly added extra definition of pmd_dirty Commit d5d6a443b243 ("arch/powerpc/include/asm/pgtable-ppc64.h: add pmd_[dirty|mkclean] for THP") added a new identical definition of pmd_dirty(). Remove it again. Cc: Minchan Kim Cc: Andrew Morton Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 1 - 1 file changed, 1 deletion(-) commit c153693d7eb9eeb28478aa2deaaf0b4e7b5ff5e9 Author: Alan Modra Date: Fri Jan 15 20:52:22 2016 +1100 powerpc: Simplify module TOC handling PowerPC64 uses the symbol .TOC. much as other targets use _GLOBAL_OFFSET_TABLE_. It identifies the value of the GOT pointer (or in powerpc parlance, the TOC pointer). Global offset tables are generally local to an executable or shared library, or in the kernel, module. Thus it does not make sense for a module to resolve a relocation against .TOC. to the kernel's .TOC. value. A module has its own .TOC., and indeed the powerpc64 module relocation processing ignores the kernel value of .TOC. and instead calculates a module-local value. This patch removes code involved in exporting the kernel .TOC., tweaks modpost to ignore an undefined .TOC., and the module loader to twiddle the section symbol so that .TOC. isn't seen as undefined. Note that if the kernel was compiled with -msingle-pic-base then ELFv2 would not have function global entry code setting up r2. In that case the module call stubs would need to be modified to set up r2 using the kernel .TOC. value, requiring some of this code to be reinstated. mpe: Furthermore a change in binutils master (not yet released) causes the current way we handle the TOC to no longer work when building with MODVERSIONS=y and RELOCATABLE=n. The symptom is that modules can not be loaded due to there being no version found for TOC. Cc: stable@vger.kernel.org # 3.16+ Signed-off-by: Alan Modra Signed-off-by: Michael Ellerman arch/powerpc/kernel/misc_64.S | 28 ---------------------------- arch/powerpc/kernel/module_64.c | 12 +++++++++--- scripts/mod/modpost.c | 3 ++- 3 files changed, 11 insertions(+), 32 deletions(-) commit d7f9ee60a6ebc263861a1d8c06acf100495201b7 Author: Chandan Rajendra Date: Wed Jan 13 22:20:22 2016 +0530 powerpc: Wire up copy_file_range() syscall Test runs on a ppc64 BE guest succeeded using modified fstests. Also tested on ppc64 LE using a home made test - mpe. Signed-off-by: Chandan Rajendra Signed-off-by: Michael Ellerman arch/powerpc/include/asm/systbl.h | 1 + arch/powerpc/include/asm/unistd.h | 2 +- arch/powerpc/include/uapi/asm/unistd.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 30f05309bde49295e02e45c7e615f73aa4e0ccc2 Merge: 3549d82 db2b52f Author: Linus Torvalds Date: Wed Jan 20 19:06:49 2016 -0800 Merge tag 'pm+acpi-4.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management and ACPI updates from Rafael Wysocki: "This includes fixes on top of the previous batch of PM+ACPI updates and some new material as well. From the new material perspective the most significant are the driver core changes that should allow USB devices to stay suspended over system suspend/resume cycles if they have been runtime-suspended already beforehand. Apart from that, ACPICA is updated to upstream revision 20160108 (cosmetic mostly, but including one fixup on top of the previous ACPICA update) and there are some devfreq updates the didn't make it before (due to timing). A few recent regressions are fixed, most importantly in the cpuidle menu governor and in the ACPI backlight driver and some x86 platform drivers depending on it. Some more bugs are fixed and cleanups are made on top of that. Specifics: - Modify the driver core and the USB subsystem to allow USB devices to stay suspended over system suspend/resume cycles if they have been runtime-suspended already beforehand and fix some bugs on top of these changes (Tomeu Vizoso, Rafael Wysocki). - Update ACPICA to upstream revision 20160108, including updates of the ACPICA's copyright notices, a code fixup resulting from a regression fix that was necessary in the upstream code only (the regression fixed by it has never been present in Linux) and a compiler warning fix (Bob Moore, Lv Zheng). - Fix a recent regression in the cpuidle menu governor that broke it on practically all architectures other than x86 and make a couple of optimizations on top of that fix (Rafael Wysocki). - Clean up the selection of cpuidle governors depending on whether or not the kernel is configured for tickless systems (Jean Delvare). - Revert a recent commit that introduced a regression in the ACPI backlight driver, address the problem it attempted to fix in a different way and revert one more cosmetic change depending on the problematic commit (Hans de Goede). - Add two more ACPI backlight quirks (Hans de Goede). - Fix a few minor problems in the core devfreq code, clean it up a bit and update the MAINTAINERS information related to it (Chanwoo Choi, MyungJoo Ham). - Improve an error message in the ACPI fan driver (Andy Lutomirski). - Fix a recent build regression in the cpupower tool (Shreyas Prabhu)" * tag 'pm+acpi-4.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) cpuidle: menu: Avoid pointless checks in menu_select() sched / idle: Drop default_idle_call() fallback from call_cpuidle() cpupower: Fix build error in cpufreq-info cpuidle: Don't enable all governors by default cpuidle: Default to ladder governor on ticking systems time: nohz: Expose tick_nohz_enabled ACPICA: Update version to 20160108 ACPICA: Silence a -Wbad-function-cast warning when acpi_uintptr_t is 'uintptr_t' ACPICA: Additional 2016 copyright changes ACPICA: Reduce regression fix divergence from upstream ACPICA ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Satellite R830 ACPI / video: Revert "thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()" ACPI / video: Document acpi_video_handles_brightness_key_presses() a bit ACPI / video: Fix using an uninitialized mutex / list_head in acpi_video_handles_brightness_key_presses() ACPI / video: Revert "ACPI / video: driver must be registered before checking for keypresses" ACPI / fan: Improve acpi_device_update_power error message ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Portege R700 cpuidle: menu: Fix menu_select() for CPUIDLE_DRIVER_STATE_START == 0 MAINTAINERS: Add devfreq-event entry MAINTAINERS: Add missing git repository and directory for devfreq ... commit 3549d82279370295a11f1dec0284a9922c903b9a Merge: 9638685 6575a9c Author: Linus Torvalds Date: Wed Jan 20 19:00:46 2016 -0800 Merge tag 'renesas-sh-drivers-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas Pull SH driver updates from Simon Horman: "Clean up the clock API on legacy SH to make it more similar to the Common Clock Framework. This will avoid different behaviour in drivers shared between legacy and CCF-based platforms (e.g. SCIF)" * tag 'renesas-sh-drivers-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: drivers: sh: clk: Avoid crashes when passing NULL clocks drivers: sh: clk: Remove obsolete and unused clk_round_parent() commit 8034e1efcb330d2aecef8cbf8a83f206270c1775 Merge: bffae69 b16c291 Author: David S. Miller Date: Wed Jan 20 18:56:44 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf commit bffae6975e00b78e86bcd694ab4c8c48216572a3 Author: Xin Long Date: Wed Jan 20 16:12:33 2016 +0800 net: change tcp_syn_retries documentation Documentation should be kept consistent with the code: static int tcp_syn_retries_max = MAX_TCP_SYNCNT; #define MAX_TCP_SYNCNT 127 Signed-off-by: Xin Long Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81e8f2e930fe76b9814c71b9d87c30760b5eb705 Author: Manfred Rudigier Date: Wed Jan 20 11:22:28 2016 +0100 net: dp83640: Fix tx timestamp overflow handling. PHY status frames are not reliable, the PHY may not be able to send them during heavy receive traffic. This overflow condition is signaled by the PHY in the next status frame, but the driver did not make use of it. Instead it always reported wrong tx timestamps to user space after an overflow happened because it assigned newly received tx timestamps to old packets in the queue. This commit fixes this issue by clearing the tx timestamp queue every time an overflow happens, so that no timestamps are delivered for overflow packets. This way time stamping will continue correctly after an overflow. Signed-off-by: Manfred Rudigier Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/phy/dp83640.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 7c1306723ee916ea9f1fa7d9e4c7a6d029ca7aaf Author: Eric Dumazet Date: Wed Jan 20 16:25:01 2016 -0800 net: diag: support v4mapped sockets in inet_diag_find_one_icsk() Lorenzo reported that we could not properly find v4mapped sockets in inet_diag_find_one_icsk(). This patch fixes the issue. Reported-by: Lorenzo Colitti Signed-off-by: Eric Dumazet Acked-by: Lorenzo Colitti Signed-off-by: David S. Miller net/ipv4/inet_diag.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit ce87fc6ce3f9f4488546187e3757cf666d9d4a2a Author: Jesse Gross Date: Wed Jan 20 17:59:49 2016 -0800 gro: Make GRO aware of lightweight tunnels. GRO is currently not aware of tunnel metadata generated by lightweight tunnels and stored in the dst. This leads to two possible problems: * Incorrectly merging two frames that have different metadata. * Leaking of allocated metadata from merged frames. This avoids those problems by comparing the tunnel information before merging, similar to how we handle other metadata (such as vlan tags), and releasing any state when we are done. Reported-by: John Fixes: 2e15ea39 ("ip_gre: Add support to collect tunnel metadata.") Signed-off-by: Jesse Gross Acked-by: Eric Dumazet Acked-by: Thomas Graf Signed-off-by: David S. Miller include/net/dst_metadata.h | 18 ++++++++++++++++++ net/core/dev.c | 7 +++++-- 2 files changed, 23 insertions(+), 2 deletions(-) commit 9638685e32af961943b679fcb72d4ddd458eb18f Merge: 03d7d12 ce96cb7 Author: Linus Torvalds Date: Wed Jan 20 18:42:30 2016 -0800 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "Driver updates for ARM SoCs. Some for SoC-family code under drivers/soc, but also some other driver updates that don't belong anywhere else. We also bring in the drivers/reset code through arm-soc. Some of the larger updates: - Qualcomm support for SMEM, SMSM, SMP2P. All used to communicate with other parts of the chip/board on these platforms, all proprietary protocols that don't fit into other subsystems and live in drivers/soc for now. - System bus driver for UniPhier - Driver for the TI Wakeup M3 IPC device - Power management for Raspberry PI + Again a bunch of other smaller updates and patches" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (38 commits) bus: uniphier: allow only built-in driver ARM: bcm2835: clarify RASPBERRYPI_FIRMWARE dependency MAINTAINERS: Drop Kumar Gala from QCOM bus: uniphier-system-bus: add UniPhier System Bus driver ARM: bcm2835: add rpi power domain driver dt-bindings: add rpi power domain driver bindings ARM: bcm2835: Define two new packets from the latest firmware. drivers/soc: make mediatek/mtk-scpsys.c explicitly non-modular soc: mediatek: SCPSYS: Add regulator support MAINTAINERS: Change QCOM entries soc: qcom: smd-rpm: Add existing platform support memory/tegra: Add number of TLB lines for Tegra124 reset: hi6220: fix modular build soc: qcom: Introduce WCNSS_CTRL SMD client ARM: qcom: select ARM_CPU_SUSPEND for power management MAINTAINERS: Add rules for Qualcomm dts files soc: qcom: enable smsm/smp2p modular build serial: msm_serial: Make config tristate soc: qcom: smp2p: Qualcomm Shared Memory Point to Point soc: qcom: smsm: Add driver for Qualcomm SMSM ... commit 03d7d12415e3a4791994e566f1245838bc505c6b Merge: f9cd69f a25682e Author: Linus Torvalds Date: Wed Jan 20 18:35:00 2016 -0800 Merge tag 'armsoc-defconfig64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM 64-bit defconfig updates from Olof Johansson: "As mentioned earlier, we usually bake this into the general "arm64" branch, but this release we have partitioned up the updates a bit more. Most of these updates are enabling new SoCs in the single defconfig for 64-bit, Renesas R8A7795, a number of Tegra options, Socionext Uniphier and a handful of new options for other platforms as well" * tag 'armsoc-defconfig64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: mediatek: enable MTK_TIMER arm64: defconfig: add CS2000 support arm64: defconfig: Add Renesas R-Car SATA driver for R-Car Gen3 SoCs arm64: defconfig: enable UniPhier SoCs support arm64: add Kconfig entry for Socionext UniPhier SoC family arm64: defconfig: add Renesas sound and AK4613 support arm64: defconfig: add Renesas R-Car DMAC driver support arm64: defconfig: Enable Renesas R-Car I2C Controller arm64: defconfig: enable EthernetAVB arm64: defconfig: Enable GPIO of Renesas R-Car Gen3 SoC arm64: berlin: add the pinctrl dependency for Marvell Berlin SoCs arm64: defconfig: renesas: Enable Renesas r8a7795 SoC arm64: defconfig: Enable printk timestamps arm64: defconfig: Enable squashfs support arm64: defconfig: Enable sdhci-tegra driver arm64: defconfig: Enable serial-tegra driver arm64: defconfig: Enable tegra-apbdma driver arm64: defconfig: Do not disable Tegra AHB driver arm64: defconfig: Enable Tegra210 support commit f9cd69fe5eb6347b4de56458d0378bc0fa44bce9 Merge: 62c79bb 2f6b99e Author: Linus Torvalds Date: Wed Jan 20 18:29:13 2016 -0800 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC defconfig updates from Olof Johansson: "As usual, a bunch of commits, mostly adding drivers and other options to defconfigs because it makes sense to have them enabled on various development or product boards. Too much to enumerate each here. There's an introduction of a pxa_defconfig, since PXA finally will allow building a shared kernel for all boards. With this, we can hopefully remove a bunch of individual defconfigs down the road but it requires a bit of real life testing and transition period" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (65 commits) ARM: Add CONFIG_DEPRECATED_PARAM_STRUCT to netwinder_defconfig ARM: multi_v7_defconfig: Add rockchip audio support arm: multi_v7_defconfig: Add virtio drivers ARM: zx_defconfig: remove CONFIG_MMC_DW_IDMAC ARM: versatile: enable the right LEDs ARM: pxa: add defconfig covering all the boards ARM: versatile: select some defaults in defconfig ARM: multi_v7_defconfig: Enable fan, sensors and audio for Odroid XU3 ARM: bcm2835: enable auxiliary spi driver in defconfig ARM: bcm2835: enable all bcm2835-relevant in defconfig ARM: default to multi_v7_defconfig ARM: multi_v7_defconfig: enable rk808 clkout module ARM: multi_v7_defconfig: enable rockchip crypto module ARM: multi_v7_defconfig: enable Rockchip io-domain driver ARM: multi_v7_defconfig: Enable generic SoC internal OMAP regulators ARM: multi_v7_defconfig: Enable AM437x PMIC TPS65218 ARM: multi_v7_defconfig: enable TPS65217 regulator ARM: realview: select apropriate targets ARM: defconfig: qcom: Enable SSBI drivers ARM: defconfig: Update qcom_defconfig ... commit 62c79bb3a99fb46a8624f9c7e86fa5ee2f936360 Merge: 6d1c244 d07822a Author: Linus Torvalds Date: Wed Jan 20 18:21:32 2016 -0800 Merge tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM 64-bit DT updates from Olof Johansson: "This is the first release where we split up the 64-bit contributions a bit more, and in particular we are having a separate DT branch for them. Contents: - New devices added to Broadcom NorthStar2 - Misc fixes for Exynos7 boards - QCOM updates for MSM8916 - Rockchip tweaks for rk3368 SoC and eval board - A series of fixes for APM X-Gene v1 and v2 - Renesas R8A7795 CPU/PSCI additions - Marvell Berlin4CT PSCI, cpuidle, watchdog portions - Freescale LS1043a SoC and dev board support + some treewide or other misc changes" * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (104 commits) dts/ls2080a: Update DTSI to add support of SP805 WDT Documentation: DT: Add entry for ARM SP805-WDT arm64: dts: X-Gene v2: I2C1 clock is always on arm64: dts: X-Gene v1: I2C0 clock is always on arm64: dts: Fix to use standard DT node names for X-Gene 1 and X-Gene 2 platforms arm64: dts: hikey: add label properties to UARTs arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI arm64: dts: apq8016-sbc: enable UART0 on LS connector arm64: dts: juno: Add idle-states to device tree arm64: dts: Added syscon-reboot node for FSL's LS2080A SoC arm64: dts: add LS1043a-RDB board support arm64: dts: add Freescale LS1043a SoC support Documentation: DT: Add entry for Freescale LS1043a-RDB board arm64: dts: uniphier: add PH1-LD10 SoC/board support arm64: renesas: r8a7795: fix SATA clock assignment arm64: dts: salvator-x: Enable SATA controller arm64: dts: r8a7795: Add SATA controller node arm64: renesas: r8a7795: add internal delay for i2c IPs arm64: renesas: salvator-x: Add board part number to DT bindings arm64: dts: r8a7795: Add pmu device nodes ... commit 6d1c244803f2c013fb9c31b0904c01f1830b73ab Merge: 1305eda7 4dd041b Author: Linus Torvalds Date: Wed Jan 20 18:16:29 2016 -0800 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM DT updates from Olof Johansson: "As usual, the bulk of this release is again DT file contents. There's a huge number of changes here, and it's challenging to give a crisp overview of just what is in here. To start with: New boards: - TI-based DM3730 from LogicPD (Torpedo) - Cosmic+ M4 (nommu) initial support (Freescale Vybrid) - Raspberry Pi 2 DT files - Watchdog on Meson8b - Veyron-mickey (ASUS Chromebit) DTS - Rockchip rk3228 SoC and eval board - Sigma Designs Tango4 Improvements: - Improved support for Qualcomm APQ8084, including Sony Xperia Z DT files - Misc new devices for Rockchip rk3036 and rk3288 - Allwinner updates for misc SoCs and systems ... and a _large_ number of other changes across the field. Devices added to SoC DTSI and board DTS files for a number of SoC vendors, new product boards on already-supported SoCs, cleanups and refactorings of existing DTS/DTSI files and a bunch of other changes" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (469 commits) ARM: dts: compulab: add new board description ARM: versatile: add the syscon LEDs to the DT dts: vt8500: Fix errors in SDHC node for WM8505 ARM: dts: imx6q: clean up unused ipu2grp ARM: dts: silk: Add compatible property to "partitions" node ARM: dts: gose: Add compatible property to "partitions" node ARM: dts: porter: Add compatible property to "partitions" node ARM: dts: koelsch: Add compatible property to "partitions" node ARM: dts: lager: Add compatible property to "partitions" node ARM: dts: bockw: Add compatible property to "partitions" node ARM: dts: meson8b: Add watchdog node Documentation: watchdog: Add new bindings for meson8b ARM: meson: Add status LED for Odroid-C1 ARM: dts: uniphier: fix a typo in comment block ARM: bcm2835: Add the auxiliary clocks to the device tree. ARM: bcm2835: Add devicetree for bcm2836 and Raspberry Pi 2 B ARM: bcm2835: Move the CPU/peripheral include out of common RPi DT. ARM: bcm2835: Split the DT for peripherals from the DT for the CPU ARM: realview: set up cache correctly on the PB11MPCore ARM: dts: Unify G2D device node with other devices on exynos4 ... commit 1305eda751d7df3069b1fcb6f62036185acd24a0 Merge: 6b5a12d d6bd057 Author: Linus Torvalds Date: Wed Jan 20 18:10:05 2016 -0800 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Olof Johansson: "Updates for new platform support: - New platform: Tango4 from Sigma Designs. - Broadcom BCM2836 (Raspberry Pi 2 SoC) - Enable cpufreq on Freescale i.MX7D - Rockchip: SMP support for rk3036, general support for rk3228 - SMP support on Broadcom Kona and NSP - Cleanups for OMAP removing legacy IOMMU data + a bunch of misc fixes and tweaks for various platforms" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (46 commits) ARM: tango: Fix UP build issues ARM: tango: pass ARM arch level for smc.S ARM: bcm2835: Add Kconfig support for bcm2836 ARM: OMAP2+: Add support for dm814x and dra62x usb ARM: OMAP2+: Add mmc hwmod entries for dm814x ARM: OMAP2+: Update 81xx clock and power domains for default, active and sgx ARM: OMAP2+: Fix SoC detection for dra62x j5-eco ARM: tango4: Initial platform support ARM: bcm2835: Add a compat string for bcm2836 machine probe dt-bindings: Add root properties for Raspberry Pi 2 ARM: imx: select SRC for i.MX7 ARM: uniphier: select PINCTRL ARM: OMAP2+: Remove device creation for omap-pcm-audio ARM: OMAP1: Remove device creation for omap-pcm-audio ARM: rockchip: enable support for RK3228 SoCs ARM: rockchip: use const and __initconst for rk3036 smp_operations ARM: zynq: Select ARCH_HAS_RESET_CONTROLLER ARM: BCM: Add SMP support for Broadcom 4708 ARM: BCM: Add SMP support for Broadcom NSP ARM: BCM: Clean up SMP support for Broadcom Kona ... commit 6b5a12dbca7a8681ecb78dbebaedc1f8364ebd10 Merge: 5083c54 2cb58c0 Author: Linus Torvalds Date: Wed Jan 20 18:03:56 2016 -0800 Merge tag 'armsoc-multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC multiplatform code updates from Arnd Bergmann: "This branch is the culmination of 5 years of effort to bring the ARMv6 and ARMv7 platforms together such that they can all be enabled and boot the same kernel. It has been a tremendous amount of cleanup and refactoring by a huge number of people, and creation of several new (and major) subsystems to better abstract out all the platform details in an appropriate manner. The bulk of this branch is a large patchset from Arnd that brings several of the more minor and older platforms we have closer to multiplatform support. Among these are MMP, S3C64xx, Orion5x, mv78xx0 and realview Much of this is moving around header files from old mach directories, but there are also some cleanup patches of debug_ll (lowlevel debug per-platform options) and other parts. Linus Walleij also has some patchs to clean up the older ARM Realview platforms by finally introducing DT support, and Rob Herring has some for ARM Versatile which is now DT-only. Both of these platforms are now multiplatform. Finally, a couple of patches from Russell for Dove PMU, and a fix from Valentin Rothberg for Exynos ADC, which were rebased on top of the series to avoid conflicts" * tag 'armsoc-multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (75 commits) ARM: realview: don't select SMP_ON_UP for UP builds ARM: s3c: simplify s3c_irqwake_{e,}intallow definition ARM: s3c64xx: fix pm-debug compilation iio: exynos-adc: fix irqf_oneshot.cocci warnings ARM: realview: build realview-dt SMP support only when used ARM: realview: select apropriate targets ARM: realview: clean up header files ARM: realview: make all header files local ARM: no longer make CPU targets visible separately ARM: integrator: use explicit core module options ARM: realview: enable multiplatform ARM: make default platform work for NOMMU ARM: debug-ll: move DEBUG_LL_UART_EFM32 to correct Kconfig location ARM: defconfig: use correct debug_ll settings ARM: versatile: convert to multi-platform ARM: versatile: merge mach code into a single file ARM: versatile: switch to DT only booting and remove legacy code ARM: versatile: add DT based PCI detection ARM: pxa: mark ezx structures as __maybe_unused ARM: pxa: mark raumfeld init functions as __maybe_unused ... commit 5083c54264d21bf9b8a4766068f51581854d772c Merge: 0c58282 0ef917f Author: Linus Torvalds Date: Wed Jan 20 17:55:20 2016 -0800 Merge tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC cleanups from Olof Johansson: "A smallish number of general cleanup commits this release cycle. Some of these are minor tweaks: - shmobile change of binding for their GIC (using arm,pl390 now) - ARCH_RENESAS introduction - Misc other renesas updates There's also a couple of treewide commits from Masahiro Yamada cleaning up const/__initconst for SMP operation structs and a switch to using "depends on" instead of if-constructs on most of the Kconfig platform targets" * tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: staging: board: armadillo800eva: Use "arm,pl390" staging: board: kzm9d: Use "arm,pl390" ARM: shmobile: r8a7778 dtsi: Use "arm,pl390" for GIC ARM: shmobile: emev2 dtsi: Use "arm,pl390" for GIC ARM: shmobile: r8a7740 dtsi: Use "arm,pl390" for GIC ARM: shmobile: r7s72100 dtsi: Use "arm,pl390" for GIC ARM: use "depends on" for SoC configs instead of "if" after prompt ARM/clocksource: use automatic DT probing for ux500 PRCMU ARM: use const and __initconst for smp_operations ARM: hisi: do not export smp_operations structures ARM: mvebu: remove unused mach/gpio.h ARM: shmobile: Remove legacy mach/irqs.h ARM: shmobile: Introduce ARCH_RENESAS MAINTAINERS: Remove link to oss.renesas.com which is closed commit 0c582826a158d9cab69b9cc66d637aee73fed0dc Merge: e3de671 08ceca8 Author: Linus Torvalds Date: Wed Jan 20 17:44:16 2016 -0800 Merge tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull non-urgent ARM SoC fixes from Olof Johansson: "As usual, we queue up a few fixes that don't seem urgent enough to go in through -rc. - MAINTAINERS updates to add a list for brcmstb and fix a typo - A handful of fixes for OMAP 81xx, a recently resurrected platform so these can't be considered real regressions and thus got queued. - A couple of other small fixes for scoop, sa1100 and davinci" * tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: OMAP2+: Fix randconfig build warning for dm814_pllss_data ARM: sa1100/simpad: Be sure to clamp return value ARM: scoop: Be sure to clamp return value ARM: davinci: fix a problematic usage of WARN() ARM: davinci: only select WT cache if cache is enabled ARM: OMAP2+: Remove useless check for legacy booting for dm814x ARM: OMAP2+: Enable GPIO for dm814x ARM: dts: Fix dm814x pinctrl address and mask ARM: dts: Fix dm8148 control modules ranges ARM: OMAP2+: Fix timer entries for dm814x ARM: dts: Fix some mux and divider clocks to get dm814x-evm booting ARM: OMAP2+: Add DPPLS clock manager for dm814x clk: ti: Add few dm814x clock aliases ARM: dts: Fix dm814x entries for pllss and prcm MAINTAINERS: gpio-brcmstb: Remove stray '>' MAINTAINERS: brcmstb: Include Broadcom internal mailing-list commit e3de671dd6784e30821e64f67f854b90b4496a68 Merge: 71e4634 040b323 Author: Linus Torvalds Date: Wed Jan 20 17:30:20 2016 -0800 Merge tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "The asm-generic tree this time contains one series from Nicolas Pitre that makes the optimized do_div() implementation from the ARM architecture available to all architectures. This also adds stricter type checking for callers of do_div, which has uncovered a number of bugs in existing code, and fixes up the ones we have found" * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: ARM: asm/div64.h: adjust to generic codde __div64_32(): make it overridable at compile time __div64_const32(): abstract out the actual 128-bit cross product code do_div(): generic optimization for constant divisor on 32-bit machines div64.h: optimize do_div() for power-of-two constant divisors mtd/sm_ftl.c: fix wrong do_div() usage drm/mgag200/mgag200_mode.c: fix wrong do_div() usage hid-sensor-hub.c: fix wrong do_div() usage ti/fapll: fix wrong do_div() usage ti/clkt_dpll: fix wrong do_div() usage tegra/clk-divider: fix wrong do_div() usage imx/clk-pllv2: fix wrong do_div() usage imx/clk-pllv1: fix wrong do_div() usage nouveau/nvkm/subdev/clk/gk20a.c: fix wrong do_div() usage commit 71e4634e00119b2fb8dd0da99b3f5ebbb49cc872 Merge: 19a3dd7 fab683e Author: Linus Torvalds Date: Wed Jan 20 17:20:53 2016 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target updates from Nicholas Bellinger: "The highlights this round include: - Introduce configfs support for unlocked configfs_depend_item() (krzysztof + andrezej) - Conversion of usb-gadget target driver to new function registration interface (andrzej + sebastian) - Enable qla2xxx FC target mode support for Extended Logins (himansu + giridhar) - Enable qla2xxx FC target mode support for Exchange Offload (himansu + giridhar) - Add qla2xxx FC target mode irq affinity notification + selective command queuing. (quinn + himanshu) - Fix iscsi-target deadlock in se_node_acl configfs deletion (sagi + nab) - Convert se_node_acl configfs deletion + se_node_acl->queue_depth to proper se_session->sess_kref + target_get_session() usage. (hch + sagi + nab) - Fix long-standing race between se_node_acl->acl_kref get and get_initiator_node_acl() lookup. (hch + nab) - Fix target/user block-size handling, and make sure netlink reaches all network namespaces (sheng + andy) Note there is an outstanding bug-fix series for remote I_T nexus port TMR LUN_RESET has been posted and still being tested, and will likely become post -rc1 material at this point" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (56 commits) scsi: qla2xxxx: avoid type mismatch in comparison target/user: Make sure netlink would reach all network namespaces target: Obtain se_node_acl->acl_kref during get_initiator_node_acl target: Convert ACL change queue_depth se_session reference usage iscsi-target: Fix potential dead-lock during node acl delete ib_srpt: Convert acl lookup to modern get_initiator_node_acl usage tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage tcm_fc: Wait for command completion before freeing a session target: Fix a memory leak in target_dev_lba_map_store() target: Support aborting tasks with a 64-bit tag usb/gadget: Remove set-but-not-used variables target: Remove an unused variable target: Fix indentation in target_core_configfs.c target/user: Allow user to set block size before enabling device iser-target: Fix non negative ERR_PTR isert_device_get usage target/fcoe: Add tag support to tcm_fc qla2xxx: Check for online flag instead of active reset when transmitting responses qla2xxx: Set all queues to 4k qla2xxx: Disable ZIO at start time. qla2xxx: Move atioq to a different lock to reduce lock contention ... commit e3c4abdb3bc9b76bedd416ecc5c27633a2f8afed Author: Mark Yao Date: Wed Sep 23 12:34:34 2015 +0800 drm/rockchip: fix wrong pitch/size using on gem args->pitch and args->size may not be set by userspace, sometimes userspace only malloc args and not memset args to zero, then args->pitch and args->size is random, it is very danger to use pitch/size on gem. pitch's type is u32, and min_pitch's type is int, example, pitch is 0xffffffff, then pitch < min_pitch return true, then gem will alloc very very big bufffer, it would eat all the memory and cause kernel crash. Stop using pitch/size from args, calc them from other args. Signed-off-by: Mark Yao drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 19a3dd7621af01b7e44a70d16beab59326c38824 Author: Dan Williams Date: Wed Jan 20 14:37:22 2016 -0800 Do not enable CONFIG_IO_STRICT_DEVMEM by default Larry Finger reports: "My PowerBook G4 Aluminum with a 32-bit PPC processor fails to boot for the 4.4-git series". This is likely due to X still needing /dev/mem access on this platform. CONFIG_IO_STRICT_DEVMEM is not yet safe to turn on when CONFIG_STRICT_DEVMEM=y. Remove the default so that old configurations do not change behavior. Fixes: 90a545e98126 ("restrict /dev/mem to idle io memory ranges") Reported-by: Larry Finger Tested-by: Larry Finger Link: http://marc.info/?l=linux-kernel&m=145332012023825&w=2 Acked-by: Kees Cook Cc: Arnd Bergmann Cc: Ingo Molnar Cc: Russell King Cc: Andrew Morton Cc: Greg Kroah-Hartman Signed-off-by: Dan Williams Signed-off-by: Linus Torvalds lib/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) commit 9f273c24ec5f4a6f785bb83e931b3808a07b459e Author: Fengguang Wu Date: Wed Jan 20 15:03:25 2016 -0800 MAINTAINERS: add/fix git URLs for various subsystems Add/fix git URLs for various subsystems Add git URL for at91 Add git URL for Rockchip Add git URL for ARM64 Update git URL for ath6kl Add git URL for backlight Add git URL for chrome Add git URL for cris Add git URL for cryptodev Update git URL for DLM Add git URL for eCryptfs Add git URL for ext4 Add git URL for hwspinlock Add git URL for integrity Add git URL for IPVS Add git URL for nfsd Add git URL for KVM/s390 Add git URL for kgdb Add git URL for nvdimm Add git URL for metag Add git URL for wireless drivers Add git URL for devicetree Update git URL for PCMCIA Update git URL for pstore Update git URL for ath10k Add git URL for hexagon Add git URL for reset Add git URL for s390 Fix tree format for SAMSUNG thermal Add git URL for md Add git URL for squashfs Add git URL for swiotlb Add git URL for xtensa Fix tree format for TPM Add git URL for UML Add git URL for VFIO Add git URL for vhost Update git URL for XFS Fix MIC maintainers entry Signed-off-by: Fengguang Wu Acked-by: Alexandre Belloni Acked-by: Nicolas Ferre Acked-by: Catalin Marinas Acked-by: Kalle Valo Acked-by: Cornelia Huck Acked-by: James Hogan Acked-by: Dominik Brodowski Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 53 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 11 deletions(-) commit b2807f07f4f87362925b8a5b8cbb7b624da10f03 Author: Johannes Weiner Date: Wed Jan 20 15:03:22 2016 -0800 mm: memcontrol: add "sock" to cgroup2 memory.stat Provide statistics on how much of a cgroup's memory footprint is made up of socket buffers from network connections owned by the group. Signed-off-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 5 ++++- mm/memcontrol.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 587d9f726aaec52157e4156e50363dbe6cb82bdb Author: Johannes Weiner Date: Wed Jan 20 15:03:19 2016 -0800 mm: memcontrol: basic memory statistics in cgroup2 memory controller Provide a cgroup2 memory.stat that provides statistics on LRU memory and fault event counters. More consumers and breakdowns will follow. Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Michal Hocko Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 56 +++++++++++++++++++++++++++++++++++++ mm/memcontrol.c | 68 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) commit 44b7a8d33d666268062e0f725d5f14813a63a6ea Author: Johannes Weiner Date: Wed Jan 20 15:03:16 2016 -0800 mm: memcontrol: do not uncharge old page in page cache replacement Changing page->mem_cgroup of a live page is tricky and fragile. In particular, the memcg writeback code relies on that mapping being stable and users of mem_cgroup_replace_page() not overlapping with dirtyable inodes. Page cache replacement doesn't have to do that, though. Instead of being clever and transferring the charge from the old page to the new, force-charge the new page and leave the old page alone. A temporary overcharge won't matter in practice, and the old page is going to be freed shortly after this anyway. And this is not performance critical. Signed-off-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 3e24b19dd5ff0587674ac7578cc11ef079708327 Author: Vladimir Davydov Date: Wed Jan 20 15:03:13 2016 -0800 Documentation: cgroup: add memory.swap.{current,max} description The rationale of separate swap counter is given by Johannes Weiner. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 5ccc5abaaf6f9242cc63342c5286990233f392fa Author: Vladimir Davydov Date: Wed Jan 20 15:03:10 2016 -0800 mm: free swap cache aggressively if memcg swap is full Swap cache pages are freed aggressively if swap is nearly full (>50% currently), because otherwise we are likely to stop scanning anonymous when we near the swap limit even if there is plenty of freeable swap cache pages. We should follow the same trend in case of memory cgroup, which has its own swap limit. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 6 ++++++ mm/memcontrol.c | 22 ++++++++++++++++++++++ mm/memory.c | 3 ++- mm/swapfile.c | 2 +- mm/vmscan.c | 2 +- 5 files changed, 32 insertions(+), 3 deletions(-) commit d8b38438a0bcb362c396f49d8279ef7b505917f4 Author: Vladimir Davydov Date: Wed Jan 20 15:03:07 2016 -0800 mm: vmscan: do not scan anon pages if memcg swap limit is hit We don't scan anonymous memory if we ran out of swap, neither should we do it in case memcg swap limit is hit, because swap out is impossible anyway. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 6 ++++++ mm/memcontrol.c | 13 +++++++++++++ mm/vmscan.c | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) commit 6f2cb2f17700a39567cf3e9a2e95041def5f3688 Author: Vladimir Davydov Date: Wed Jan 20 15:03:05 2016 -0800 swap.h: move memcg related stuff to the end of the file The following patches will add more functions to the memcg section of include/linux/swap.h. Some of them will need values defined below the current location of the section. So let's move the section to the end of the file. No functional changes intended. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 70 ++++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 32 deletions(-) commit eb01aaab43084f1c919ce66183fea005033351b9 Author: Vladimir Davydov Date: Wed Jan 20 15:03:02 2016 -0800 mm: memcontrol: replace mem_cgroup_lruvec_online with mem_cgroup_online mem_cgroup_lruvec_online() takes lruvec, but it only needs memcg. Since get_scan_count(), which is the only user of this function, now possesses pointer to memcg, let's pass memcg directly to mem_cgroup_online() instead of picking it out of lruvec and rename the function accordingly. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 27 ++++++++++----------------- mm/vmscan.c | 2 +- 2 files changed, 11 insertions(+), 18 deletions(-) commit 3337767850b490eec5ca822f871241c981664737 Author: Vladimir Davydov Date: Wed Jan 20 15:02:59 2016 -0800 mm: vmscan: pass memcg to get_scan_count() memcg will come in handy in get_scan_count(). It can already be used for getting swappiness immediately in get_scan_count() instead of passing it around. The following patches will add more memcg-related values, which will be used there. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 37e84351198be087335ad2b2253b35c7cc76a5ad Author: Vladimir Davydov Date: Wed Jan 20 15:02:56 2016 -0800 mm: memcontrol: charge swap to cgroup2 This patchset introduces swap accounting to cgroup2. This patch (of 7): In the legacy hierarchy we charge memsw, which is dubious, because: - memsw.limit must be >= memory.limit, so it is impossible to limit swap usage less than memory usage. Taking into account the fact that the primary limiting mechanism in the unified hierarchy is memory.high while memory.limit is either left unset or set to a very large value, moving memsw.limit knob to the unified hierarchy would effectively make it impossible to limit swap usage according to the user preference. - memsw.usage != memory.usage + swap.usage, because a page occupying both swap entry and a swap cache page is charged only once to memsw counter. As a result, it is possible to effectively eat up to memory.limit of memory pages *and* memsw.limit of swap entries, which looks unexpected. That said, we should provide a different swap limiting mechanism for cgroup2. This patch adds mem_cgroup->swap counter, which charges the actual number of swap entries used by a cgroup. It is only charged in the unified hierarchy, while the legacy hierarchy memsw logic is left intact. The swap usage can be monitored using new memory.swap.current file and limited using memory.swap.max. Note, to charge swap resource properly in the unified hierarchy, we have to make swap_entry_free uncharge swap only when ->usage reaches zero, not just ->count, i.e. when all references to a swap entry, including the one taken by swap cache, are gone. This is necessary, because otherwise swap-in could result in uncharging swap even if the page is still in swap cache and hence still occupies a swap entry. At the same time, this shouldn't break memsw counter logic, where a page is never charged twice for using both memory and swap, because in case of legacy hierarchy we uncharge swap on commit (see mem_cgroup_commit_charge). Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 1 + include/linux/swap.h | 6 +++ mm/memcontrol.c | 118 ++++++++++++++++++++++++++++++++++++++++++--- mm/shmem.c | 4 ++ mm/swap_state.c | 5 ++ mm/swapfile.c | 4 +- 6 files changed, 128 insertions(+), 10 deletions(-) commit 0b8f73e104285a4badf9d768d1c39b06d77d1f97 Author: Johannes Weiner Date: Wed Jan 20 15:02:53 2016 -0800 mm: memcontrol: clean up alloc, online, offline, free functions The creation and teardown of struct mem_cgroup is fairly messy and that has attracted mistakes and subtle bugs before. The main cause for this is that there is no clear model about what needs to happen when, and that attracts more chaos. So create one: 1. mem_cgroup_alloc() should allocate struct mem_cgroup and its auxiliary members and initialize work items, locks etc. so that the object it returns is fully initialized and in a neutral state. 2. mem_cgroup_css_alloc() will use mem_cgroup_alloc() to obtain a new memcg object and configure it and the system according to the role of the new memory-controlled cgroup in the hierarchy. 3. mem_cgroup_css_online() is no longer needed to synchronize with iterators, but it verifies css->id which isn't available earlier. 4. mem_cgroup_css_offline() implements stuff that needs to happen upon the user-visible destruction of a cgroup, which includes stopping all user interfacing as well as releasing certain structures when continued memory consumption would be unexpected at that point. 5. mem_cgroup_css_free() prepares the system and the memcg object for the object's disappearance, neutralizes its state, and then gives it back to mem_cgroup_free(). 6. mem_cgroup_free() releases struct mem_cgroup and auxiliary memory. [arnd@arndb.de: fix SLOB build regression] Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Michal Hocko Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 3 - mm/memcontrol.c | 257 +++++++++++++++------------------------------ 2 files changed, 84 insertions(+), 176 deletions(-) commit 0db1529817b7b16226421f01470c5ba982c5f302 Author: Johannes Weiner Date: Wed Jan 20 15:02:50 2016 -0800 mm: memcontrol: flatten struct cg_proto There are no more external users of struct cg_proto, flatten the structure into struct mem_cgroup. Since using those struct members doesn't stand out as much anymore, add cgroup2 static branches to make it clearer which code is legacy. Suggested-by: Vladimir Davydov Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 14 ++++++-------- mm/memcontrol.c | 33 +++++++++++++++------------------ 2 files changed, 21 insertions(+), 26 deletions(-) commit d886f4e483ce63a3304adc9eda87031b93341c28 Author: Johannes Weiner Date: Wed Jan 20 15:02:47 2016 -0800 mm: memcontrol: rein in the CONFIG space madness What CONFIG_INET and CONFIG_LEGACY_KMEM guard inside the memory controller code is insignificant, having these conditionals is not worth the complication and fragility that comes with them. [akpm@linux-foundation.org: rework mem_cgroup_css_free() statement ordering] Signed-off-by: Johannes Weiner Cc: Michal Hocko Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 14 +++++------- init/Kconfig | 21 +++--------------- mm/memcontrol.c | 53 ++++------------------------------------------ mm/vmpressure.c | 2 -- 4 files changed, 12 insertions(+), 78 deletions(-) commit d55f90bfab40e3b5db323711d28186ff09461692 Author: Vladimir Davydov Date: Wed Jan 20 15:02:44 2016 -0800 net: drop tcp_memcontrol.c tcp_memcontrol.c only contains legacy memory.tcp.kmem.* file definitions and mem_cgroup->tcp_mem init/destroy stuff. This doesn't belong to network subsys. Let's move it to memcontrol.c. This also allows us to reuse generic code for handling legacy memcg files. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: "David S. Miller" Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/net/tcp_memcontrol.h | 10 --- mm/memcontrol.c | 98 +++++++++++++++++++-- net/ipv4/Makefile | 1 - net/ipv4/sysctl_net_ipv4.c | 1 - net/ipv4/tcp_ipv4.c | 1 - net/ipv4/tcp_memcontrol.c | 200 ------------------------------------------- net/ipv6/tcp_ipv6.c | 1 - 7 files changed, 90 insertions(+), 222 deletions(-) commit 489c2a20a414351fe0813a727c34600c0f7292ae Author: Johannes Weiner Date: Wed Jan 20 15:02:41 2016 -0800 mm: memcontrol: introduce CONFIG_MEMCG_LEGACY_KMEM Let the user know that CONFIG_MEMCG_KMEM does not apply to the cgroup2 interface. This also makes legacy-only code sections stand out better. [arnd@arndb.de: mm: memcontrol: only manage socket pressure for CONFIG_INET] Signed-off-by: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Acked-by: Vladimir Davydov Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 4 ++-- init/Kconfig | 10 +++++++++- mm/memcontrol.c | 18 +++++++++--------- mm/vmpressure.c | 2 ++ net/ipv4/Makefile | 2 +- 5 files changed, 23 insertions(+), 13 deletions(-) commit 04823c833b3eaef7816e28e3727124394f6bb3c3 Author: Vladimir Davydov Date: Wed Jan 20 15:02:38 2016 -0800 mm: memcontrol: allow to disable kmem accounting for cgroup2 Kmem accounting might incur overhead that some users can't put up with. Besides, the implementation is still considered unstable. So let's provide a way to disable it for those users who aren't happy with it. To disable kmem accounting for cgroup2, pass cgroup.memory=nokmem at boot time. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kernel-parameters.txt | 1 + mm/memcontrol.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 52c29b04823cb1bab2805336b80866325fe2bc3f Author: Johannes Weiner Date: Wed Jan 20 15:02:35 2016 -0800 mm: memcontrol: account "kmem" consumers in cgroup2 memory controller The original cgroup memory controller has an extension to account slab memory (and other "kernel memory" consumers) in a separate "kmem" counter, once the user set an explicit limit on that "kmem" pool. However, this includes various consumers whose sizes are directly linked to userspace activity. Accounting them as an optional "kmem" extension is problematic for several reasons: 1. It leaves the main memory interface with incomplete semantics. A user who puts their workload into a cgroup and configures a memory limit does not expect us to leave holes in the containment as big as the dentry and inode cache, or the kernel stack pages. 2. If the limit set on this random historical subgroup of consumers is reached, subsequent allocations will fail even when the main memory pool available to the cgroup is not yet exhausted and/or has reclaimable memory in it. 3. Calling it 'kernel memory' is misleading. The dentry and inode caches are no more 'kernel' (or no less 'user') memory than the page cache itself. Treating these consumers as different classes is a historical implementation detail that should not leak to users. So, in addition to page cache, anonymous memory, and network socket memory, account the following memory consumers per default in the cgroup2 memory controller: - threadinfo - task_struct - task_delay_info - pid - cred - mm_struct - vm_area_struct and vm_region (nommu) - anon_vma and anon_vma_chain - signal_struct - sighand_struct - fs_struct - files_struct - fdtable and fdtable->full_fds_bits - dentry and external_name - inode for all filesystems. This should give us reasonable memory isolation for most common workloads out of the box. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 127424c86bb6cb87f0b563d9fdcfbbaf3c86ecec Author: Johannes Weiner Date: Wed Jan 20 15:02:32 2016 -0800 mm: memcontrol: move kmem accounting code to CONFIG_MEMCG The cgroup2 memory controller will account important in-kernel memory consumers per default. Move all necessary components to CONFIG_MEMCG. Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Cc: Michal Hocko Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/list_lru.h | 4 +-- include/linux/memcontrol.h | 7 +++-- include/linux/sched.h | 4 +-- include/linux/slab.h | 2 +- include/linux/slab_def.h | 3 +- include/linux/slub_def.h | 2 +- mm/list_lru.c | 12 ++++---- mm/memcontrol.c | 69 +++++++++++++++++++++++++++------------------- mm/slab.h | 6 ++-- mm/slab_common.c | 10 +++---- mm/slub.c | 10 +++---- 11 files changed, 72 insertions(+), 57 deletions(-) commit 3893e302f6a377c4ef0f077f190bf760bf84e0be Author: Johannes Weiner Date: Wed Jan 20 15:02:29 2016 -0800 mm: memcontrol: separate kmem code from legacy tcp accounting code The cgroup2 memory controller will include important in-kernel memory consumers per default, including socket memory, but it will no longer carry the historic tcp control interface. Separate the kmem state init from the tcp control interface init in preparation for that. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit 8e0a891213fbddcec231c9d1d7577c320c77a25a Author: Johannes Weiner Date: Wed Jan 20 15:02:26 2016 -0800 mm: memcontrol: group kmem init and exit functions together Put all the related code to setup and teardown the kmem accounting state into the same location. No functional change intended. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 157 +++++++++++++++++++++++++++----------------------------- 1 file changed, 76 insertions(+), 81 deletions(-) commit 567e9ab2e614e55feca20e8bcb54b629e9cc1a3b Author: Johannes Weiner Date: Wed Jan 20 15:02:24 2016 -0800 mm: memcontrol: give the kmem states more descriptive names On any given memcg, the kmem accounting feature has three separate states: not initialized, structures allocated, and actively accounting slab memory. These are represented through a combination of the kmem_acct_activated and kmem_acct_active flags, which is confusing. Convert to a kmem_state enum with the states NONE, ALLOCATED, and ONLINE. Then rename the functions to modify the state accordingly. This follows the nomenclature of css object states more closely. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 15 ++++++++----- mm/memcontrol.c | 52 ++++++++++++++++++++++------------------------ mm/slab_common.c | 4 ++-- mm/vmscan.c | 2 +- 4 files changed, 38 insertions(+), 35 deletions(-) commit b15aac110a45c52d7f47ab8ee2d68f98044cfe6c Author: Johannes Weiner Date: Wed Jan 20 15:02:21 2016 -0800 mm: memcontrol: remove double kmem page_counter init The kmem page_counter's limit is initialized to PAGE_COUNTER_MAX inside mem_cgroup_css_online(). There is no need to repeat this from memcg_propagate_kmem(). Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 6d378dac7c4905db38f8127c4e618f0f627a4ced Author: Johannes Weiner Date: Wed Jan 20 15:02:18 2016 -0800 mm: memcontrol: drop unused @css argument in memcg_init_kmem This series adds accounting of the historical "kmem" memory consumers to the cgroup2 memory controller. These consumers include the dentry cache, the inode cache, kernel stack pages, and a few others that are pointed out in patch 7/8. The footprint of these consumers is directly tied to userspace activity in common workloads, and so they have to be part of the minimally viable configuration in order to present a complete feature to our users. The cgroup2 interface of the memory controller is far from complete, but this series, along with the socket memory accounting series, provides the final semantic changes for the existing memory knobs in the cgroup2 interface, which is scheduled for initial release in the next merge window. This patch (of 8): Remove unused css argument frmo memcg_init_kmem() Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Acked-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/net/tcp_memcontrol.h | 3 ++- mm/memcontrol.c | 6 +++--- net/ipv4/tcp_memcontrol.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit 545b5e2ad4771d23d4c67d0bcc18babd2070df13 Author: Arnd Bergmann Date: Wed Jan 20 15:02:15 2016 -0800 memstick: use sector_div instead of do_div do_div is the wrong way to divide a sector_t, as it is less efficient when sector_t is 32-bit wide. With the upcoming do_div optimizations, the kernel starts warning about this: drivers/memstick/core/ms_block.c: In function 'msb_io_work': include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast This changes the code to use sector_div instead, which always produces optimal code. Signed-off-by: Arnd Bergmann Cc: Maxim Levitsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/memstick/core/ms_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e99469ab0f821bea77625cd4775ca529d4ca7d4 Author: Geliang Tang Date: Wed Jan 20 15:02:12 2016 -0800 dma-mapping: use offset_in_page macro Use offset_in_page macro instead of (addr & ~PAGE_MASK). Signed-off-by: Geliang Tang Acked-by: Will Deacon Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/dma-mapping.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20d666e41166f8023ff3d960e832d87ded18c5c4 Author: Christoph Hellwig Date: Wed Jan 20 15:02:09 2016 -0800 dma-mapping: remove This wasn't an asm-generic header to start with, and can be merged into dma-mapping.h trivially. Signed-off-by: Christoph Hellwig Cc: "David S. Miller" Cc: Aurelien Jacquiot Cc: Chris Metcalf Cc: David Howells Cc: Geert Uytterhoeven Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Cc: Helge Deller Cc: James Hogan Cc: Jesper Nilsson Cc: Koichi Yasutake Cc: Ley Foon Tan Cc: Mark Salter Cc: Mikael Starvik Cc: Steven Miao Cc: Vineet Gupta Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/xtensa/include/asm/dma-mapping.h | 2 -- drivers/base/dma-mapping.c | 3 +-- include/asm-generic/dma-coherent.h | 32 -------------------------------- include/linux/dma-mapping.h | 34 ++++++++++++++++++++++++++++------ 4 files changed, 29 insertions(+), 42 deletions(-) commit e1c7e324539ada3b2b13ca2898bcb4948a9ef9db Author: Christoph Hellwig Date: Wed Jan 20 15:02:05 2016 -0800 dma-mapping: always provide the dma_map_ops based implementation Move the generic implementation to now that all architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now that everyone supports them. [valentinrothberg@gmail.com: remove leftovers in Kconfig] Signed-off-by: Christoph Hellwig Cc: "David S. Miller" Cc: Aurelien Jacquiot Cc: Chris Metcalf Cc: David Howells Cc: Geert Uytterhoeven Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Cc: Helge Deller Cc: James Hogan Cc: Jesper Nilsson Cc: Koichi Yasutake Cc: Ley Foon Tan Cc: Mark Salter Cc: Mikael Starvik Cc: Steven Miao Cc: Vineet Gupta Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Valentin Rothberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/DMA-API-HOWTO.txt | 10 - .../features/io/dma_map_attrs/arch-support.txt | 40 --- arch/Kconfig | 3 - arch/alpha/Kconfig | 1 - arch/alpha/include/asm/dma-mapping.h | 2 - arch/arc/Kconfig | 1 - arch/arc/include/asm/dma-mapping.h | 2 - arch/arm/Kconfig | 1 - arch/arm/include/asm/dma-mapping.h | 7 - arch/arm64/Kconfig | 1 - arch/arm64/include/asm/dma-mapping.h | 2 - arch/avr32/Kconfig | 1 - arch/avr32/include/asm/dma-mapping.h | 2 - arch/blackfin/Kconfig | 1 - arch/blackfin/include/asm/dma-mapping.h | 2 - arch/c6x/Kconfig | 1 - arch/c6x/include/asm/dma-mapping.h | 2 - arch/cris/Kconfig | 1 - arch/cris/include/asm/dma-mapping.h | 2 - arch/frv/Kconfig | 1 - arch/frv/include/asm/dma-mapping.h | 2 - arch/h8300/Kconfig | 1 - arch/h8300/include/asm/dma-mapping.h | 2 - arch/hexagon/Kconfig | 1 - arch/hexagon/include/asm/dma-mapping.h | 2 - arch/ia64/Kconfig | 1 - arch/ia64/include/asm/dma-mapping.h | 2 - arch/m68k/Kconfig | 1 - arch/m68k/include/asm/dma-mapping.h | 2 - arch/metag/Kconfig | 1 - arch/metag/include/asm/dma-mapping.h | 2 - arch/microblaze/Kconfig | 1 - arch/microblaze/include/asm/dma-mapping.h | 2 - arch/mips/Kconfig | 1 - arch/mips/include/asm/dma-mapping.h | 2 - arch/mn10300/Kconfig | 1 - arch/mn10300/include/asm/dma-mapping.h | 2 - arch/nios2/Kconfig | 1 - arch/openrisc/Kconfig | 3 - arch/openrisc/include/asm/dma-mapping.h | 2 - arch/parisc/Kconfig | 1 - arch/parisc/include/asm/dma-mapping.h | 2 - arch/powerpc/Kconfig | 1 - arch/powerpc/include/asm/dma-mapping.h | 2 - arch/s390/Kconfig | 1 - arch/s390/include/asm/dma-mapping.h | 2 - arch/sh/Kconfig | 1 - arch/sh/include/asm/dma-mapping.h | 2 - arch/sparc/Kconfig | 1 - arch/sparc/include/asm/dma-mapping.h | 2 - arch/tile/Kconfig | 1 - arch/tile/include/asm/dma-mapping.h | 3 - arch/unicore32/Kconfig | 1 - arch/unicore32/include/asm/dma-mapping.h | 2 - arch/x86/Kconfig | 1 - arch/x86/include/asm/dma-mapping.h | 2 - arch/xtensa/Kconfig | 1 - arch/xtensa/include/asm/dma-mapping.h | 2 - drivers/gpu/drm/Kconfig | 4 +- drivers/gpu/drm/imx/Kconfig | 2 +- drivers/gpu/drm/rcar-du/Kconfig | 2 +- drivers/gpu/drm/shmobile/Kconfig | 2 +- drivers/gpu/drm/sti/Kconfig | 2 +- drivers/gpu/drm/tilcdc/Kconfig | 2 +- drivers/gpu/drm/vc4/Kconfig | 2 +- drivers/media/platform/Kconfig | 1 - include/asm-generic/dma-mapping-broken.h | 95 ------ include/asm-generic/dma-mapping-common.h | 358 ------------------- include/linux/dma-attrs.h | 10 - include/linux/dma-mapping.h | 379 ++++++++++++++++++++- 70 files changed, 369 insertions(+), 633 deletions(-) commit bd38118f9c57b22f57f9c2fccca4a82aef15cc5f Author: Christoph Hellwig Date: Wed Jan 20 15:02:02 2016 -0800 tile: uninline dma_set_mask We'll soon merge into and the reference to dma_capable in the tile dma_set_mask would create a circular dependency. Fix this by moving the implementation out of line. Signed-off-by: Christoph Hellwig Cc: Chris Metcalf Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/tile/include/asm/dma-mapping.h | 29 +---------------------------- arch/tile/kernel/pci-dma.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 28 deletions(-) commit 30081d8ea47d521e8804398b25f59b8e49a2ed0b Author: Christoph Hellwig Date: Wed Jan 20 15:01:59 2016 -0800 sparc: use generic dma_set_mask Sparc already uses the same code as the generic code for the PCI implementation but just fails the call sbus. This moves to the generic implemenation which eventually return -EIO due to the NULL dma_mask pointer in the device. Signed-off-by: Christoph Hellwig Cc: "David S. Miller" Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/dma-mapping.h | 15 --------------- 1 file changed, 15 deletions(-) commit 5348c1e9e0dc2b62a484c4b74a8d1d59aa9620a4 Author: Christoph Hellwig Date: Wed Jan 20 15:01:56 2016 -0800 metag: convert to dma_map_ops Signed-off-by: Christoph Hellwig Cc: James Hogan Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/metag/Kconfig | 1 + arch/metag/include/asm/dma-mapping.h | 179 +---------------------------------- arch/metag/kernel/dma.c | 146 +++++++++++++++++++++------- 3 files changed, 117 insertions(+), 209 deletions(-) commit 340f3039acd67ec7750e36bd327caadadaacaaf4 Author: Christoph Hellwig Date: Wed Jan 20 15:01:53 2016 -0800 m68k: convert to dma_map_ops Signed-off-by: Christoph Hellwig Cc: Geert Uytterhoeven Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m68k/Kconfig | 1 + arch/m68k/include/asm/dma-mapping.h | 112 ++---------------------------------- arch/m68k/kernel/dma.c | 61 +++++++++----------- 3 files changed, 32 insertions(+), 142 deletions(-) commit f151341ca00e0418f98a5131e1a4a2a3ec219653 Author: Christoph Hellwig Date: Wed Jan 20 15:01:50 2016 -0800 mn10300: convert to dma_map_ops Signed-off-by: Christoph Hellwig Cc: David Howells Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mn10300/Kconfig | 2 + arch/mn10300/include/asm/dma-mapping.h | 161 +-------------------------------- arch/mn10300/mm/dma-alloc.c | 67 ++++++++++++-- 3 files changed, 67 insertions(+), 163 deletions(-) commit 79387179e2e4fede52326e4c4e26145dbd6b505c Author: Christoph Hellwig Date: Wed Jan 20 15:01:47 2016 -0800 parisc: convert to dma_map_ops Signed-off-by: Christoph Hellwig Tested-by: Helge Deller Acked-by: Helge Deller Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/parisc/Kconfig | 2 + arch/parisc/include/asm/dma-mapping.h | 189 ++-------------------------------- arch/parisc/kernel/drivers.c | 2 +- arch/parisc/kernel/pci-dma.c | 92 ++++++++++------- drivers/parisc/ccio-dma.c | 57 +++++----- drivers/parisc/sba_iommu.c | 52 +++++----- 6 files changed, 124 insertions(+), 270 deletions(-) commit eae075196305549513335c2fc7d5d63712246bfd Author: Christoph Hellwig Date: Wed Jan 20 15:01:44 2016 -0800 frv: convert to dma_map_ops Signed-off-by: Christoph Hellwig Cc: David Howells Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/Kconfig | 2 + arch/frv/include/asm/dma-mapping.h | 132 ++-------------------------------- arch/frv/mb93090-mb00/pci-dma-nommu.c | 72 ++++++++++++------- arch/frv/mb93090-mb00/pci-dma.c | 74 ++++++++++++------- 4 files changed, 101 insertions(+), 179 deletions(-) commit 5a1a67f1d7fef42eaa5a4cc3d48094fbec75d685 Author: Christoph Hellwig Date: Wed Jan 20 15:01:41 2016 -0800 nios2: convert to dma_map_ops Signed-off-by: Christoph Hellwig Cc: Ley Foon Tan Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/nios2/Kconfig | 1 + arch/nios2/include/asm/dma-mapping.h | 123 ++--------------------------- arch/nios2/mm/dma-mapping.c | 149 +++++++++++++++++++---------------- 3 files changed, 87 insertions(+), 186 deletions(-) commit e20dd88995dffe262934f355b3e96daa2458b331 Author: Christoph Hellwig Date: Wed Jan 20 15:01:38 2016 -0800 cris: convert to dma_map_ops Signed-off-by: Christoph Hellwig Cc: Mikael Starvik Cc: Jesper Nilsson Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/cris/Kconfig | 1 + arch/cris/arch-v32/drivers/pci/dma.c | 54 +++++++++--- arch/cris/include/asm/dma-mapping.h | 161 ++--------------------------------- 3 files changed, 51 insertions(+), 165 deletions(-) commit 4605f04b2893fb5498b31c54e8f21da2fc4cc736 Author: Christoph Hellwig Date: Wed Jan 20 15:01:35 2016 -0800 c6x: convert to dma_map_ops [dan.carpenter@oracle.com: C6X: fix build breakage] Signed-off-by: Christoph Hellwig Cc: Mark Salter Cc: Aurelien Jacquiot Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/c6x/Kconfig | 2 + arch/c6x/include/asm/dma-mapping.h | 98 ++++---------------------------------- arch/c6x/kernel/dma.c | 95 +++++++++++++++++------------------- arch/c6x/mm/dma-coherent.c | 10 ++-- 4 files changed, 58 insertions(+), 147 deletions(-) commit 6f62097583e799040d6d18909b670b1e4dbb614d Author: Christoph Hellwig Date: Wed Jan 20 15:01:32 2016 -0800 blackfin: convert to dma_map_ops Signed-off-by: Christoph Hellwig Cc: Steven Miao Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/blackfin/Kconfig | 1 + arch/blackfin/include/asm/dma-mapping.h | 127 +------------------------------- arch/blackfin/kernel/dma-mapping.c | 52 +++++++++---- 3 files changed, 43 insertions(+), 137 deletions(-) commit a34a517ac96c6910a3a0aab9513035bfbed0020c Author: Christoph Hellwig Date: Wed Jan 20 15:01:29 2016 -0800 avr32: convert to dma_map_ops Signed-off-by: Christoph Hellwig Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/avr32/Kconfig | 1 + arch/avr32/include/asm/dma-mapping.h | 342 +---------------------------------- arch/avr32/mm/dma-coherent.c | 115 ++++++++---- 3 files changed, 85 insertions(+), 373 deletions(-) commit 052c96dbe33b032b949510ca724ed54d02e1255c Author: Christoph Hellwig Date: Wed Jan 20 15:01:26 2016 -0800 arc: convert to dma_map_ops [vgupta@synopsys.com: ARC: dma mapping fixes #2] Signed-off-by: Christoph Hellwig Cc: Vineet Gupta Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Vineet Gupta Cc: Carlos Palminha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/Kconfig | 1 + arch/arc/include/asm/dma-mapping.h | 187 +------------------------------------ arch/arc/mm/dma.c | 152 ++++++++++++++++++++---------- 3 files changed, 110 insertions(+), 230 deletions(-) commit 0d4a619b64bad7117947a84a10c17a2b8f14d252 Author: Christoph Hellwig Date: Wed Jan 20 15:01:22 2016 -0800 dma-mapping: make the generic coherent dma mmap implementation optional This series converts all remaining architectures to use dma_map_ops and the generic implementation of the DMA API. This not only simplifies the code a lot, but also prepares for possible future changes like more generic non-iommu dma_ops implementations or generic per-device dma_map_ops. This patch (of 16): We have a couple architectures that do not want to support this code, so add another Kconfig symbol that disables the code similar to what we do for the nommu case. Signed-off-by: Christoph Hellwig Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Cc: Steven Miao Cc: Ley Foon Tan Cc: David Howells Cc: Koichi Yasutake Cc: Chris Metcalf Cc: "David S. Miller" Cc: Aurelien Jacquiot Cc: Geert Uytterhoeven Cc: Helge Deller Cc: James Hogan Cc: Jesper Nilsson Cc: Mark Salter Cc: Mikael Starvik Cc: Vineet Gupta Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/Kconfig | 3 +++ drivers/base/dma-mapping.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit f9ed89e17ee7d1f5f25615bb0080b9a3ff1bb5f0 Author: Fengguang Wu Date: Wed Jan 20 15:01:19 2016 -0800 iio: core: fix ptr_ret.cocci warnings drivers/iio/industrialio-sw-trigger.c:169:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu Cc: Joel Becker Cc: Lars-Peter Clausen Cc: Christoph Hellwig Cc: Hartmut Knaack Cc: Octavian Purdila Cc: Paul Bolle Cc: Adriana Reus Cc: Daniel Baluta Cc: Cristina Opriceana Cc: Peter Meerwald Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/iio/industrialio-sw-trigger.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 90d6cd51af1aa275a302846b35b9638c870d2af5 Author: Andrew Morton Date: Wed Jan 20 15:01:16 2016 -0800 fs/adfs/adfs.h: tidy up comments Lots of needless 80-col overflows. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/adfs/adfs.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit e458bcd16f5bec6f19b60ef957b4f88af95aa78a Author: Andrew Morton Date: Wed Jan 20 15:01:13 2016 -0800 fs/overlayfs/super.c needs pagemap.h i386 allmodconfig: In file included from fs/overlayfs/super.c:10:0: fs/overlayfs/super.c: In function 'ovl_fill_super': include/linux/fs.h:898:36: error: 'PAGE_CACHE_SIZE' undeclared (first use in this function) #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) ^ fs/overlayfs/super.c:939:19: note: in expansion of macro 'MAX_LFS_FILESIZE' sb->s_maxbytes = MAX_LFS_FILESIZE; ^ include/linux/fs.h:898:36: note: each undeclared identifier is reported only once for each function it appears in #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) ^ fs/overlayfs/super.c:939:19: note: in expansion of macro 'MAX_LFS_FILESIZE' sb->s_maxbytes = MAX_LFS_FILESIZE; ^ Cc: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/overlayfs/super.c | 1 + 1 file changed, 1 insertion(+) commit 2954e440be7305134be632a94536b412899490f7 Author: Yaowei Bai Date: Wed Jan 20 15:01:11 2016 -0800 ipc/shm.c: is_file_shm_hugepages() can be boolean Make is_file_shm_hugepages() return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/shm.h | 6 +++--- ipc/shm.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 06af1c52c9ea234e0b1266cc0b52c3e0c6c8fe9f Author: Bongkyu Kim Date: Wed Jan 20 15:01:08 2016 -0800 lz4: fix wrong compress buffer size for 64-bits The current lz4 compress buffer is 16kb on 32-bits, 32kb on 64-bits system. But, lz4 needs only 16kb on both. On 64-bits, this causes wasted cpu cycles for additional memset during every compression. In case of lz4hc, the current buffer size is (256kb + 8) on 32-bits, (512kb + 16) on 64-bits. But, lz4hc needs only (256kb + 2 * pointer) on both. This patch fixes these wrong compress buffer sizes for 64-bits. Signed-off-by: Bongkyu Kim Cc: Chanho Min Cc: Yann Collet Cc: Kyungsik Lee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/lz4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a3b609ef9f8b1dbfe97034ccad6cd3fe71fbe7ab Author: Mateusz Guzik Date: Wed Jan 20 15:01:05 2016 -0800 proc read mm's {arg,env}_{start,end} with mmap semaphore taken. Only functions doing more than one read are modified. Consumeres happened to deal with possibly changing data, but it does not seem like a good thing to rely on. Signed-off-by: Mateusz Guzik Acked-by: Cyrill Gorcunov Cc: Alexey Dobriyan Cc: Jarod Wilson Cc: Jan Stancek Cc: Al Viro Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 13 ++++++++++--- mm/util.c | 16 ++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) commit ddf1d398e517e660207e2c807f76a90df543a217 Author: Mateusz Guzik Date: Wed Jan 20 15:01:02 2016 -0800 prctl: take mmap sem for writing to protect against others An unprivileged user can trigger an oops on a kernel with CONFIG_CHECKPOINT_RESTORE. proc_pid_cmdline_read takes mmap_sem for reading and obtains args + env start/end values. These get sanity checked as follows: BUG_ON(arg_start > arg_end); BUG_ON(env_start > env_end); These can be changed by prctl_set_mm. Turns out also takes the semaphore for reading, effectively rendering it useless. This results in: kernel BUG at fs/proc/base.c:240! invalid opcode: 0000 [#1] SMP Modules linked in: virtio_net CPU: 0 PID: 925 Comm: a.out Not tainted 4.4.0-rc8-next-20160105dupa+ #71 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 task: ffff880077a68000 ti: ffff8800784d0000 task.ti: ffff8800784d0000 RIP: proc_pid_cmdline_read+0x520/0x530 RSP: 0018:ffff8800784d3db8 EFLAGS: 00010206 RAX: ffff880077c5b6b0 RBX: ffff8800784d3f18 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 00007f78e8857000 RDI: 0000000000000246 RBP: ffff8800784d3e40 R08: 0000000000000008 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000050 R13: 00007f78e8857800 R14: ffff88006fcef000 R15: ffff880077c5b600 FS: 00007f78e884a740(0000) GS:ffff88007b200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f78e8361770 CR3: 00000000790a5000 CR4: 00000000000006f0 Call Trace: __vfs_read+0x37/0x100 vfs_read+0x82/0x130 SyS_read+0x58/0xd0 entry_SYSCALL_64_fastpath+0x12/0x76 Code: 4c 8b 7d a8 eb e9 48 8b 9d 78 ff ff ff 4c 8b 7d 90 48 8b 03 48 39 45 a8 0f 87 f0 fe ff ff e9 d1 fe ff ff 4c 8b 7d 90 eb c6 0f 0b <0f> 0b 0f 0b 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 RIP proc_pid_cmdline_read+0x520/0x530 ---[ end trace 97882617ae9c6818 ]--- Turns out there are instances where the code just reads aformentioned values without locking whatsoever - namely environ_read and get_cmdline. Interestingly these functions look quite resilient against bogus values, but I don't believe this should be relied upon. The first patch gets rid of the oops bug by grabbing mmap_sem for writing. The second patch is optional and puts locking around aformentioned consumers for safety. Consumers of other fields don't seem to benefit from similar treatment and are left untouched. This patch (of 2): The code was taking the semaphore for reading, which does not protect against readers nor concurrent modifications. The problem could cause a sanity checks to fail in procfs's cmdline reader, resulting in an OOPS. Note that some functions perform an unlocked read of various mm fields, but they seem to be fine despite possible modificaton. Signed-off-by: Mateusz Guzik Acked-by: Cyrill Gorcunov Cc: Alexey Dobriyan Cc: Jarod Wilson Cc: Jan Stancek Cc: Al Viro Cc: Anshuman Khandual Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sys.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit bf76f73c5f6554df1bd337aea5b3ea561f09632c Author: Daniel Axtens Date: Wed Jan 20 15:00:58 2016 -0800 powerpc: enable UBSAN support This hooks up UBSAN support for PowerPC. So far it's found some interesting cases where we don't properly sanitise input to shifts, including one in our futex handling. Nothing critical, but interesting and worth fixing. [valentinrothberg@gmail.com: arch/powerpc/Kconfig: fix typo in select statement] Signed-off-by: Daniel Axtens Cc: Andrey Ryabinin Cc: Benjamin Herrenschmidt Tested-by: Andrew Donnellan Acked-by: Michael Ellerman Signed-off-by: Valentin Rothberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/Makefile | 8 +++++++- arch/powerpc/kernel/vdso32/Makefile | 1 + arch/powerpc/kernel/vdso64/Makefile | 1 + arch/powerpc/xmon/Makefile | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) commit c6d308534aef6c99904bf5862066360ae067abc4 Author: Andrey Ryabinin Date: Wed Jan 20 15:00:55 2016 -0800 UBSAN: run-time undefined behavior sanity checker UBSAN uses compile-time instrumentation to catch undefined behavior (UB). Compiler inserts code that perform certain kinds of checks before operations that could cause UB. If check fails (i.e. UB detected) __ubsan_handle_* function called to print error message. So the most of the work is done by compiler. This patch just implements ubsan handlers printing errors. GCC has this capability since 4.9.x [1] (see -fsanitize=undefined option and its suboptions). However GCC 5.x has more checkers implemented [2]. Article [3] has a bit more details about UBSAN in the GCC. [1] - https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Options.html [2] - https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html [3] - http://developerblog.redhat.com/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/ Issues which UBSAN has found thus far are: Found bugs: * out-of-bounds access - 97840cb67ff5 ("netfilter: nfnetlink: fix insufficient validation in nfnetlink_bind") undefined shifts: * d48458d4a768 ("jbd2: use a better hash function for the revoke table") * 10632008b9e1 ("clockevents: Prevent shift out of bounds") * 'x << -1' shift in ext4 - http://lkml.kernel.org/r/<5444EF21.8020501@samsung.com> * undefined rol32(0) - http://lkml.kernel.org/r/<1449198241-20654-1-git-send-email-sasha.levin@oracle.com> * undefined dirty_ratelimit calculation - http://lkml.kernel.org/r/<566594E2.3050306@odin.com> * undefined roundown_pow_of_two(0) - http://lkml.kernel.org/r/<1449156616-11474-1-git-send-email-sasha.levin@oracle.com> * [WONTFIX] undefined shift in __bpf_prog_run - http://lkml.kernel.org/r/ WONTFIX here because it should be fixed in bpf program, not in kernel. signed overflows: * 32a8df4e0b33f ("sched: Fix odd values in effective_load() calculations") * mul overflow in ntp - http://lkml.kernel.org/r/<1449175608-1146-1-git-send-email-sasha.levin@oracle.com> * incorrect conversion into rtc_time in rtc_time64_to_tm() - http://lkml.kernel.org/r/<1449187944-11730-1-git-send-email-sasha.levin@oracle.com> * unvalidated timespec in io_getevents() - http://lkml.kernel.org/r/ * [NOTABUG] signed overflow in ktime_add_safe() - http://lkml.kernel.org/r/ [akpm@linux-foundation.org: fix unused local warning] [akpm@linux-foundation.org: fix __int128 build woes] Signed-off-by: Andrey Ryabinin Cc: Peter Zijlstra Cc: Sasha Levin Cc: Randy Dunlap Cc: Rasmus Villemoes Cc: Jonathan Corbet Cc: Michal Marek Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Yury Gribov Cc: Dmitry Vyukov Cc: Konstantin Khlebnikov Cc: Kostya Serebryany Cc: Johannes Berg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/ubsan.txt | 84 +++++++ Makefile | 3 +- arch/x86/Kconfig | 1 + arch/x86/boot/Makefile | 1 + arch/x86/boot/compressed/Makefile | 1 + arch/x86/entry/vdso/Makefile | 1 + arch/x86/realmode/rm/Makefile | 1 + drivers/firmware/efi/libstub/Makefile | 1 + include/linux/sched.h | 3 + lib/Kconfig.debug | 2 + lib/Kconfig.ubsan | 29 +++ lib/Makefile | 3 + lib/ubsan.c | 456 ++++++++++++++++++++++++++++++++++ lib/ubsan.h | 84 +++++++ mm/kasan/Makefile | 1 + scripts/Makefile.lib | 6 + scripts/Makefile.ubsan | 17 ++ 17 files changed, 693 insertions(+), 1 deletion(-) commit 68920c973254c5b71a684645c5f6f82d6732c5d6 Author: Andrey Ryabinin Date: Wed Jan 20 15:00:51 2016 -0800 net/mac80211/debugfs.c: prevent build failure with CONFIG_UBSAN=y With upcoming CONFIG_UBSAN the following BUILD_BUG_ON in net/mac80211/debugfs.c starts to trigger: BUILD_BUG_ON(hw_flag_names[NUM_IEEE80211_HW_FLAGS] != (void *)0x1); It seems, that compiler instrumentation causes some code deoptimizations. Because of that GCC is not being able to resolve condition in BUILD_BUG_ON() at compile time. We could make size of hw_flag_names array unspecified and replace the condition in BUILD_BUG_ON() with following: ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS That will have the same effect as before (adding new flag without updating array will trigger build failure) except it doesn't fail with CONFIG_UBSAN. As a bonus this patch slightly decreases size of hw_flag_names array. Signed-off-by: Andrey Ryabinin Cc: Johannes Berg Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/mac80211/debugfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5c9cf8af2e77388f1da81c39237fb4f20c2f85d5 Author: Andrey Ryabinin Date: Wed Jan 20 15:00:48 2016 -0800 kernel: printk: specify alignment for struct printk_log On architectures that have support for efficient unaligned access struct printk_log has 4-byte alignment. Specify alignment attribute in type declaration. The whole point of this patch is to fix deadlock which happening when UBSAN detects unaligned access in printk() thus UBSAN recursively calls printk() with logbuf_lock held by top printk() call. Signed-off-by: Andrey Ryabinin Cc: Peter Zijlstra Cc: Sasha Levin Cc: Randy Dunlap Cc: Rasmus Villemoes Cc: Jonathan Corbet Cc: Michal Marek Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Yury Gribov Cc: Dmitry Vyukov Cc: Konstantin Khlebnikov Cc: Kostya Serebryany Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/printk/printk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 41662f5cc55335807d39404371cfcbb1909304c4 Author: Kees Cook Date: Wed Jan 20 15:00:45 2016 -0800 sysctl: enable strict writes SYSCTL_WRITES_WARN was added in commit f4aacea2f5d1 ("sysctl: allow for strict write position handling"), and released in v3.16 in August of 2014. Since then I can find only 1 instance of non-zero offset writing[1], and it was fixed immediately in CRIU[2]. As such, it appears safe to flip this to the strict state now. [1] https://www.google.com/search?q="when%20file%20position%20was%20not%200" [2] http://lists.openvz.org/pipermail/criu/2015-April/019819.html Signed-off-by: Kees Cook Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/kernel.txt | 15 +++++++-------- kernel/sysctl.c | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) commit a460bece027301e079b9e53c5e0f67c8e3eaebc1 Author: Davidlohr Bueso Date: Wed Jan 20 15:00:42 2016 -0800 rbtree: use READ_ONCE in RB_EMPTY_ROOT With commit d72da4a4d97 ("rbtree: Make lockless searches non-fatal") our rbtrees provide weak guarantees that allows us to do lockless (and very speculative) reads of the tree. Such readers cannot see partial stores on nodes, ie left/right as well as root. As such, similar to the WRITE_ONCE semantics when doing rotations, use READ_ONCE when checking the root node in RB_EMPTY_ROOT. Signed-off-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Cc: Michel Lespinasse Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rbtree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a253f1eee6c471d5418983ca9aa9c756e7db5db9 Author: Geliang Tang Date: Wed Jan 20 15:00:39 2016 -0800 rapidio: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Acked-by: "Bounine, Alexandre" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/rio-sysfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 978e30c9b46161c792ecdad0091fd017b21b8ca5 Author: Xunlei Pang Date: Wed Jan 20 15:00:36 2016 -0800 kexec: move some memembers and definitions within the scope of CONFIG_KEXEC_FILE Move the stuff currently only used by the kexec file code within CONFIG_KEXEC_FILE (and CONFIG_KEXEC_VERIFY_SIG). Also move internal "struct kexec_sha_region" and "struct kexec_buf" into "kexec_internal.h". Signed-off-by: Xunlei Pang Cc: "Eric W. Biederman" Cc: Dave Young Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/machine_kexec_64.c | 2 ++ include/linux/kexec.h | 62 +++++++++++++++----------------------- kernel/kexec_file.c | 2 ++ kernel/kexec_internal.h | 21 +++++++++++++ 4 files changed, 50 insertions(+), 37 deletions(-) commit 2b24692b9235cb82b6f735b7a4c4137211ddf005 Author: Geliang Tang Date: Wed Jan 20 15:00:34 2016 -0800 kernel/kexec_core.c: use list_for_each_entry_safe in kimage_free_page_list Use list_for_each_entry_safe() instead of list_for_each_safe() to simplify the code. Signed-off-by: Geliang Tang Cc: Dave Young Cc: Vivek Goyal Acked-by: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit cdf4b3fa03bab157d2d70d4de65bb7ae319b084f Author: Xunlei Pang Date: Wed Jan 20 15:00:31 2016 -0800 kexec: set KEXEC_TYPE_CRASH before sanity_check_segment_list() sanity_check_segment_list() checks KEXEC_TYPE_CRASH flag to ensure all the segments of the loaded crash kernel are within the kernel crash resource limits, so set the flag beforehand. Signed-off-by: Xunlei Pang Acked-by: Dave Young Cc: Eric Biederman Cc: Vivek Goyal Acked-by: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kexec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9425676a363c0976e3d43dda792dc4711a651d1d Author: Rasmus Villemoes Date: Wed Jan 20 15:00:28 2016 -0800 kernel/cpu.c: make set_cpu_* static inlines Almost all callers of the set_cpu_* functions pass an explicit true or false. Making them static inline thus replaces the function calls with a simple set_bit/clear_bit, saving some .text. Signed-off-by: Rasmus Villemoes Acked-by: Rusty Russell Cc: Greg Kroah-Hartman Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/cpumask.h | 43 +++++++++++++++++++++++++++++++++++++++---- kernel/cpu.c | 34 ---------------------------------- 2 files changed, 39 insertions(+), 38 deletions(-) commit 5aec01b834fd6f8ca49d1aeede665b950d0c148e Author: Rasmus Villemoes Date: Wed Jan 20 15:00:25 2016 -0800 kernel/cpu.c: eliminate cpu_*_mask Replace the variables cpu_possible_mask, cpu_online_mask, cpu_present_mask and cpu_active_mask with macros expanding to expressions of the same type and value, eliminating some indirection. Signed-off-by: Rasmus Villemoes Acked-by: Rusty Russell Cc: Greg Kroah-Hartman Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/cpumask.h | 8 ++++---- kernel/cpu.c | 8 -------- 2 files changed, 4 insertions(+), 12 deletions(-) commit 848e239155a17c5373e52278ff9a13b29867ea8a Author: Rasmus Villemoes Date: Wed Jan 20 15:00:22 2016 -0800 drivers/base/cpu.c: use __cpu_*_mask directly The only user of the lvalue-ness of the cpu_*_mask variables is in drivers/base/cpu.c, and that is mostly a work-around for the fact that not even const variables can be used in static initialization. Now that the underlying struct cpumasks are exposed we can take their address. Signed-off-by: Rasmus Villemoes Acked-by: Rusty Russell Acked-by: Greg Kroah-Hartman Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4b804c85dc37db6c108832b28cd54673ff7ee037 Author: Rasmus Villemoes Date: Wed Jan 20 15:00:19 2016 -0800 kernel/cpu.c: export __cpu_*_mask Exporting the cpumasks __cpu_possible_mask and friends will allow us to remove the extra indirection through the cpu_*_mask variables. It will also allow the set_cpu_* functions to become static inlines, which will give a .text reduction. Signed-off-by: Rasmus Villemoes Acked-by: Rusty Russell Cc: Greg Kroah-Hartman Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/cpumask.h | 4 ++++ kernel/cpu.c | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit c4c54dd1caf1393c529e7ea1f18b4342c796a49c Author: Rasmus Villemoes Date: Wed Jan 20 15:00:16 2016 -0800 kernel/cpu.c: change type of cpu_possible_bits and friends Change cpu_possible_bits and friends (online, present, active) from being bitmaps that happen to have the right size to actually being struct cpumasks. Also rename them to __cpu_xyz_mask. This is mostly a small cleanup in preparation for exporting them and, eventually, eliminating the extra indirection through the cpu_xyz_mask variables. Signed-off-by: Rasmus Villemoes Acked-by: Rusty Russell Cc: Greg Kroah-Hartman Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/cpu.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit a0512164278b11deb3b07bf14e72f8b979b07aa6 Author: Rasmus Villemoes Date: Wed Jan 20 15:00:13 2016 -0800 powerpc/fadump: rename cpu_online_mask member of struct fadump_crash_info_header The four cpumasks cpu_{possible,online,present,active}_bits are exposed readonly via the corresponding const variables cpu_xyz_mask. But they are also accessible for arbitrary writing via the exposed functions set_cpu_xyz. There's quite a bit of code throughout the kernel which iterates over or otherwise accesses these bitmaps, and having the access go via the cpu_xyz_mask variables is nowadays [1] simply a useless indirection. It may be that any problem in CS can be solved by an extra level of indirection, but that doesn't mean every extra indirection solves a problem. In this case, it even necessitates some minor ugliness (see 4/6). Patch 1/6 is new in v2, and fixes a build failure on ppc by renaming a struct member, to avoid problems when the identifier cpu_online_mask becomes a macro later in the series. The next four patches eliminate the cpu_xyz_mask variables by simply exposing the actual bitmaps, after renaming them to discourage direct access - that still happens through cpu_xyz_mask, which are now simply macros with the same type and value as they used to have. After that, there's no longer any reason to have the setter functions be out-of-line: The boolean parameter is almost always a literal true or false, so by making them static inlines they will usually compile to one or two instructions. For a defconfig build on x86_64, bloat-o-meter says we save ~3000 bytes. We also save a little stack (stackdelta says 127 functions have a 16 byte smaller stack frame, while two grow by that amount). Mostly because, when iterating over the mask, gcc typically loads the value of cpu_xyz_mask into a callee-saved register and from there into %rdi before each find_next_bit call - now it can just load the appropriate immediate address into %rdi before each call. [1] See Rusty's kind explanation http://thread.gmane.org/gmane.linux.kernel/2047078/focus=2047722 for some historic context. This patch (of 6): As preparation for eliminating the indirect access to the various global cpu_*_bits bitmaps via the pointer variables cpu_*_mask, rename the cpu_online_mask member of struct fadump_crash_info_header to simply online_mask, thus allowing cpu_online_mask to become a macro. Signed-off-by: Rasmus Villemoes Acked-by: Michael Ellerman Cc: Greg Kroah-Hartman Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/fadump.h | 2 +- arch/powerpc/kernel/fadump.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c428fbdbf3e9515bfe686881ffdba862dbd8cb6f Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Jan 20 15:00:10 2016 -0800 exit: remove unneeded declaration of exit_mm() Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/exit.c | 2 -- 1 file changed, 2 deletions(-) commit ac94b6e3ba858b8de1dfe3f77ad215af7b648545 Author: Jann Horn Date: Wed Jan 20 15:00:08 2016 -0800 fs/coredump: prevent "" / "." / ".." core path components Let %h and %e print empty values as "!", "." as "!" and ".." as "!.". This prevents hostnames and comm values that are empty or consist of one or two dots from changing the directory level at which the corefile will be stored. Consider the case where someone decides to sort coredumps by hostname with a core pattern like "/cores/%h/core.%e.%p.%t" or so. In this case, hostnames "" and "." would cause the coredump to land directly in /cores, which is not what the intent behind the core pattern is, and ".." would cause the coredump to land in /. Yeah, there probably aren't many people who do that, but I still don't want this edgecase to be kind of broken. It seems very unlikely that this caused security issues anywhere, so I'm not requesting a stable backport. [akpm@linux-foundation.org: tweak code comment] Signed-off-by: Jann Horn Acked-by: Kees Cook Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coredump.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit caaee6234d05a58c5b4d05e7bf766131b810a657 Author: Jann Horn Date: Wed Jan 20 15:00:04 2016 -0800 ptrace: use fsuid, fsgid, effective creds for fs access checks By checking the effective credentials instead of the real UID / permitted capabilities, ensure that the calling process actually intended to use its credentials. To ensure that all ptrace checks use the correct caller credentials (e.g. in case out-of-tree code or newly added code omits the PTRACE_MODE_*CREDS flag), use two new flags and require one of them to be set. The problem was that when a privileged task had temporarily dropped its privileges, e.g. by calling setreuid(0, user_uid), with the intent to perform following syscalls with the credentials of a user, it still passed ptrace access checks that the user would not be able to pass. While an attacker should not be able to convince the privileged task to perform a ptrace() syscall, this is a problem because the ptrace access check is reused for things in procfs. In particular, the following somewhat interesting procfs entries only rely on ptrace access checks: /proc/$pid/stat - uses the check for determining whether pointers should be visible, useful for bypassing ASLR /proc/$pid/maps - also useful for bypassing ASLR /proc/$pid/cwd - useful for gaining access to restricted directories that contain files with lax permissions, e.g. in this scenario: lrwxrwxrwx root root /proc/13020/cwd -> /root/foobar drwx------ root root /root drwxr-xr-x root root /root/foobar -rw-r--r-- root root /root/foobar/secret Therefore, on a system where a root-owned mode 6755 binary changes its effective credentials as described and then dumps a user-specified file, this could be used by an attacker to reveal the memory layout of root's processes or reveal the contents of files he is not allowed to access (through /proc/$pid/cwd). [akpm@linux-foundation.org: fix warning] Signed-off-by: Jann Horn Acked-by: Kees Cook Cc: Casey Schaufler Cc: Oleg Nesterov Cc: Ingo Molnar Cc: James Morris Cc: "Serge E. Hallyn" Cc: Andy Shevchenko Cc: Andy Lutomirski Cc: Al Viro Cc: "Eric W. Biederman" Cc: Willy Tarreau Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/array.c | 2 +- fs/proc/base.c | 21 +++++++++++---------- fs/proc/namespaces.c | 4 ++-- include/linux/ptrace.h | 24 +++++++++++++++++++++++- kernel/events/core.c | 2 +- kernel/futex.c | 2 +- kernel/futex_compat.c | 2 +- kernel/kcmp.c | 4 ++-- kernel/ptrace.c | 39 +++++++++++++++++++++++++++++++-------- mm/process_vm_access.c | 2 +- security/commoncap.c | 7 ++++++- 11 files changed, 80 insertions(+), 29 deletions(-) commit 3dfb7d8cdbc7ea0c2970450e60818bb3eefbad69 Author: Jann Horn Date: Wed Jan 20 15:00:01 2016 -0800 security: let security modules use PTRACE_MODE_* with bitmasks It looks like smack and yama weren't aware that the ptrace mode can have flags ORed into it - PTRACE_MODE_NOAUDIT until now, but only for /proc/$pid/stat, and with the PTRACE_MODE_*CREDS patch, all modes have flags ORed into them. Signed-off-by: Jann Horn Acked-by: Kees Cook Acked-by: Casey Schaufler Cc: Oleg Nesterov Cc: Ingo Molnar Cc: James Morris Cc: "Serge E. Hallyn" Cc: Andy Shevchenko Cc: Andy Lutomirski Cc: Al Viro Cc: "Eric W. Biederman" Cc: Willy Tarreau Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds security/smack/smack_lsm.c | 8 +++----- security/yama/yama_lsm.c | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) commit 570ac9337b5c13dbf46ca6758c376e2e13e8956f Author: Oleg Nesterov Date: Wed Jan 20 14:59:58 2016 -0800 ptrace: task_stopped_code(ptrace => true) can't see TASK_STOPPED task task_stopped_code()->task_is_stopped_or_traced() doesn't look right, the traced task must never be TASK_STOPPED. We can not add WARN_ON(task_is_stopped(p)), but this is only because do_wait() can race with PTRACE_ATTACH from another thread. [akpm@linux-foundation.org: teeny cleanup] Signed-off-by: Oleg Nesterov Cc: Andrey Ryabinin Cc: Roland McGrath Acked-by: Tejun Heo Cc: Pedro Alves Cc: Jan Kratochvil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/exit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7c3b00e06d731a28fc3d17ed02ba250642b15b81 Author: Oleg Nesterov Date: Wed Jan 20 14:59:55 2016 -0800 ptrace: make wait_on_bit(JOBCTL_TRAPPING_BIT) in ptrace_attach() killable ptrace_attach() can hang waiting for STOPPED -> TRACED transition if the tracee gets frozen in between, change wait_on_bit() to use TASK_KILLABLE. This doesn't really solve the problem(s) and we probably need to fix the freezer. In particular, note that this means that pm freezer will fail if it races attach-to-stopped-task. And otoh perhaps we can just remove JOBCTL_TRAPPING_BIT altogether, it is not clear if we really need to hide this transition from debugger, WNOHANG after PTRACE_ATTACH can fail anyway if it races with SIGCONT. Signed-off-by: Oleg Nesterov Reported-by: Andrey Ryabinin Cc: Roland McGrath Acked-by: Tejun Heo Cc: Pedro Alves Cc: Jan Kratochvil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/ptrace.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 8992de4cec126c6703ece0747239d071dbce725f Author: Julia Lawall Date: Wed Jan 20 14:59:52 2016 -0800 fat: constify fatent_operations structures The fatent_operations structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/fat.h | 2 +- fs/fat/fatent.c | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) commit 28016128d37a46d89ac5d9a450709284148989d6 Author: Namjae Jeon Date: Wed Jan 20 14:59:49 2016 -0800 Documentation/filesystems/vfat.txt: update the limitation for fat fallocate Update the limitation for fat fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat Cc: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/vfat.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 16fab2015099a937e1a771f2785c5dd3445fe483 Author: Namjae Jeon Date: Wed Jan 20 14:59:46 2016 -0800 fat: permit to return phy block number by fibmap in fallocated region Make the fibmap call return the proper physical block number for any offset request in the fallocated range. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat Cc: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/cache.c | 79 +++++++++++++++++++++++++++++++++++++++------------------- fs/fat/dir.c | 2 +- fs/fat/fat.h | 5 +++- fs/fat/inode.c | 31 ++++++++++++++++++++--- 4 files changed, 87 insertions(+), 30 deletions(-) commit 7e0f236b5b9cc23aa004eb58ee2201f294d0422a Author: Namjae Jeon Date: Wed Jan 20 14:59:43 2016 -0800 fat: skip cluster allocation on fallocated region Skip new cluster allocation after checking i_blocks limit in _fat_get_block, because the blocks are already allocated in fallocated region. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat Cc: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/inode.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit b13bb33eacb7266d66a3adf03adaa0886d091789 Author: Namjae Jeon Date: Wed Jan 20 14:59:41 2016 -0800 fat: add fat_fallocate operation Implement preallocation via the fallocate syscall on VFAT partitions. This patch is based on an earlier patch of the same name which had some issues detailed below and did not get accepted. Refer https://lkml.org/lkml/2007/12/22/130. a) The preallocated space was not persistent when the FALLOC_FL_KEEP_SIZE flag was set. It will deallocate cluster at evict time. b) There was no need to zero out the clusters when the flag was set Instead of doing an expanding truncate, just allocate clusters and add them to the fat chain. This reduces preallocation time. Compatibility with windows: There are no issues when FALLOC_FL_KEEP_SIZE is not set because it just does an expanding truncate. Thus reading from the preallocated area on windows returns null until data is written to it. When a file with preallocated area using the FALLOC_FL_KEEP_SIZE was written to on windows, the windows driver freed-up the preallocated clusters and allocated new clusters for the new data. The freed up clusters gets reflected in the free space available for the partition which can be seen from the Volume properties. The windows chkdsk tool also does not report any errors on a disk containing files with preallocated space. And there is also no issue using linux fat fsck. because discard preallocated clusters at repair time. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat Cc: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/fat.h | 1 + fs/fat/file.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/fat/inode.c | 34 ++++++++++++++++++++++++++++++-- 3 files changed, 94 insertions(+), 2 deletions(-) commit a3082d526f2d406d4b488e49a508a0062a23314f Author: OGAWA Hirofumi Date: Wed Jan 20 14:59:38 2016 -0800 fat: add simple validation for directory inode This detects simple corruption cases of directory, and tries to avoid further damage to user data. And performance impact of this validation should be very low, or not measurable. Signed-off-by: OGAWA Hirofumi Reported-by: Vegard Nossum Tested-by: Vegard Nossum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/inode.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a513d86983164a1f74a226ab7006deffbf63907e Author: Jan Kara Date: Wed Jan 20 14:59:35 2016 -0800 fat: allow time_offset to be up to 24 hours Currently we limit values of time_offset mount option to be between -12 and 12 hours. However e.g. zone GMT+12 can have a DST correction on top which makes the total time difference 13 hours. Update the checks in mount option parsing to allow offset of upto 24 hours to allow for unusual cases. Signed-off-by: Jan Kara Reported-by: Volker Kuhlmann Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2c35dea279351f2ad74a99126b29f9f5394ccc04 Author: Geliang Tang Date: Wed Jan 20 14:59:32 2016 -0800 fs/hfs/catalog.c: use list_for_each_entry in hfs_cat_delete Use list_for_each_entry() instead of list_for_each() to simplify the code. Signed-off-by: Geliang Tang Reviewed-by: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hfs/catalog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f057f3b226a5c513aafaa5ece94f3a7f363215c5 Author: Yaowei Bai Date: Wed Jan 20 14:59:29 2016 -0800 init/do_mounts: initrd_load() can be boolean Make initrd_load() return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/do_mounts.h | 4 ++-- init/do_mounts_initrd.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 31c025b5fece8d0fdc88920065fbc1ff7e4a78b1 Author: Yaowei Bai Date: Wed Jan 20 14:59:27 2016 -0800 init/main.c: obsolete_checksetup can be boolean Make obsolete_checksetup() return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit df0108c5da561c66c333bb46bfe3c1fc65905898 Author: Jason Baron Date: Wed Jan 20 14:59:24 2016 -0800 epoll: add EPOLLEXCLUSIVE flag Currently, epoll file descriptors or epfds (the fd returned from epoll_create[1]()) that are added to a shared wakeup source are always added in a non-exclusive manner. This means that when we have multiple epfds attached to a shared fd source they are all woken up. This creates thundering herd type behavior. Introduce a new 'EPOLLEXCLUSIVE' flag that can be passed as part of the 'event' argument during an epoll_ctl() EPOLL_CTL_ADD operation. This new flag allows for exclusive wakeups when there are multiple epfds attached to a shared fd event source. The implementation walks the list of exclusive waiters, and queues an event to each epfd, until it finds the first waiter that has threads blocked on it via epoll_wait(). The idea is to search for threads which are idle and ready to process the wakeup events. Thus, we queue an event to at least 1 epfd, but may still potentially queue an event to all epfds that are attached to the shared fd source. Performance testing was done by Madars Vitolins using a modified version of Enduro/X. The use of the 'EPOLLEXCLUSIVE' flag reduce the length of this particular workload from 860s down to 24s. Sample epoll_clt text: EPOLLEXCLUSIVE Sets an exclusive wakeup mode for the epfd file descriptor that is being attached to the target file descriptor, fd. Thus, when an event occurs and multiple epfd file descriptors are attached to the same target file using EPOLLEXCLUSIVE, one or more epfds will receive an event with epoll_wait(2). The default in this scenario (when EPOLLEXCLUSIVE is not set) is for all epfds to receive an event. EPOLLEXCLUSIVE may only be specified with the op EPOLL_CTL_ADD. Signed-off-by: Jason Baron Tested-by: Madars Vitolins Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Al Viro Cc: Michael Kerrisk Cc: Eric Wong Cc: Jonathan Corbet Cc: Andy Lutomirski Cc: Hagen Paul Pfeifer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 24 +++++++++++++++++++++--- include/uapi/linux/eventpoll.h | 3 +++ 2 files changed, 24 insertions(+), 3 deletions(-) commit 6b10df4257367dd0ead49f88df473972c00a8b5c Author: Vladimir Zapolskiy Date: Wed Jan 20 14:59:21 2016 -0800 checkpatch: fix a number of COMPLEX_MACRO false positives A simple search over the kernel souce displays a number of correctly defined multiline macro, which generally are used as an array element initializer: % find ../linux -type f | xargs grep -B1 -H '^[:space]*\[.*\\$' However checkpatch.pl unexpectedly complains about all these macro definitions: % ./scripts/checkpatch.pl --types COMPLEX_MACRO -f include/linux/perf/arm_pmu.h ERROR: Macros with complex values should be enclosed in parentheses +#define PERF_MAP_ALL_UNSUPPORTED \ + [0 ... PERF_COUNT_HW_MAX - 1] = HW_OP_UNSUPPORTED The change intends to fix this type of false positives by flattening only array members and skipping array element designators. Signed-off-by: Vladimir Zapolskiy Acked-by: Joe Perches Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 62e15a6daab0f6b3e8233e976201bce9faecaaf7 Author: Joe Perches Date: Wed Jan 20 14:59:18 2016 -0800 checkpatch: improve macros with flow control test The current test excludes any macro with ## concatenation from being reported with hidden flow control. Some macros are used with return or goto statements along with ##args or ##__VA_ARGS__. A somewhat common case is a logging macro like pr_info(fmt, ...) then a return or goto statement. Check the concatenated variable for args or __VA_ARGS__ and allow those macros to also be reported when they contain a return or goto. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 938224b5e596c1c30d968ffd927a578ea7c4f45b Author: Joe Perches Date: Wed Jan 20 14:59:15 2016 -0800 checkpatch: warn when casting constants to c90 int or longer types Linus Torvalds wrote: > I can't but help to react that this: > #define IOMMU_ERROR_CODE (~(unsigned long) 0) > Not that this *matters*, but it's a bit odd to have to cast constants > to perfectly regular C types. So add a test that looks for constants that are cast to standard C90 int or longer types and suggest using C90 "6.4.4.1 Integer constants" integer-suffixes instead. Miscellanea: o Add a --fix option too Signed-off-by: Joe Perches Suggested-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit f5948701891322770ad6ede317da5fc9cf33d2f0 Author: Chris Metcalf Date: Wed Jan 20 14:59:12 2016 -0800 lib/clz_tab.c: put in lib-y rather than obj-y The clz table (__clz_tab) in lib/clz_tab.c is also provided as part of libgcc.a, and many architectures link against libgcc. To allow the linker to avoid a multiple-definition link failure, clz_tab.o has to be in lib/lib.a rather than lib/builtin.o. The specific issue is that libgcc.a comes before lib/builtin.o on vmlinux.o's link command line, so its _clz.o is pulled to satisfy __clz_tab, and then when the remainder of lib/builtin.o is pulled in to satisfy all the other dependencies, the __clz_tab symbols conflict. By putting clz_tab.o in lib.a, the linker can simply avoid pulling it into vmlinux.o when this situation arises. The definitions of __clz_tab are the same in libgcc.a and in the kernel; arguably we could also simply rename the kernel version, but it's unlikely the libgcc version will ever change to become incompatible, so just using it seems reasonably safe. Signed-off-by: Chris Metcalf Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 243c2137cda52599f6112f52b6be5e61fa6536ae Author: Adam Barth Date: Wed Jan 20 14:59:09 2016 -0800 include/linux/radix-tree.h: fix error in docs about locks This text refers to the "first 7 functions", which was correct when written but became incorrect when Johannes Weiner added another function to the list in 139e561660fe ("lib: radix_tree: tree node interface"). Change the text to correctly refer to the first 8 functions. Signed-off-by: Adam Barth Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7aaf4c3e1235cca77dcc1c5a0848687e7d26a42f Author: Andy Shevchenko Date: Wed Jan 20 14:59:07 2016 -0800 test_hexdump: print statistics at the end Like others test are doing print the gathered statistics after test module is finished. Return from the module based on the result. Signed-off-by: Andy Shevchenko Acked-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_hexdump.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) commit 1dacd9ddd359eed63b210bd9b5000c2cfae287ff Author: Andy Shevchenko Date: Wed Jan 20 14:59:04 2016 -0800 test_hexdump: test all possible group sizes for overflow Currently the only one combination is tested for overflow, i.e. rowsize = 16, groupsize = 1, len = 1. Do various test to go through all possible branches. Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_hexdump.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit cc77a719a5cfd419d057277fd0fdfca568bcfdd2 Author: Andy Shevchenko Date: Wed Jan 20 14:59:01 2016 -0800 test_hexdump: check all bytes in real buffer After processing by hex_dump_to_buffer() check all the parts to be expected. Part 1. The actual expected hex dump with or without ASCII part. Part 2. Check if the buffer is dirty beyond needed. Part 3. Return code should be as expected. This is done by using comparison of the return code and memcmp() against the test buffer. We fill the buffer by FILL_CHAR ('#') characters, so, we expect to have a tail of the buffer will be left untouched. The terminating NUL is also checked by memcmp(). Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_hexdump.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) commit 7047d813718c8e40929b7267a8d20cbf212f8565 Author: Andy Shevchenko Date: Wed Jan 20 14:58:58 2016 -0800 test_hexdump: switch to memcmp() Better to use memcmp() against entire buffer to check that nothing is happened to the data in the tail. Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_hexdump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ad27a7559a85309a4775389d012f3728c92f5eb0 Author: Andy Shevchenko Date: Wed Jan 20 14:58:56 2016 -0800 test_hexdump: replace magic numbers by their meaning The magic numbers of the length are converted to their actual meaning, such as end of the buffer with and without ASCII part. We don't touch the rest of the magic constants that will be removed in the following commits. Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_hexdump.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit a3d601fcc2f94fd1583053a1b1aea5de66ffc79c Author: Andy Shevchenko Date: Wed Jan 20 14:58:53 2016 -0800 test_hexdump: go through all possible lengths of buffer When test for overflow do iterate the buffer length in a range 0 .. BUF_SIZE. Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_hexdump.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 3db4a987180acfba3bc117575bfedb81e055778c Author: Andy Shevchenko Date: Wed Jan 20 14:58:50 2016 -0800 test_hexdump: define FILL_CHAR constant Define a character to fill the test buffers. Though the character should be printable since it's used when errors are reported. It should neither be from hex digit [a-fA-F0-9] dictionary nor space. It is recommended not to use one which is present in ASCII part of the test data. Later on we might switch to unprintable character to make test case more robust. Signed-off-by: Andy Shevchenko Suggested-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_hexdump.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 87977ca6bcd051b8bd20adff0a023548ff25902c Author: Andy Shevchenko Date: Wed Jan 20 14:58:47 2016 -0800 test_hexdump: introduce test_hexdump_prepare_test() helper The function prepares the expected result in the provided buffer. Signed-off-by: Andy Shevchenko Acked-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_hexdump.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 60b2e8f4f71a21b96306a8a3ea4dd345ea3bfb46 Author: Andy Shevchenko Date: Wed Jan 20 14:58:44 2016 -0800 test_hexdump: rename to test_hexdump The test suite currently doesn't cover many corner cases when hex_dump_to_buffer() runs into overflow. Refactor and amend test suite to cover most of the cases. This patch (of 9): Just to follow the scheme that most of the test modules are using. There is no fuctional change. Signed-off-by: Andy Shevchenko Acked-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Makefile | 2 +- lib/test-hexdump.c | 180 ----------------------------------------------------- lib/test_hexdump.c | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+), 181 deletions(-) commit 1f330c3279004dd83fcbac5669a858366c51e058 Author: Stephen Boyd Date: Wed Jan 20 14:58:41 2016 -0800 drivers/firmware/broadcom/bcm47xx_nvram.c: use __ioread32_copy() instead of open-coding Now that we have a generic library function for this, replace the open-coded instance. Signed-off-by: Stephen Boyd Cc: Hauke Mehrtens Cc: Cc: Paul Walmsley Cc: Bjorn Andersson Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/firmware/broadcom/bcm47xx_nvram.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit c431e678127578c1b86fe976556d79dd669ad953 Author: Stephen Boyd Date: Wed Jan 20 14:58:38 2016 -0800 drivers/soc/qcom/smd.c: use __ioread32_copy() instead of open-coding it Now that we have a generic library function for this, replace the open-coded instance. Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Cc: Cc: David Howells Cc: Hauke Mehrtens Cc: Paul Walmsley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/soc/qcom/smd.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit a9aec5881b9d4aca184b29d33484a6a58d23f7f2 Author: Stephen Boyd Date: Wed Jan 20 14:58:35 2016 -0800 lib/iomap_copy.c: add __ioread32_copy() Some drivers need to read data out of iomem areas 32-bits at a time. Add an API to do this. Signed-off-by: Stephen Boyd Cc: Bjorn Andersson Cc: Cc: David Howells Cc: Hauke Mehrtens Cc: Paul Walmsley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/io.h | 1 + lib/iomap_copy.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit ef5c16b85b2a6d55ae12a8d7125f3908c8d271d4 Author: Stephen Boyd Date: Wed Jan 20 14:58:32 2016 -0800 arch/frv/include/asm/io.h: accept const void pointers for read{b,w,l}() The SMD driver is reading and writing chunks of data to iomem, and there's an __iowrite32_copy() function for the writing part, but no __ioread32_copy() function for the reading part. This series adds __ioread32_copy() and uses it in two places. This patch (of 4): The frv port uses compiler builtins, __builtin_read*(), for the I/O read routines. Unfortunately, these don't accept const void pointers although the generic ASM implementations do, so generic code passing const pointers to these APIs cause compilers to emit warnings. Add wrapper functions that cast away the const to avoid the warnings. Signed-off-by: Stephen Boyd Cc: David Howells Cc: Cc: Bjorn Andersson Cc: Hauke Mehrtens Cc: Paul Walmsley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/include/asm/io.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 564b026fbd0d28e9f70fb3831293d2922bb7855b Author: James Bottomley Date: Wed Jan 20 14:58:29 2016 -0800 string_helpers: fix precision loss for some inputs It was noticed that we lose precision in the final calculation for some inputs. The most egregious example is size=3000 blk_size=1900 in units of 10 should yield 5.70 MB but in fact yields 3.00 MB (oops). This is because the current algorithm doesn't correctly account for all the remainders in the logarithms. Fix this by doing a correct calculation in the remainders based on napier's algorithm. Additionally, now we have the correct result, we have to account for arithmetic rounding because we're printing 3 digits of precision. This means that if the fourth digit is five or greater, we have to round up, so add a section to ensure correct rounding. Finally account for all possible inputs correctly, including zero for block size. Fixes: b9f28d863594c429e1df35a0474d2663ca28b307 Signed-off-by: James Bottomley Reported-by: Vitaly Kuznetsov Cc: [delay until after 4.4 release] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/string_helpers.c | 63 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 20 deletions(-) commit a4cc3c3c7356ded3eba5905f94279382a05d9c96 Author: Martin Kepplinger Date: Wed Jan 20 14:58:26 2016 -0800 ./CREDITS: add credit information for Martin Kepplinger Signed-off-by: Martin Kepplinger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds CREDITS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit be17bddc6907f65b0a9f0ff77200a6d403ac41d1 Author: Joe Perches Date: Wed Jan 20 14:58:24 2016 -0800 scripts/get_maintainer.pl: handle file names beginning with ./ The problem is that get_maintainer.pl doesn't work if you have a ./ prefix on the filename. For example, if you type: ./scripts/get_maintainer.pl -f ./drivers/usb/usb-skeleton.c then the current code only includes LKML and people from the git log, it doesn't include Greg or the linux-usb list. Reported-by: Dan Carpenter Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/get_maintainer.pl | 4 ++++ 1 file changed, 4 insertions(+) commit 75339d825ae5b1cd5bd6d4b1db3b4b7c12d7b3e9 Author: Randy Dunlap Date: Wed Jan 20 14:58:21 2016 -0800 misc: ibmasm: fix build errors Fix build when CONFIG_SERIAL_8250=m and CONFIG_IBM_ASM=y. Fixes these build errors: drivers/built-in.o: In function `ibmasm_remove_one': module.c:(.text+0xf6874): undefined reference to `ibmasm_unregister_uart' drivers/built-in.o: In function `ibmasm_init_one': module.c:(.text+0xf6c37): undefined reference to `ibmasm_register_uart' Signed-off-by: Randy Dunlap Cc: Max Asbock Cc: Vernon Mauery Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/misc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit c102f07ca0b04f2cb49cfc161c83f6239d17f491 Author: Junil Lee Date: Wed Jan 20 14:58:18 2016 -0800 zsmalloc: fix migrate_zspage-zs_free race condition record_obj() in migrate_zspage() does not preserve handle's HANDLE_PIN_BIT, set by find_aloced_obj()->trypin_tag(), and implicitly (accidentally) un-pins the handle, while migrate_zspage() still performs an explicit unpin_tag() on the that handle. This additional explicit unpin_tag() introduces a race condition with zs_free(), which can pin that handle by this time, so the handle becomes un-pinned. Schematically, it goes like this: CPU0 CPU1 migrate_zspage find_alloced_obj trypin_tag set HANDLE_PIN_BIT zs_free() pin_tag() obj_malloc() -- new object, no tag record_obj() -- remove HANDLE_PIN_BIT set HANDLE_PIN_BIT unpin_tag() -- remove zs_free's HANDLE_PIN_BIT The race condition may result in a NULL pointer dereference: Unable to handle kernel NULL pointer dereference at virtual address 00000000 CPU: 0 PID: 19001 Comm: CookieMonsterCl Tainted: PC is at get_zspage_mapping+0x0/0x24 LR is at obj_free.isra.22+0x64/0x128 Call trace: get_zspage_mapping+0x0/0x24 zs_free+0x88/0x114 zram_free_page+0x64/0xcc zram_slot_free_notify+0x90/0x108 swap_entry_free+0x278/0x294 free_swap_and_cache+0x38/0x11c unmap_single_vma+0x480/0x5c8 unmap_vmas+0x44/0x60 exit_mmap+0x50/0x110 mmput+0x58/0xe0 do_exit+0x320/0x8dc do_group_exit+0x44/0xa8 get_signal+0x538/0x580 do_signal+0x98/0x4b8 do_notify_resume+0x14/0x5c This patch keeps the lock bit in migration path and update value atomically. Signed-off-by: Junil Lee Signed-off-by: Minchan Kim Acked-by: Vlastimil Babka Cc: Sergey Senozhatsky Cc: [4.1+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit dcd6c87cc59af1b4fe7664b35c6344bbe1c9928f Author: Guenter Roeck Date: Wed Jan 20 14:58:15 2016 -0800 mm: arch: remove duplicate definitions of MADV_FREE Commits 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures") and ef58978f1eaa ("mm: define MADV_FREE for some arches") both defined MADV_FREE, but did not use the same values. This results in build errors such as ./arch/alpha/include/uapi/asm/mman.h:53:0: error: "MADV_FREE" redefined ./arch/alpha/include/uapi/asm/mman.h:50:0: note: this is the location of the previous definition for the affected architectures. Fixes: 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures") Fixes: ef58978f1eaa ("mm: define MADV_FREE for some arches") Signed-off-by: Guenter Roeck Cc: Chen Gang Cc: Minchan Kim Acked-by: Helge Deller [parisc] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/uapi/asm/mman.h | 1 - arch/mips/include/uapi/asm/mman.h | 1 - arch/parisc/include/uapi/asm/mman.h | 1 - arch/xtensa/include/uapi/asm/mman.h | 1 - 4 files changed, 4 deletions(-) commit f4be6153cca6c88eaf1e52931d9a010ad4ad940e Author: Kirill A. Shutemov Date: Wed Jan 20 14:58:12 2016 -0800 fs/proc/task_mmu.c: add workaround for old compilers For THP=n, HPAGE_PMD_NR in smaps_account() expands to BUILD_BUG(). That's fine since this codepath is eliminated by modern compilers. But older compilers have not that efficient dead code elimination. It causes problem at least with gcc 4.1.2 on m68k: fs/built-in.o: In function `smaps_account': task_mmu.c:(.text+0x4f8fa): undefined reference to `__compiletime_assert_471' Let's replace HPAGE_PMD_NR with 1 << compound_order(page). Signed-off-by: Kirill A. Shutemov Reported-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b9b6fff7b4caf5838550151d15b389aaa217707 Author: Kirill A. Shutemov Date: Wed Jan 20 14:58:09 2016 -0800 thp: fix interrupt unsafe locking in split_huge_page() split_queue_lock can be taken from interrupt context in some cases, but I forgot to convert locking in split_huge_page() to interrupt-safe primitives. Let's fix this. lockdep output: ====================================================== [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ] 4.4.0+ #259 Tainted: G W ------------------------------------------------------ syz-executor/18183 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire: (split_queue_lock){+.+...}, at: free_transhuge_page+0x24/0x90 mm/huge_memory.c:3436 and this task is already holding: (slock-AF_INET){+.-...}, at: spin_lock_bh include/linux/spinlock.h:307 (slock-AF_INET){+.-...}, at: lock_sock_fast+0x45/0x120 net/core/sock.c:2462 which would create a new lock dependency: (slock-AF_INET){+.-...} -> (split_queue_lock){+.+...} but this new dependency connects a SOFTIRQ-irq-safe lock: (slock-AF_INET){+.-...} ... which became SOFTIRQ-irq-safe at: mark_irqflags kernel/locking/lockdep.c:2799 __lock_acquire+0xfd8/0x4700 kernel/locking/lockdep.c:3162 lock_acquire+0x1dc/0x430 kernel/locking/lockdep.c:3585 __raw_spin_lock include/linux/spinlock_api_smp.h:144 _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:302 udp_queue_rcv_skb+0x781/0x1550 net/ipv4/udp.c:1680 flush_stack+0x50/0x330 net/ipv6/udp.c:799 __udp4_lib_mcast_deliver+0x694/0x7f0 net/ipv4/udp.c:1798 __udp4_lib_rcv+0x17dc/0x23e0 net/ipv4/udp.c:1888 udp_rcv+0x21/0x30 net/ipv4/udp.c:2108 ip_local_deliver_finish+0x2b3/0xa50 net/ipv4/ip_input.c:216 NF_HOOK_THRESH include/linux/netfilter.h:226 NF_HOOK include/linux/netfilter.h:249 ip_local_deliver+0x1c4/0x2f0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:498 ip_rcv_finish+0x5ec/0x1730 net/ipv4/ip_input.c:365 NF_HOOK_THRESH include/linux/netfilter.h:226 NF_HOOK include/linux/netfilter.h:249 ip_rcv+0x963/0x1080 net/ipv4/ip_input.c:455 __netif_receive_skb_core+0x1620/0x2f80 net/core/dev.c:4154 __netif_receive_skb+0x2a/0x160 net/core/dev.c:4189 netif_receive_skb_internal+0x1b5/0x390 net/core/dev.c:4217 napi_skb_finish net/core/dev.c:4542 napi_gro_receive+0x2bd/0x3c0 net/core/dev.c:4572 e1000_clean_rx_irq+0x4e2/0x1100 drivers/net/ethernet/intel/e1000e/netdev.c:1038 e1000_clean+0xa08/0x24a0 drivers/net/ethernet/intel/e1000/e1000_main.c:3819 napi_poll net/core/dev.c:5074 net_rx_action+0x7eb/0xdf0 net/core/dev.c:5139 __do_softirq+0x26a/0x920 kernel/softirq.c:273 invoke_softirq kernel/softirq.c:350 irq_exit+0x18f/0x1d0 kernel/softirq.c:391 exiting_irq ./arch/x86/include/asm/apic.h:659 do_IRQ+0x86/0x1a0 arch/x86/kernel/irq.c:252 ret_from_intr+0x0/0x20 arch/x86/entry/entry_64.S:520 arch_safe_halt ./arch/x86/include/asm/paravirt.h:117 default_idle+0x52/0x2e0 arch/x86/kernel/process.c:304 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:295 default_idle_call+0x48/0xa0 kernel/sched/idle.c:92 cpuidle_idle_call kernel/sched/idle.c:156 cpu_idle_loop kernel/sched/idle.c:252 cpu_startup_entry+0x554/0x710 kernel/sched/idle.c:300 rest_init+0x192/0x1a0 init/main.c:412 start_kernel+0x678/0x69e init/main.c:683 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:195 x86_64_start_kernel+0x158/0x167 arch/x86/kernel/head64.c:184 to a SOFTIRQ-irq-unsafe lock: (split_queue_lock){+.+...} which became SOFTIRQ-irq-unsafe at: mark_irqflags kernel/locking/lockdep.c:2817 __lock_acquire+0x146e/0x4700 kernel/locking/lockdep.c:3162 lock_acquire+0x1dc/0x430 kernel/locking/lockdep.c:3585 __raw_spin_lock include/linux/spinlock_api_smp.h:144 _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:302 split_huge_page_to_list+0xcc0/0x1c50 mm/huge_memory.c:3399 split_huge_page include/linux/huge_mm.h:99 queue_pages_pte_range+0xa38/0xef0 mm/mempolicy.c:507 walk_pmd_range mm/pagewalk.c:50 walk_pud_range mm/pagewalk.c:90 walk_pgd_range mm/pagewalk.c:116 __walk_page_range+0x653/0xcd0 mm/pagewalk.c:204 walk_page_range+0xfe/0x2b0 mm/pagewalk.c:281 queue_pages_range+0xfb/0x130 mm/mempolicy.c:687 migrate_to_node mm/mempolicy.c:1004 do_migrate_pages+0x370/0x4e0 mm/mempolicy.c:1109 SYSC_migrate_pages mm/mempolicy.c:1453 SyS_migrate_pages+0x640/0x730 mm/mempolicy.c:1374 entry_SYSCALL_64_fastpath+0x16/0x7a arch/x86/entry/entry_64.S:185 other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(split_queue_lock); local_irq_disable(); lock(slock-AF_INET); lock(split_queue_lock); lock(slock-AF_INET); Signed-off-by: Kirill A. Shutemov Reported-by: Dmitry Vyukov Acked-by: David Rientjes Reviewed-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 290e0e0f2b54b2eed5018f921c585bb694f9e68a Author: Jean Delvare Date: Wed Jan 20 14:58:06 2016 -0800 lib/libcrc32c.c: fix build warning Fix the following build warning: lib/libcrc32c.c:42:5: warning: no previous prototype for "crc32c" [-Wmissing-prototypes] u32 crc32c(u32 crc, const void *address, unsigned int length) ^ Signed-off-by: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/libcrc32c.c | 1 + 1 file changed, 1 insertion(+) commit d0eb20a863ba7dc1d3f4b841639671f134560be2 Author: Martin K. Petersen Date: Wed Jan 20 11:01:23 2016 -0500 sd: Optimal I/O size is in bytes, not sectors Commit ca369d51b3e1 ("block/sd: Fix device-imposed transfer length limits") accidentally switched optimal I/O size reporting from bytes to block layer sectors. Signed-off-by: Martin K. Petersen Reported-by: Christian Borntraeger Tested-by: Christian Borntraeger Fixes: ca369d51b3e1649be4a72addd6d6a168cfb3f537 Cc: stable@vger.kernel.org # 4.4+ Reviewed-by: James E.J. Bottomley Reviewed-by: Ewan D. Milne Reviewed-by: Matthew R. Ochs drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c142ce0d3c6b070c248cef4bbe3a0f58cfd61f3f Author: Geert Uytterhoeven Date: Fri Jan 15 14:39:09 2016 +0100 hisi_sas: Restrict SCSI_HISI_SAS to arm64 The HiSilicon SAS HBA is available in HiSilicon arm64 SoCs only. Restrict it to arm64, unless compile-testing. Signed-off-by: Geert Uytterhoeven Reviewed-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fb7a6ae7554f15b5b0b7f31b02ed4ef40a8c2eb6 Author: Geert Uytterhoeven Date: Fri Jan 15 14:39:08 2016 +0100 hisi_sas: SCSI_HISI_SAS should depend on HAS_DMA If NO_DMA=y: ERROR: "dma_map_sg" [drivers/scsi/hisi_sas/hisi_sas_v1_hw.ko] undefined! ERROR: "dma_pool_alloc" [drivers/scsi/hisi_sas/hisi_sas_v1_hw.ko] undefined! ERROR: "dma_unmap_sg" [drivers/scsi/hisi_sas/hisi_sas_v1_hw.ko] undefined! ERROR: "dma_unmap_sg" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_set_mask" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_map_sg" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_pool_destroy" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_free_coherent" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_pool_free" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_alloc_coherent" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_pool_alloc" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_supported" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! ERROR: "dma_pool_create" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/Kconfig | 1 + 1 file changed, 1 insertion(+) commit db2b52f75250c88ee3c6ba3d91bef38f3f1a1e8c Merge: f11aef6 38cb76a Author: Rafael J. Wysocki Date: Thu Jan 21 00:43:29 2016 +0100 Merge branch 'pm-tools' * pm-tools: cpupower: Fix build error in cpufreq-info commit f11aef69b235bc30c323776d75ac23b43aac45bb Merge: fa8bb45 5bb1729 Author: Rafael J. Wysocki Date: Thu Jan 21 00:43:21 2016 +0100 Merge branch 'pm-cpuidle' * pm-cpuidle: cpuidle: menu: Avoid pointless checks in menu_select() sched / idle: Drop default_idle_call() fallback from call_cpuidle() cpuidle: Don't enable all governors by default cpuidle: Default to ladder governor on ticking systems time: nohz: Expose tick_nohz_enabled cpuidle: menu: Fix menu_select() for CPUIDLE_DRIVER_STATE_START == 0 commit fa8bb4518771b19460a318fbab3eb36c81db3a50 Merge: 6efd3f8 250dfa0 Author: Rafael J. Wysocki Date: Thu Jan 21 00:43:13 2016 +0100 Merge branch 'pm-devfreq' * pm-devfreq: MAINTAINERS: Add devfreq-event entry MAINTAINERS: Add missing git repository and directory for devfreq PM / devfreq: Do not show statistics if it's not ready. PM / devfreq: Modify the indentation of trans_stat sysfs for readability PM / devfreq: Set the freq_table of devfreq device PM / devfreq: Add show_one macro to delete the duplicate code PM / devfreq: event: Fix the error and warning from script/checkpatch.pl PM / devfreq: event: Remove the error log of devfreq_event_get_edev_by_phandle() commit 6efd3f8cde1d6acc20a715ac6ea17e01421742df Merge: a72aea7 3ded910 Author: Rafael J. Wysocki Date: Thu Jan 21 00:42:59 2016 +0100 Merge branch 'pm-core' * pm-core: driver core: Avoid NULL pointer dereferences in device_is_bound() platform: Do not detach from PM domains on shutdown USB / PM: Allow USB devices to remain runtime-suspended when sleeping PM / sleep: Go direct_complete if driver has no callbacks PM / Domains: add setter for dev.pm_domain device core: add device_is_bound() commit a72aea722f1b43442c9e219de824d5975dcdaa61 Merge: 6799060 770188f b21f2e8 f972799 Author: Rafael J. Wysocki Date: Thu Jan 21 00:41:59 2016 +0100 Merge branches 'acpica', 'acpi-video' and 'acpi-fan' * acpica: ACPICA: Update version to 20160108 ACPICA: Silence a -Wbad-function-cast warning when acpi_uintptr_t is 'uintptr_t' ACPICA: Additional 2016 copyright changes ACPICA: Reduce regression fix divergence from upstream ACPICA * acpi-video: ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Satellite R830 ACPI / video: Revert "thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()" ACPI / video: Document acpi_video_handles_brightness_key_presses() a bit ACPI / video: Fix using an uninitialized mutex / list_head in acpi_video_handles_brightness_key_presses() ACPI / video: Revert "ACPI / video: driver must be registered before checking for keypresses" ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Portege R700 * acpi-fan: ACPI / fan: Improve acpi_device_update_power error message commit 386744425e35e04984c6e741c7750fd6eef1a9df Author: Thierry Reding Date: Wed Jul 1 14:17:58 2015 +0200 swiotlb: Make linux/swiotlb.h standalone includible This header file uses the enum dma_data_direction and struct page types without explicitly including the corresponding header files. This makes it rely on the includer to have included the proper headers before. To fix this, include linux/dma-direction.h and forward-declare struct page. The swiotlb_free() function is also annotated __init, therefore requires linux/init.h to be included as well. Signed-off-by: Thierry Reding Signed-off-by: Konrad Rzeszutek Wilk include/linux/swiotlb.h | 3 +++ 1 file changed, 3 insertions(+) commit 973abd30a14681543ea1edb80eb5ef04bf0bb021 Author: Fengguang Wu Date: Fri Dec 18 15:51:59 2015 +0800 MAINTAINERS: add git URL for swiotlb CC: Konrad Rzeszutek Wilk Signed-off-by: Fengguang Wu Signed-off-by: Konrad Rzeszutek Wilk MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c2f662ebb69fb48bf62881a456aa7fa53e38d771 Author: Shaohua Li Date: Wed Jan 20 14:00:45 2016 -0800 MD: add myself as MD maintainer Cc: NeilBrown Signed-off-by: Shaohua Li MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 849674e4fb175e47b7504249f7367367b18fe6a1 Author: Shaohua Li Date: Wed Jan 20 13:52:20 2016 -0800 MD: rename some functions These short function names are hard to search. Rename them to make vim happy. Signed-off-by: Shaohua Li drivers/md/faulty.c | 18 +++++++++--------- drivers/md/raid1.c | 21 +++++++++++---------- drivers/md/raid10.c | 20 ++++++++++---------- drivers/md/raid5.c | 45 +++++++++++++++++++++++---------------------- 4 files changed, 53 insertions(+), 51 deletions(-) commit 9fa686068a32ddf256df03982b3e3967c18654a8 Merge: 90bf353 6bf6410 Author: Linus Torvalds Date: Wed Jan 20 10:15:21 2016 -0800 Merge tag 'dmaengine-fix-4.5-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Here is my second pull request for this window: A few driver fixes have piled up and one missed rcar bindings patch which got somehow lost in for-linus branch so cherry-picked that one. Fixes are for dw, at_hdmac, edma" * tag 'dmaengine-fix-4.5-rc1' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: rcar-dmac: Document SoC specific bindings dmaengine: at_xdmac: fix resume for cyclic transfers dmaengine: dw: fix cyclic transfer callbacks dmaengine: dw: fix cyclic transfer setup dmaengine: edma: Fix paRAM slot allocation for entry channel 0 commit 90bf353bc1451b71067b12541db08ab7774723eb Merge: af75d51 3f984cb Author: Linus Torvalds Date: Wed Jan 20 10:10:23 2016 -0800 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild updates from Michal Marek: - Fix for make O=... perf-tar* - make tags revamp and fix for the fallout. Patch for warnings about line breaks inside DEFINE_PER_CPU macros is pending - New coccinelle test * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: coccinelle: tests: unsigned value cannot be lesser than zero tags: Unify emacs and exuberant rules tags: Drop the _PE rule tags: Do not try to index defconfigs tags: Process Kconfig files in a single pass tags: Fix erroneous pattern match in a comment aic7xxx: Avoid name collision with tags: Treat header files as C code package Makefile: fix perf-tar targets when outdir is set scripts/tags.sh: Teach tags about more powerpc macros commit ba2d084055fd3f67af120070f5620173efd867c8 Author: David Sterba Date: Wed Jan 20 19:07:04 2016 +0100 btrfs: sysfs: fix typo in compat_ro attribute definition Signed-off-by: David Sterba fs/btrfs/sysfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af75d517a8b83cea88d8039beca1213813eb35f0 Merge: d9569f0 5b61c7b Author: Linus Torvalds Date: Wed Jan 20 09:55:50 2016 -0800 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig updates from Michal Marek: - Fix for make xconfig segfault - Handle long strings in config symbol values - Fix for mixing boolean and kconfig ternary type * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: fix qconf segfault by deleting heap objects kconfig: return 'false' instead of 'no' in bool function kconfig: allow kconfig to handle longer path names commit 9662e32c810ad3e6ce49832d5f585a54f8fbdbdb Merge: 904f664 bd79008 Author: Bjorn Helgaas Date: Wed Jan 20 11:48:25 2016 -0600 Merge branch 'pci/trivial' into next * pci/trivial: PCI: shpchp: Constify hpc_ops structure PCI: Use kobj_to_dev() instead of open-coding it PCI: Use to_pci_dev() instead of open-coding it PCI: Fix all whitespace issues PCI/MSI: Fix typos in commit 904f664b585cc9f3dc134a8c0dd08e9bce6c10bc Merge: 3a6384b 8b9b963 c2e771b Author: Bjorn Helgaas Date: Wed Jan 20 11:47:54 2016 -0600 Merge branches 'pci/iommu' and 'pci/misc' into next * pci/iommu: PCI: Add function 1 DMA alias quirk for Lite-On/Plextor M6e/Marvell 88SS9183 * pci/misc: PCI: Limit config space size for Netronome NFP4000 PCI: Add Netronome NFP4000 PF device ID commit 8b9b963e55a8a8eadf604c0d60b97249c468e706 Author: Tim Sander Date: Tue Jan 19 14:32:29 2016 -0600 PCI: Add function 1 DMA alias quirk for Lite-On/Plextor M6e/Marvell 88SS9183 Add function 1 DMA alias quirk for Lite-On/Plextor M6e/Marvell 88SS9183. Signed-off-by: Tim Sander Signed-off-by: Bjorn Helgaas Acked-by: Alex Williamson drivers/pci/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) commit d9569f003cfc0228e132749ae6fd81cb29dc6c70 Merge: 0cf0305 7599ea8 Author: Linus Torvalds Date: Wed Jan 20 09:45:43 2016 -0800 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild updates from Michal Marek: - Make -m in makefiles work like -y and fix the fallout - Minor genksyms fix - Fix race with make -j install modules_install - Move -Wsign-compare from make W=1 to W=2 - Other minor fixes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Demote 'sign-compare' warning to W=2 Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially kbuild: Do not run modules_install and install in paralel genksyms: Handle string literals with spaces in reference files fixdep: constify strrcmp arguments ath10k: Fix build with CONFIG_THERMAL=m Revert "drm: Hack around CONFIG_AGP=m build failures" kbuild: Allow to specify composite modules with modname-m staging/ad7606: Actually build the interface modules commit 0cf0305fffcf8df0998b70d0e922b7a3a5976182 Author: David Howells Date: Wed Jan 20 10:29:00 2016 +0000 FRV: Mark architecture orphaned Mark the FRV architecture orphaned in the MAINTAINERS file. Signed-off-by: David Howells Signed-off-by: Linus Torvalds MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4a121096db9cf2cac8ce37aca2231e1e09a04e8f Author: Simon Horman Date: Mon Jan 18 10:04:33 2016 +0900 MAINTAINERS: Update mailing list for Renesas SoC Development Update the mailing list used for development of support for Renesas SoCs and related drivers. Up until now the linux-sh mailing list has been used, however, Renesas SoCs are now much wider than the SH architecture and there is some desire from some for the linux-sh list to refocus on discussion of the work on the SH architecture. Signed-off-by: Simon Horman Acked-by: Yoshihiro Shimoda Acked-by: Magnus Damm Acked-by: Geert Uytterhoeven Acked-by: Wolfram Sang Acked-by: Laurent Pinchart Acked-by: Rich Felker Acked-by: Sergei Shtylyov Signed-off-by: Linus Torvalds MAINTAINERS | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 629d9d1cafbd49cb374561a5a7d7724c4d6b2567 Author: Arnd Bergmann Date: Mon Jan 18 21:50:26 2016 +0100 mm: avoid uninitialized variable in tracepoint A newly added tracepoint in the hugepage code uses a variable in the error handling that is not initialized at that point: include/trace/events/huge_memory.h:81:230: error: 'isolated' may be used uninitialized in this function [-Werror=maybe-uninitialized] The result is relatively harmless, as the trace data will in rare cases contain incorrect data. This works around the problem by adding an explicit initialization. Signed-off-by: Arnd Bergmann Fixes: 7d2eba0557c1 ("mm: add tracepoint for scanning pages") Reviewed-by: Ebru Akagunduz Acked-by: David Rientjes Cc: Kirill A. Shutemov Signed-off-by: Linus Torvalds mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991f86d7ae4e1f8c15806e62f97af519e3cdd860 Author: Takashi Iwai Date: Wed Jan 20 17:19:02 2016 +0100 ALSA: hda - Flush the pending probe work at remove As HD-audio driver does deferred probe internally via workqueue, the driver might go into the mixed state doing both probe and remove when the module gets unloaded during the probe work. This eventually triggers an Oops, unsurprisingly. For avoiding this race, we just need to flush the pending probe work explicitly before actually starting the resource release. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=960710 Cc: # v3.17+ Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit a6111d11b8b5364d02ea2e881c81ce39d004eb32 Author: Zhao Lei Date: Tue Jan 12 17:52:13 2016 +0800 btrfs: raid56: Use raid_write_end_io for scrub No need to create additional end_io function for scrub, it increased code size and introduced some un-unified lines, as: raid_write_parity_end_io(): int err = bio->bi_error; if (bio->bi_error) raid_write_end_io(): int err = bio->bi_error; if (err) This patch combines them. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/raid56.c | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) commit 748f4ef4c6708e733da077a1980923b9d19db78a Author: Zhao Lei Date: Tue Jan 12 17:22:13 2016 +0800 btrfs: Remove unnecessary ClearPageUptodate for raid56 PageUptodate flag already initialized to 0 for new page, no need to set it again. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/raid56.c | 2 -- 1 file changed, 2 deletions(-) commit 915e22903cb34619c1a1462ca4248add96fa41d7 Author: Zhao Lei Date: Tue Mar 3 20:42:48 2015 +0800 btrfs: use rbio->nr_pages to reduce calculation We can use rbio->stripe_npages to reduce unnecessary calculation in many code place. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/raid56.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit b7178a5f0372a51260cf6e74d828e315e43dfc86 Author: Zhao Lei Date: Tue Mar 3 20:38:46 2015 +0800 btrfs: Use unified stripe_page's index calculation We are using different index calculation method for stripe_page in current code: 1: (rbio->stripe_len / PAGE_CACHE_SIZE) * stripe_index + page_index 2: DIV_ROUND_UP(rbio->stripe_len, PAGE_CACHE_SIZE) * stripe_index + page_index 3: DIV_ROUND_UP(rbio->stripe_len * stripe_index, PAGE_CACHE_SIZE) + page_index ... They can get same result when stripe_len align to PAGE_CACHE_SIZE, this is why current code can work, intruduce and use a common function for calculation is a better choose. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/raid56.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) commit bfca9a6d4b1322ba36235e8a652f05a9668ef59b Author: Zhao Lei Date: Mon Dec 8 19:55:57 2014 +0800 btrfs: Fix calculation of rbio->dbitmap's size calculation Current code is trying to calculate rbio->dbitmap's size to make it align to sizeof(long), but implement haven't achived this object, it is align to sizeof(char) instead. This patch fixed above calculation, and use sizeof(long) instead of fixed "8" to increate compatibility. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/raid56.c | 4 ++-- fs/btrfs/scrub.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit e1746e8381cd2af421f75557b5cae3604fc18b35 Author: Zhao Lei Date: Tue Dec 1 18:39:40 2015 +0800 btrfs: Fix no_space in write and rm loop I see no_space in v4.4-rc1 again in xfstests generic/102. It happened randomly in some node only. (one of 4 phy-node, and a kvm with non-virtio block driver) By bisect, we can found the first-bad is: commit bdced438acd8 ("block: setup bi_phys_segments after splitting")' But above patch only triggered the bug by making bio operation faster(or slower). Main reason is in our space_allocating code, we need to commit page writeback before wait it complish, this patch fixed above bug. BTW, there is another reason for generic/102 fail, caused by disable default mixed-blockgroup, I'll fix it in xfstests. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/extent-tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0bc19f9031e0c59770286f82b8561c1d35064a65 Author: Zhao Lei Date: Wed Jan 6 18:56:36 2016 +0800 btrfs: merge functions for wait snapshot creation wait_for_snapshot_creation() is in same group with oher two: btrfs_start_write_no_snapshoting() btrfs_end_write_no_snapshoting() Rename wait_for_snapshot_creation() and move it into same place with other two. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/ctree.h | 1 + fs/btrfs/extent-tree.c | 20 ++++++++++++++++++++ fs/btrfs/inode.c | 22 +--------------------- 3 files changed, 22 insertions(+), 21 deletions(-) commit ee22f0c4ec428e7f16d3c5fa1d55fd7860cb304a Author: Zhao Lei Date: Wed Jan 6 18:47:31 2016 +0800 btrfs: delete unused argument in btrfs_copy_from_user size_t write_bytes is not necessary for btrfs_copy_from_user(), delete it. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/file.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit bca8e988043e39483afd7872a2641f03ed7201a6 Author: Takashi Iwai Date: Wed Jan 20 15:46:44 2016 +0100 ALSA: hda - Fix missing module loading with model=generic option When the generic codec driver is specified via model option or such, the hda driver doesn't try to load the generic driver module but still loads the codec-specific driver, and this ends up with the binding failure. This patch fixes it by moving the generic module request in the common helper code. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111021 Cc: # v4.4+ Signed-off-by: Takashi Iwai sound/pci/hda/hda_bind.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 2f1b0077a9604eda130ffb0313c2f1e9db424269 Author: Yoshinori Sato Date: Fri Jan 15 23:51:51 2016 +0900 h8300: System call entry enable interrupt. Signed-off-by: Yoshinori Sato arch/h8300/kernel/entry.S | 1 + 1 file changed, 1 insertion(+) commit bf24eec39a6b0df1fcc1ff92db39fe2f2a60f737 Author: Yoshinori Sato Date: Fri Jan 15 17:07:32 2016 +0900 h8300: show_stack cleanup - fix stack limit. h8300's stack not aligned 4byte. - pritty output form. Signed-off-by: Yoshinori Sato arch/h8300/include/asm/traps.h | 2 +- arch/h8300/kernel/traps.c | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) commit db903b462b3e7a0cbd4bace485d0d4ba27344ec7 Author: Yoshinori Sato Date: Fri Jan 15 13:28:18 2016 +0900 h8300: Restraint of warning. Signed-off-by: Yoshinori Sato arch/h8300/include/asm/io.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 96ff2d7081cfc50e5493e9a5ac7c58bfa2ea41d3 Author: Yoshinori Sato Date: Wed Jan 20 23:27:30 2016 +0900 h8300: Add KGDB support. Signed-off-by: Yoshinori Sato arch/h8300/Kconfig | 1 + arch/h8300/include/asm/kgdb.h | 45 ++++++++++++++ arch/h8300/kernel/Makefile | 2 + arch/h8300/kernel/entry.S | 18 ++++++ arch/h8300/kernel/kgdb.c | 135 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 201 insertions(+) commit bed2e98e1f4db8b827df507abc30be7b11b0613d Author: Takashi Iwai Date: Wed Jan 20 15:00:26 2016 +0100 ALSA: hda - Degrade i915 binding failure message Currently HD-audio driver on Intel Skylake or Broxteon gives an error message when binding with i915 audio component fails. However, this isn't any serious error on a system without Intel graphics. Indeed there are such systems, where a third-party codec (e.g. Creative) is put on the mobo while using other discrete GPU (e.g. Nvidia). Printing a kernel "error" message is overreaction in such a case. This patch downgrades the print level for that message. For systems that mandate the i915 binding (e.g. Haswell or Broadwell HDMI/DP), another kernel error message is shown in addition to make clear what went wrong. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111021 Signed-off-by: Takashi Iwai sound/hda/hdac_i915.c | 2 +- sound/pci/hda/hda_intel.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit be13326058e79c0b3d8caea5e7d1b34286c09487 Author: Guenter Roeck Date: Tue Dec 15 20:30:37 2015 -0800 irqchip: renesas-h8s: Replace ctrl_outw/ctrl_inw with writew/readw Commit 13ae42a3b1c1 ("h8300: Rename ctlr_out/in[bwl] to raw_read/write[bwl]") changed the function names, but not all callers, resulting in drivers/irqchip/irq-renesas-h8s.c: In function ‘h8s_disable_irq’: drivers/irqchip/irq-renesas-h8s.c:43:9: error: implicit declaration of function ‘ctrl_inw’ drivers/irqchip/irq-renesas-h8s.c:44:2: error: implicit declaration of function ‘ctrl_outw’ Fixes: 13ae42a3b1c1 ("h8300: Rename ctlr_out/in[bwl] to raw_read/write[bwl]") Cc: Daniel Lezcano Signed-off-by: Guenter Roeck drivers/irqchip/irq-renesas-h8s.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9ee05bb627c08eae8b854c9fa1d77e75188954b6 Author: Yoshinori Sato Date: Sat Dec 5 21:36:53 2015 +0900 h8300: signal stack fix Signed-off-by: Yoshinori Sato arch/h8300/kernel/signal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 42b510eb56dea96150dfc0747d4b2486b7fa72e0 Author: Yoshinori Sato Date: Fri Dec 4 01:20:57 2015 +0900 h8300: Add LZO compression Signed-off-by: Yoshinori Sato arch/h8300/Kconfig | 2 ++ arch/h8300/boot/compressed/Makefile | 11 ++++++++--- arch/h8300/boot/compressed/misc.c | 6 ++++++ 3 files changed, 16 insertions(+), 3 deletions(-) commit af3da5798d7b9d3dc7412cb5e1d4ed106dcecefc Author: Yoshinori Sato Date: Sun Nov 15 23:11:09 2015 +0900 h8300: zImage alignment fix Missing alignment for .data section. Sometime bootup failed. Signed-off-by: Yoshinori Sato arch/h8300/boot/compressed/vmlinux.lds | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c4eb32b1eeec0d9ee5af2d83f21fa7193961f61c Author: Geert Uytterhoeven Date: Mon Jun 29 11:42:58 2015 +0200 clk: h8300: Remove "sh73a0-" part from compatible value Drop the bogus "sh73a0-" part (accidentally copied from shmobile?) from the compatible value. Signed-off-by: Geert Uytterhoeven Documentation/devicetree/bindings/clock/renesas,h8300-div-clock.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3724d3188980cc7416d81acc9bee21161ee20ebd Author: Yoshinori Sato Date: Sun Nov 15 23:11:09 2015 +0900 h8300: zImage alignment fix Missing alignment for .data section. Sometime bootup failed. Signed-off-by: Yoshinori Sato arch/h8300/boot/compressed/vmlinux.lds | 1 + 1 file changed, 1 insertion(+) commit 202736d99b7f29279db9da61587f11a08a04a9c6 Author: Herbert Xu Date: Tue Jan 19 21:23:57 2016 +0800 crypto: algif_skcipher - sendmsg SG marking is off by one We mark the end of the SG list in sendmsg and sendpage and unmark it on the next send call. Unfortunately the unmarking in sendmsg is off-by-one, leading to an SG list that is too short. Fixes: 0f477b655a52 ("crypto: algif - Mark sgl end at the end of data") Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_skcipher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b16c29191dc89bd877af99a7b04ce4866728a3e0 Author: Sasha Levin Date: Mon Jan 18 19:23:51 2016 -0500 netfilter: nf_conntrack: use safer way to lock all buckets When we need to lock all buckets in the connection hashtable we'd attempt to lock 1024 spinlocks, which is way more preemption levels than supported by the kernel. Furthermore, this behavior was hidden by checking if lockdep is enabled, and if it was - use only 8 buckets(!). Fix this by using a global lock and synchronize all buckets on it when we need to lock them all. This is pretty heavyweight, but is only done when we need to resize the hashtable, and that doesn't happen often enough (or at all). Signed-off-by: Sasha Levin Acked-by: Jesper Dangaard Brouer Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_core.h | 8 +++---- net/netfilter/nf_conntrack_core.c | 38 +++++++++++++++++++++++-------- net/netfilter/nf_conntrack_helper.c | 2 +- net/netfilter/nf_conntrack_netlink.c | 2 +- net/netfilter/nfnetlink_cttimeout.c | 4 ++-- 5 files changed, 35 insertions(+), 19 deletions(-) commit 07cbeea5412fa82543cbdba94ca94799fdb7bf55 Author: Shawn Lin Date: Wed Jan 20 16:17:04 2016 +0800 mmc: sdio_cis: fix unknown tuple for CISTPL_SDIO_STD CISTPL_SDIO_STD(0x91) is a known tuple, but sdio_cis don't define it, so we get the warning below while probing several sdio wifi cards. Refer to SDIO spec, it's not needed to parse the tuple, so this patch make it a known one. [ 4.098980] mmc2: queuing unknown CIS tuple 0x91 (3 bytes) [ 4.099033] mmc2: new ultra high speed SDR104 SDIO card at address 0001 Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sdio_cis.c | 1 + 1 file changed, 1 insertion(+) commit fab683eb12e71ac6057dc42dc7d1e5e71e5cba5e Author: Arnd Bergmann Date: Wed Jan 20 11:47:14 2016 +0100 scsi: qla2xxxx: avoid type mismatch in comparison A recent bug fix added code that does bool logged_out = (status & 0xFFFF); if (logged_out == CTIO_PORT_LOGGED_OUT) ... This looks wrong because we are comparing a boolean with an integer constant, ang gcc warns about it accordingly: drivers/scsi/qla2xxx/qla_target.c: In function 'qlt_do_ctio_completion': drivers/scsi/qla2xxx/qla_target.c:3587:20: warning: comparison of constant '41' with boolean expression is always false [-Wbool-compare] (logged_out == CTIO_PORT_LOGGED_OUT) ? The correct fix is presumably to make that variable an 'int'. Signed-off-by: Arnd Bergmann Fixes: 71cdc0796465 ("qla2xxx: Delete session if initiator is gone from FW") Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20c08b362f4b0c41103fe9d75c61ca348d021441 Author: Sheng Yang Date: Wed Jan 13 17:26:13 2016 -0800 target/user: Make sure netlink would reach all network namespaces The current code only allow netlink to reach the initial network namespace, which caused trouble for any client running inside container. This patch would make sure TCMU netlink would work for all network namespaces. Signed-off-by: Sheng Yang Acked-by: Andy Grover Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 21aaa23b0ebbd19334fa461370c03cbb076b3295 Author: Nicholas Bellinger Date: Thu Jan 7 22:09:27 2016 -0800 target: Obtain se_node_acl->acl_kref during get_initiator_node_acl This patch addresses a long standing race where obtaining se_node_acl->acl_kref in __transport_register_session() happens a bit too late, and leaves open the potential for core_tpg_del_initiator_node_acl() to hit a NULL pointer dereference. Instead, take ->acl_kref in core_tpg_get_initiator_node_acl() while se_portal_group->acl_node_mutex is held, and move the final target_put_nacl() from transport_deregister_session() into transport_free_session() so that fabric driver login failure handling using the modern method to still work as expected. Also, update core_tpg_get_initiator_node_acl() to take an extra reference for dynamically generated acls for demo-mode, before returning to fabric caller. Also update iscsi-target sendtargets special case handling to use target_tpg_has_node_acl() when checking if demo_mode_discovery == true during discovery lookup. Note the existing wait_for_completion(&acl->acl_free_comp) in core_tpg_del_initiator_node_acl() does not change. Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 2 +- drivers/target/target_core_tpg.c | 42 +++++++++++++++++++++++++++++++++- drivers/target/target_core_transport.c | 19 ++++++++++----- include/target/target_core_fabric.h | 2 ++ 4 files changed, 57 insertions(+), 8 deletions(-) commit d36ad77f702356afb1009d2987b0ab55da4c7d57 Author: Nicholas Bellinger Date: Thu Jan 7 22:15:06 2016 -0800 target: Convert ACL change queue_depth se_session reference usage This patch converts core_tpg_set_initiator_node_queue_depth() to use struct se_node_acl->acl_sess_list when performing explicit se_tpg_tfo->shutdown_session() for active sessions, in order for new se_node_acl->queue_depth to take effect. This follows how core_tpg_del_initiator_node_acl() currently works when invoking se_tpg_tfo->shutdown-session(), and ahead of the next patch to take se_node_acl->acl_kref during lookup, the extra get_initiator_node_acl() can go away. In order to achieve this, go ahead and change target_get_session() to use kref_get_unless_zero() and propigate up the return value to know when a session is already being released. This is because se_node_acl->acl_group is already protecting se_node_acl->acl_group reference via configfs, and shutdown within core_tpg_del_initiator_node_acl() won't occur until sys_write() to core_tpg_set_initiator_node_queue_depth() attribute returns back to user-space. Also, drop the left-over iscsi-target hack, and obtain se_portal_group->session_lock in lio_tpg_shutdown_session() internally. Remove iscsi-target wrapper and unused se_tpg + force parameters and associated code. Reported-by: Christoph Hellwig Cc: Sagi Grimberg Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_configfs.c | 29 ++--- drivers/target/iscsi/iscsi_target_tpg.c | 10 -- drivers/target/iscsi/iscsi_target_tpg.h | 2 - drivers/target/target_core_tpg.c | 152 ++++++++------------------- drivers/target/target_core_transport.c | 4 +- include/target/target_core_fabric.h | 5 +- 6 files changed, 56 insertions(+), 146 deletions(-) commit 26a99c19f810b2593410899a5b304b21b47428a6 Author: Nicholas Bellinger Date: Tue Jan 19 16:15:27 2016 -0800 iscsi-target: Fix potential dead-lock during node acl delete This patch is a iscsi-target specific bug-fix for a dead-lock that can occur during explicit struct se_node_acl->acl_group se_session deletion via configfs rmdir(2), when iscsi-target time2retain timer is still active. It changes iscsi-target to obtain se_portal_group->session_lock internally using spin_in_locked() to check for the specific se_node_acl configfs shutdown rmdir(2) case. Note this patch is intended for stable, and the subsequent v4.5-rc patch converts target_core_tpg.c to use proper se_sess->sess_kref reference counting for both se_node_acl deletion + se_node_acl->queue_depth se_session restart. Reported-by:: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Cc: Mike Christie Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_configfs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 3568459a51136f418ca8cad48a0db3803010148a Author: Mans Rullgard Date: Sun Jan 17 22:31:02 2016 +0000 ALSA: at73c213: manage SSC clock Since commit 49af54ff0fc7 ("misc: atmel-ssc: prepare clock only when request") the SSC driver expects clients to manage the SSC clock. This updates the at73c213 driver to enable the SSC clock whenever it is needed. Signed-off-by: Mans Rullgard Signed-off-by: Takashi Iwai sound/spi/at73c213.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ad1ba2a0c453db255f04b17101db6d05c44d8467 Author: Zhao Lei Date: Tue Dec 15 18:18:09 2015 +0800 btrfs: Use direct way to determine raid56 write/recover mode Old code used bbio->raid_map to determine whether in raid56 write/recover operation, because we didn't't have bbio->map_type. Now we have direct way for this condition, rid of using the function-relative data, and make the code more readable. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 94a97dfeb61e32a213ca5519b063076c5201c5b2 Author: Zhao Lei Date: Wed Dec 9 21:03:49 2015 +0800 btrfs: Small cleanup for get index_srcdev loop 1: Adjust condition in loop to make less TAB 2: Move btrfs_put_bbio()'s line for combine, and makes logic clean. Signed-off-by: Zhao Lei Signed-off-by: Chris Mason fs/btrfs/volumes.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit f04b772bfc17f502703794f4d100d12155c1a1a9 Author: Qu Wenruo Date: Tue Dec 15 09:14:37 2015 +0800 btrfs: Enhance chunk validation check Enhance chunk validation: 1) Num_stripes We already have such check but it's only in super block sys chunk array. Now check all on-disk chunks. 2) Chunk logical It should be aligned to sector size. This behavior should be *DOUBLE CHECKED* for 64K sector size like PPC64 or AArch64. Maybe we can found some hidden bugs. 3) Chunk length Same as chunk logical, should be aligned to sector size. 4) Stripe length It should be power of 2. 5) Chunk type Any bit out of TYPE_MAS | PROFILE_MASK is invalid. With all these much restrict rules, several fuzzed image reported in mail list should no longer cause kernel panic. Reported-by: Vegard Nossum Signed-off-by: Qu Wenruo Signed-off-by: Chris Mason fs/btrfs/volumes.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 319e4d0661e5323c9f9945f0f8fb5905e5fe74c3 Author: Qu Wenruo Date: Tue Dec 15 09:14:36 2015 +0800 btrfs: Enhance super validation check Enhance btrfs_check_super_valid() function by the following points: 1) Restrict sector/node size check Not the old max/min valid check, but also check if it's a power of 2. So some bogus number like 12K node size won't pass now. 2) Super flag check For now, there is still some inconsistency between kernel and btrfs-progs super flags. And considering btrfs-progs may add new flags for super block, this check will only output warning. 3) Better root alignment check Now root bytenr is checked against sector size. 4) Move some check into btrfs_check_super_valid(). Like node size vs leaf size check, and PAGESIZE vs sectorsize check. And magic number check. Reported-by: Vegard Nossum Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/disk-io.c | 97 +++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 49 deletions(-) commit c2d6cb1636d235257086f939a8194ef0bf93af6e Author: Filipe Manana Date: Fri Jan 15 11:05:12 2016 +0000 Btrfs: fix deadlock running delayed iputs at transaction commit time While running a stress test I ran into a deadlock when running the delayed iputs at transaction time, which produced the following report and trace: [ 886.399989] ============================================= [ 886.400871] [ INFO: possible recursive locking detected ] [ 886.401663] 4.4.0-rc6-btrfs-next-18+ #1 Not tainted [ 886.402384] --------------------------------------------- [ 886.403182] fio/8277 is trying to acquire lock: [ 886.403568] (&fs_info->delayed_iput_sem){++++..}, at: [] btrfs_run_delayed_iputs+0x36/0xbf [btrfs] [ 886.403568] [ 886.403568] but task is already holding lock: [ 886.403568] (&fs_info->delayed_iput_sem){++++..}, at: [] btrfs_run_delayed_iputs+0x36/0xbf [btrfs] [ 886.403568] [ 886.403568] other info that might help us debug this: [ 886.403568] Possible unsafe locking scenario: [ 886.403568] [ 886.403568] CPU0 [ 886.403568] ---- [ 886.403568] lock(&fs_info->delayed_iput_sem); [ 886.403568] lock(&fs_info->delayed_iput_sem); [ 886.403568] [ 886.403568] *** DEADLOCK *** [ 886.403568] [ 886.403568] May be due to missing lock nesting notation [ 886.403568] [ 886.403568] 3 locks held by fio/8277: [ 886.403568] #0: (sb_writers#11){.+.+.+}, at: [] __sb_start_write+0x5f/0xb0 [ 886.403568] #1: (&sb->s_type->i_mutex_key#15){+.+.+.}, at: [] btrfs_file_write_iter+0x73/0x408 [btrfs] [ 886.403568] #2: (&fs_info->delayed_iput_sem){++++..}, at: [] btrfs_run_delayed_iputs+0x36/0xbf [btrfs] [ 886.403568] [ 886.403568] stack backtrace: [ 886.403568] CPU: 6 PID: 8277 Comm: fio Not tainted 4.4.0-rc6-btrfs-next-18+ #1 [ 886.403568] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [ 886.403568] 0000000000000000 ffff88009f80f770 ffffffff8125d4fd ffffffff82af1fc0 [ 886.403568] ffff88009f80f830 ffffffff8108e5f9 0000000200000000 ffff88009fd92290 [ 886.403568] 0000000000000000 ffffffff82af1fc0 ffffffff829cfb01 00042b216d008804 [ 886.403568] Call Trace: [ 886.403568] [] dump_stack+0x4e/0x79 [ 886.403568] [] __lock_acquire+0xd42/0xf0b [ 886.403568] [] ? __module_address+0xdf/0x108 [ 886.403568] [] lock_acquire+0x10d/0x194 [ 886.403568] [] ? lock_acquire+0x10d/0x194 [ 886.403568] [] ? btrfs_run_delayed_iputs+0x36/0xbf [btrfs] [ 886.489542] [] down_read+0x3e/0x4d [ 886.489542] [] ? btrfs_run_delayed_iputs+0x36/0xbf [btrfs] [ 886.489542] [] btrfs_run_delayed_iputs+0x36/0xbf [btrfs] [ 886.489542] [] btrfs_commit_transaction+0x8f5/0x96e [btrfs] [ 886.489542] [] flush_space+0x435/0x44a [btrfs] [ 886.489542] [] ? reserve_metadata_bytes+0x26a/0x384 [btrfs] [ 886.489542] [] reserve_metadata_bytes+0x28d/0x384 [btrfs] [ 886.489542] [] ? btrfs_block_rsv_refill+0x58/0x96 [btrfs] [ 886.489542] [] btrfs_block_rsv_refill+0x70/0x96 [btrfs] [ 886.489542] [] btrfs_evict_inode+0x394/0x55a [btrfs] [ 886.489542] [] evict+0xa7/0x15c [ 886.489542] [] iput+0x1d3/0x266 [ 886.489542] [] btrfs_run_delayed_iputs+0x8f/0xbf [btrfs] [ 886.489542] [] btrfs_commit_transaction+0x8f5/0x96e [btrfs] [ 886.489542] [] ? signal_pending_state+0x31/0x31 [ 886.489542] [] btrfs_alloc_data_chunk_ondemand+0x1d7/0x288 [btrfs] [ 886.489542] [] btrfs_check_data_free_space+0x40/0x59 [btrfs] [ 886.489542] [] btrfs_delalloc_reserve_space+0x1e/0x4e [btrfs] [ 886.489542] [] btrfs_direct_IO+0x10c/0x27e [btrfs] [ 886.489542] [] generic_file_direct_write+0xb3/0x128 [ 886.489542] [] btrfs_file_write_iter+0x229/0x408 [btrfs] [ 886.489542] [] ? __lock_is_held+0x38/0x50 [ 886.489542] [] __vfs_write+0x7c/0xa5 [ 886.489542] [] vfs_write+0xa0/0xe4 [ 886.489542] [] SyS_write+0x50/0x7e [ 886.489542] [] entry_SYSCALL_64_fastpath+0x12/0x6f [ 1081.852335] INFO: task fio:8244 blocked for more than 120 seconds. [ 1081.854348] Not tainted 4.4.0-rc6-btrfs-next-18+ #1 [ 1081.857560] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1081.863227] fio D ffff880213f9bb28 0 8244 8240 0x00000000 [ 1081.868719] ffff880213f9bb28 00ffffff810fc6b0 ffffffff0000000a ffff88023ed55240 [ 1081.872499] ffff880206b5d400 ffff880213f9c000 ffff88020a4d5318 ffff880206b5d400 [ 1081.876834] ffffffff00000001 ffff880206b5d400 ffff880213f9bb40 ffffffff81482ba4 [ 1081.880782] Call Trace: [ 1081.881793] [] schedule+0x7f/0x97 [ 1081.883340] [] rwsem_down_write_failed+0x2d5/0x325 [ 1081.895525] [] ? trace_hardirqs_on_caller+0x16/0x1ab [ 1081.897419] [] call_rwsem_down_write_failed+0x13/0x20 [ 1081.899251] [] ? call_rwsem_down_write_failed+0x13/0x20 [ 1081.901063] [] ? __down_write_nested.isra.0+0x1f/0x21 [ 1081.902365] [] down_write+0x43/0x57 [ 1081.903846] [] ? btrfs_alloc_data_chunk_ondemand+0x1f6/0x288 [btrfs] [ 1081.906078] [] btrfs_alloc_data_chunk_ondemand+0x1f6/0x288 [btrfs] [ 1081.908846] [] ? mark_held_locks+0x56/0x6c [ 1081.910409] [] btrfs_check_data_free_space+0x40/0x59 [btrfs] [ 1081.912482] [] btrfs_delalloc_reserve_space+0x1e/0x4e [btrfs] [ 1081.914597] [] btrfs_direct_IO+0x10c/0x27e [btrfs] [ 1081.919037] [] generic_file_direct_write+0xb3/0x128 [ 1081.920754] [] btrfs_file_write_iter+0x229/0x408 [btrfs] [ 1081.922496] [] ? __lock_is_held+0x38/0x50 [ 1081.923922] [] __vfs_write+0x7c/0xa5 [ 1081.925275] [] vfs_write+0xa0/0xe4 [ 1081.926584] [] SyS_write+0x50/0x7e [ 1081.927968] [] entry_SYSCALL_64_fastpath+0x12/0x6f [ 1081.985293] INFO: lockdep is turned off. [ 1081.986132] INFO: task fio:8249 blocked for more than 120 seconds. [ 1081.987434] Not tainted 4.4.0-rc6-btrfs-next-18+ #1 [ 1081.988534] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1081.990147] fio D ffff880218febbb8 0 8249 8240 0x00000000 [ 1081.991626] ffff880218febbb8 00ffffff81486b8e ffff88020000000b ffff88023ed75240 [ 1081.993258] ffff8802120a9a00 ffff880218fec000 ffff88020a4d5318 ffff8802120a9a00 [ 1081.994850] ffffffff00000001 ffff8802120a9a00 ffff880218febbd0 ffffffff81482ba4 [ 1081.996485] Call Trace: [ 1081.997037] [] schedule+0x7f/0x97 [ 1081.998017] [] rwsem_down_write_failed+0x2d5/0x325 [ 1081.999241] [] ? finish_wait+0x6d/0x76 [ 1082.000306] [] call_rwsem_down_write_failed+0x13/0x20 [ 1082.001533] [] ? call_rwsem_down_write_failed+0x13/0x20 [ 1082.002776] [] ? __down_write_nested.isra.0+0x1f/0x21 [ 1082.003995] [] down_write+0x43/0x57 [ 1082.005000] [] ? btrfs_alloc_data_chunk_ondemand+0x1f6/0x288 [btrfs] [ 1082.007403] [] btrfs_alloc_data_chunk_ondemand+0x1f6/0x288 [btrfs] [ 1082.008988] [] btrfs_fallocate+0x7c1/0xc2f [btrfs] [ 1082.010193] [] ? percpu_down_read+0x4e/0x77 [ 1082.011280] [] ? __sb_start_write+0x5f/0xb0 [ 1082.012265] [] ? __sb_start_write+0x5f/0xb0 [ 1082.013021] [] vfs_fallocate+0x170/0x1ff [ 1082.013738] [] ioctl_preallocate+0x89/0x9b [ 1082.014778] [] do_vfs_ioctl+0x40a/0x4ea [ 1082.015778] [] ? SYSC_newfstat+0x25/0x2e [ 1082.016806] [] ? __fget_light+0x4d/0x71 [ 1082.017789] [] SyS_ioctl+0x57/0x79 [ 1082.018706] [] entry_SYSCALL_64_fastpath+0x12/0x6f This happens because we can recursively acquire the semaphore fs_info->delayed_iput_sem when attempting to allocate space to satisfy a file write request as shown in the first trace above - when committing a transaction we acquire (down_read) the semaphore before running the delayed iputs, and when running a delayed iput() we can end up calling an inode's eviction handler, which in turn commits another transaction and attempts to acquire (down_read) again the semaphore to run more delayed iput operations. This results in a deadlock because if a task acquires multiple times a semaphore it should invoke down_read_nested() with a different lockdep class for each level of recursion. Fix this by simplifying the implementation and use a mutex instead that is acquired by the cleaner kthread before it runs the delayed iputs instead of always acquiring a semaphore before delayed references are run from anywhere. Fixes: d7c151717a1e (btrfs: Fix NO_SPACE bug caused by delayed-iput) Cc: stable@vger.kernel.org # 4.1+ Signed-off-by: Filipe Manana Signed-off-by: Chris Mason fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 5 ++++- fs/btrfs/extent-tree.c | 9 +++++---- fs/btrfs/inode.c | 2 -- 4 files changed, 10 insertions(+), 8 deletions(-) commit fedc00455ccc1f928066528da87b0c7b143de647 Author: Filipe Manana Date: Fri Jan 15 10:56:15 2016 +0000 Btrfs: fix typo in log message when starting a balance The recent change titled "Btrfs: Check metadata redundancy on balance" (already in linux-next) left a typo in a message for users: metatdata -> metadata. Signed-off-by: Filipe Manana Signed-off-by: Chris Mason fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 326f784281fbbdcd91bb401b2a3e32132c0f5c72 Merge: acc3085 546bed6 Author: Chris Mason Date: Tue Jan 19 18:21:30 2016 -0800 Merge branch 'misc-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5 commit acc308556c812485462b6b43843c3f64530dd843 Merge: 988f1f5 fb75d85 Author: Chris Mason Date: Tue Jan 19 18:21:00 2016 -0800 Merge branch 'misc-cleanups-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5 commit 2b4015e9fb335aa6982a68dbe6e4158d6c1b10ee Merge: d36ccdb 4bef0a2 Author: Linus Torvalds Date: Tue Jan 19 17:54:15 2016 -0800 Merge tag 'platform-drivers-x86-v4.5-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Add intel punit and telemetry driver for APL SoCs. Add intel-hid driver for various laptop hotkey support. Add asus-wireless radio control driver. Keyboard backlight support/improvements for ThinkPads, Vaio, and Toshiba. Several hotkey related fixes and improvements for dell and toshiba. Fix oops on dual GPU Macs in apple-gmux. A few new device IDs and quirks. Various minor config related build issues and cleanups. surface pro 4: - fix compare_const_fl.cocci warnings - Add support for Surface Pro 4 Buttons platform/x86: - Add Intel Telemetry Debugfs interfaces - Add Intel telemetry platform device - Add Intel telemetry platform driver - Add Intel Telemetry Core Driver - add NULL check for input parameters - add Intel P-Unit mailbox IPC driver - update acpi resource structure for Punit thinkpad_acpi: - Add support for keyboard backlight dell-wmi: - Process only one event on devices with interface version 0 - Check if Dell WMI descriptor structure is valid - Improve unknown hotkey handling - Use a C99-style array for bios_to_linux_keycode tc1100-wmi: - fix build warning when CONFIG_PM not enabled asus-wireless: - Add ACPI HID ATK4001 - Add Asus Wireless Radio Control driver asus-wmi: - drop to_platform_driver macro intel-hid: - new hid event driver for hotkeys sony-laptop: - Keyboard backlight control for some Vaio Fit models ideapad-laptop: - Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list apple-gmux: - Assign apple_gmux_data before registering toshiba_acpi: - Add rfkill dependency to ACPI_TOSHIBA entry - Fix keyboard backlight sysfs entries not being updated - Add WWAN RFKill support - Add support for WWAN devices - Fix blank screen at boot if transflective backlight is supported - Propagate the hotkey value via genetlink toshiba_bluetooth: - Add missing newline in toshiba_bluetooth_present function" * tag 'platform-drivers-x86-v4.5-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (29 commits) surface pro 4: fix compare_const_fl.cocci warnings surface pro 4: Add support for Surface Pro 4 Buttons platform:x86: Add Intel Telemetry Debugfs interfaces platform:x86: Add Intel telemetry platform device platform:x86: Add Intel telemetry platform driver platform/x86: Add Intel Telemetry Core Driver intel_punit_ipc: add NULL check for input parameters thinkpad_acpi: Add support for keyboard backlight dell-wmi: Process only one event on devices with interface version 0 dell-wmi: Check if Dell WMI descriptor structure is valid tc1100-wmi: fix build warning when CONFIG_PM not enabled asus-wireless: Add ACPI HID ATK4001 platform/x86: Add Asus Wireless Radio Control driver asus-wmi: drop to_platform_driver macro intel-hid: new hid event driver for hotkeys Keyboard backlight control for some Vaio Fit models platform/x86: Add rfkill dependency to ACPI_TOSHIBA entry platform:x86: add Intel P-Unit mailbox IPC driver intel_pmc_ipc: update acpi resource structure for Punit ideapad-laptop: Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list ... commit 4bef0a27e414f79e0200f33ab23adeb07965272e Author: Julia Lawall Date: Sun Dec 27 22:10:58 2015 +0100 surface pro 4: fix compare_const_fl.cocci warnings Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Weng Xuetian Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Signed-off-by: Darren Hart drivers/platform/x86/surfacepro3_button.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d5ac6e1771e30137ba1a2898885102b8bc21851 Author: Weng Xuetian Date: Sun Jan 17 15:10:38 2016 -0800 surface pro 4: Add support for Surface Pro 4 Buttons Surface Pro 4 buttons are managed by a device with _HID "MSHW0040" different from Surface Pro 3. This commit adds MSHW0040 to id list to support the Surface Pro 4. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109871 Signed-off-by: Weng Xuetian Acked-by: Chen Yu Signed-off-by: Darren Hart drivers/platform/x86/Kconfig | 4 ++-- drivers/platform/x86/surfacepro3_button.c | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) commit 87bee290998d062937eecf40ad409480e7281b0e Author: Souvik Kumar Chakravarty Date: Tue Jan 12 16:05:14 2016 +0530 platform:x86: Add Intel Telemetry Debugfs interfaces This implements debugfs interfaces for reading the telemetry samples from SSRAM and configuring firmware trace verbosity. Interface created under /sys/kernel/debug/telemetry soc_states: SoC Device and Low Power States pss_info: Info from the Primary SubSystem ioss_info: Info from IO SubSusytem pss_trace_verbosity: Read/Modify PSS F/W trace verbosity ioss_trace_verbosity: Read/Modify IOSS F/W trace verbosity. Signed-off-by: Souvik Kumar Chakravarty Signed-off-by: Darren Hart MAINTAINERS | 1 + drivers/platform/x86/Makefile | 3 +- drivers/platform/x86/intel_telemetry_debugfs.c | 1030 ++++++++++++++++++++++++ 3 files changed, 1033 insertions(+), 1 deletion(-) commit 48c1917088ba00af25a0afc13de7403d6a80b06d Author: Souvik Kumar Chakravarty Date: Tue Jan 12 16:02:54 2016 +0530 platform:x86: Add Intel telemetry platform device Telemetry Device is created by the pmc_ipc driver. Resources are populated according SSRAM region as indicated by the BIOS tables. Signed-off-by: Souvik Kumar Chakravarty Signed-off-by: Darren Hart drivers/platform/x86/intel_pmc_ipc.c | 96 ++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 9d16b482b059d784137881f3ec4bb121c5a2e6ee Author: Souvik Kumar Chakravarty Date: Tue Jan 12 16:01:39 2016 +0530 platform:x86: Add Intel telemetry platform driver Telemetry platform driver implements the telemetry interfaces. Currently it supports ApolloLake. It uses the PUNIT and PMC IPC interfaces to configure the telemetry samples to read. The samples are read from a Secure SRAM region. Signed-off-by: Souvik Kumar Chakravarty Signed-off-by: Darren Hart MAINTAINERS | 1 + drivers/platform/x86/Makefile | 3 +- drivers/platform/x86/intel_telemetry_pltdrv.c | 1206 +++++++++++++++++++++++++ 3 files changed, 1209 insertions(+), 1 deletion(-) commit 378f956e3f93b7862d89f93411953758491b42cc Author: Souvik Kumar Chakravarty Date: Tue Jan 12 16:00:33 2016 +0530 platform/x86: Add Intel Telemetry Core Driver Intel PM Telemetry is a software mechanism via which various SoC PM and performance related parameters like PM counters, firmware trace verbosity, the status of different devices inside the SoC, etc. can be monitored and analyzed. The different samples that may be monitored can be configured at runtime via exported APIs. This patch adds the telemetry core driver that implements basic exported APIs. Signed-off-by: Souvik Kumar Chakravarty Signed-off-by: Darren Hart MAINTAINERS | 7 + arch/x86/include/asm/intel_telemetry.h | 147 +++++++++ drivers/platform/x86/Kconfig | 11 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel_telemetry_core.c | 464 ++++++++++++++++++++++++++++ 5 files changed, 630 insertions(+) commit 3fae75740faff4c6a66be7131838fda3ae92e280 Author: Qipeng Zha Date: Fri Jan 8 18:32:27 2016 +0800 intel_punit_ipc: add NULL check for input parameters intel_punit_ipc_command() maybe called when in or out data pointers are NULL. Signed-off-by: Qipeng Zha Signed-off-by: Darren Hart drivers/platform/x86/intel_punit_ipc.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit bb28f3d51ff5e1be541d057708011cc1efe6fae9 Author: Pali Rohár Date: Wed Dec 30 23:27:41 2015 +0100 thinkpad_acpi: Add support for keyboard backlight This patch adds support for controlling keyboard backlight via standard linux led class interface (::kbd_backlight). It uses ACPI HKEY device with MLCG and MLCS methods. Signed-off-by: Pali Rohár Tested-by: Fabio D'Urso Acked-by: Henrique de Moraes Holschuh Signed-off-by: Darren Hart drivers/platform/x86/thinkpad_acpi.c | 206 +++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) commit 481fe5be821c3d04f986e4061de42e1209a62374 Author: Pali Rohár Date: Mon Jan 4 22:26:36 2016 +0100 dell-wmi: Process only one event on devices with interface version 0 BIOS/ACPI on devices with WMI interface version 0 does not clear buffer before filling it. So next time when BIOS/ACPI send WMI event which is smaller as previous then it contains garbage in buffer from previous event. BIOS/ACPI on devices with WMI interface version 1 clears buffer and sometimes send more events in buffer at one call. Since commit 83fc44c32ad8 ("dell-wmi: Update code for processing WMI events") dell-wmi process all events in buffer (and not just first). To prevent reading garbage from the buffer we process only the first event on devices with WMI interface version 0. Signed-off-by: Pali Rohár Tested-by: Gabriele Mazzotta Signed-off-by: Darren Hart drivers/platform/x86/dell-wmi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 595773a493e360bdb4306a1a78669996c4842bc2 Author: Pali Rohár Date: Mon Jan 4 22:26:35 2016 +0100 dell-wmi: Check if Dell WMI descriptor structure is valid After examining existing DSDT ACPI tables of more laptops and looking into Dell WMI document mentioned in ML dicussion archived at http://www.spinics.net/lists/platform-driver-x86/msg07220.html we will parse and check WMI descriptor if contains expected data. It is because WMI descriptor contains interface version number and it is needed to know in next commit. Signed-off-by: Pali Rohár Tested-by: Gabriele Mazzotta Signed-off-by: Darren Hart drivers/platform/x86/dell-wmi.c | 80 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 2 deletions(-) commit 75d7e7d7a8f4966cb8b1da54a1c74fb2a97ae8fc Author: Colin Ian King Date: Wed Jan 6 18:02:59 2016 +0000 tc1100-wmi: fix build warning when CONFIG_PM not enabled Conditionally declare suspend_data on CONFIG_PM to avoid the following warning when CONFIG_OM is not enabled: drivers/platform/x86/tc1100-wmi.c:55:27: warning: 'suspend_data' defined but not used [-Wunused-variable] Signed-off-by: Colin Ian King Signed-off-by: Darren Hart drivers/platform/x86/tc1100-wmi.c | 2 ++ 1 file changed, 2 insertions(+) commit b0a095fc193a5f257c3609b09298c0705fc32c0b Author: João Paulo Rechi Vita Date: Tue Jan 5 08:26:01 2016 -0500 asus-wireless: Add ACPI HID ATK4001 As reported in https://bugzilla.kernel.org/show_bug.cgi?id=98931#c22 in the Asus UX31A the Asus Wireless Radio Control device (ASHS) uses the HID "ATK4001". Signed-off-by: João Paulo Rechi Vita Reported-by: Tasev Nikola Signed-off-by: Darren Hart drivers/platform/x86/asus-wireless.c | 1 + 1 file changed, 1 insertion(+) commit f6a6bbae0471fdfb824a86d1808eae33e8819254 Author: João Paulo Rechi Vita Date: Tue Jan 5 11:16:53 2016 -0500 platform/x86: Add Asus Wireless Radio Control driver Some Asus notebooks like the Asus E202SA and the Asus X555UB have a separate ACPI device for notifications from the airplane mode hotkey. This device is called "Wireless Radio Control" in Asus websites and ASHS in the DSDT, and its ACPI _HID is ATK4002 in the two models mentioned above. For these models, when the airplane mode hotkey (Fn+F2) is pressed, a query 0x0B is started in the Embedded Controller, and all this query does is a notify ASHS with the value 0x88 (for acpi_osi >= "Windows 2012"): Scope (_SB.PCI0.SBRG.EC0) { (...) Method (_Q0B, 0, NotSerialized) // _Qxx: EC Query { If ((MSOS () >= OSW8)) { Notify (ASHS, 0x88) // Device-Specific } Else { (...) } } } Signed-off-by: João Paulo Rechi Vita Reviewed-by: Andy Shevchenko Signed-off-by: Darren Hart MAINTAINERS | 6 +++ drivers/platform/x86/Kconfig | 14 ++++++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/asus-wireless.c | 83 ++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+) commit f5b3f66548b72f8ab77fea5867bd45ad91ed2143 Author: Geliang Tang Date: Tue Dec 22 22:16:13 2015 +0800 asus-wmi: drop to_platform_driver macro to_platform_driver has been defined in platform_device.h, so drop this repetitive macro in asus-wmi.c. Signed-off-by: Geliang Tang Signed-off-by: Darren Hart drivers/platform/x86/asus-wmi.c | 3 --- 1 file changed, 3 deletions(-) commit ecc83e52b28c707da3e7fb8aa471417d9c0d1ec7 Author: Alex Hung Date: Fri Dec 18 23:31:10 2015 +0800 intel-hid: new hid event driver for hotkeys This driver supports various HID events including hotkeys. Dell XPS 13 9350 requires it for the wireless hotkey. Signed-off-by: Alex Hung Reviewed-and-tested-by: Andy Lutomirski [dvhart: Kconfig help typo fix and INPUT_SPARSEKMAP fix from Sedat Dilek] Signed-off-by: Darren Hart MAINTAINERS | 6 + drivers/platform/x86/Kconfig | 12 ++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel-hid.c | 289 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 308 insertions(+) commit c9ad1d9946e849ac3d8821d91e136d7fd728dec5 Author: John Keeping Date: Tue Jan 19 10:47:00 2016 +0000 drm/rockchip: explain why we can't wait_for_vblanks Signed-off-by: John Keeping drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit f2227f469782e55765deacb8ebcc7ec05fe04013 Author: John Keeping Date: Tue Jan 19 10:46:59 2016 +0000 drm/rockchip: don't wait for vblank if fb hasn't changed As commented in drm_atomic_helper_wait_for_vblanks(), userspace relies on cursor ioctls being unsynced. Converting the rockchip driver to atomic has significantly impacted cursor performance by making every cursor update wait for vblank. By skipping the vblank sync when the framebuffer has not changed (as is done in drm_atomic_helper_wait_for_vblanks()) we can avoid this for the common case of moving the cursor and only need to delay the cursor ioctl when the cursor icon changes. We cannot add the check on legacy_cursor_update since that results in the cursor bo being unreferenced while the hardware may still be reading it. Fully supporting unsynced cursor updates is left for the future when the atomic helper framework supports async updates. Signed-off-by: John Keeping Tested-by: Heiko Stuebner drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c240906d36653944d5c049df7ce667a7e8bea6ac Author: John Keeping Date: Tue Jan 19 10:46:58 2016 +0000 drm/atomic-helper: Export framebuffer_changed() The Rockchip driver cannot use drm_atomic_helper_wait_for_vblanks() because it has hardware counters for neither vblanks nor scanlines. In order to simplify re-implementing the functionality for this driver, export the framebuffer_changed() helper so it can be reused. Signed-off-by: John Keeping Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic_helper.c | 24 ++++++++++++++++++++---- include/drm/drm_atomic_helper.h | 4 ++++ 2 files changed, 24 insertions(+), 4 deletions(-) commit 759c01142a5d0f364a462346168a56de28a80f52 Author: Willy Tarreau Date: Mon Jan 18 16:36:09 2016 +0100 pipe: limit the per-user amount of pages allocated in pipes On no-so-small systems, it is possible for a single process to cause an OOM condition by filling large pipes with data that are never read. A typical process filling 4000 pipes with 1 MB of data will use 4 GB of memory. On small systems it may be tricky to set the pipe max size to prevent this from happening. This patch makes it possible to enforce a per-user soft limit above which new pipes will be limited to a single page, effectively limiting them to 4 kB each, as well as a hard limit above which no new pipes may be created for this user. This has the effect of protecting the system against memory abuse without hurting other users, and still allowing pipes to work correctly though with less data at once. The limit are controlled by two new sysctls : pipe-user-pages-soft, and pipe-user-pages-hard. Both may be disabled by setting them to zero. The default soft limit allows the default number of FDs per process (1024) to create pipes of the default size (64kB), thus reaching a limit of 64MB before starting to create only smaller pipes. With 256 processes limited to 1024 FDs each, this results in 1024*64kB + (256*1024 - 1024) * 4kB = 1084 MB of memory allocated for a user. The hard limit is disabled by default to avoid breaking existing applications that make intensive use of pipes (eg: for splicing). Reported-by: socketpair@gmail.com Reported-by: Tetsuo Handa Mitigates: CVE-2013-4312 (Linux 2.0+) Suggested-by: Linus Torvalds Signed-off-by: Willy Tarreau Signed-off-by: Al Viro Documentation/sysctl/fs.txt | 23 ++++++++++++++++++++++ fs/pipe.c | 47 +++++++++++++++++++++++++++++++++++++++++++-- include/linux/pipe_fs_i.h | 4 ++++ include/linux/sched.h | 1 + kernel/sysctl.c | 14 ++++++++++++++ 5 files changed, 87 insertions(+), 2 deletions(-) commit d36ccdbd1ca1050ad4e7b9b16ced848132533f6e Merge: 7c24d9f 23567fd Author: Linus Torvalds Date: Tue Jan 19 16:02:31 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem update from James Morris: "A CVE fix and a maintainers file update" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: Fix keyring ref leak in join_session_keyring() Fix the MAINTAINERS record for the certs/ directory commit 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2 Author: Yevgeny Pats Date: Tue Jan 19 22:09:04 2016 +0000 KEYS: Fix keyring ref leak in join_session_keyring() This fixes CVE-2016-0728. If a thread is asked to join as a session keyring the keyring that's already set as its session, we leak a keyring reference. This can be tested with the following program: #include #include #include #include int main(int argc, const char *argv[]) { int i = 0; key_serial_t serial; serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING, "leaked-keyring"); if (serial < 0) { perror("keyctl"); return -1; } if (keyctl(KEYCTL_SETPERM, serial, KEY_POS_ALL | KEY_USR_ALL) < 0) { perror("keyctl"); return -1; } for (i = 0; i < 100; i++) { serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING, "leaked-keyring"); if (serial < 0) { perror("keyctl"); return -1; } } return 0; } If, after the program has run, there something like the following line in /proc/keys: 3f3d898f I--Q--- 100 perm 3f3f0000 0 0 keyring leaked-keyring: empty with a usage count of 100 * the number of times the program has been run, then the kernel is malfunctioning. If leaked-keyring has zero usages or has been garbage collected, then the problem is fixed. Reported-by: Yevgeny Pats Signed-off-by: David Howells Acked-by: Don Zickus Acked-by: Prarit Bhargava Acked-by: Jarod Wilson Signed-off-by: James Morris security/keys/process_keys.c | 1 + 1 file changed, 1 insertion(+) commit 800f20170dcf1dd7d89ce45cb9be930b359936d1 Author: Mattia Dongili Date: Mon Dec 14 21:12:32 2015 -0800 Keyboard backlight control for some Vaio Fit models SVF1521P6EW, SVF1521DCXW, SVF13N1L2ES and likely most SVF*. do not expose separate timeout controls in auto mode. Signed-off-by: Dominik Matta Signed-off-by: Mattia Dongili Signed-off-by: Darren Hart drivers/platform/x86/sony-laptop.c | 65 ++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 20 deletions(-) commit dc4522beb24352b371cfbfdcecb0c8def5a2455e Author: Azael Avalos Date: Mon Dec 14 13:00:59 2015 -0700 platform/x86: Add rfkill dependency to ACPI_TOSHIBA entry Commit 2fdde83443aa ("toshiba_acpi: Add WWAN RFKill support") added WWAN rfkill support to the driver, but the KConfig entry was not updated to add the RFKill dependency, causing a broken build if RFKill is not selected. This patch adds the RFKILL dependency to the KConfig entry, fixing the build issue. Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fdca4f16f57da76a8e68047923588a87d1c01f0a Author: Qipeng Zha Date: Fri Dec 11 22:45:00 2015 +0800 platform:x86: add Intel P-Unit mailbox IPC driver This driver provides support for P-Unit mailbox IPC on Intel platforms. The heart of the P-Unit is the Foxton microcontroller and its firmware, which provide mailbox interface for power management usage. Signed-off-by: Qipeng Zha Reviewed-by: Andy Shevchenko Signed-off-by: Darren Hart MAINTAINERS | 4 +- arch/x86/include/asm/intel_punit_ipc.h | 101 ++++++++++ drivers/platform/x86/Kconfig | 6 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel_punit_ipc.c | 338 +++++++++++++++++++++++++++++++++ 5 files changed, 449 insertions(+), 1 deletion(-) commit 8cc7fb4a6523d4bdda87bba61f4dc742d3b5ba39 Author: Qipeng Zha Date: Fri Dec 11 22:44:59 2015 +0800 intel_pmc_ipc: update acpi resource structure for Punit BIOS restructure exported memory resources for Punit in acpi table, So update resources for Punit. Signed-off-by: Qipeng Zha Reviewed-by: Andy Shevchenko Signed-off-by: Darren Hart drivers/platform/x86/intel_pmc_ipc.c | 118 +++++++++++++++++++++++------------ 1 file changed, 78 insertions(+), 40 deletions(-) commit edde316acb5f07c04abf09a92f59db5d2efd14e2 Author: Josh Boyer Date: Wed Dec 9 21:12:52 2015 -0500 ideapad-laptop: Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list One of the newest ideapad models also lacks a physical hw rfkill switch, and trying to read the hw rfkill switch through the ideapad module causes it to always reported blocking breaking wifi. Fix it by adding this model to the DMI list. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1286293 Cc: stable@vger.kernel.org Signed-off-by: Josh Boyer Signed-off-by: Darren Hart drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit cbc61f114af5fb078d84dc8864152f4db1712bc5 Author: Andy Lutomirski Date: Mon Nov 30 17:02:01 2015 -0800 dell-wmi: Improve unknown hotkey handling If DMI lists a hotkey that we don't recognize, log and ignore it instead of trying to map it to keycode 0. I haven't seen this happen, but it will help maintain the key map in the future and it will help avoid sending bogus events. This also improves the message that we log when we get an unknown key event. Signed-off-by: Andy Lutomirski Reviewed-by: Pali Rohár [dvhart: remove BUILD_BUG_ON per mutual agreement on list] Signed-off-by: Darren Hart drivers/platform/x86/dell-wmi.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit c1e1655bb892c6800af82c2d88c8063fce7b5c98 Author: Matthew Garrett Date: Mon Nov 16 21:38:40 2015 +0100 apple-gmux: Assign apple_gmux_data before registering Registering the handler after both GPUs will trigger a DDC switch for connector reprobing. This will oops if apple_gmux_data hasn't already been assigned. Reorder the code to do that. [Lukas: More generally, this commit fixes a race condition that is triggered by invoking a handler callback between the call to vga_switcheroo_register_handler() and the assignment of apple_gmux_data.] Tested-by: Pierre Moreau [MBP 5,3 2009 nvidia MCP79 + G96 pre-retina 15"] Tested-by: Paul Hordiienko [MBP 6,2 2010 intel ILK + nvidia GT216 pre-retina 15"] Tested-by: Lukas Wunner [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] Tested-by: William Brown [MBP 8,2 2011 intel SNB + amd turks pre-retina 15"] Tested-by: Bruno Bierbaumer [MBP 11,3 2013 intel HSW + nvidia GK107 retina 15"] Signed-off-by: Matthew Garrett Reviewed-by: Lukas Wunner Signed-off-by: Lukas Wunner Signed-off-by: Darren Hart drivers/platform/x86/apple-gmux.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 65e3cf9c0f05877f76eefcb4f005944dc5379fbf Author: Azael Avalos Date: Mon Nov 23 10:51:30 2015 -0700 toshiba_acpi: Fix keyboard backlight sysfs entries not being updated Certain Toshiba models with the second generation keyboard backlight (type 2) do not generate the keyboard backlight changed event (0x92), and thus, the sysfs entries are never being updated. This patch adds a workquee and a global boolean variable to address the issue. For those models that do generate the event, the sysfs entries are being updated via the *notify function and the boolean is set to true to avoid a second call to update the entries. For those models that do not generate the event, the workquee is used to update the sysfs entries and also to emulate the event via netlink, to make userspace aware of such change. Signed-off-by: Azael Avalos Signed-off-by: Darren Hart drivers/platform/x86/toshiba_acpi.c | 47 +++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) commit 503943e0e52bd3fbf014aa1d838ced37adb43121 Author: Maciej W. Rozycki Date: Fri Nov 13 00:48:29 2015 +0000 MIPS: Add IEEE Std 754 conformance mode selection Add an `ieee754=' kernel parameter to control IEEE Std 754 conformance mode. Use separate flags copied from the respective CPU feature flags, and adjusted according to the conformance mode selected, to make binaries requesting individual NaN encoding modes accepted or rejected as needed. Update the initial setting for FCSR and, in the full FPU emulation mode, its read-only mask accordingly. Accept the mode selection requested for legacy processors as well. As with the EF_MIPS_NAN2008 ELF file header flag adjust both ABS2008 and NAN2008 bits at the same time, to match the choice made for hardware currently implemented. Signed-off-by: Maciej W. Rozycki Cc: Andrew Morton Cc: Matthew Fortune Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11481/ Signed-off-by: Ralf Baechle Documentation/kernel-parameters.txt | 35 ++++++++++++ arch/mips/include/asm/elf.h | 4 ++ arch/mips/kernel/cpu-probe.c | 105 ++++++++++++++++++++++++++++++++---- arch/mips/kernel/elf.c | 12 +++-- 4 files changed, 142 insertions(+), 14 deletions(-) commit 93adeaf6dadcaed943a51ad9ea2d77e24e6d70a7 Author: Maciej W. Rozycki Date: Fri Nov 13 00:48:15 2015 +0000 MIPS: Determine the presence of IEEE Std 754-2008 features Determine the presence of and the amount of control available over IEEE Std 754-2008 features. In the case of a hardware FPU being used examine the FIR register for the presence of the HAS2008 bit and then the FCSR register for the writability of the ABS2008 and NAN2008 bits and the hardwired state of each of these bits if read-only. Update the initial FCSR contents used for threads and the FCSR writability mask accordingly. For full FPU emulation and MIPS32 or MIPS64 processors make the FCSR ABS2008 and NAN2008 bits writable. Signed-off-by: Maciej W. Rozycki Cc: Andrew Morton Cc: Matthew Fortune Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11480/ Signed-off-by: Ralf Baechle arch/mips/kernel/cpu-probe.c | 76 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) commit 2b5e869ecfcb3112f7e1267cb0328f3ff6d49b18 Author: Maciej W. Rozycki Date: Fri Nov 13 00:48:02 2015 +0000 MIPS: ELF: Interpret the NAN2008 file header flag Handle the EF_MIPS_NAN2008 ELF file header flag and refuse execution where there is no support in the FPU for the NaN encoding mode requested by a binary invoked. Ensure that the setting of the bit in the binary matches one in any intepreter used. Set the thread's initial FCSR contents according to the value of the EF_MIPS_NAN2008. Set the values of the FCSR ABS2008 and NAN2008 bits both to the same value if possible, to take the approach taken with existing FPU hardware into account. As of now all implementations have both bits hardwired to the same value, that is both are fixed at 0 or both are fixed at 1, even though the architecture allows for implementations where the amount of control implemented with each of these two individual bits is independent of each other. Signed-off-by: Maciej W. Rozycki Cc: Andrew Morton Cc: Matthew Fortune Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11479/ Signed-off-by: Ralf Baechle arch/mips/include/asm/elf.h | 9 +++++--- arch/mips/kernel/elf.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 3 deletions(-) commit eb4bc076ff94b82fce04f6db061de597f71bd129 Author: Maciej W. Rozycki Date: Fri Nov 13 00:47:48 2015 +0000 ELF: Also pass any interpreter's file header to `arch_check_elf' Also pass any interpreter's file header to `arch_check_elf' so that any architecture handler can have a look at it if needed. Signed-off-by: Maciej W. Rozycki Acked-by: Andrew Morton Acked-by: Al Viro Cc: Matthew Fortune Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11478/ Signed-off-by: Ralf Baechle arch/mips/include/asm/elf.h | 2 +- arch/mips/kernel/elf.c | 2 +- fs/binfmt_elf.c | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) commit 90d53a91fbd0c5a0882c29fa4279a3d2d700c76d Author: Maciej W. Rozycki Date: Fri Nov 13 00:47:28 2015 +0000 MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation Implement IEEE Std 754-2008 NaN encoding wired to the state of the FCSR.NAN2008 bit. Make the interpretation of the quiet bit in NaN data as follows: * in the legacy mode originally defined by the MIPS architecture the value of 1 denotes an sNaN whereas the value of 0 denotes a qNaN, * in the 2008 mode introduced with revision 5 of the MIPS architecture the value of 0 denotes an sNaN whereas the value of 1 denotes a qNaN, following the definition of the preferred NaN encoding introduced with IEEE Std 754-2008. In the 2008 mode, following the requirement of the said standard, quiet an sNaN where needed by setting the quiet bit to 1 and leaving all the NaN payload bits unchanged. Update format conversion operations according to the rules set by IEEE Std 754-2008 and the MIPS architecture. Specifically: * propagate NaN payload bits through conversions between floating-point formats such that as much information as possible is preserved and specifically a conversion from a narrower format to a wider format and then back to the original format does not change a qNaN payload in any way, * conversions from a floating-point to an integer format where the source is a NaN, infinity or a value that would convert to an integer outside the range of the result format produce, under the default exception handling, the respective values defined by the MIPS architecture. In full FPU emulation set the FIR.HAS2008 bit to 1, however do not make any further FCSR bits writable. Signed-off-by: Maciej W. Rozycki Cc: Andrew Morton Cc: Matthew Fortune Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11477/ Signed-off-by: Ralf Baechle arch/mips/kernel/cpu-probe.c | 2 ++ arch/mips/math-emu/dp_tint.c | 9 ++++++--- arch/mips/math-emu/dp_tlong.c | 9 ++++++--- arch/mips/math-emu/ieee754.c | 6 ++++-- arch/mips/math-emu/ieee754.h | 42 ++++++++++++++++++++++++++++------------- arch/mips/math-emu/ieee754dp.c | 12 ++++++++++-- arch/mips/math-emu/ieee754int.h | 12 ++++++------ arch/mips/math-emu/ieee754sp.c | 12 ++++++++++-- arch/mips/math-emu/sp_fdp.c | 13 ++++++++----- arch/mips/math-emu/sp_tint.c | 9 ++++++--- arch/mips/math-emu/sp_tlong.c | 9 ++++++--- 11 files changed, 93 insertions(+), 42 deletions(-) commit 198f70589e3c0f0f50da646152443787e959228f Author: Maciej W. Rozycki Date: Fri Nov 13 00:47:08 2015 +0000 MIPS: math-emu: Add IEEE Std 754-2008 ABS.fmt and NEG.fmt emulation Implement IEEE Std 754-2008 non-arithmetic ABS.fmt and NEG.fmt emulation wired to the state of the FCSR.ABS2008 bit. In the non-arithmetic mode the sign bit is altered according to the operation requested regardless of the datum encoded in the input operand, no other bits are changed, the resulting bit pattern is written to the output operand and no exception is ever signalled. Signed-off-by: Maciej W. Rozycki Cc: Andrew Morton Cc: Matthew Fortune Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11476/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_simple.c | 38 +++++++++++++++++++++++++------------- arch/mips/math-emu/sp_simple.c | 38 +++++++++++++++++++++++++------------- 2 files changed, 50 insertions(+), 26 deletions(-) commit 9519ef37a4a4e9c3c2d7d89ecbecfaf3c839208a Author: Maciej W. Rozycki Date: Fri Nov 13 00:46:55 2015 +0000 MIPS: Define the legacy-NaN and 2008-NaN features Allocate CPU option bits and define macros for the legacy-NaN and 2008-NaN IEEE Std 754 MIPS architecture features. Unconditionally mark the legacy-NaN feature as present across hardware and emulated floating-point configurations. Signed-off-by: Maciej W. Rozycki Cc: Andrew Morton Cc: Matthew Fortune Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11475/ Signed-off-by: Ralf Baechle arch/mips/include/asm/cpu-features.h | 7 +++++++ arch/mips/include/asm/cpu.h | 2 ++ arch/mips/kernel/cpu-probe.c | 2 ++ 3 files changed, 11 insertions(+) commit 2ed02dd415aee71a8bf4c621a9bd65c256642b96 Author: Maciej W. Rozycki Date: Fri Nov 13 00:46:44 2015 +0000 MIPS: Use a union to access the ELF file header Rewrite `arch_elf_pt_proc' and `arch_check_elf' using a union to access the ELF file header. Signed-off-by: Maciej W. Rozycki Cc: Andrew Morton Cc: Matthew Fortune Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11474/ Signed-off-by: Ralf Baechle arch/mips/kernel/elf.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit a0fd81a9df67e3863a297c45c2f74b3bd2224a5d Author: John Crispin Date: Mon Jan 4 20:28:13 2016 +0100 MAINTAINERS: add myself as Ralink MIPS architecture maintainer Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11998/ Signed-off-by: Ralf Baechle MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 9ca44355f05ad90a274a33b597e0d1b22d310205 Author: John Crispin Date: Mon Jan 4 20:28:12 2016 +0100 MAINTAINERS: Add myself as Lantiq MIPS architecture maintainer Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11997/ Signed-off-by: Ralf Baechle MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 7e5873d3755c791e9e4ad2e189164575c978e01c Author: John Crispin Date: Mon Jan 4 20:24:01 2016 +0100 MIPS: pci: Add MT7620a PCIE driver The "a" version of the MT7620 has single port PCIE bus. The driver is straightforward without any special magic required. The driver works on MT7620 and MT7628. There are a few magic values that get written to the pcie phy and a register of which we only know the name. I marked these places as vodoo in the comments above the code. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11996/ Signed-off-by: Ralf Baechle arch/mips/pci/Makefile | 1 + arch/mips/pci/pci-mt7620.c | 426 +++++++++++++++++++++++++++++++++++++++++++++ arch/mips/ralink/Kconfig | 1 + 3 files changed, 428 insertions(+) commit 3b2e7c7c83873f4c073d501c2fff80518e264240 Author: John Crispin Date: Mon Jan 4 20:24:00 2016 +0100 MIPS: ralink: Add a few missing clocks Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11995/ Signed-off-by: Ralf Baechle arch/mips/ralink/mt7620.c | 3 +++ arch/mips/ralink/rt305x.c | 1 + arch/mips/ralink/rt3883.c | 1 + 3 files changed, 5 insertions(+) commit 3bca798b859c75063b3b4e65f6b019c7a4bd53ef Author: John Crispin Date: Mon Jan 4 20:23:59 2016 +0100 MIPS: ralink: Fix vendor string for mt7620 Ralink was acquired by Mediatek. Represent this in the cpuinfo. It apparently confused people. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11994/ Signed-off-by: Ralf Baechle arch/mips/ralink/mt7620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0af3a40f09a2a85089037a0b5b51471fa48b229e Author: John Crispin Date: Mon Jan 4 20:23:58 2016 +0100 MIPS: ralink: Fix invalid assignment of SoC type Commit 418d29c87061 ("MIPS: ralink: Unify SoC id handling") introduced broken code. We obviously need to assign the value. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11993/ Signed-off-by: Ralf Baechle arch/mips/ralink/rt288x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fad2522272ed5ed451d2d7b1dc547ddf3781cc7e Author: John Crispin Date: Mon Jan 4 20:23:57 2016 +0100 MIPS: ralink: fix USB frequency scaling Commit 418d29c87061 ("MIPS: ralink: Unify SoC id handling") was not fully correct. The logic for the SoC check got inverted. We need to check if it is not a MT76x8. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11992/ Signed-off-by: Ralf Baechle arch/mips/ralink/mt7620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e906a5f67e5a3337d696ec848e9c28fc68b39aa3 Author: John Crispin Date: Mon Jan 4 20:23:56 2016 +0100 MIPS: ralink: MT7688 pinmux fixes A few fixes to the pinmux data, 2 new muxes and a minor whitespace cleanup. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11991/ Signed-off-by: Ralf Baechle arch/mips/ralink/mt7620.c | 80 +++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 30 deletions(-) commit 1df7addb9671ace5fbae4daa45b0755cebefb1dc Author: John Crispin Date: Mon Jan 4 20:23:55 2016 +0100 MIPS: ralink: add MT7621 support MT7621 is based on a 1004k core. This patch adds support for the SoC. The timer and IRQ is just boiler plate as GIC has recently been moved to generic places in the kernel and just works. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11990/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-ralink/irq.h | 9 + arch/mips/include/asm/mach-ralink/mt7621.h | 38 ++++ .../asm/mach-ralink/mt7621/cpu-feature-overrides.h | 65 ++++++ arch/mips/ralink/Kconfig | 11 + arch/mips/ralink/Makefile | 8 +- arch/mips/ralink/Platform | 5 + arch/mips/ralink/irq-gic.c | 25 +++ arch/mips/ralink/mt7621.c | 226 +++++++++++++++++++++ arch/mips/ralink/timer-gic.c | 24 +++ 9 files changed, 410 insertions(+), 1 deletion(-) commit 2761f83cad764f2b13ca3d7fb2f3fb5bedae1cd3 Author: John Crispin Date: Mon Jan 4 20:23:54 2016 +0100 MIPS: ralink: add a symbol for INTC Some of the newer SoCs use the GIC. This patch splits the INTC out into its own symbol, allowing us to add the gic code in the following patch. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11989/ Signed-off-by: Ralf Baechle arch/mips/ralink/Kconfig | 4 ++++ arch/mips/ralink/Makefile | 2 ++ 2 files changed, 6 insertions(+) commit 663148e48a661d759369b726261d160486b68e75 Author: John Crispin Date: Sun Jan 3 16:26:04 2016 +0100 Documentation: DT: net: add docs for ralink/mediatek SoC ethernet binding Add three files. ralink,rt2880-net.txt descibes the actual frame engine and the other two describe the switch forntend bindings. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: Michael Lee Cc: devicetree@vger.kernel.org Cc: David S. Miller Cc: netdev@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-mediatek@lists.infradead.org Cc: John Crispin Cc: Felix Fietkau Cc: Michael Lee Cc: steven.liu@mediatek.com Cc: Fred.Chang@mediatek.com Patchwork: https://patchwork.linux-mips.org/patch/11970/ Signed-off-by: Ralf Baechle .../bindings/net/mediatek,mt7620-gsw.txt | 26 +++++++++ .../devicetree/bindings/net/ralink,rt2880-net.txt | 61 ++++++++++++++++++++++ .../devicetree/bindings/net/ralink,rt3050-esw.txt | 32 ++++++++++++ 3 files changed, 119 insertions(+) commit 3d1f664ab940382e7faa597fdfefed4acb163afc Author: Rafał Miłecki Date: Fri Jan 1 15:30:03 2016 +0100 MIPS: BCM47xx: Support SPROM prefixes on other platforms BCM47XX platform has specific PCI setup because all buses share the same domain. It's different e.g. on ARM ARCH_BCM_5301X where each PCI bus gets its own domain (they are handled by iProc PCIe controller driver). As we want to make SPROM driver more generic, let's add an exception for BCM47xx. It was tested on BCM4706 (MIPS) and BCM4708A0 (ARM). Signed-off-by: Rafał Miłecki Cc: Hauke Mehrtens Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11969/ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 7c24d9f3b27b198c3c4dfc8327a25fb077a96219 Merge: 99e38df ed8a9d2c Author: Linus Torvalds Date: Tue Jan 19 15:03:34 2016 -0800 Merge branch 'for-4.5/core' of git://git.kernel.dk/linux-block Pull core block updates from Jens Axboe: "We don't have a lot of core changes this time around, it's mostly in drivers, which will come in a subsequent pull. The cores changes include: - blk-mq - Prep patch from Christoph, changing blk_mq_alloc_request() to take flags instead of just using gfp_t for sleep/nosleep. - Doc patch from me, clarifying the difference between legacy and blk-mq for timer usage. - Fixes from Raghavendra for memory-less numa nodes, and a reuse of CPU masks. - Cleanup from Geliang Tang, using offset_in_page() instead of open coding it. - From Ilya, rename request_queue slab to it reflects what it holds, and a fix for proper use of bdgrab/put. - A real fix for the split across stripe boundaries from Keith. We yanked a broken version of this from 4.4-rc final, this one works. - From Mike Krinkin, emit a trace message when we split. - From Wei Tang, two small cleanups, not explicitly clearing memory that is already cleared" * 'for-4.5/core' of git://git.kernel.dk/linux-block: block: use bd{grab,put}() instead of open-coding block: split bios to max possible length block: add call to split trace point blk-mq: Avoid memoryless numa node encoded in hctx numa_node blk-mq: Reuse hardware context cpumask for tags blk-mq: add a flags parameter to blk_mq_alloc_request Revert "blk-flush: Queue through IO scheduler when flush not required" block: clarify blk_add_timer() use case for blk-mq bio: use offset_in_page macro block: do not initialise statics to 0 or NULL block: do not initialise globals to 0 or NULL block: rename request_queue slab cache commit f9a6ed62c406544d33b1873c0260ef9272ddc215 Author: Sagi Grimberg Date: Tue Jan 12 13:19:50 2016 +0200 IB/srpt: Remove redundant wc array No usage after the conversion to the new CQ API. Signed-off-by: Sagi Grimberg Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.h | 2 -- 1 file changed, 2 deletions(-) commit 8483d152db61c5baf5452b844ef65b96ee9a6cfb Author: Eric Anholt Date: Mon Dec 21 16:11:44 2015 -0800 drm/vc4: Remove broken attempt at GPU reset using genpd. I've tested and confirmed that it doesn't actually work. We'll need to sort out how to do this properly later, but for now just remove it since it also caused build breakage due to using CONFIG_PM_SLEEP functions without our Kconfig depending on PM_SLEEP. Signed-off-by: Eric Anholt Acked-by: Sudip Mukherjee drivers/gpu/drm/vc4/vc4_v3d.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 967bcfc0f5744c1553545883bbb43df1d41cbb5c Author: Mike Marciniszyn Date: Thu Dec 24 11:19:23 2015 -0500 IB/qib: Improve ipoib UD performance Based on profiling, UD performance drops in case of processes in a single client due to excess context switches when the progress workqueue is scheduled. This is solved by modifying the heuristic to select the direct progress instead of the scheduling progress via the workqueue when UD-like situations are detected in the heuristic. Reviewed-by: Vinit Agnihotri Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4ed088e6c2aa2b7b0479791c7251696b541bfa39 Author: Matan Barak Date: Thu Jan 14 17:50:43 2016 +0200 IB/mlx4: Advertise RoCE v2 support Advertise RoCE v2 support in port_immutable attributes according to the hardware's capabilities. This enables the verbs stack to use RoCE v2 mode. Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit e1b866c677d69334e2981b19696b7e3d88dff707 Author: Moni Shoua Date: Thu Jan 14 17:50:42 2016 +0200 IB/mlx4: Create and use another QP1 for RoCEv2 The mlx4 driver uses a special QP to implement the GSI QP. This kind of QP allows to build the InfiniBand headers in software. When mlx4 hardware builds the packet, it calculates the ICRC and puts it at the end of the payload. However, this ICRC calculation depends on the QP configuration, which is determined when the QP is modified (roce_mode during INIT->RTR). When receiving a packet, the ICRC verification doesn't depend on this configuration. Therefore, using two GSI QPs for send (one for each RoCE version) and one GSI QP for receive are required. Signed-off-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mlx4_ib.h | 7 ++ drivers/infiniband/hw/mlx4/qp.c | 159 ++++++++++++++++++++++++++++++----- 2 files changed, 147 insertions(+), 19 deletions(-) commit 3ef967a4affeef7bb3b7713dcfed6518b99737c6 Author: Moni Shoua Date: Thu Jan 14 17:50:41 2016 +0200 IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers RoCEv2 packets are sent over IP/UDP protocols. The mlx4 driver uses a type of RAW QP to send packets for QP1 and therefore needs to build the network headers below BTH in software. This patch adds option to build QP1 packets with IP and UDP headers if RoCEv2 is requested. Signed-off-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/core/ud_header.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 60 +++++++++++++++++++++++++++++++------ include/rdma/ib_pack.h | 4 +-- 3 files changed, 54 insertions(+), 12 deletions(-) commit 71a39bbbfc5931310073ecbbdbe6d0fa92501fe4 Author: Moni Shoua Date: Thu Jan 14 17:50:40 2016 +0200 IB/mlx4: Enable RoCE v2 when the IB device is added If the hardware supports RoCE v2, we configure the hardware UDP port according to the RoCE v2 Annex when mlx4_ib device is added. Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 3b5daf28ac4bb9354b7d2f10ce5942cad23e979a Author: Moni Shoua Date: Thu Jan 14 17:50:39 2016 +0200 IB/mlx4: Support modify_qp for RoCE v2 In order to support modify_qp for RoCE v2, we need to set the gid_type in the QP context. Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 37 ++++++++++++++++++++++++++++++++++--- include/linux/mlx4/qp.h | 2 +- 2 files changed, 35 insertions(+), 4 deletions(-) commit 7ead4bcb1b788732516755ef84ef1272d3e152eb Author: Moni Shoua Date: Thu Jan 14 17:50:38 2016 +0200 IB/core: Add definition for the standard RoCE V2 UDP port This will be used in hardware device driver when building QP or AH contexts. Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 1 + 1 file changed, 1 insertion(+) commit 3f723f42d9d625bb9ecfe923d19d1d42da775797 Author: Moni Shoua Date: Thu Jan 14 17:50:37 2016 +0200 net/mlx4_core: Add support for RoCE v2 entropy In RoCE v2 we need to choose a source UDP port, we do so by using entropy over the source and dest QPNs. Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx4/qp.c | 26 ++++++++++++++++++++++++++ include/linux/mlx4/qp.h | 13 ++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) commit fca83006294a6356705781eee31da1658fd411a5 Author: Moni Shoua Date: Thu Jan 14 17:50:36 2016 +0200 net/mlx4_core: Add support for configuring RoCE v2 UDP port In order to support RoCE v2, the hardware needs to be configured to classify certain UDP packets as RoCE v2 packets and pass it through its RoCE pipeline. This patch enables configuring this UDP port. Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx4/fw.c | 16 +++++++++++++++- include/linux/mlx4/device.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) commit 7e57b85c444c3c1bf3550aa6890666fc4353bd33 Author: Moni Shoua Date: Thu Jan 14 17:50:35 2016 +0200 IB/mlx4: Add support for setting RoCEv2 gids in hardware To tell hardware about a gid with type RoCEv2, software needs a new modifier to the SET_PORT command: MLX4_SET_PORT_ROCE_ADDR. This can replace the old method, MLX4_SET_PORT_GID_TABLE, for RoCEv1 gids. Signed-off-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 63 +++++++++++++++++++++++++++++++++++++-- include/linux/mlx4/cmd.h | 3 +- 2 files changed, 62 insertions(+), 4 deletions(-) commit 1da494cbc0d922f192f1c5cc96c8794a8171c3c0 Author: Moni Shoua Date: Thu Jan 14 17:50:34 2016 +0200 net/mlx4_core: Configure mlx4 hardware for mixed RoCE v1/v2 modes If the hardware supports RoCE v2 (mixed with RoCE v1) mode, we enable it. This is necessary in order to support RoCE v2. Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx4/mlx4.h | 5 ++++- drivers/net/ethernet/mellanox/mlx4/port.c | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit b699a859d17b3a7a8edc5441ee99d245dfd9f86c Author: Moni Shoua Date: Thu Jan 14 17:50:33 2016 +0200 IB/mlx4: Add gid_type to GID properties IB core driver adds a property of type to struct ib_gid_attr. The mlx4 driver should take that in consideration when modifying or querying the hardware gid table. Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 17 +++++++++++++---- drivers/infiniband/hw/mlx4/mlx4_ib.h | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) commit d8ae914196d35bbc0c459aec6de588ba585a1c3e Author: Moni Shoua Date: Thu Jan 14 17:50:32 2016 +0200 net/mlx4: Query RoCE support Query the RoCE support from firmware using the appropriate firmware commands. Downstream patches will read these capabilities and act accordingly. Signed-off-by: Moni Shoua Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx4/fw.c | 23 +++++++++++++++++++++++ include/linux/mlx4/device.h | 10 +++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) commit 5fe1043da84887369d32459514f2c7d98ff37936 Author: Christoph Hellwig Date: Thu Jan 7 23:53:41 2016 -0800 svc_rdma: use local_dma_lkey We now alwasy have a per-PD local_dma_lkey available. Make use of that fact in svc_rdma and stop registering our own MR. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Jason Gunthorpe Reviewed-by: Chuck Lever Reviewed-by: Steve Wise Acked-by: J. Bruce Fields Signed-off-by: Doug Ledford include/linux/sunrpc/svc_rdma.h | 2 -- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 4 ++-- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 6 ++--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 36 ++++-------------------------- 5 files changed, 10 insertions(+), 40 deletions(-) commit 5d252f90a800cee5bc57c76d636ae60464f7a887 Author: Chuck Lever Date: Thu Jan 7 14:50:10 2016 -0500 svcrdma: Add class for RDMA backwards direction transport To support the server-side of an NFSv4.1 backchannel on RDMA connections, add a transport class that enables backward direction messages on an existing forward channel connection. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford include/linux/sunrpc/svc_rdma.h | 5 + net/sunrpc/xprt.c | 1 + net/sunrpc/xprtrdma/Makefile | 2 +- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 371 +++++++++++++++++++++++++++++ net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 52 ++++ net/sunrpc/xprtrdma/svc_rdma_transport.c | 14 +- net/sunrpc/xprtrdma/transport.c | 30 ++- net/sunrpc/xprtrdma/xprt_rdma.h | 15 ++ 8 files changed, 475 insertions(+), 15 deletions(-) commit 03fe9931536fe4782e9e34f7f499d588acd2015b Author: Chuck Lever Date: Thu Jan 7 14:50:02 2016 -0500 svcrdma: Define maximum number of backchannel requests Extra resources for handling backchannel requests have to be pre-allocated when a transport instance is created. Set up additional fields in svcxprt_rdma to track these resources. The max_requests fields are elements of the RPC-over-RDMA protocol, so they should be u32. To ensure that unsigned arithmetic is used everywhere, some other fields in the svcxprt_rdma struct are updated. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford include/linux/sunrpc/svc_rdma.h | 13 ++++++++++--- net/sunrpc/xprtrdma/svc_rdma.c | 6 ++++-- net/sunrpc/xprtrdma/svc_rdma_transport.c | 24 ++++++++++++++---------- 3 files changed, 28 insertions(+), 15 deletions(-) commit ba986c96f907a513215fb7f1c0a89261c97251ca Author: Chuck Lever Date: Thu Jan 7 14:49:53 2016 -0500 svcrdma: Make map_xdr non-static Pre-requisite to use map_xdr in the backchannel code. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford include/linux/sunrpc/svc_rdma.h | 2 ++ net/sunrpc/xprtrdma/svc_rdma_sendto.c | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 78da2b3cea05b059d23814509bb46a29101e0f77 Author: Chuck Lever Date: Thu Jan 7 14:49:45 2016 -0500 svcrdma: Remove last two __GFP_NOFAIL call sites Clean up. These functions can otherwise fail, so check for page allocation failures too. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford net/sunrpc/xprtrdma/svc_rdma_sendto.c | 5 ++++- net/sunrpc/xprtrdma/svc_rdma_transport.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 39b09a1a121cb22820c374f4e92f7ca34be1b75d Author: Chuck Lever Date: Thu Jan 7 14:49:37 2016 -0500 svcrdma: Add gfp flags to svc_rdma_post_recv() svc_rdma_post_recv() allocates pages for receive buffers on-demand. It uses GFP_KERNEL so the allocator tries hard, and may sleep. But I'm about to add a call to svc_rdma_post_recv() from a function that may not sleep. Since all svc_rdma_post_recv() call sites can tolerate its failure, allow it to fail if the page allocator returns nothing. Longer term, receive buffers, being a finite resource per-connection, should be pre-allocated and re-used. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford include/linux/sunrpc/svc_rdma.h | 2 +- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_transport.c | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) commit 71810ef3271d1a06f7002c55c7e354d8c3233762 Author: Chuck Lever Date: Thu Jan 7 14:49:28 2016 -0500 svcrdma: Remove unused req_map and ctxt kmem_caches Clean up. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford include/linux/sunrpc/svc_rdma.h | 1 + net/sunrpc/xprtrdma/svc_rdma.c | 35 ----------------------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 7 ------- 3 files changed, 1 insertion(+), 42 deletions(-) commit 2fe81b239dbb00d0a2fd8858ac9dd4ef4a8841ee Author: Chuck Lever Date: Thu Jan 7 14:49:20 2016 -0500 svcrdma: Improve allocation of struct svc_rdma_req_map To ensure this allocation cannot fail and will not sleep, pre-allocate the req_map structures per-connection. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford include/linux/sunrpc/svc_rdma.h | 8 ++- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 6 +-- net/sunrpc/xprtrdma/svc_rdma_transport.c | 85 ++++++++++++++++++++++++++++---- 3 files changed, 84 insertions(+), 15 deletions(-) commit cc886c9ff1607eda04062bdcec963e2f8e6a3eb1 Author: Chuck Lever Date: Thu Jan 7 14:49:12 2016 -0500 svcrdma: Improve allocation of struct svc_rdma_op_ctxt When the maximum payload size of NFS READ and WRITE was increased by commit cc9a903d915c ("svcrdma: Change maximum server payload back to RPCSVC_MAXPAYLOAD"), the size of struct svc_rdma_op_ctxt increased to over 6KB (on x86_64). That makes allocating one of these from a kmem_cache more likely to fail in situations when system memory is exhausted. Since I'm about to add a caller where this allocation must always work _and_ it cannot sleep, pre-allocate ctxts for each connection. Another motivation for this change is that NFSv4.x servers are required by specification not to drop NFS requests. Pre-allocating memory resources reduces the likelihood of a drop. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford include/linux/sunrpc/svc_rdma.h | 6 +- net/sunrpc/xprtrdma/svc_rdma_transport.c | 102 +++++++++++++++++++++++++++---- 2 files changed, 94 insertions(+), 14 deletions(-) commit ced4ac0c4f7819d586b559a2ed7244e4f78ac3d0 Author: Chuck Lever Date: Thu Jan 7 14:49:03 2016 -0500 svcrdma: Clean up process_context() Be sure the completed ctxt is put in every path. The xprt enqueue can take a while, so put the completed ctxt back in circulation _before_ enqueuing the xprt. Remove/disable debugging. Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford net/sunrpc/xprtrdma/svc_rdma_transport.c | 44 +++++++++++++++----------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 3d61677c4d5f40529fb26c8f45c0d3a1bba47c66 Author: Chuck Lever Date: Thu Jan 7 14:48:55 2016 -0500 svcrdma: Clean up rdma_create_xprt() kzalloc is used here, so setting the atomic fields to zero is unnecessary. sc_ord is set again in handle_connect_req. The other fields are re-initialized in svc_rdma_accept(). Signed-off-by: Chuck Lever Acked-by: Bruce Fields Signed-off-by: Doug Ledford net/sunrpc/xprtrdma/svc_rdma_transport.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit c3efe7500add077f79d37b18e9c66df6621409b6 Author: Matan Barak Date: Mon Jan 4 10:49:54 2016 +0200 IB/core: Use hop-limit from IP stack for RoCE Previously, IPV6_DEFAULT_HOPLIMIT was used as the hop limit value for RoCE. Fixing that by taking ip4_dst_hoplimit and ip6_dst_hoplimit as hop limit values. Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 9 ++++++++- drivers/infiniband/core/cm.c | 1 + drivers/infiniband/core/cma.c | 12 +++++------- drivers/infiniband/core/verbs.c | 16 +++++++--------- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 3 ++- include/rdma/ib_addr.h | 4 +++- 6 files changed, 26 insertions(+), 19 deletions(-) commit f7f4b23e27f7561330ef13f93dbe8f2dc410efa7 Author: Matan Barak Date: Mon Jan 4 10:49:53 2016 +0200 IB/core: Rename rdma_addr_find_dmac_by_grh rdma_addr_find_dmac_by_grh resolves dmac, vlan_id and if_index and downsteram patch will also add hop_limit as an output parameter, thus we rename it to rdma_addr_find_l2_eth_by_grh. Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 7 ++++--- drivers/infiniband/core/verbs.c | 18 +++++++++--------- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 6 +++--- include/rdma/ib_addr.h | 5 +++-- 4 files changed, 19 insertions(+), 17 deletions(-) commit 4bfdf635c668869c69fd18ece37ec66fb6f38fcf Author: Bart Van Assche Date: Fri Jan 1 13:17:46 2016 +0100 IB/cm: Fix a recently introduced deadlock ib_send_cm_drep() calls cm_enter_timewait() while holding a spinlock that can be locked from inside an interrupt handler. Hence do not enable interrupts inside cm_enter_timewait() if called with interrupts disabled. This patch fixes e.g. the following deadlock: Acked-by: Erez Shitrit ================================= [ INFO: inconsistent lock state ] 4.4.0-rc7+ #1 Tainted: G E --------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. swapper/8/0 [HC1[1]:SC0[0]:HE0:SE1] takes: (&(&cm_id_priv->lock)->rlock){?.+...}, at: [] cm_establish+0x 74/0x1b0 [ib_cm] {HARDIRQ-ON-W} state was registered at: [] mark_held_locks+0x71/0x90 [] trace_hardirqs_on_caller+0xa7/0x1c0 [] trace_hardirqs_on+0xd/0x10 [] _raw_spin_unlock_irq+0x2b/0x40 [] cm_enter_timewait+0xae/0x100 [ib_cm] [] ib_send_cm_drep+0xb6/0x190 [ib_cm] [] srp_cm_handler+0x128/0x1a0 [ib_srp] [] cm_process_work+0x20/0xf0 [ib_cm] [] cm_dreq_handler+0x135/0x2c0 [ib_cm] [] cm_work_handler+0x75/0xd0 [ib_cm] [] process_one_work+0x1bd/0x460 [] worker_thread+0x118/0x420 [] kthread+0xe4/0x100 [] ret_from_fork+0x3f/0x70 irq event stamp: 1672286 hardirqs last enabled at (1672283): [] poll_idle+0x10/0x80 hardirqs last disabled at (1672284): [] common_interrupt+0x84/0x89 softirqs last enabled at (1672286): [] _local_bh_enable+0x1c/0x50 softirqs last disabled at (1672285): [] irq_enter+0x47/0x70 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&cm_id_priv->lock)->rlock); lock(&(&cm_id_priv->lock)->rlock); *** DEADLOCK *** no locks held by swapper/8/0. stack backtrace: CPU: 8 PID: 0 Comm: swapper/8 Tainted: G E 4.4.0-rc7+ #1 Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.0.2 11/17/2014 ffff88045af5e950 ffff88046e503a88 ffffffff81251c1b 0000000000000007 0000000000000006 0000000000000003 ffff88045af5ddc0 ffff88046e503ad8 ffffffff810a32f4 0000000000000000 0000000000000000 0000000000000001 Call Trace: [] dump_stack+0x4f/0x74 [] print_usage_bug+0x184/0x190 [] mark_lock_irq+0xf2/0x290 [] mark_lock+0x115/0x1b0 [] mark_irqflags+0x15c/0x170 [] __lock_acquire+0x1ef/0x560 [] lock_acquire+0x62/0x80 [] _raw_spin_lock_irqsave+0x43/0x60 [] cm_establish+0x74/0x1b0 [ib_cm] [] ib_cm_notify+0x31/0x100 [ib_cm] [] srpt_qp_event+0x54/0xd0 [ib_srpt] [] mlx4_ib_qp_event+0x72/0xc0 [mlx4_ib] [] mlx4_qp_event+0x69/0xd0 [mlx4_core] [] mlx4_eq_int+0x51e/0xd50 [mlx4_core] [] mlx4_msi_x_interrupt+0xf/0x20 [mlx4_core] [] handle_irq_event_percpu+0x40/0x110 [] handle_irq_event+0x3f/0x70 [] handle_edge_irq+0x79/0x120 [] handle_irq+0x5d/0x130 [] do_IRQ+0x6d/0x130 [] common_interrupt+0x89/0x89 [] cpuidle_enter_state+0xcf/0x200 [] cpuidle_enter+0x12/0x20 [] call_cpuidle+0x36/0x60 [] cpuidle_idle_call+0x63/0x110 [] cpu_idle_loop+0xfa/0x130 [] cpu_startup_entry+0xe/0x10 [] start_secondary+0x83/0x90 Fixes: commit be4b499323bf ("IB/cm: Do not queue work to a device that's going away") Signed-off-by: Bart Van Assche Cc: Erez Shitrit Cc: stable Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 19f57298f03825e36aefc866d8472b43780538d4 Author: Bart Van Assche Date: Thu Dec 31 09:56:43 2015 +0100 IB/srpt: Fix the RDMA completion handlers Avoid that the following kernel crash is triggered when processing an RDMA completion: BUG: unable to handle kernel paging request at 0000000100000198 IP: [] __lock_acquire+0xa2/0x560 Call Trace: [] lock_acquire+0x62/0x80 [] _raw_spin_lock_irqsave+0x43/0x60 [] srpt_rdma_read_done+0x57/0x120 [ib_srpt] [] __ib_process_cq+0x43/0xc0 [ib_core] [] ib_cq_poll_work+0x25/0x70 [ib_core] [] process_one_work+0x1bd/0x460 [] worker_thread+0x118/0x420 [] kthread+0xe4/0x100 [] ret_from_fork+0x3f/0x70 Fixes: commit 59fae4deaad3 ("IB/srpt: chain RDMA READ/WRITE requests"). Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ee177e945e000a40b520ea667fd4fbe7a61634e Author: Bart Van Assche Date: Thu Dec 31 09:56:03 2015 +0100 irq_poll: Fix irq_poll_sched() The IRQ_POLL_F_SCHED bit is set as long as polling is ongoing. This means that irq_poll_sched() must proceed if this bit has not yet been set. Fixes: commit ea51190c0315 ("irq_poll: fold irq_poll_sched_prep into irq_poll_sched"). Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford lib/irq_poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9506902b7be2d8ccc235c14ccaec7f07b2c7d520 Author: Matan Barak Date: Wed Dec 30 16:14:18 2015 +0200 IB/core: Fix dereference before check Sparse complains about dereference before check. Fixing this by moving the check before the dereference. Fixes: 200298326b27 ('IB/core: Validate route when we init ah') Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2e2cdace5a26507a564d319a1338920a838ef52e Author: Matan Barak Date: Wed Dec 30 16:14:17 2015 +0200 IB/core: Eliminate sparse false context imbalance warning When write_gid function needs to do a sleep-able operation, it unlocks table->rwlock and then relocks it. Sparse complains about context imbalance. This is safe as write_gid is always called with table->rwlock. write_gid protects from simultaneous writes to this GID entry by setting the GID_TABLE_ENTRY_INVALID flag. Fixes: 9c584f049596 ('IB/core: Change per-entry lock in RoCE GID table to one lock') Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 1 + 1 file changed, 1 insertion(+) commit 6e2a51a0f7c89a22169f366d23d5f213b7b7edaf Author: Hal Rosenstock Date: Tue Dec 29 05:43:43 2015 -0500 IB/core: sysfs.c: Fix PerfMgt ClassPortInfo handling Port number is not part of ClassPortInfo attribute but is still needed as a parameter when invoking process_mad. To properly handle this attribute, port_num is added as a parameter to get_counter_table and get_perf_mad was changed not to store port_num in the attribute itself when it's querying the ClassPortInfo attribute. This handles issue pointed out by Matan Barak Fixes: 145d9c541032 ('IB/core: Display extended counter set if available') Signed-off-by: Hal Rosenstock Acked-by: Matan Barak Acked-by: Ira Weiny Reviewed-by: Christoph Lameter Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b6aeb980f1e143f3237365710290b199e9363eeb Author: Bart Van Assche Date: Tue Dec 29 10:45:03 2015 +0100 IB/core: Remove set-but-not-used variable from ib_sg_to_pages() Detected this by building the IB core with W=1. See also patch "IB core: Fix ib_sg_to_pages()" (commit 8f5ba10ed40a). Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Christoph Hellwig Reviewed-by: Leon Romanovsky Acked-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c876a1b7dd6da5dd2d54990fa2772cbfe3779726 Author: Leon Romanovsky Date: Sat Jan 9 13:06:25 2016 +0200 IB/mlx5: Fix passing casted pointer in mlx5_query_port_roce Fix static checker warning: drivers/infiniband/hw/mlx5/main.c:149 mlx5_query_port_roce() warn: passing casted pointer '&props->qkey_viol_cntr' to 'mlx5_query_nic_vport_qkey_viol_cntr()' 32 vs 16. Fixes: 3f89a643eb29 ("IB/mlx5: Extend query_device/port to support RoCE") Reported-by: Dan Carpenter Signed-off-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d53e11fdf0538a972ad4f1e5ec315d3e35c1aae9 Author: Christoph Hellwig Date: Tue Jan 5 22:46:12 2016 -0800 IB/mad: use CQ abstraction Remove the local workqueue to process mad completions and use the CQ API instead. Signed-off-by: Christoph Hellwig Reviewed-by: Hal Rosenstock Reviewed-by: Ira Weiny Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 162 +++++++++++++------------------------ drivers/infiniband/core/mad_priv.h | 2 +- 2 files changed, 59 insertions(+), 105 deletions(-) commit ca281265c02f342fed4927b4e98e377d9318881f Author: Christoph Hellwig Date: Mon Jan 4 14:15:58 2016 +0100 IB/mad: pass ib_mad_send_buf explicitly to the recv_handler Stop abusing wr_id and just pass the parameter explicitly. Signed-off-by: Christoph Hellwig Reviewed-by: Hal Rosenstock Reviewed-by: Ira Weiny Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 1 + drivers/infiniband/core/mad.c | 18 ++++++++++-------- drivers/infiniband/core/sa_query.c | 7 ++++--- drivers/infiniband/core/user_mad.c | 1 + drivers/infiniband/ulp/srpt/ib_srpt.c | 1 + include/rdma/ib_mad.h | 2 ++ 6 files changed, 19 insertions(+), 11 deletions(-) commit 39f426553ea30f4449d022577fd6494c265ef3ef Author: Lucas Tanure Date: Tue Jan 19 12:06:30 2016 -0200 infiniband: Replace memset with eth_zero_addr Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. Signed-off-by: Lucas Tanure Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/ah.c | 2 +- drivers/infiniband/hw/nes/nes_utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 50ca6ed21e7c389c250ee30b0bb4df66157a1115 Author: Leon Romanovsky Date: Tue Jan 19 11:11:24 2016 +0200 IB/mlx5: Delete locally redefined variable Fix the following sparse warning: drivers/infiniband/hw/mlx5/main.c:1061:29: warning: symbol 'pfn' shadows an earlier one drivers/infiniband/hw/mlx5/main.c:1030:21: originally declared here Fixes: d69e3bcf7976 ('IB/mlx5: Mmap the HCA's core clock register to user-space') Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 ---- 1 file changed, 4 deletions(-) commit f25bf1977f7a968e85fe8ab99252b8132c6cf8c4 Author: Moni Shoua Date: Thu Jan 14 17:48:07 2016 +0200 net/mlx4: Remove unused macro The macro mlx4_foreach_non_ib_transport_port() is not used anywhere. Remove it. Fixes: aa9a2d51a3e7 ("mlx4: Activate RoCE/SRIOV") Signed-off-by: Moni Shoua Signed-off-by: Doug Ledford include/linux/mlx4/device.h | 4 ---- 1 file changed, 4 deletions(-) commit 1049f138166ad6ca2e1c8edd2317a71f5b21b9fe Author: Moni Shoua Date: Thu Jan 14 17:47:38 2016 +0200 IB/mlx4: Take source mac from AH instead from the port In commit dbf727de7440 ("IB/core: Use GID table in AH creation and dmac resolution") we copy source mac to mlx4_ah from the attributes of gid at ib_ah_attr.grh.sgid_index. Now we can use it. Signed-off-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit 4e4081673445485aa6bc90383bdb83e7a96cc48a Author: Matan Barak Date: Thu Jan 14 17:47:02 2016 +0200 IB/mlx4: Initialize hop_limit when creating address handle Hop limit value wasn't copied from attributes when ah was created. This may influence packets for unconnected services to get dropped in routers when endpoints are not in the same subnet. Fixes: fa417f7b520e ("IB/mlx4: Add support for IBoE") Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/ah.c | 1 + 1 file changed, 1 insertion(+) commit 9f17768611ebf81dfac69948dd12622b6f2e45fc Author: Leon Romanovsky Date: Thu Jan 14 08:11:40 2016 +0200 IB/mlx5: Expose correct maximum number of CQE capacity Maximum number of EQE capacity per CQ was mistakenly exposed as CQE. Fix that. Fixes: 938fe83c8dcb ("net/mlx5_core: New device capabilities handling") Signed-off-by: Leon Romanovsky Cc: Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28de1f74374da4f0f628b14bbccb07e5637d00b1 Author: Hariprasad S Date: Wed Jan 13 10:03:14 2016 +0530 iw_cxgb4: Take clip reference before starting IPv6 listen The h/w is designed in such a way that, if you do anything IPv6 related, a valid clip entry must be there. So take clip reference before creating IPv6 listening servers, and then if we fail to create server, release the clip entry. Signed-off-by: Hariprasad Shenai Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 4275a5b20043005ec6ceee67c1d352e798b0f5a1 Author: Hariprasad S Date: Tue Jan 12 16:33:22 2016 +0530 iw_cxgb4: Fixes GW-Basic labels to meaningful error names Reported-by: Dan Carpenter Signed-off-by: Hariprasad Shenai Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/device.c | 45 ++++++++++++++---------------------- 1 file changed, 17 insertions(+), 28 deletions(-) commit 82b1df1b083ff1b1c45fcdf5a844351cdca03ed8 Author: Hariprasad S Date: Tue Jan 12 16:33:21 2016 +0530 iw_cxgb4: Fixes static checker warning in c4iw_rdev_open() Commit c5dfb000b904 ("iw_cxgb4: Pass qid range to user space driver") from Dec 11, 2015, leads to the following static checker warning: drivers/infiniband/hw/cxgb4/device.c:857 c4iw_rdev_open() warn: variable dereferenced before check 'rdev->status_page' Also we weren't deallocating ocqp pool in error path when failed to allocate status page. Fixing it too. Fixes: c5dfb000b904 ("iw_cxgb4: Pass qid range to user space driver") Reported-by: Dan Carpenter Signed-off-by: Hariprasad Shenai Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a7d0e959fab832d0614d0e144cb01cbb87d36258 Author: Dan Carpenter Date: Tue Jan 12 12:29:21 2016 +0300 IB/cma: allocating too much memory in make_cma_ports() The issue here is that there is a cut and paste bug. When we allocate cma_dev_group->default_ports_group we use "sizeof(*cma_dev_group->ports)" instead of "sizeof(*cma_dev_group->default_ports_group)". We're bumping up against the 80 character limit so I introduced a new local pointer "ports_group" to get around that. Fixes: 045959db65c6 ('IB/cma: Add configfs for rdma_cm') Signed-off-by: Dan Carpenter Acked-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/cma_configfs.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit bc1251e6d9420fec4c6b328bcf9ea4e5bdecd30d Author: Dan Carpenter Date: Tue Jan 12 12:27:43 2016 +0300 RDMA/nes: checking for NULL instead of IS_ERR nes_reg_phys_mr() returns ERR_PTRs on error. It doesn't return NULL. This bug has been there for a while, but we recently changed from calling a function pointer to calling nes_reg_phys_mr() directly so now Smatch is able to detect the bug. Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbbeb8632bf0b46ab44cfcedc4654cd7831b7161 Author: Vinit Agnihotri Date: Mon Jan 11 12:57:25 2016 -0500 IB/qib: Support creating qps with GFP_NOIO flag The current code is problematic when the QP creation and ipoib is used to support NFS and NFS desires to do IO for paging purposes. In that case, the GFP_KERNEL allocation in qib_qp.c causes a deadlock in tight memory situations. This fix adds support to create queue pair with GFP_NOIO flag for connected mode only to cleanly fail the create queue pair in those situations. Cc: # 3.16+ Reviewed-by: Mike Marciniszyn Signed-off-by: Vinit Agnihotri Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_qp.c | 46 ++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 14 deletions(-) commit 5f2f3cad8b878b23f17a11dd5af4f4a2cc41c797 Author: Sowmini Varadhan Date: Mon Jan 18 16:12:09 2016 -0500 sunvnet: Initialize network_header and transport_header in vnet_rx_one() vnet_fullcsum() accesses ip_hdr() and transport header to compute the checksum for IPv4 packets, so these need to be initialized in skb created in vnet_rx_one(). Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit b4ace4f1ae07691b4f6ea9f3e92efbec083df058 Author: Craig Gallek Date: Tue Jan 19 14:27:08 2016 -0500 soreuseport: fix NULL ptr dereference SO_REUSEPORT after bind Marc Dionne discovered a NULL pointer dereference when setting SO_REUSEPORT on a socket after it is bound. This patch removes the assumption that at least one socket in the reuseport group is bound with the SO_REUSEPORT option before other bind calls occur. Fixes: e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection") Reported-by: Marc Dionne Signed-off-by: Craig Gallek Tested-by: Marc Dionne Signed-off-by: David S. Miller include/net/sock_reuseport.h | 2 +- net/core/sock_reuseport.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit e0045bf80f62779ba75ba04513020d60e59f5298 Author: Hante Meuleman Date: Tue Jan 19 12:39:24 2016 +0100 brcmfmac: fix sdio sg table alloc crash With commit 7d34b0560567 ("brcmfmac: Move all module parameters to one place") a bug was introduced causing a null pointer exception. This patch fixes the bug by initializing the sg table till after the settings have been initialized. Fixes: 7d34b0560567 ("brcmfmac: Move all module parameters to one place") Reported-by: Marc Zyngier Tested-by: Marc Zyngier Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 40 ++++++++-------------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +++ .../wireless/broadcom/brcm80211/brcmfmac/sdio.h | 1 + 3 files changed, 21 insertions(+), 25 deletions(-) commit b7e2d195cc523bd92ed7a64aac089421dbab2a2d Author: Arnd Bergmann Date: Mon Jan 18 20:39:56 2016 +0100 ssb: mark ssb_bus_register as __maybe_unused The SoC variant of the ssb code is now optional like the other ones, which means we can build the framwork without any front-end, but that results in a warning: drivers/ssb/main.c:616:12: warning: 'ssb_bus_register' defined but not used [-Wunused-function] This annotates the ssb_bus_register function as __maybe_unused to shut up the warning. A configuration like this will not work on any hardware of course, but we still want this to silently build without warnings if the configuration is allowed in the first place. Signed-off-by: Arnd Bergmann Fixes: 845da6e58e19 ("ssb: add Kconfig entry for compiling SoC related code") Acked-by: Michael Buesch Signed-off-by: Kalle Valo drivers/ssb/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e7828b28a5de056a29c60fb4e5e4799f5e667427 Author: Michael Büsch Date: Mon Jan 18 17:53:03 2016 +0100 ssb: Set linux-wireless as MAINTAINERS list ssb patches go through the linux-wireless tree. Set the list to linux-wireless, so linux-wireless patchwork can catch the patches. Signed-off-by: Michael Buesch Signed-off-by: Kalle Valo MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5dc3b7b9eb7efbd0dd57cef50ed29c2a709bf51b Author: Felix Fietkau Date: Fri Jan 15 16:00:30 2016 +0100 brcmfmac: add missing include linux/module.h is required for defining module parameters Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 1 + 1 file changed, 1 insertion(+) commit 52a82e23b9f2a9e1d429c5207f8575784290d008 Author: Ursula Braun Date: Tue Jan 19 10:41:33 2016 +0100 af_iucv: Validate socket address length in iucv_sock_bind() Signed-off-by: Ursula Braun Reported-by: Dmitry Vyukov Reviewed-by: Evgeny Cherkashin Signed-off-by: David S. Miller net/iucv/af_iucv.c | 3 +++ 1 file changed, 3 insertions(+) commit 65487fdc0c8072b6ac32ed30fab34de4e66ace55 Author: Ira Weiny Date: Sun Jan 3 22:44:25 2016 -0500 IB/sysfs: Fix sparse warning on attr_id Attributed ID was declared as an int while the value should really be big endian 16. Fixes: 35c4cbb17811 ("IB/core: Create get_perf_mad function in sysfs.c") Reported-by: Bart Van Assche Signed-off-by: Ira Weiny Reviewed-by: Bart Van Assche Reviewed-by: Christoph Lameter Reviewed-by: Hal Rosenstock Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9781808c632860fcd82b8e371539a7458ce83548 Author: Devesh Sharma Date: Thu Dec 24 13:14:08 2015 -0500 RDMA/be2net: Remove open and close entry points Recently Dough Ledford reported a deadlock happening between ocrdma-load sequence and NetworkManager service issueing "open" on be2net interface. The deadlock happens when any be2net hook (e.g. open/close) is called in parallel to insmod ocrdma.ko. A. be2net is sending administrative open/close event to ocrdma holding device_list_mutex. It does this from ndo_open/ndo_stop hooks of be2net. So sequence of locks is rtnl_lock---> device_list lock B. When new ocrdma roce device gets registered, infiniband stack now takes rtnl_lock in ib_register_device() in GID initialization routines. So sequence of locks in this path is device_list lock ---> rtnl_lock. This improper locking sequence causes deadlock. In order to resolve the above deadlock condition, ocrdma intorduced a patch to stop listening to administrative open/close events generated from be2net driver. It now depends on link-state-change async-event generated from CNA. This change leaves behind dead code which used to generate administrative open/close events. This patch cleans-up all that dead code from be2net. Reported-by: Doug Ledford CC: Sathya Perla Signed-off-by: Padmanabh Ratnakar Signed-off-by: Selvin Xavier Signed-off-by: Devesh Sharma Signed-off-by: Doug Ledford drivers/net/ethernet/emulex/benet/be.h | 2 -- drivers/net/ethernet/emulex/benet/be_main.c | 4 ---- drivers/net/ethernet/emulex/benet/be_roce.c | 36 ----------------------------- drivers/net/ethernet/emulex/benet/be_roce.h | 4 +--- 4 files changed, 1 insertion(+), 45 deletions(-) commit 3b1ea43009f2aca9f8ff0dd6540f6701e0871baf Author: Devesh Sharma Date: Thu Dec 24 13:14:07 2015 -0500 RDMA/ocrdma: Depend on async link events from CNA Recently Dough Ledford reported a deadlock happening between ocrdma-load sequence and NetworkManager service issuing "open" on be2net interface. The deadlock happens when any be2net hook (e.g. open/close) is called in parallel to insmod ocrdma.ko. A. be2net is sending administrative open/close event to ocrdma holding device_list_mutex. It does this from ndo_open/ndo_stop hooks of be2net. So sequence of locks is rtnl_lock---> device_list lock B. When new ocrdma roce device gets registered, infiniband stack now takes rtnl_lock in ib_register_device() in GID initialization routines. So sequence of locks in this path is device_list lock ---> rtnl_lock. This improper locking sequence causes deadlock. With this patch we stop using administrative open and close events injected by be2net driver. These events were used to dispatch PORT_ACTIVE and PORT_ERROR events to the IB-stack. This patch implements a logic to receive async-link-events generated from CNA whenever link-state-change is detected. Now on, these async-events will be used to dispatch PORT_ACTIVE and PORT_ERROR events to IB-stack. Depending on async-events from CNA removes the need to hold device-list-mutex and thus breaks the busy-wait scenario. Reported-by: Doug Ledford CC: Sathya Perla Signed-off-by: Padmanabh Ratnakar Signed-off-by: Selvin Xavier Signed-off-by: Devesh Sharma Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma.h | 10 ++++++ drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 42 ++++++++++++++++++++----- drivers/infiniband/hw/ocrdma/ocrdma_hw.h | 4 ++- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 34 ++++++++++++++------ drivers/infiniband/hw/ocrdma/ocrdma_sli.h | 49 ++++++++++++++++++++++++++--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- 6 files changed, 119 insertions(+), 22 deletions(-) commit d310a344e18c1d9a6a2ab11ef15f2954418c493d Author: Devesh Sharma Date: Thu Dec 24 13:14:06 2015 -0500 RDMA/ocrdma: Dispatch only port event when port state changes Dispatch only port event to IB stack when port state changes. Don't explicitly modify qps to error. Let application listen to port events on async event queue or let QP fail with retry-exceeded completion error. Signed-off-by: Padmanabh Ratnakar Signed-off-by: Devesh Sharma Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_main.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit a2addf94a8f05171ecb98ac22d335bde09ed9f36 Author: Devesh Sharma Date: Thu Dec 24 13:14:05 2015 -0500 RDMA/ocrdma: Fix vlan-id assignment in qp parameters vlan-id is wrongly getting as 0 when PFC is enabled. Set vlan-id configured by user in QP parameters. In case vlan interface is not used, flash a warning to user to configure vlan and assign vlan-id as 0 in qp params. Fixes: dbf727de7440 ('IB/core: Use GID table in AH creation and dmac resolution') Cc: Matan Barak Signed-off-by: Devesh Sharma Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ed0dfffd7dcd3f517b1507929642c2aed4ef00fb Author: Eric Dumazet Date: Tue Jan 19 08:36:43 2016 -0800 udp: fix potential infinite loop in SO_REUSEPORT logic Using a combination of connected and un-connected sockets, Dmitry was able to trigger soft lockups with his fuzzer. The problem is that sockets in the SO_REUSEPORT array might have different scores. Right after sk2=socket(), setsockopt(sk2,...,SO_REUSEPORT, on) and bind(sk2, ...), but _before_ the connect(sk2) is done, sk2 is added into the soreuseport array, with a score which is smaller than the score of first socket sk1 found in hash table (I am speaking of the regular UDP hash table), if sk1 had the connect() done, giving a +8 to its score. hash bucket [X] -> sk1 -> sk2 -> NULL sk1 score = 14 (because it did a connect()) sk2 score = 6 SO_REUSEPORT fast selection is an optimization. If it turns out the score of the selected socket does not match score of first socket, just fallback to old SO_REUSEPORT logic instead of trying to be too smart. Normal SO_REUSEPORT users do not mix different kind of sockets, as this mechanism is used for load balance traffic. Fixes: e32ea7e74727 ("soreuseport: fast reuseport UDP socket selection") Reported-by: Dmitry Vyukov Signed-off-by: Eric Dumazet Cc: Craig Gallek Acked-by: Craig Gallek Signed-off-by: David S. Miller net/ipv4/udp.c | 32 +++++++++++++++++++++----------- net/ipv6/udp.c | 32 +++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 22 deletions(-) commit 649367735ee5dedb128d9fac0b86ba7e0fe7ae3b Author: Matan Barak Date: Thu Jan 7 11:19:29 2016 +0200 IB/cma: Fix RDMA port validation for iWarp cma_validate_port wrongly assumed that Ethernet devices are RoCE devices and thus their ndev should be matched in the GID table. This broke the iWarp support. Fixing that matching the ndev only if we work on a RoCE port. Cc: # 4.4.x- Fixes: abae1b71dd37 ('IB/cma: cma_validate_port should verify the port and netdevice') Reported-by: Hariprasad Shenai Tested-by: Hariprasad Shenai Signed-off-by: Matan Barak Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09dc9cd6528f5b52bcbd3292a6312e762c85260f Author: Mike Marciniszyn Date: Thu Jan 7 16:44:10 2016 -0500 IB/qib: fix mcast detach when qp not attached The code produces the following trace: [1750924.419007] general protection fault: 0000 [#3] SMP [1750924.420364] Modules linked in: nfnetlink autofs4 rpcsec_gss_krb5 nfsv4 dcdbas rfcomm bnep bluetooth nfsd auth_rpcgss nfs_acl dm_multipath nfs lockd scsi_dh sunrpc fscache radeon ttm drm_kms_helper drm serio_raw parport_pc ppdev i2c_algo_bit lpc_ich ipmi_si ib_mthca ib_qib dca lp parport ib_ipoib mac_hid ib_cm i3000_edac ib_sa ib_uverbs edac_core ib_umad ib_mad ib_core ib_addr tg3 ptp dm_mirror dm_region_hash dm_log psmouse pps_core [1750924.420364] CPU: 1 PID: 8401 Comm: python Tainted: G D 3.13.0-39-generic #66-Ubuntu [1750924.420364] Hardware name: Dell Computer Corporation PowerEdge 860/0XM089, BIOS A04 07/24/2007 [1750924.420364] task: ffff8800366a9800 ti: ffff88007af1c000 task.ti: ffff88007af1c000 [1750924.420364] RIP: 0010:[] [] qib_mcast_qp_free+0x11/0x50 [ib_qib] [1750924.420364] RSP: 0018:ffff88007af1dd70 EFLAGS: 00010246 [1750924.420364] RAX: 0000000000000001 RBX: ffff88007b822688 RCX: 000000000000000f [1750924.420364] RDX: ffff88007b822688 RSI: ffff8800366c15a0 RDI: 6764697200000000 [1750924.420364] RBP: ffff88007af1dd78 R08: 0000000000000001 R09: 0000000000000000 [1750924.420364] R10: 0000000000000011 R11: 0000000000000246 R12: ffff88007baa1d98 [1750924.420364] R13: ffff88003ecab000 R14: ffff88007b822660 R15: 0000000000000000 [1750924.420364] FS: 00007ffff7fd8740(0000) GS:ffff88007fc80000(0000) knlGS:0000000000000000 [1750924.420364] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1750924.420364] CR2: 00007ffff597c750 CR3: 000000006860b000 CR4: 00000000000007e0 [1750924.420364] Stack: [1750924.420364] ffff88007b822688 ffff88007af1ddf0 ffffffffa0132429 000000007af1de20 [1750924.420364] ffff88007baa1dc8 ffff88007baa0000 ffff88007af1de70 ffffffffa00cb313 [1750924.420364] 00007fffffffde88 0000000000000000 0000000000000008 ffff88003ecab000 [1750924.420364] Call Trace: [1750924.420364] [] qib_multicast_detach+0x1e9/0x350 [ib_qib] [1750924.568035] [] ? ib_uverbs_modify_qp+0x323/0x3d0 [ib_uverbs] [1750924.568035] [] ib_detach_mcast+0x31/0x50 [ib_core] [1750924.568035] [] ib_uverbs_detach_mcast+0x93/0x170 [ib_uverbs] [1750924.568035] [] ib_uverbs_write+0xc6/0x2c0 [ib_uverbs] [1750924.568035] [] ? apparmor_file_permission+0x18/0x20 [1750924.568035] [] ? security_file_permission+0x23/0xa0 [1750924.568035] [] vfs_write+0xb4/0x1f0 [1750924.568035] [] SyS_write+0x49/0xa0 [1750924.568035] [] system_call_fastpath+0x1a/0x1f [1750924.568035] Code: 66 2e 0f 1f 84 00 00 00 00 00 31 c0 5d c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb 48 8b 7f 10 ff 8f 40 01 00 00 74 0e 48 89 df e8 8e f8 06 e1 5b 5d c3 0f [1750924.568035] RIP [] qib_mcast_qp_free+0x11/0x50 [ib_qib] [1750924.568035] RSP [1750924.650439] ---[ end trace 73d5d4b3f8ad4851 ] The fix is to note the qib_mcast_qp that was found. If none is found, then return EINVAL indicating the error. Cc: Reviewed-by: Dennis Dalessandro Reported-by: Jason Gunthorpe Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_verbs_mcast.c | 35 +++++++++++++---------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 50be28de6febbec4535fad2cf0870afbc524e735 Author: Erez Shitrit Date: Thu Jan 7 09:28:08 2016 +0200 IB/IPoIB: Fix kernel panic on multicast flow ipoib_mcast_restart_task calls ipoib_mcast_remove_list with the parameter mcast->dev. That mcast is a temporary (used as an iterator) variable that may be uninitialized. There is no need to send the variable dev to the function, as each mcast has its dev as a member in the mcast struct. This causes the next panic: RIP: 0010: ipoib_mcast_leave+0x6d/0xf0 [ib_ipoib] RSP: 0018: EFLAGS: 00010246 RAX: f0201 RBX: 24e00 RCX: 00000 .... .... Stack: Call Trace: ipoib_mcast_remove_list+0x3a/0x70 [ib_ipoib] ipoib_mcast_restart_task+0x3bb/0x520 [ib_ipoib] process_one_work+0x164/0x470 worker_thread+0x11d/0x420 ... Fixes: 5a0e81f6f483 ('IB/IPoIB: factor out common multicast list removal code') Signed-off-by: Erez Shitrit Reported-by: Doron Tsur Reviewed-by: Christoph Lameter Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +-- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) commit 3466904d38ff1e63f0a19cb31166db67f2d05c61 Author: Jordan Lazare Date: Mon Jan 18 17:00:03 2016 -0500 drm/amdgpu: Allow the driver to load if amdgpu.powerplay=1 on asics without powerplay support Avoid setting pp_enabled if there is no powerplay implementation. Signed-off-by: Jordan Lazare Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 99e38df892234aa985185fc776647bad6f9bd7a7 Merge: a200dcb 3270425 Author: Linus Torvalds Date: Tue Jan 19 09:35:06 2016 -0800 Merge tag 'iommu-updates-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: "The updates include: - Small code cleanups in the AMD IOMMUv2 driver - Scalability improvements for the DMA-API implementation of the AMD IOMMU driver. This is just a starting point, but already showed some good improvements in my tests. - Removal of the unused Renesas IPMMU/IPMMUI driver - Updates for ARM-SMMU include: * Some fixes to get the driver working nicely on Broadcom hardware * A change to the io-pgtable API to indicate the unit in which to flush (all callers converted, with Ack from Laurent) * Use of devm_* for allocating/freeing the SMMUv3 buffers - Some other small fixes and improvements for other drivers" * tag 'iommu-updates-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (46 commits) iommu/vt-d: Fix up error handling in alloc_iommu iommu/vt-d: Check the return value of iommu_device_create() iommu/amd: Remove an unneeded condition iommu/amd: Preallocate dma_ops apertures based on dma_mask iommu/amd: Use trylock to aquire bitmap_lock iommu/amd: Make dma_ops_domain->next_index percpu iommu/amd: Relax locking in dma_ops path iommu/amd: Initialize new aperture range before making it visible iommu/amd: Build io page-tables with cmpxchg64 iommu/amd: Allocate new aperture ranges in dma_ops_alloc_addresses iommu/amd: Optimize dma_ops_free_addresses iommu/amd: Remove need_flush from struct dma_ops_domain iommu/amd: Iterate over all aperture ranges in dma_ops_area_alloc iommu/amd: Flush iommu tlb in dma_ops_free_addresses iommu/amd: Rename dma_ops_domain->next_address to next_index iommu/amd: Remove 'start' parameter from dma_ops_area_alloc iommu/amd: Flush iommu tlb in dma_ops_aperture_alloc() iommu/amd: Retry address allocation within one aperture iommu/amd: Move aperture_range.offset to another cache-line iommu/amd: Add dma_ops_aperture_alloc() function ... commit 9571e1d84042f5670df9fabdcbe7dd5da3abe43e Author: Michel Dänzer Date: Tue Jan 19 17:59:46 2016 +0900 drm/amdgpu: Use drm_calloc_large for VM page_tables array It can be big, depending on the VM address space size, which is tunable via the vm_size module parameter. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93721 Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 558041d8d21b48287224dd0e32cf19563c77607c Author: Al Viro Date: Tue Jan 19 11:40:44 2016 -0500 find_filesystem(): simplify comparison Signed-off-by: Al Viro fs/filesystems.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 32704253dc008dfedead71da016b00d10cd1854f Merge: afd2ff9 7cd7578 89ae54b e7479a1 ae50dc4 6d6c7e5 1fb260b bc84745 Author: Joerg Roedel Date: Tue Jan 19 15:30:43 2016 +0100 Merge branches 's390', 'arm/renesas', 'arm/msm', 'arm/shmobile', 'arm/smmu', 'x86/amd' and 'x86/vt-d' into next commit 5bb1729cbdfbe974ad6385be94b14afbac97e19f Author: Rafael J. Wysocki Date: Sat Jan 16 00:56:34 2016 +0100 cpuidle: menu: Avoid pointless checks in menu_select() If menu_select() cannot find a suitable state to return, it will return the state index stored in data->last_state_idx. This means that it is pointless to look at the states whose indices are less than or equal to data->last_state_idx in the main loop, so don't do that. Given that those checks are done on every idle state selection, this change can save quite a bit of completely unnecessary overhead. Signed-off-by: Rafael J. Wysocki Acked-by: Ingo Molnar Tested-by: Sudeep Holla drivers/cpuidle/governors/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51164251f5c35e6596130ef0de94ffe65fe441e0 Author: Rafael J. Wysocki Date: Sat Jan 16 00:54:53 2016 +0100 sched / idle: Drop default_idle_call() fallback from call_cpuidle() After commit 9c4b2867ed7c (cpuidle: menu: Fix menu_select() for CPUIDLE_DRIVER_STATE_START == 0) it is clear that menu_select() cannot return negative values. Moreover, ladder_select_state() will never return a negative value too, so make find_deepest_state() return non-negative values too and drop the default_idle_call() fallback from call_cpuidle(). This eliminates one branch from the idle loop and makes the governors and find_deepest_state() handle the case when all states have been disabled from sysfs consistently. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Acked-by: Ingo Molnar Tested-by: Sudeep Holla drivers/cpuidle/cpuidle.c | 6 +++--- kernel/sched/idle.c | 6 ------ 2 files changed, 3 insertions(+), 9 deletions(-) commit 9cb1ccecb69d133e014b7be4de2609f689398c07 Author: Heiko Carstens Date: Mon Jan 18 13:12:19 2016 +0100 s390: remove all usages of PSW_ADDR_INSN Yet another leftover from the 31 bit era. The usual operation "y = x & PSW_ADDR_INSN" with the PSW_ADDR_INSN mask is a nop for CONFIG_64BIT. Therefore remove all usages and hope the code is a bit less confusing. Signed-off-by: Heiko Carstens Reviewed-by: David Hildenbrand arch/s390/include/asm/ptrace.h | 4 ++-- arch/s390/kernel/debug.c | 2 +- arch/s390/kernel/dumpstack.c | 9 ++++----- arch/s390/kernel/early.c | 2 +- arch/s390/kernel/ftrace.c | 2 +- arch/s390/kernel/kprobes.c | 6 +++--- arch/s390/kernel/perf_event.c | 12 +++++------- arch/s390/kernel/process.c | 10 +++++----- arch/s390/kernel/ptrace.c | 6 ++---- arch/s390/kernel/stacktrace.c | 11 +++++------ arch/s390/kernel/traps.c | 9 ++++----- arch/s390/kvm/guestdbg.c | 4 ++-- arch/s390/mm/fault.c | 4 ++-- arch/s390/oprofile/backtrace.c | 9 ++++----- 14 files changed, 41 insertions(+), 49 deletions(-) commit fecc868a668774b0fc666728c3f5d9f6fceefe64 Author: Heiko Carstens Date: Mon Jan 18 12:49:44 2016 +0100 s390: remove all usages of PSW_ADDR_AMODE This is a leftover from the 31 bit area. For CONFIG_64BIT the usual operation "y = x | PSW_ADDR_AMODE" is a nop. Therefore remove all usages of PSW_ADDR_AMODE and make the code a bit less confusing. Signed-off-by: Heiko Carstens Reviewed-by: David Hildenbrand arch/s390/include/asm/processor.h | 4 ++-- arch/s390/include/asm/ptrace.h | 2 +- arch/s390/kernel/early.c | 6 +++--- arch/s390/kernel/ipl.c | 4 ++-- arch/s390/kernel/kprobes.c | 10 +++++----- arch/s390/kernel/process.c | 2 +- arch/s390/kernel/setup.c | 16 ++++++---------- arch/s390/kernel/signal.c | 13 ++++++------- arch/s390/kernel/traps.c | 2 +- arch/s390/mm/fault.c | 2 +- 10 files changed, 28 insertions(+), 33 deletions(-) commit 696aafd36905a90af87c64d1278f91e39e66ae1e Author: Heiko Carstens Date: Tue Jan 19 10:19:02 2016 +0100 s390: wire up copy_file_range syscall Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/unistd.h | 3 ++- arch/s390/kernel/compat_wrapper.c | 1 + arch/s390/kernel/syscalls.S | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit cd17e153af499c74d7e347c8ad7eab273f55f20b Author: Heiko Carstens Date: Fri Jan 15 14:52:59 2016 +0100 s390: remove superfluous memblock_alloc() return value checks memblock_alloc() and memblock_alloc_base() will panic on their own if they can't find free memory. Therefore remove some pointless checks. Signed-off-by: Heiko Carstens Acked-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/kernel/crash_dump.c | 2 -- arch/s390/kernel/smp.c | 2 -- arch/s390/numa/numa.c | 2 -- 3 files changed, 6 deletions(-) commit ef1f7fd7eba19eb64fc424355eb9d4e49ca06fb1 Author: Heiko Carstens Date: Fri Jan 15 14:50:25 2016 +0100 s390/numa: allocate memory with correct alignment Allocating memory with a requested minimum alignment of 1 is wrong since pg_data_t contains a spinlock which requires an alignment of 4 bytes. Therefore fix this and ask for an alignment of 8 bytes like it is guarenteed for all kmalloc requests. Signed-off-by: Heiko Carstens Acked-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/numa/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 204ee2c5643199a25181ec04ea645d00709c2a5a Author: Christian Borntraeger Date: Mon Jan 11 09:17:18 2016 +0100 s390/irqflags: optimize irq restore The ssm instruction takes longer that stnsm/stosm as it is often used to modify DAT and PER. We know that irqsave/irqrestore only deals with external and I/O interrupts and we know that irqrestore can transition only from disabled->disabled or disabled->enabled, so we can use the faster stosm. Signed-off-by: Christian Borntraeger arch/s390/include/asm/irqflags.h | 9 +++++++-- arch/s390/mm/init.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit a9d7ab97812cf2cf9fd7c980205ae35f58c52cf5 Author: Dominik Dingel Date: Mon Jan 11 11:47:12 2016 +0100 s390/mm: use TASK_MAX_SIZE where applicable To improve readability we can use TASK_MAX_SIZE when we just check for the upper limit. All places explicitly dealing with 3 vs 4 level pgtables were left unchanged. Signed-off-by: Dominik Dingel Reviewed-By: Sascha Silbe arch/s390/mm/mmap.c | 12 ++++++------ arch/s390/mm/pgtable.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit d394f2d9d8e1e7b4959819344baf67b5995da9b0 Author: Alex Thorlton Date: Fri Dec 11 14:59:45 2015 -0600 x86/platform/UV: Remove EFI memmap quirk for UV2+ Commit a5d90c923bcf ("x86/efi: Quirk out SGI UV") added a quirk to efi_apply_memmap_quirks to force SGI UV systems to fall back to the old EFI memmap mechanism. We have a BIOS fix for this issue on all systems except for UV1. This commit fixes up the EFI quirk/MMR mapping code so that we only apply the special case to UV1 hardware. Signed-off-by: Alex Thorlton Reviewed-by: Matt Fleming Cc: Dimitri Sivanich Cc: H. Peter Anvin Cc: Hedi Berriche Cc: Len Brown Cc: Linus Torvalds Cc: Mike Travis Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1449867585-189233-2-git-send-email-athorlton@sgi.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/x2apic_uv_x.c | 5 ++++- arch/x86/platform/efi/quirks.c | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) commit fb75d857a31d600cc0c37b8c7d914014f7fa3f9a Author: Colin Ian King Date: Tue Jan 19 00:05:28 2016 +0000 btrfs: remove duplicate const specifier duplicate const is redundant so remove it Signed-off-by: Colin Ian King Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0036e74686344f1051afc3107740140abfd03616 Author: Chuanxiao Dong Date: Mon Jan 18 10:35:19 2016 +0100 mmc: debugfs: correct wrong voltage value Correct the wrong voltage value shown in debugfs for mmc/sd/sdio. Signed-off-by: Chuanxiao Dong Signed-off-by: Pawel Wodkowski Fixes: 42cd95a0603e ("mmc: core: debugfs: Add signal_voltage to ios dump") Signed-off-by: Ulf Hansson drivers/mmc/core/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd7f6727102a1ccf6b4c1dfcc631f9b546526b26 Author: Jean Delvare Date: Mon Jan 18 17:06:05 2016 +0100 crypto: crc32c - Fix crc32c soft dependency I don't think it makes sense for a module to have a soft dependency on itself. This seems quite cyclic by nature and I can't see what purpose it could serve. OTOH libcrc32c calls crypto_alloc_shash("crc32c", 0, 0) so it pretty much assumes that some incarnation of the "crc32c" hash algorithm has been loaded. Therefore it makes sense to have the soft dependency there (as crc-t10dif does.) Cc: stable@vger.kernel.org Cc: Tim Chen Cc: "David S. Miller" Signed-off-by: Jean Delvare Signed-off-by: Herbert Xu crypto/crc32c_generic.c | 1 - lib/libcrc32c.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 4f0414e54e4d1893c6f08260693f8ef84c929293 Author: Herbert Xu Date: Mon Jan 18 18:46:10 2016 +0800 crypto: algif_skcipher - Load TX SG list after waiting We need to load the TX SG list in sendmsg(2) after waiting for incoming data, not before. Cc: stable@vger.kernel.org Reported-by: Dmitry Vyukov Signed-off-by: Herbert Xu Tested-by: Dmitry Vyukov crypto/algif_skcipher.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e31835ad3abc6809703d3bbd2400bdd6285f8fea Author: Herbert Xu Date: Tue Jan 19 09:05:43 2016 +0800 crypto: atmel-aes - Add missing break to atmel_aes_reg_name The debug function atmel_aes_reg_name was missing a break for AES_GCMHR. Reported-by: David Binderman Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 1 + 1 file changed, 1 insertion(+) commit 9c03ee147193645be4c186d3688232fa438c57c7 Author: Raghavendra K T Date: Sat Jan 16 00:31:23 2016 +0530 sched: Fix crash in sched_init_numa() The following PowerPC commit: c118baf80256 ("arch/powerpc/mm/numa.c: do not allocate bootmem memory for non existing nodes") avoids allocating bootmem memory for non existent nodes. But when DEBUG_PER_CPU_MAPS=y is enabled, my powerNV system failed to boot because in sched_init_numa(), cpumask_or() operation was done on unallocated nodes. Fix that by making cpumask_or() operation only on existing nodes. [ Tested with and w/o DEBUG_PER_CPU_MAPS=y on x86 and PowerPC. ] Reported-by: Jan Stancek Tested-by: Jan Stancek Signed-off-by: Raghavendra K T Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Link: http://lkml.kernel.org/r/1452884483-11676-1-git-send-email-raghavendra.kt@linux.vnet.ibm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b000de5848441bc4e99c662fe1fd1b854151a84e Author: Andy Shevchenko Date: Fri Jan 15 22:11:08 2016 +0200 x86/platform/intel-mid: Join string and fix SoC name Join string back to make grepping a bit easier. While here, lowering case for Penwell SoC name in one case to be aligned with the rest messages. Signed-off-by: Andy Shevchenko Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mika Westerberg Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1452888668-147116-2-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/intel-mid.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3fda5bb420e79b357328b358409e4c547d8f0a18 Author: Andy Shevchenko Date: Fri Jan 15 22:11:07 2016 +0200 x86/platform/intel-mid: Enable 64-bit build Intel Tangier SoC is known to have 64-bit dual core CPU. Enable 64-bit build for it. The kernel has been tested on Intel Edison board: Linux buildroot 4.4.0-next-20160115+ #25 SMP Fri Jan 15 22:03:19 EET 2016 x86_64 GNU/Linux processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 74 model name : Genuine Intel(R) CPU 4000 @ 500MHz stepping : 8 Signed-off-by: Andy Shevchenko Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mika Westerberg Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1452888668-147116-1-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/Kconfig | 3 +-- arch/x86/kernel/head64.c | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit f5540ecb8910cb2bc923c50b4ca5e7a50a9bf775 Merge: 10a0c0f 96b9e70 Author: Ingo Molnar Date: Tue Jan 19 08:30:48 2016 +0100 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf tools improvements and fixes from Arnaldo Carvalho de Melo: User visible bug fixes: - Fix reading of build-id from vDSO (Ben Hutchings) - Fix processing samples for guests, noticed with 'perf kvm', but noticeable as well via other tools, such as 'perf top' (Ravi Bangoria) Build infrastructure: - Add feature-dump target and FEATURES_DUMP make variable, to allow reusing the feature detection results among multiple tools/ living codebases, such as perf and lib/bpf (Jiri Olsa) - 'make -C tools/perf build-test' improvements, making it more paralelizable and allowing building it outside of the source tree, using O= (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit d8d803867ac13117b8f6c6572474ab1c90e9036b Author: David Howells Date: Thu Jan 14 15:50:20 2016 +0000 Fix the MAINTAINERS record for the certs/ directory Fix the MAINTAINERS record for the certs/ directory to have the new keyrings mailing list and also to be authoritative for the sign-file tool Signed-off-by: David Howells Acked-by: David Woodhouse Signed-off-by: James Morris MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a200dcb34693084e56496960d855afdeaaf9578f Merge: d05d82f 43e361f Author: Linus Torvalds Date: Mon Jan 18 16:44:24 2016 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio barrier rework+fixes from Michael Tsirkin: "This adds a new kind of barrier, and reworks virtio and xen to use it. Plus some fixes here and there" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (44 commits) checkpatch: add virt barriers checkpatch: check for __smp outside barrier.h checkpatch.pl: add missing memory barriers virtio: make find_vqs() checkpatch.pl-friendly virtio_balloon: fix race between migration and ballooning virtio_balloon: fix race by fill and leak s390: more efficient smp barriers s390: use generic memory barriers xen/events: use virt_xxx barriers xen/io: use virt_xxx barriers xenbus: use virt_xxx barriers virtio_ring: use virt_store_mb sh: move xchg_cmpxchg to a header by itself sh: support 1 and 2 byte xchg virtio_ring: update weak barriers to use virt_xxx Revert "virtio_ring: Update weak barriers to use dma_wmb/rmb" asm-generic: implement virt_xxx memory barriers x86: define __smp_xxx xtensa: define __smp_xxx tile: define __smp_xxx ... commit 38cb76a307821f76c7f9dff7449f73aeb014d5cc Author: Shreyas B. Prabhu Date: Mon Jan 18 20:44:43 2016 +0530 cpupower: Fix build error in cpufreq-info Fix the following build error by including limits.h - utils/cpufreq-info.c: In function ‘get_latency’: utils/cpufreq-info.c:437:29: error: ‘UINT_MAX’ undeclared (first use in this function) if (!latency || latency == UINT_MAX) { ^ Signed-off-by: Shreyas B. Prabhu Fixes: e98f033f94f3 (cpupower: fix how "cpupower frequency-info" interprets latency) Signed-off-by: Rafael J. Wysocki tools/power/cpupower/utils/cpufreq-info.c | 1 + 1 file changed, 1 insertion(+) commit ee3804d9f94c5a391c66386b70b9fe5a58775507 Merge: 4c931f7 85bec54 Author: Dave Chinner Date: Tue Jan 19 08:28:36 2016 +1100 Merge branch 'xfs-misc-fixes-for-4.5-3' into for-next commit 85bec5460ad8e05e0a8d70fb0f6750eb719ad092 Author: Dave Chinner Date: Tue Jan 19 08:28:10 2016 +1100 xfs: log mount failures don't wait for buffers to be released Recently I've been seeing xfs/051 fail on 1k block size filesystems. Trying to trace the events during the test lead to the problem going away, indicating that it was a race condition that lead to this ASSERT failure: XFS: Assertion failed: atomic_read(&pag->pag_ref) == 0, file: fs/xfs/xfs_mount.c, line: 156 ..... [] xfs_free_perag+0x87/0xb0 [] xfs_mountfs+0x4d9/0x900 [] xfs_fs_fill_super+0x3bf/0x4d0 [] mount_bdev+0x180/0x1b0 [] xfs_fs_mount+0x15/0x20 [] mount_fs+0x38/0x170 [] vfs_kern_mount+0x67/0x120 [] do_mount+0x218/0xd60 [] SyS_mount+0x8b/0xd0 When I finally caught it with tracing enabled, I saw that AG 2 had an elevated reference count and a buffer was responsible for it. I tracked down the specific buffer, and found that it was missing the final reference count release that would put it back on the LRU and hence be found by xfs_wait_buftarg() calls in the log mount failure handling. The last four traces for the buffer before the assert were (trimmed for relevance) kworker/0:1-5259 xfs_buf_iodone: hold 2 lock 0 flags ASYNC kworker/0:1-5259 xfs_buf_ioerror: hold 2 lock 0 error -5 mount-7163 xfs_buf_lock_done: hold 2 lock 0 flags ASYNC mount-7163 xfs_buf_unlock: hold 2 lock 1 flags ASYNC This is an async write that is completing, so there's nobody waiting for it directly. Hence we call xfs_buf_relse() once all the processing is complete. That does: static inline void xfs_buf_relse(xfs_buf_t *bp) { xfs_buf_unlock(bp); xfs_buf_rele(bp); } Now, it's clear that mount is waiting on the buffer lock, and that it has been released by xfs_buf_relse() and gained by mount. This is expected, because at this point the mount process is in xfs_buf_delwri_submit() waiting for all the IO it submitted to complete. The mount process, however, is waiting on the lock for the buffer because it is in xfs_buf_delwri_submit(). This waits for IO completion, but it doesn't wait for the buffer reference owned by the IO to go away. The mount process collects all the completions, fails the log recovery, and the higher level code then calls xfs_wait_buftarg() to free all the remaining buffers in the filesystem. The issue is that on unlocking the buffer, the scheduler has decided that the mount process has higher priority than the the kworker thread that is running the IO completion, and so immediately switched contexts to the mount process from the semaphore unlock code, hence preventing the kworker thread from finishing the IO completion and releasing the IO reference to the buffer. Hence by the time that xfs_wait_buftarg() is run, the buffer still has an active reference and so isn't on the LRU list that the function walks to free the remaining buffers. Hence we miss that buffer and continue onwards to tear down the mount structures, at which time we get find a stray reference count on the perag structure. On a non-debug kernel, this will be ignored and the structure torn down and freed. Hence when the kworker thread is then rescheduled and the buffer released and freed, it will access a freed perag structure. The problem here is that when the log mount fails, we still need to quiesce the log to ensure that the IO workqueues have returned to idle before we run xfs_wait_buftarg(). By synchronising the workqueues, we ensure that all IO completions are fully processed, not just to the point where buffers have been unlocked. This ensures we don't end up in the situation above. cc: # 3.18 Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_buf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3e85286e75224fa3f08bdad20e78c8327742634e Author: Dave Chinner Date: Tue Jan 19 08:21:46 2016 +1100 Revert "xfs: clear PF_NOFREEZE for xfsaild kthread" This reverts commit 24ba16bb3d499c49974669cd8429c3e4138ab102 as it prevents machines from suspending. This regression occurs when the xfsaild is idle on entry to suspend, and so there s no activity to wake it from it's idle sleep and hence see that it is supposed to freeze. Hence the freezer times out waiting for it and suspend is cancelled. There is no obvious fix for this short of freezing the filesystem properly, so revert this change for now. cc: # 4.4 Signed-off-by: Dave Chinner Acked-by: Jiri Kosina Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_trans_ail.c | 1 - 1 file changed, 1 deletion(-) commit 4c931f770d327f4851917828a1682d030b53d021 Merge: dde7f55 58f88ca Author: Dave Chinner Date: Tue Jan 19 08:16:08 2016 +1100 Merge branch 'xfs-setxattr-promotion' into for-next commit d05d82f7110b08fd36178a641b69a1f206e1142b Merge: d90f351 00d27c6 Author: Linus Torvalds Date: Mon Jan 18 12:57:18 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile updates from Chris Metcalf: "This is a grab bag of changes that includes some NOHZ and context-tracking related changes, some debugging improvements, JUMP_LABEL support, and some fixes for tilepro allmodconfig support. We also remove the now-unused node_has_online_mem() definitions both for tile's asm/topology.h as well as in linux/topology.h itself" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: numa: remove stale node_has_online_mem() define arch/tile: move user_exit() to early kernel entry sequence tile: fix bug in setting PT_FLAGS_DISABLE_IRQ on kernel entry tile: fix tilepro casts for readl, writel, etc tile: fix a -Wframe-larger-than warning tile: include the syscall number in the backtrace MAINTAINERS: add git URL for tile arch/tile: adopt prepare_exit_to_usermode() model from x86 tile/jump_label: add jump label support for TILE-Gx tile: define a macro ktext_writable_addr to get writable kernel text address commit d90f351a9bec6af3e8e7cefbbff94072461c3c9a Merge: c1a198d 238d1c6 Author: Linus Torvalds Date: Mon Jan 18 12:50:55 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 Pull AVR32 updates from Hans-Christian Noren Egtvedt. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32: mmc: atmel: get rid of struct mci_dma_data mmc: atmel-mci: restore dma on AVR32 avr32: wire up missing syscalls avr32: wire up accept4 syscall commit c1a198d9235b9e7d6942027374e44f78ebdcb455 Merge: 48f58ba 988f1f5 Author: Linus Torvalds Date: Mon Jan 18 12:44:40 2016 -0800 Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs updates from Chris Mason: "This has our usual assortment of fixes and cleanups, but the biggest change included is Omar Sandoval's free space tree. It's not the default yet, mounting -o space_cache=v2 enables it and sets a readonly compat bit. The tree can actually be deleted and regenerated if there are any problems, but it has held up really well in testing so far. For very large filesystems (30T+) our existing free space caching code can end up taking a huge amount of time during commits. The new tree based code is faster and less work overall to update as the commit progresses. Omar worked on this during the summer and we'll hammer on it in production here at FB over the next few months" * 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (73 commits) Btrfs: fix fitrim discarding device area reserved for boot loader's use Btrfs: Check metadata redundancy on balance btrfs: statfs: report zero available if metadata are exhausted btrfs: preallocate path for snapshot creation at ioctl time btrfs: allocate root item at snapshot ioctl time btrfs: do an allocation earlier during snapshot creation btrfs: use smaller type for btrfs_path locks btrfs: use smaller type for btrfs_path lowest_level btrfs: use smaller type for btrfs_path reada btrfs: cleanup, use enum values for btrfs_path reada btrfs: constify static arrays btrfs: constify remaining structs with function pointers btrfs tests: replace whole ops structure for free space tests btrfs: use list_for_each_entry* in backref.c btrfs: use list_for_each_entry_safe in free-space-cache.c btrfs: use list_for_each_entry* in check-integrity.c Btrfs: use linux/sizes.h to represent constants btrfs: cleanup, remove stray return statements btrfs: zero out delayed node upon allocation btrfs: pass proper enum type to start_transaction() ... commit 383bf44d1a8b18de5c26ec2a48c6822681b50984 Author: Miroslav Benes Date: Thu Jan 14 11:35:53 2016 +0100 livepatch: change the error message in asm/livepatch.h header files If anyone includes asm/livepatch.h when CONFIG_LIVEPATCH=n the build fails with the existing error message. Change it to something saner. [jkosina@suse.cz: fixed changelog typo spotted by Josh] Suggested-by: Andrew Morton Signed-off-by: Miroslav Benes Acked-by: Josh Poimboeuf Signed-off-by: Jiri Kosina arch/s390/include/asm/livepatch.h | 2 +- arch/x86/include/asm/livepatch.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 48f58ba9cbffd3945fbc4d7f45b75cf4801a60b7 Merge: 7f36f1b b064d0d Author: Linus Torvalds Date: Mon Jan 18 12:35:14 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull more networking fixes from David Miller: 1) Fix brcmfmac build with older gcc, from Arend van Spriel. 2) IRQ values unintentionally truncated to u8 in mlx5 driver, from Doron Tsur. 3) Fix build warnings wrt tcp cgroup changes, from Geert Uytterhoeven. 4) Limit deep recursion in ovs stack, from Hannes Frederic Sowa. 5) at803x phy driver bug fixes from, Martin Blumenstingl. 6) Fix TSO handling in hns driver, from Daode Huang * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits) ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid net: hns: bug fix about hisilicon TSO BD mode brcmfmac: fix BRCMF_FW_NVRAM_DEF macro for older gcc compilers net: phy: at803x: Add the interrupt register bit definitions net: phy: at803x: Clean up duplicate register definitions net: phy: at803x: Allow specifying the RGMII RX clock delay via phy mode net: phy: at803x: Don't set gbit features for the AR8030 phy arm64: bpf: add extra pass to handle faulty codegen arm64: insn: remove BUG_ON from codegen sctp: the temp asoc's transports should not be hashed/unhashed net/mlx5_core: Fix trimming down IRQ number tcp_memcontrol: Forward declare cgroup_subsys and mem_cgroup stucts batman-adv: Drop immediate orig_node free function batman-adv: Drop immediate batadv_hard_iface free function batman-adv: Drop immediate neigh_ifinfo free function batman-adv: Drop immediate batadv_hardif_neigh_node free function batman-adv: Drop immediate batadv_neigh_node free function batman-adv: Drop immediate batadv_orig_ifinfo free function batman-adv: Avoid recursive call_rcu for batadv_nc_node ... commit 7f36f1b2a8c4f55f8226ed6c8bb4ed6de11c4015 Merge: c38dec7 e04a2bd Author: Linus Torvalds Date: Mon Jan 18 12:28:57 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide Pull IDE updates from David Miller: "Just a few small changes this merge window, marking ops const, printf string type fixes, etc" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: drivers/ide: make ide-scan-pci.c driver explicitly non-modular ide: constify ide_dma_ops structures ide: silence some underflow warnings commit c38dec71664dadb15094151f53886abb69f8f9e6 Merge: d43fb9f 079062b Author: Linus Torvalds Date: Mon Jan 18 12:10:45 2016 -0800 Merge tag 'rtc-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Core: - fix module reference count in rtc-proc - Replace simple_strtoul by kstrtoul New driver: - Epson RX8010SJ Subsystem wide cleanups: - use %ph for short hex dumps - constify *_chip_ops structures Drivers: - abx80x: Microcrystal rv1805 support, alarm support - cmos: prevent kernel warning on IRQ flags mismatch - s5m: various cleanups - rv8803: rx8900 compatibility, small error path fix - sunxi: various cleanups - lpc32xx: remove irq > NR_IRQS check from probe() - imxdi: fix spelling mistake in warning message - ds1685: don't try to micromanage sysfs output size - da9063: avoid writing undefined data to rtc - gemini: Remove unnecessary platform_set_drvdata() - efi: add efi_procfs in efi_rtc_ops - pcf8523: refuse to write dates later than 2099" * tag 'rtc-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (24 commits) rtc: cmos: prevent kernel warning on IRQ flags mismatch rtc: rtc-ds2404: constify ds2404_chip_ops structures rtc: s5m: Make register configuration per S2MPS device to remove exceptions rtc: s5m: Add separate field for storing auto-cleared mask in register config rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields rtc: Replace simple_strtoul by kstrtoul rtc: abx80x: add alarm support rtc: abx80x: Add Microcrystal rv1805 support rtc: v3020: constify v3020_chip_ops structures rtc: rv8803: Extend compatibility with the rx8900 rtc: rv8803: fix handling return value of i2c_smbus_read_byte_data rtc: Add Epson RX8010SJ RTC driver rtc: lpc32xx: remove irq > NR_IRQS check from probe() rtc: imxdi: fix spelling mistake in warning message rtc: ds1685: don't try to micromanage sysfs output size rtc: use %ph for short hex dumps rtc: da9063: avoid writing undefined data to rtc rtc: sunxi: use of_device_get_match_data rtc: sunxi: constify the data_year_param structure rtc: sunxi: fix signedness issues ... commit 6c54809977de3c9e2ef9e9934a2c6625f7e161e7 Author: Arnd Bergmann Date: Mon Jan 18 10:45:00 2016 +0100 ARM: debug-ll: fix BCM63xx entry for multiplatform During my randconfig build testing, I found that a kernel with DEBUG_AT91_UART and ARCH_BCM_63XX fails to build: arch/arm/include/debug/at91.S:18:0: error: "CONFIG_DEBUG_UART_VIRT" redefined [-Werror] It turns out that the DEBUG_UART_BCM63XX option is enabled whenever the ARCH_BCM_63XX is, and that breaks multiplatform kernels because we then end up using the UART address from BCM63XX rather than the one we actually configured (if any). This changes the BCM63XX options to only have one Kconfig option, and only enable that if the user explicitly turns it on. Signed-off-by: Arnd Bergmann Fixes: b51312bebfa4 ("ARM: BCM63XX: add low-level UART debug support") Cc: stable@vger.kernel.org arch/arm/Kconfig.debug | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit d43fb9f3c5dff281dd72bea5cd2e91386fdc33a8 Merge: 5807fca 6f6abd3 Author: Linus Torvalds Date: Mon Jan 18 11:58:31 2016 -0800 Merge tag 'fbdev-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev updates from Tomi Valkeinen: "Summary: - pxafb: device-tree support - An unsafe kernel parameter 'lockless_register_fb' for debugging problems happening while inside the console lock - Small miscellaneous fixes & cleanups - omapdss: add writeback support functions - Separation of omapfb and omapdrm (see below) About the separation of omapfb and omapdrm, see http://permalink.gmane.org/gmane.comp.video.dri.devel/143151 for longer story. The short version: omapfb and omapdrm have shared low level drivers (omapdss and panel drivers), making further development of omapdrm difficult. After these patches omapfb and omapdrm have their own versions of the drivers, which are more or less direct copies for now but will diverge soon. This also means that omapfb (everything under drivers/video/fbdev/omap2/) is now in maintenance mode, and all new development will be done for omapdrm (drivers/gpu/drm/omapdrm/)" * tag 'fbdev-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (49 commits) video: fbdev: pxafb: fix out of memory error path drm/omap: make omapdrm select OMAP2_DSS drm/omap: move omapdss & displays under omapdrm omapfb: move vrfb into omapfb omapfb: take omapfb's private omapdss into use omapfb/displays: change CONFIG_DISPLAY_* to CONFIG_FB_OMAP2_* omapfb/dss: change CONFIG_OMAP* to CONFIG_FB_OMAP* omapdss: remove CONFIG_OMAP2_DSS_VENC from omapdss.h omapfb: copy omapdss & displays for omapfb omapfb: allow compilation only if DRM_OMAP is disabled fbdev: omap2: panel-dpi: simplify gpio setting fbdev: omap2: panel-dpi: in .disable first disable backlight then display OMAPDSS: DSS: fix a warning message video: omapdss: delete unneeded of_node_put OMAPDSS: DISPC: Remove boolean comparisons OMAPDSS: DSI: cleanup DSI_IRQ_ERROR_MASK define OMAPDSS: remove extra out == NULL checks OMAPDSS: change internal dispc functions to static OMAPDSS: make a two dss feat funcs internal to omapdss OMAPDSS: remove extra EXPORT_SYMBOLs ... commit 00d27c6336b00345724b2510f7c5b8cee3055f02 Author: Chris Metcalf Date: Tue Jan 5 11:22:10 2016 -0500 numa: remove stale node_has_online_mem() define This isn't used anywhere, so delete it. Looks like the last usage (in x86-specific code) was removed by Tejun in 2011 in commit bd6709a91a59 ("x86, NUMA: Make 32bit use common NUMA init path"). Signed-off-by: Chris Metcalf arch/tile/include/asm/topology.h | 3 --- include/linux/topology.h | 4 ---- 2 files changed, 7 deletions(-) commit 1bb50cad45f4a3fb9a339006d76efc50f70eed5b Author: Chris Metcalf Date: Wed Dec 23 17:13:04 2015 -0500 arch/tile: move user_exit() to early kernel entry sequence This ensures that we always notify context tracking that we have exited from user space no matter how we enter the kernel. It is similar to how arm64 handles context tracking, for example. This allows the removal of all the exception_enter() calls that were added in commit 49e4e15619cd ("tile: support CONTEXT_TRACKING and thus NOHZ_FULL"). Signed-off-by: Chris Metcalf arch/tile/kernel/intvec_32.S | 5 ++++- arch/tile/kernel/intvec_64.S | 5 ++++- arch/tile/kernel/ptrace.c | 15 --------------- arch/tile/kernel/single_step.c | 3 --- arch/tile/kernel/traps.c | 13 ++++--------- arch/tile/kernel/unaligned.c | 13 ++++--------- arch/tile/mm/fault.c | 3 --- 7 files changed, 16 insertions(+), 41 deletions(-) commit 9ce815ed50bbc518526106071f395deacaf94ad7 Author: Chris Metcalf Date: Wed Dec 23 15:02:47 2015 -0500 tile: fix bug in setting PT_FLAGS_DISABLE_IRQ on kernel entry This flag value is saved in ptregs and used to decide whether to disable irqs when returning from the kernel. Commit 1168df528fe4 ("tile: don't assume user privilege is zero") performed a bad merge from some KVM-enabled code that had not yet been upstreamed. The only issue with the old code is that we will read the interrupt mask in more conditions than we need to (e.g., coming from user space when user space has the Interrupt Critical Section bit set, or coming from a guest kernel), which is a slow multi-cycle operation. This change saves those few cycles in the common case. Signed-off-by: Chris Metcalf arch/tile/kernel/intvec_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acfb699e3d757b349251ea19b8173220008d1c9e Author: Chris Metcalf Date: Mon Dec 21 13:03:03 2015 -0500 tile: fix tilepro casts for readl, writel, etc Missing parentheses could cause an argument of the form "integer + pointer" to get cast to "(long)integer + pointer" and remain a pointer type, causing compiler warnings. Signed-off-by: Chris Metcalf arch/tile/include/asm/io.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f3a26163fa8f36344bf01707529052aea20368e8 Author: Chris Metcalf Date: Mon Dec 21 12:14:24 2015 -0500 tile: fix a -Wframe-larger-than warning The warning occurs in setup.c, where it is known that it can't be a problem, but it's still a good idea to silence the warning. The onstack array is converted from an s32 to a u8, which still is plenty of range for the values being managed there. Signed-off-by: Chris Metcalf arch/tile/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ac65abd48b6d3c62ec17dc4c28830513dd605e0 Author: Chris Metcalf Date: Thu Dec 17 15:01:38 2015 -0500 tile: include the syscall number in the backtrace This information is easily available in the backtrace data and can be helpful when trying to figure out the backtrace, particularly if we're early in kernel entry or late in kernel exit. Signed-off-by: Chris Metcalf arch/tile/kernel/stack.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 7fa129ccb92c982ee8947d7fe004d7fd4f0691b9 Author: Fengguang Wu Date: Fri Dec 18 10:15:37 2015 -0500 MAINTAINERS: add git URL for tile Signed-off-by: Fengguang Wu Signed-off-by: Chris Metcalf MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 583b24a210ada7e88fc12aaf50024975ec882816 Author: Chris Metcalf Date: Tue Sep 22 14:49:41 2015 -0400 arch/tile: adopt prepare_exit_to_usermode() model from x86 This change is a prerequisite change for TASK_ISOLATION but also stands on its own for readability and maintainability. The existing tile do_work_pending() was called in a loop from assembly on the slow path; this change moves the loop into C code as well. For the x86 version see commit c5c46f59e4e7 ("x86/entry: Add new, comprehensible entry and exit handlers written in C"). This change exposes a pre-existing bug on the older tilepro platform; the singlestep processing is done last, but on tilepro (unlike tilegx) we enable interrupts while doing that processing, so we could in theory miss a signal or other asynchronous event. A future change could fix this by breaking the singlestep work into a "prepare" step done in the main loop, and a "trigger" step done after exiting the loop. Since this change is intended as purely a restructuring change, we call out the bug explicitly now, but don't yet fix it. Signed-off-by: Chris Metcalf arch/tile/include/asm/processor.h | 2 +- arch/tile/include/asm/thread_info.h | 8 +++- arch/tile/kernel/intvec_32.S | 46 +++++++-------------- arch/tile/kernel/intvec_64.S | 49 +++++++---------------- arch/tile/kernel/process.c | 79 +++++++++++++++++++------------------ 5 files changed, 77 insertions(+), 107 deletions(-) commit e04a2bd6d8c95608cbb2c803ee2875cebfd89f52 Author: Paul Gortmaker Date: Wed Dec 9 16:45:51 2015 -0500 drivers/ide: make ide-scan-pci.c driver explicitly non-modular The Kconfig for this support is currently: config IDEPCI_PCIBUS_ORDER bool "Probe IDE PCI devices in the PCI bus order (DEPRECATED)" ...meaning that it currently is not being built as a module by anyone. Lets change the initcall to be the equivalent device_initcall, so that when reading the driver code, there is no doubt it is builtin-only. Unlike other similar changes, we leave the module.h header to be included since this code interacts with other drivers and needs to know what a struct module is. Cc: "David S. Miller" Cc: linux-ide@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: David S. Miller drivers/ide/ide-scan-pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b5a608fb28c84ef3e569b6929e58977f4e2ce480 Author: Julia Lawall Date: Sun Nov 15 21:36:30 2015 +0100 ide: constify ide_dma_ops structures The ide_dma_ops structures are never modified, so declare these as const, as is already done for the others. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/ide/it821x.c | 2 +- drivers/ide/trm290.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0860bf94712f34f5920193004dfed25408f078b1 Author: Dan Carpenter Date: Fri Nov 13 17:34:01 2015 +0300 ide: silence some underflow warnings Back in the day we used to just say this code was root only so it was ok that the bounds checking was sloppy. These days it annoys static checkers so we fix it. In the original code "c > INT_MAX" was never true since "c" was an int. I am not sure what was intended so I left it alone. But because I made "c" unsigned it means we don't have a warning any more. The second warning is that we cap "i" but allow negatives leading to an underflow of the ide_disks_chs[] array. The third set of warnings is because these values come from the user and we cap most of the upper bounds but allow negative values. Negative cylinders doesn't make sense. drivers/ide/ide.c:262 ide_set_disk_chs() warn: impossible condition '(c > ((~0 >> 1))) => (s32min-s32max > s32max)' drivers/ide/ide.c:270 ide_set_disk_chs() warn: check 'ide_disks_chs[i]' for negative offsets 'i' = s32min. extra = 's32min-19' drivers/ide/ide.c:271 ide_set_disk_chs() warn: no lower bound on 'h' Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/ide/ide.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b064d0d88ae5280c7e878f79d0c9a8e2876a4d14 Author: Hannes Frederic Sowa Date: Mon Jan 18 18:03:48 2016 +0100 ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack It was seen that defective configurations of openvswitch could overwrite the STACK_END_MAGIC and cause a hard crash of the kernel because of too many recursions within ovs. This problem arises due to the high stack usage of openvswitch. The rest of the kernel is fine with the current limit of 10 (RECURSION_LIMIT). We use the already existing recursion counter in ovs_execute_actions to implement an upper bound of 5 recursions. Cc: Pravin Shelar Cc: Simon Horman Cc: Eric Dumazet Cc: Simon Horman Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/openvswitch/actions.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 60a6531bfe49555581ccd65f66a350cc5693fcde Author: Ido Schimmel Date: Mon Jan 18 17:30:22 2016 +0200 team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid We can't be within an RCU read-side critical section when deleting VLANs, as underlying drivers might sleep during the hardware operation. Therefore, replace the RCU critical section with a mutex. This is consistent with team_vlan_rx_add_vid. Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device") Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/team/team.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 918f618f564e208dd181d8ac7525694ccf4bc097 Author: huangdaode Date: Mon Jan 18 17:24:16 2016 +0800 net: hns: bug fix about hisilicon TSO BD mode The current upstreaming code fails to set the tso_mode register when initilizes, when processes large size packets, the default 4 bd is not enough, so this patch initilizes it and set the default value to 8 bds Signed-off-by: Daode Huang Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 13 +++++++++++-- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 3 +++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 5 +++++ 3 files changed, 19 insertions(+), 2 deletions(-) commit 23195ec00503c6c29daea5b6c780787c0b5f1bf3 Author: Arend van Spriel Date: Sat Jan 16 16:39:13 2016 +0100 brcmfmac: fix BRCMF_FW_NVRAM_DEF macro for older gcc compilers With gcc < 4.3 __UNIQUE_ID does not create unique ids with the macro BRCMF_FW_NVRAM_DEF. Fix this by removing the MODULE_FIRMWARE instance for the nvram file. This file is not in linux-firmware repo so it may not be needed anyway. Otherwise consider this as a temporary fix. Reported-by: Geert Uytterhoeven Signed-off-by: Arend van Spriel Acked-by: Kalle Valo Tested-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6bf641039f96e0c0cf3b10ae9ba12039d1a01122 Author: Simon Horman Date: Thu Nov 12 10:53:59 2015 +0900 dmaengine: rcar-dmac: Document SoC specific bindings In general Renesas hardware is not documented to the extent where the relationship between IP blocks on different SoCs can be assumed although they may appear to operate the same way. Furthermore the documentation typically does not specify a version for individual IP blocks. For these reasons a convention of using the SoC name in place of a version and providing SoC-specific compat strings has been adopted. Although not universally liked this convention is used in the bindings for most drivers for Renesas hardware. The purpose of this patch is to update the Renesas R-Car DMA Controller driver to follow this convention. Cc: devicetree@vger.kernel.org Cc: Magnus Damm Cc: Laurent Pinchart Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit c0bcdbdff3ff73a54161fca3cb8b6cdbd0bb8762 Author: Takashi Iwai Date: Mon Jan 18 14:12:40 2016 +0100 ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 When a TLV ioctl with numid zero is handled, the driver may spew a kernel warning with a stack trace at each call. The check was intended obviously only for a kernel driver, but not for a user interaction. Let's fix it. This was spotted by syzkaller fuzzer. Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/control.c | 2 ++ 1 file changed, 2 insertions(+) commit 9586495dc3011a80602329094e746dbce16cb1f1 Author: Nicolas Boichat Date: Mon Jan 18 21:35:01 2016 +0800 ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode This reverts one hunk of commit ef44a1ec6eee ("ALSA: sound/core: use memdup_user()"), which replaced a number of kmalloc followed by memcpy with memdup calls. In this case, we are copying from a struct snd_seq_port_info32 to a struct snd_seq_port_info, but the latter is 4 bytes longer than the 32-bit version, so we need to separate kmalloc and copy calls. Fixes: ef44a1ec6eee ('ALSA: sound/core: use memdup_user()') Signed-off-by: Nicolas Boichat Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_compat.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 43c54b8c7cfe22f868a751ba8a59abf1724160b1 Author: Nicolas Boichat Date: Mon Jan 18 21:35:00 2016 +0800 ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode This reverts one hunk of commit ef44a1ec6eee ("ALSA: sound/core: use memdup_user()"), which replaced a number of kmalloc followed by memcpy with memdup calls. In this case, we are copying from a struct snd_pcm_hw_params32 to a struct snd_pcm_hw_params, but the latter is 4 bytes longer than the 32-bit version, so we need to separate kmalloc and copy calls. This actually leads to an out-of-bounds memory access later on in sound/soc/soc-pcm.c:soc_pcm_hw_params() (detected using KASan). Fixes: ef44a1ec6eee ('ALSA: sound/core: use memdup_user()') Signed-off-by: Nicolas Boichat Cc: Signed-off-by: Takashi Iwai sound/core/pcm_compat.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 611dcadb01c89d1d3521450c05a4ded332e5a32d Author: Songjun Wu Date: Mon Jan 18 11:14:44 2016 +0100 dmaengine: at_xdmac: fix resume for cyclic transfers When having cyclic transfers, the channel was paused when performing suspend but was not correctly resumed. Signed-off-by: Songjun Wu Signed-off-by: Ludovic Desroches Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Cc: # 4.1 and later Signed-off-by: Vinod Koul drivers/dma/at_xdmac.c | 3 +++ 1 file changed, 3 insertions(+) commit 2ba1fe7a06d3624f9a7586d672b55f08f7c670f3 Author: Takashi Iwai Date: Mon Jan 18 13:52:47 2016 +0100 ALSA: hrtimer: Fix stall by hrtimer_cancel() hrtimer_cancel() waits for the completion from the callback, thus it must not be called inside the callback itself. This was already a problem in the past with ALSA hrtimer driver, and the early commit [fcfdebe70759: ALSA: hrtimer - Fix lock-up] tried to address it. However, the previous fix is still insufficient: it may still cause a lockup when the ALSA timer instance reprograms itself in its callback. Then it invokes the start function even in snd_timer_interrupt() that is called in hrtimer callback itself, results in a CPU stall. This is no hypothetical problem but actually triggered by syzkaller fuzzer. This patch tries to fix the issue again. Now we call hrtimer_try_to_cancel() at both start and stop functions so that it won't fall into a deadlock, yet giving some chance to cancel the queue if the functions have been called outside the callback. The proper hrtimer_cancel() is called in anyway at closing, so this should be enough. Reported-and-tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/hrtimer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 35b815392a6b6c268baf3b63d7f2ba350597024f Author: Pablo Neira Ayuso Date: Mon Jan 18 13:52:29 2016 +0100 netfilter: nf_tables_netdev: fix error path in module initialization Unregister the chain type and return error, otherwise this leaks the subscription to the netdevice notifier call chain. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_netdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d6b3347bf178266259af64b1f27b5cf54acf62c8 Author: Eric Dumazet Date: Fri Jan 15 08:21:32 2016 -0800 netfilter: xt_TCPMSS: handle CHECKSUM_COMPLETE in tcpmss_tg6() In case MSS option is added in TCP options, skb length increases by 4. IPv6 needs to update skb->csum if skb has CHECKSUM_COMPLETE, otherwise kernel complains loudly in netdev_rx_csum_fault() with a stack dump. Signed-off-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_TCPMSS.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1822793a523e5d5730b19cc21160ff1717421bc8 Author: Herbert Xu Date: Fri Jan 15 22:02:20 2016 +0800 crypto: algif_skcipher - Fix race condition in skcipher_check_key We need to lock the child socket in skcipher_check_key as otherwise two simultaneous calls can cause the parent socket to be freed. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_skcipher.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ad46d7e33219218605ea619e32553daf4f346b9f Author: Herbert Xu Date: Fri Jan 15 22:01:08 2016 +0800 crypto: algif_hash - Fix race condition in hash_check_key We need to lock the child socket in hash_check_key as otherwise two simultaneous calls can cause the parent socket to be freed. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_hash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit cbafd643be4c01d9df994175d5e2fa8b3b1b86bb Author: Geert Uytterhoeven Date: Fri Jan 15 14:48:06 2016 +0100 crypto: CRYPTO_DEV_ATMEL_AES should depend on HAS_DMA If NO_DMA=y: ERROR: "dma_unmap_sg" [drivers/crypto/atmel-aes.ko] undefined! ERROR: "dma_map_sg" [drivers/crypto/atmel-aes.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5b57167749274961baf15ed1f05a4996b3ab0487 Author: Arnd Bergmann Date: Wed Jan 13 23:24:02 2016 +0100 lib: sw842: select crc32 The sw842 library code was merged in linux-4.1 and causes a very rare randconfig failure when CONFIG_CRC32 is not set: lib/built-in.o: In function `sw842_compress': oid_registry.c:(.text+0x12ddc): undefined reference to `crc32_be' lib/built-in.o: In function `sw842_decompress': oid_registry.c:(.text+0x137e4): undefined reference to `crc32_be' This adds an explict 'select CRC32' statement, similar to what the other users of the crc32 code have. In practice, CRC32 is always enabled anyway because over 100 other symbols select it. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Fixes: 2da572c959dd ("lib: add software 842 compression/decompression") Acked-by: Dan Streetman Signed-off-by: Herbert Xu lib/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit a6a48c565f6f112c6983e2a02b1602189ed6e26e Author: Herbert Xu Date: Wed Jan 13 15:03:32 2016 +0800 crypto: af_alg - Forbid bind(2) when nokey child sockets are present This patch forbids the calling of bind(2) when there are child sockets created by accept(2) in existence, even if they are created on the nokey path. This is needed as those child sockets have references to the tfm object which bind(2) will destroy. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/af_alg.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit d7b65aee1e7b4c87922b0232eaba56a8a143a4a0 Author: Herbert Xu Date: Wed Jan 13 15:01:06 2016 +0800 crypto: algif_skcipher - Remove custom release parent function This patch removes the custom release parent function as the generic af_alg_release_parent now works for nokey sockets too. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_skcipher.c | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) commit f1d84af1835846a5a2b827382c5848faf2bb0e75 Author: Herbert Xu Date: Wed Jan 13 15:00:36 2016 +0800 crypto: algif_hash - Remove custom release parent function This patch removes the custom release parent function as the generic af_alg_release_parent now works for nokey sockets too. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_hash.c | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) commit 6a935170a980024dd29199e9dbb5c4da4767a1b9 Author: Herbert Xu Date: Wed Jan 13 14:59:03 2016 +0800 crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path This patch allows af_alg_release_parent to be called even for nokey sockets. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/af_alg.c | 9 ++++++++- include/crypto/if_alg.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) commit 70401f4edc331c3c8068fc13b93d784a72de053e Author: Tadeusz Struk Date: Fri Jan 8 10:19:54 2016 -0800 crypto: qat - update init_esram for C3xxx dev type There is no esram on C3xxx devices so we don't need to wait for it to initialize. Signed-off-by: Tadeusz Struk Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_hal.c | 3 +++ 1 file changed, 3 insertions(+) commit c0e77a11ffcadb98d4c0a24ab760ab1bbb7e0680 Author: Pingchao Yang Date: Thu Jan 7 09:39:46 2016 +0800 crypto: qat - fix timeout issues Change the variable times data type and timeout conditon since the value of times should be -1 after loop. Signed-off-by: Yang Pingchao Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_hal.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 91a93eafea3310e7e4ab482327d34b68ad7bfdaa Author: Pingchao Yang Date: Wed Jan 6 17:56:34 2016 +0800 crypto: qat - remove to call get_sram_bar_id for qat_c3xxx Reported-by : Struk, Tadeusz Signed-off-by: Yang Pingchao Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_hal.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6e8d8ecf438792ecf7a3207488fb4eebc4edb040 Author: Herbert Xu Date: Mon Jan 11 21:29:41 2016 +0800 crypto: algif_skcipher - Add key check exception for cipher_null This patch adds an exception to the key check so that cipher_null users may continue to use algif_skcipher without setting a key. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_skcipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1383cd86a062fc798899ab20f0ec2116cce39cb Author: Herbert Xu Date: Mon Jan 11 21:26:50 2016 +0800 crypto: skcipher - Add crypto_skcipher_has_setkey This patch adds a way for skcipher users to determine whether a key is required by a transform. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/skcipher.c | 2 ++ include/crypto/skcipher.h | 7 +++++++ 2 files changed, 9 insertions(+) commit 6de62f15b581f920ade22d758f4c338311c2f0d4 Author: Herbert Xu Date: Fri Jan 8 21:31:04 2016 +0800 crypto: algif_hash - Require setkey before accept(2) Hash implementations that require a key may crash if you use them without setting a key. This patch adds the necessary checks so that if you do attempt to use them without a key that we return -ENOKEY instead of proceeding. This patch also adds a compatibility path to support old applications that do acept(2) before setkey. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_hash.c | 201 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 193 insertions(+), 8 deletions(-) commit a5596d6332787fd383b3b5427b41f94254430827 Author: Herbert Xu Date: Fri Jan 8 21:28:26 2016 +0800 crypto: hash - Add crypto_ahash_has_setkey This patch adds a way for ahash users to determine whether a key is required by a crypto_ahash transform. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/ahash.c | 5 ++++- crypto/shash.c | 4 +++- include/crypto/hash.h | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) commit a0fa2d037129a9849918a92d91b79ed6c7bd2818 Author: Herbert Xu Date: Mon Jan 4 13:36:12 2016 +0900 crypto: algif_skcipher - Add nokey compatibility path This patch adds a compatibility path to support old applications that do acept(2) before setkey. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/algif_skcipher.c | 149 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 144 insertions(+), 5 deletions(-) commit 37766586c965d63758ad542325a96d5384f4a8c9 Author: Herbert Xu Date: Mon Jan 4 13:35:18 2016 +0900 crypto: af_alg - Add nokey compatibility path This patch adds a compatibility path to support old applications that do acept(2) before setkey. Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/af_alg.c | 13 ++++++++++++- include/crypto/if_alg.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) commit a383292c86663bbc31ac62cc0c04fc77504636a6 Author: Herbert Xu Date: Wed Dec 30 20:24:17 2015 +0800 crypto: af_alg - Fix socket double-free when accept fails When we fail an accept(2) call we will end up freeing the socket twice, once due to the direct sk_free call and once again through newsock. This patch fixes this by removing the sk_free call. Cc: stable@vger.kernel.org Reported-by: Dmitry Vyukov Signed-off-by: Herbert Xu crypto/af_alg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c840ac6af3f8713a71b4d2363419145760bd6044 Author: Herbert Xu Date: Wed Dec 30 11:47:53 2015 +0800 crypto: af_alg - Disallow bind/setkey/... after accept(2) Each af_alg parent socket obtained by socket(2) corresponds to a tfm object once bind(2) has succeeded. An accept(2) call on that parent socket creates a context which then uses the tfm object. Therefore as long as any child sockets created by accept(2) exist the parent socket must not be modified or freed. This patch guarantees this by using locks and a reference count on the parent socket. Any attempt to modify the parent socket will fail with EBUSY. Cc: stable@vger.kernel.org Reported-by: Dmitry Vyukov Signed-off-by: Herbert Xu crypto/af_alg.c | 35 ++++++++++++++++++++++++++++++++--- include/crypto/if_alg.h | 8 +++----- 2 files changed, 35 insertions(+), 8 deletions(-) commit dd504589577d8e8e70f51f997ad487a4cb6c026f Author: Herbert Xu Date: Fri Dec 25 15:40:05 2015 +0800 crypto: algif_skcipher - Require setkey before accept(2) Some cipher implementations will crash if you try to use them without calling setkey first. This patch adds a check so that the accept(2) call will fail with -ENOKEY if setkey hasn't been done on the socket yet. Cc: stable@vger.kernel.org Reported-by: Dmitry Vyukov Signed-off-by: Herbert Xu Tested-by: Dmitry Vyukov crypto/algif_skcipher.c | 48 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) commit 6f6abd360603aff043352db90c28748c8c46560e Author: Robert Jarzmik Date: Sat Dec 19 13:14:31 2015 +0100 video: fbdev: pxafb: fix out of memory error path As seen by Julia, the initial allocation memory is not checked anymore after commit "video: fbdev: pxafb: initial devicetree conversion". Introduce back the removed test. Reported-by: Julia Lawall Signed-off-by: Robert Jarzmik Signed-off-by: Tomi Valkeinen drivers/video/fbdev/pxafb.c | 2 ++ 1 file changed, 2 insertions(+) commit db8948e653e12b218058bb6696f4a33fa7845f64 Author: Takashi Iwai Date: Mon Jan 18 09:17:30 2016 +0100 ALSA: hda - Fix bass pin fixup for ASUS N550JX ASUS N550JX (PCI SSID 1043:13df) requires the same fixup for a bass speaker output pin as other N550 models. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110001 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 5807fcaa9bf7dd87241df739161c119cf78a6bc4 Merge: 2d663b5 acb2cfd Author: Linus Torvalds Date: Sun Jan 17 19:13:15 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem updates from James Morris: - EVM gains support for loading an x509 cert from the kernel (EVM_LOAD_X509), into the EVM trusted kernel keyring. - Smack implements 'file receive' process-based permission checking for sockets, rather than just depending on inode checks. - Misc enhancments for TPM & TPM2. - Cleanups and bugfixes for SELinux, Keys, and IMA. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (41 commits) selinux: Inode label revalidation performance fix KEYS: refcount bug fix ima: ima_write_policy() limit locking IMA: policy can be updated zero times selinux: rate-limit netlink message warnings in selinux_nlmsg_perm() selinux: export validatetrans decisions gfs2: Invalid security labels of inodes when they go invalid selinux: Revalidate invalid inode security labels security: Add hook to invalidate inode security labels selinux: Add accessor functions for inode->i_security security: Make inode argument of inode_getsecid non-const security: Make inode argument of inode_getsecurity non-const selinux: Remove unused variable in selinux_inode_init_security keys, trusted: seal with a TPM2 authorization policy keys, trusted: select hash algorithm for TPM2 chips keys, trusted: fix: *do not* allow duplicate key options tpm_ibmvtpm: properly handle interrupted packet receptions tpm_tis: Tighten IRQ auto-probing tpm_tis: Refactor the interrupt setup tpm_tis: Get rid of the duplicate IRQ probing code ... commit 8a7b6a778a8519a879c7b6764a11c0d39eead95f Author: Dave Jiang Date: Wed Jan 13 13:29:48 2016 -0700 ntb: ntb perf tool Providing raw performance data via a tool that directly access data from NTB w/o any software overhead. This allows measurement of the hardware performance limit. In revision one we are only doing single direction CPU and DMA writes. Eventually we will provide bi-directional writes. The measurement using DMA engine for NTB performance measure does not measure the raw performance of DMA engine over NTB due to software overhead. But it should provide the peak performance through the Linux DMA driver. Signed-off-by: Dave Jiang Tested-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/test/Kconfig | 8 + drivers/ntb/test/Makefile | 1 + drivers/ntb/test/ntb_perf.c | 748 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 757 insertions(+) commit 2d663b55816e5c1d211a77fff90687053fe78aac Merge: 25eedab cb74ed2 Author: Linus Torvalds Date: Sun Jan 17 18:48:49 2016 -0800 Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit Pull audit updates from Paul Moore: "Seven audit patches for 4.5, all very minor despite the diffstat. The diffstat churn for linux/audit.h can be attributed to needing to reshuffle the linux/audit.h header to fix the seccomp auditing issue (see the commit description for details). Besides the seccomp/audit fix, most of the fixes are around trying to improve the connection with the audit daemon and a Kconfig simplification. Nothing crazy, and everything passes our little audit-testsuite" * 'upstream' of git://git.infradead.org/users/pcmoore/audit: audit: always enable syscall auditing when supported and audit is enabled audit: force seccomp event logging to honor the audit_enabled flag audit: Delete unnecessary checks before two function calls audit: wake up threads if queue switched from limited to unlimited audit: include auditd's threads in audit_log_start() wait exception audit: remove audit_backlog_wait_overflow audit: don't needlessly reset valid wait time commit 25eedabe019851bc513abd601ed514df524cb482 Author: Linus Torvalds Date: Sun Jan 17 18:33:15 2016 -0800 vm: fix incorrect unlock error path in madvise_free_huge_pmd Commit b8d3c4c3009d ("mm/huge_memory.c: don't split THP page when MADV_FREE syscall is called") introduced this new function, but got the error handling for when pmd_trans_huge_lock() fails wrong. In the failure case, the lock has not been taken, and we should not unlock on the way out. Cc: Minchan Kim Cc: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c671e1e30259da587d7a0162895200601979ee65 Author: Dave Airlie Date: Mon Jan 18 09:10:42 2016 +1000 drm/vc4: fix warning in validate printf. This just fixes a warning on 64-bit builds: drivers/gpu/drm/vc4/vc4_validate.c: In function ‘validate_gl_shader_rec’: drivers/gpu/drm/vc4/vc4_validate.c:864:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=] Reported-by: Linus Torvalds Signed-off-by: Dave Airlie Signed-off-by: Linus Torvalds drivers/gpu/drm/vc4/vc4_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c61f30a255550bbfc6b83c1ca720661489cac4c0 Author: Geert Uytterhoeven Date: Fri Dec 18 11:51:36 2015 +0100 ARM: dts: armadillo800eva Correct extal1 frequency to 24 MHz On r8a7740/armadillo, actual clock rates are ca. 4% lower than reported by /sys/kernel/debug/clk/clk_summary. Correct the extal1 frequency from 25 MHz to 24 MHz to fix this. This matches the Armadillo-800 EVA Product Manual, which claims the main crystal runs at 24 MHz, and the old legacy/reference board code. Fixes: 25aa7ba3fdfb ("ARM: shmobile: armadillo800eva: Sync DTS") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 484bb6c969523aa547d854bb57104339ee4aa800 Author: Andrzej Hajda Date: Thu Jan 14 09:59:02 2016 +0100 drm/rockchip/dsi: fix handling mipi_dsi_pixel_format_to_bpp result The function can return negative value so it should be assigned to signed variable. The problem has been detected using patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci. Signed-off-by: Andrzej Hajda Reviewed-by: Chris Zhong drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c7647f8681feeb6c0957e3cf5daed1fbf8b3a5af Author: John Keeping Date: Tue Jan 12 18:05:18 2016 +0000 drm/rockchip: vop: fix mask when updating interrupts Commit dbb3d94 (drm/rockchip: vop: move interrupt registers into vop_data) introduced new macros for updating the interrupt control registers but these always use the mask from the register definition without refining it for the particular bits that are being changed. This means that whenever we enable/disable a particular interrupt we end up disabling all of the others as a side effect. Signed-off-by: John Keeping drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 63087aae5a7976a4557d16873146eae03948ec74 Author: Mark Yao Date: Tue Jan 12 16:04:39 2016 +0800 drm/rockchip: cleanup unnecessary export symbol Now rockchip_drm_vop.c is build into rockchipdrm.ko, so no need to export following symbol anymore: rockchip_drm_dma_attach_device rockchip_drm_dma_detach_device rockchip_drm_dma_attach_device rockchip_drm_dma_detach_device rockchip_register_crtc_funcs rockchip_unregister_crtc_funcs rockchip_fb_get_gem_obj Signed-off-by: Mark Yao drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ---- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 1 - 2 files changed, 5 deletions(-) commit ce90d092bcd96b646b370121f0f1508270627f98 Author: Mark Yao Date: Tue Jan 12 15:51:12 2016 +0800 drm/rockchip: Don't build rockchip_drm_vop as modules rockchip_drm_vop's module init had moved to rockchip_vop_reg.c so no need to build rockchip_drm_vop.ko Signed-off-by: Mark Yao drivers/gpu/drm/rockchip/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e6e4a556161b709c01f14b033c86dfefe28c2d3c Author: Martin Blumenstingl Date: Fri Jan 15 01:55:24 2016 +0100 net: phy: at803x: Add the interrupt register bit definitions Also use them instead of a magic value when enabling the interrupts. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit a46bd63bc13b2190b343706d78deab220d5c4d45 Author: Martin Blumenstingl Date: Fri Jan 15 01:55:23 2016 +0100 net: phy: at803x: Clean up duplicate register definitions Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 2e5f9f281ee8369f56d403b4a52942f19b6978f8 Author: Martin Blumenstingl Date: Fri Jan 15 01:55:22 2016 +0100 net: phy: at803x: Allow specifying the RGMII RX clock delay via phy mode at803x currently automatically enables the RGMII TX clock delay when the phy interface mode is PHY_INTERFACE_MODE_RGMII_TXID. The same should be done when PHY_INTERFACE_MODE_RGMII_ID is specified. Use a similar logic to enable the RGMII RX clock delay as well. at803x_context_{save,restore} were not touched because these are only used on AR8030 which is a RMII phy (RGMII clock delays are irrelevant). Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 63 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 9 deletions(-) commit e15bb4c64ddbf62122ef906732b96ae31135f156 Author: Martin Blumenstingl Date: Fri Jan 15 01:55:21 2016 +0100 net: phy: at803x: Don't set gbit features for the AR8030 phy The 8030 is only a "RMII Fast Ethernet PHY", thus it must not have the SUPPORTED_1000* bits set. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42ff712bc0c3d7cd60d29b319aecd2d2c8cc75d4 Author: Zi Shen Lim Date: Wed Jan 13 23:33:22 2016 -0800 arm64: bpf: add extra pass to handle faulty codegen Code generation functions in arch/arm64/kernel/insn.c previously BUG_ON invalid parameters. Following change of that behavior, now we need to handle the error case where AARCH64_BREAK_FAULT is returned. Instead of error-handling on every emit() in JIT, we add a new validation pass at the end of JIT compilation. There's no point in running JITed code at run-time only to trap due to AARCH64_BREAK_FAULT. Instead, we drop this failed JIT compilation and allow the system to gracefully fallback on the BPF interpreter. Signed-off-by: Zi Shen Lim Suggested-by: Alexei Starovoitov Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit c94ae4f7c5ec6b6fddde1c08809d5e32a963d7f3 Author: Zi Shen Lim Date: Wed Jan 13 23:33:21 2016 -0800 arm64: insn: remove BUG_ON from codegen During code generation, we used to BUG_ON unknown/unsupported encoding or invalid parameters. Instead, now we report these as errors and simply return the instruction AARCH64_BREAK_FAULT. Users of these codegen helpers should check for and handle this failure condition as appropriate. Otherwise, unhandled codegen failure will result in trapping at run-time due to AARCH64_BREAK_FAULT, which is arguably better than a BUG_ON. Signed-off-by: Zi Shen Lim Acked-by: Will Deacon Signed-off-by: David S. Miller arch/arm64/kernel/insn.c | 165 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 112 insertions(+), 53 deletions(-) commit dd7445ad6be3809565272b0e724f2f00c2de1989 Author: Xin Long Date: Sat Jan 16 20:17:17 2016 +0800 sctp: the temp asoc's transports should not be hashed/unhashed Re-establish the previous behavior and avoid hashing temporary asocs by checking t->asoc->temp in sctp_(un)hash_transport. Also, remove the check of t->asoc->temp in __sctp_lookup_association, since they are never hashed now. Fixes: 4f0087812648 ("sctp: apply rhashtable api to send/recv path") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Reported-by: Vlad Yasevich Signed-off-by: David S. Miller net/sctp/endpointola.c | 2 +- net/sctp/input.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 984065055e6e39f8dd812529e11922374bd39352 Merge: 12768c1 1df59b8 Author: Linus Torvalds Date: Sun Jan 17 13:40:25 2016 -0800 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "This is the main drm pull request for 4.5. I don't think I've missed anything too major, I'm mostly back at work now but I'll probably get some sleep in 5 years time. Summary: New drivers: - etnaviv: GPU driver for the 3D core on the Vivante core used in numerous ARM boards. Highlights: Core: - Atomic suspend/resume helpers - Move the headers to using userspace friendlier types. - Documentation updates - Lots of struct_mutex removal. - Bunch of DP MST fixes from AMD. Panel: - More DSI helpers - Support for some new basic panels i915: - Basic Kabylake support - DP link training and detect code refactoring - fbc/psr fixes - FIFO underrun fixes - SDE interrupt handling fixes - dma-buf/fence support in pageflip path. - GPU side for MST audio support radeon/amdgpu: - Drop UMS support - GPUVM/Scheduler optimisations - Initial Powerplay support for Tonga/Fiji/CZ/ST - ACP audio prerequisites nouveau: - GK20a instmem improvements - PCIE link speed change support msm: - DSI support for msm8960/apq8064 tegra: - Host1X support for Tegra210 SoC vc4: - 3D acceleration support armada: - Get rid of struct mutex tda998x: - Atomic modesetting support - TMDS clock limitations omapdrm: - Atomic modesetting support - improved TILER performance rockchip: - RK3036 VOP support - Atomic modesetting support - Synopsys DW MIPI DSI support exynos: - Runtime PM support - of_graph binding for DP panels - Cleanup of IPP code - Configurable plane support - Kernel panic fixes at release time" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (711 commits) drm/fb_cma_helper: Remove implicit call to disable_unused_functions drm/amdgpu: add missing irq.h include drm/vmwgfx: Fix a width / pitch mismatch on framebuffer updates drm/vmwgfx: Fix an incorrect lock check drm: nouveau: fix nouveau_debugfs_init prototype drm/nouveau/pci: fix check in nvkm_pcie_set_link drm/amdgpu: validate duplicates first drm/amdgpu: move VM page tables to the LRU end on CS v2 drm/ttm: add ttm_bo_move_to_lru_tail function v2 drm/ttm: fix adding foreign BOs to the swap LRU drm/ttm: fix adding foreign BOs to the LRU during init v2 drm/radeon: use kobj_to_dev() drm/amdgpu: use kobj_to_dev() drm/amdgpu/cz: force vce clocks when sclks are forced drm/amdgpu/cz: force uvd clocks when sclks are forced drm/amdgpu/cz: add code to enable forcing VCE clocks drm/amdgpu/cz: add code to enable forcing UVD clocks drm/amdgpu: fix lost sync_to if scheduler is enabled. drm/amd/powerplay: fix static checker warning for return meaningless value. drm/sysfs: use kobj_to_dev() ... commit 12768c1e2c83b05ea1658470045789a14b6edf4c Merge: a4eff16 1b1fe54 Author: Linus Torvalds Date: Sun Jan 17 13:31:50 2016 -0800 Merge tag 'linux-kselftest-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: "This 14 patch update: - adds a new test for intel_pstate driver - adds empty string and async test cases to firmware class tests - fixes and cleans up several existing tests" * tag 'linux-kselftest-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: firmware: add empty string and async tests firmware: actually return NULL on failed request_firmware_nowait() test: firmware_class: add asynchronous request trigger test: firmware_class: use kstrndup() where appropriate test: firmware_class: report errors properly on failure selftests/seccomp: fix 32-bit build warnings add breakpoints/.gitignore add ptrace/.gitignore update .gitignore in selftests/timers update .gitignore in selftests/vm tools, testing, add test for intel_pstate driver selftest/ipc: actually test it selftests/capabilities: actually test it selftests/capabilities: clean up for Makefile commit a4eff16c54886c11972d6396ce8447b99e097343 Merge: 0cbeafb b0e5513 Author: Linus Torvalds Date: Sun Jan 17 13:20:54 2016 -0800 Merge branch 'parisc-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parsic updates from Helge Deller: "This patchset includes two major fixes which are both scheduled for stable: First, __ARCH_SI_PREAMBLE_SIZE was defined with a wrong value. Second, huge page pte and TLB changes needed protection with a spinlock. Other than that there are just some trivial optimizations and cleanups" * 'parisc-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Protect huge page pte changes with spinlocks parisc: Imporove debug info about space registers and TLB configuration parisc: Drop parisc-specific NSIGTRAP define parisc: Fix __ARCH_SI_PREAMBLE_SIZE parisc: Reduce overhead of parisc_requires_coherency() parisc: Initialize PCI bridge cache line and default latency commit 1df59b8497f47495e873c23abd6d3d290c730505 Merge: 28f0360 48ea1e3 Author: Dave Airlie Date: Mon Jan 18 07:02:19 2016 +1000 Merge tag 'drm-intel-next-fixes-2016-01-14' of git://anongit.freedesktop.org/drm-intel into drm-next misc i915 fixes all over the place. * tag 'drm-intel-next-fixes-2016-01-14' of git://anongit.freedesktop.org/drm-intel: drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1 page drm/i915: Widen return value for reservation_object_wait_timeout_rcu to long. drm/i915: intel_hpd_init(): Fix suspend/resume reprobing drm/i915: shut up gen8+ SDE irq dmesg noise, again drm/i915: Restore inhibiting the load of the default context drm/i915: Tune down rpm wakelock debug checks drm/i915: Avoid writing relocs with addresses in non-canonical form drm/i915: Move Braswell stop_machine GGTT insertion workaround commit 28f03607bb2e7a3dab71d0a377fd13f6ed3ebb9f Merge: e9c5e74 4314e19 Author: Dave Airlie Date: Mon Jan 18 07:01:16 2016 +1000 Merge tag 'topic/drm-misc-2016-01-17' of git://anongit.freedesktop.org/drm-intel into drm-next Since your main drm-next pull isn't out of the door yet I figured I might as well flush out drm-misc instead of delaying for 4.6. It's really just random stuff all over, biggest thing probably connector_mask tracking from Maarten. * tag 'topic/drm-misc-2016-01-17' of git://anongit.freedesktop.org/drm-intel: (24 commits) drm/fb_cma_helper: Remove implicit call to disable_unused_functions drm/sysfs: use kobj_to_dev() drm/i915: Init power domains early in driver load drm: Do not set connector->encoder in drivers apple-gmux: Add initial documentation drm: move MODULE_PARM_DESC to other file drm/edid: index CEA/HDMI mode tables using the VIC drm/atomic: Remove drm_atomic_connectors_for_crtc. drm/i915: Update connector_mask during readout, v2. drm: Remove opencoded drm_gem_object_release_handle() drm: Do not set outparam on error during GEM handle allocation drm/docs: more leftovers from the big vtable documentation pile drm/atomic-helper: Reject legacy flips on a disabled pipe drm/atomic: add connector mask to drm_crtc_state. drm/tegra: Use __drm_atomic_helper_reset_connector for subclassing connector state, v2. drm/atomic: Add __drm_atomic_helper_connector_reset, v2. drm/i915: Set connector_state->connector using the helper. drm: Use a normal idr allocation for the obj->name drm: Only bump object-reference count when adding first handle drm: Balance error path for GEM handle allocation ... commit 0cbeafb245ca568bc0765645aa64f0451b716657 Merge: 58cf279a 06b031d Author: Linus Torvalds Date: Sun Jan 17 12:58:52 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge second patch-bomb from Andrew Morton: - more MM stuff: - Kirill's page-flags rework - Kirill's now-allegedly-fixed THP rework - MADV_FREE implementation - DAX feature work (msync/fsync). This isn't quite complete but DAX is new and it's good enough and the guys have a handle on what needs to be done - I expect this to be wrapped in the next week or two. - some vsprintf maintenance work - various other misc bits * emailed patches from Andrew Morton : (145 commits) printk: change recursion_bug type to bool lib/vsprintf: factor out %pN[F] handler as netdev_bits() lib/vsprintf: refactor duplicate code to special_hex_number() printk-formats.txt: remove unimplemented %pT printk: help pr_debug and pr_devel to optimize out arguments lib/test_printf.c: test dentry printing lib/test_printf.c: add test for large bitmaps lib/test_printf.c: account for kvasprintf tests lib/test_printf.c: add a few number() tests lib/test_printf.c: test precision quirks lib/test_printf.c: check for out-of-bound writes lib/test_printf.c: don't BUG lib/kasprintf.c: add sanity check to kvasprintf lib/vsprintf.c: warn about too large precisions and field widths lib/vsprintf.c: help gcc make number() smaller lib/vsprintf.c: expand field_width to 24 bits lib/vsprintf.c: eliminate potential race in string() lib/vsprintf.c: move string() below widen_string() lib/vsprintf.c: pull out padding code from dentry_name() printk: do cond_resched() between lines while outputting to consoles ... commit 58cf279acac3080ce03eeea5ca268210b3165fe1 Merge: 6606b34 c474e34 Author: Linus Torvalds Date: Sun Jan 17 12:32:01 2016 -0800 Merge tag 'gpio-v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "Here is the bulk of GPIO changes for v4.5. Notably there are big refactorings mostly by myself, aimed at getting the gpio_chip into a shape that makes me believe I can proceed to preserve state for a proper userspace ABI (character device) that has already been proposed once, but resulted in the feedback that I need to go back and restructure stuff. So I've been restructuring stuff. On the way I ran into brokenness (return code from the get_value() callback) and had to fix it. Also, refactored generic GPIO to be simpler. Some of that is still waiting to trickle down from the subsystems all over the kernel that provide random gpio_chips, I've touched every single GPIO driver in the kernel now, oh man I didn't know I was responsible for so much... Apart from that we're churning along as usual. I took some effort to test and retest so it should merge nicely and we shook out a couple of bugs in -next. Infrastructural changes: - In struct gpio_chip, rename the .dev node to .parent to better reflect the fact that this is not the GPIO struct device abstraction. We will add that soon so this would be totallt confusing. - It was noted that the driver .get_value() callbacks was sometimes reporting negative -ERR values to the gpiolib core, expecting them to be propagated to consumer gpiod_get_value() and gpio_get_value() calls. This was not happening, so as there was a mess of drivers returning negative errors and some returning "anything else than zero" to indicate that a line was active. As some would have bit 31 set to indicate "line active" it clashed with negative error codes. This is fixed by the largeish series clamping values in all drivers with !!value to [0,1] and then augmenting the code to propagate error codes to consumers. (Includes some ACKed patches in other subsystems.) - Add a void *data pointer to struct gpio_chip. The container_of() design pattern is indeed very nice, but we want to reform the struct gpio_chip to be a non-volative, stateless business, and keep states internal to the gpiolib to be able to hold on to the state when adding a proper userspace ABI (character device) further down the road. To achieve this, drivers need a handle at the internal state that is not dependent on their struct gpio_chip() so we add gpiochip_add_data() and gpiochip_get_data() following the pattern of many other subsystems. All the "use gpiochip data pointer" patches transforms drivers to this scheme. - The Generic GPIO chip header has been merged into the general header, and the custom header for that removed. Instead of having a separate mm_gpio_chip struct for these generic drivers, merge that into struct gpio_chip, simplifying the code and removing the need for separate and confusing includes. Misc improvements: - Stabilize the way GPIOs are looked up from the ACPI legacy specification. - Incremental driver features for PXA, PCA953X, Lantiq (patches from the OpenWRT community), RCAR, Zynq, PL061, 104-idi-48 New drivers: - Add a GPIO chip to the ALSA SoC AC97 driver. - Add a new Broadcom NSP SoC driver (this lands in the pinctrl dir, but the branch is merged here too to account for infrastructural changes). - The sx150x driver now supports the sx1502" * tag 'gpio-v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (220 commits) gpio: generic: make bgpio_pdata always visible gpiolib: fix chip order in gpio list gpio: mpc8xxx: Do not use gpiochip_get_data() in mpc8xxx_gpio_save_regs() gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs() gpio: brcmstb: Allow building driver for BMIPS_GENERIC gpio: brcmstb: Set endian flags for big-endian MIPS gpio: moxart: fix build regression gpio: xilinx: Do not use gpiochip_get_data() in xgpio_save_regs() leds: pca9532: use gpiochip data pointer leds: tca6507: use gpiochip data pointer hid: cp2112: use gpiochip data pointer bcma: gpio: use gpiochip data pointer avr32: gpio: use gpiochip data pointer video: fbdev: via: use gpiochip data pointer gpio: pch: Optimize pch_gpio_get() Revert "pinctrl: lantiq: Implement gpio_chip.to_irq" pinctrl: nsp-gpio: use gpiochip data pointer pinctrl: vt8500-wmt: use gpiochip data pointer pinctrl: exynos5440: use gpiochip data pointer pinctrl: at91-pio4: use gpiochip data pointer ... commit 6606b342febfd470b4a33acb73e360eeaca1d9bb Merge: a016af2 ac36856 Author: Linus Torvalds Date: Sun Jan 17 12:15:38 2016 -0800 Merge git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: "This adds following items: - watchdog restart handler support - watchdog reboot notifier support - watchdog sysfs attributes - support for the following new devices: AMD Mullins platform, AMD Carrizo platform, meson8b SoC, CSRatlas7, TS-4800, Alphascale asm9260-wdt, Zodiac, Sigma Designs SMP86xx/SMP87xx - Changes in refcounting for the watchdog core - watchdog core improvements - and small fixes" * git://www.linux-watchdog.org/linux-watchdog: (60 commits) watchdog: asm9260: remove __init and __exit annotations watchdog: Drop pointer to watchdog device from struct watchdog_device watchdog: ziirave: Use watchdog infrastructure to create sysfs attributes watchdog: Add support for creating driver specific sysfs attributes watchdog: kill unref/ref ops watchdog: stmp3xxx: Remove unused variables watchdog: add MT7621 watchdog support hwmon: (sch56xx) Drop watchdog driver data reference count callbacks watchdog: da9055_wdt: Drop reference counting watchdog: da9052_wdt: Drop reference counting watchdog: Separate and maintain variables based on variable lifetime watchdog: diag288: Stop re-using watchdog core internal flags watchdog: Create watchdog device in watchdog_dev.c watchdog: qcom-wdt: Do not set 'dev' in struct watchdog_device watchdog: mena21: Do not use device pointer from struct watchdog_device watchdog: gpio: Do not use device pointer from struct watchdog_device watchdog: tangox: Print info message using pointer to platform device watchdog: bcm2835_wdt: Drop log message if watchdog is stopped devicetree: watchdog: add binding for Sigma Designs SMP8642 watchdog watchdog: add support for Sigma Designs SMP86xx/SMP87xx ... commit a016af2e70bfca23f2f5de7d8708157b86ea374d Merge: e535d74 c3b1681 Author: Linus Torvalds Date: Sun Jan 17 12:05:31 2016 -0800 Merge tag 'sound-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "We've had quite busy weeks in this cycle. Looking at ALSA core, the significant changes are a few fixes wrt timer and sequencer ioctls that have been revealed by fuzzer recently. Other than that, ASoC core got a few updates about DAI link handling, but these are rather straightforward refactoring. In drivers scene, ASoC received quite lots of new drivers in addition to bunch of updates for still ongoing Intel Skylake support and topology API. HD-audio gained a new HDMI/DP hotplug notification via component. FireWire got a pile of code refactoring/updates with SCS.1x driver integration. More highlights are shown below. [ NOTE: this contains also many commits for DRM. This is due to the pull of drm stable branch into sound tree, as the base of i915 audio component work for HD-audio. The highlights below don't contain these DRM changes, as these are supposed to be pulled via drm tree in anyway sooner or later. ] Core: - Handful fixes to harden ALSA timer and sequencer ioctls against races reported by syzkaller fuzzer - Irq description string can be unique to each card; only for HD-audio for now ASoC: - Conversion of the array of DAI links to a list for supporting dynamically adding and removing DAI links - Topology API enhancements to make everything more component based and being able to specify PCM links via topology - Some more fixes for the topology code, though it is still not final and ready for enabling in production; we really need to get to the point where that can be done - A pile of changes for Intel SkyLake drivers which hopefully deliver some useful initial functionality for systems with this chipset, though there is more work still to come - Lots of new features and cleanups for the Renesas drivers - ANC support for WM5110 - New drivers: Imagination Technologies IPs, Atmel class D speaker, Cirrus CS47L24 and WM1831, Dialog DA7128, Realtek RT5659 and RT56156, Rockchip RK3036, TI PC3168A, and AMD ACP - Rename PCM1792a driver to be generic pcm179x HD-Audio: - Use audio component for i915 HDMI/DP hotplug handling - On-demand binding with i915 driver - bdl_pos_adj parameter adjustment for Baytrail controllers - Enable power_save_node for CX20722; this shouldn't lead to regression, hopefully - Kabylake HDMI/DP codec support - Quirks for Lenovo E50-80, Dell Latitude E-series, and other Dell machines - A few code refactoring FireWire: - Lots of code cleanup and refactoring - Integrate the support of SCS.1x devices into snd-oxfw driver; snd-scs1x driver is obsoleted USB-audio: - Fix possible NULL dereference at disconnection - A regression fix for Native Instruments devices Misc: - A few code cleanups of fm801 driver" * tag 'sound-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (722 commits) ALSA: timer: Code cleanup ALSA: timer: Harden slave timer list handling ALSA: hda - Add fixup for Dell Latitidue E6540 ALSA: timer: Fix race among timer ioctls ALSA: hda - add codec support for Kabylake display audio codec ALSA: timer: Fix double unlink of active_list ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices ALSA: hda - fix the headset mic detection problem for a Dell laptop ALSA: hda - Fix white noise on Dell Latitude E5550 ALSA: hda_intel: add card number to irq description ALSA: seq: Fix race at timer setup and close ALSA: seq: Fix missing NULL check at remove_events ioctl ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnect ASoC: hdac_hdmi: remove unused hdac_hdmi_query_pin_connlist ASoC: AMD: Add missing include file ALSA: hda - Fixup inverted internal mic for Lenovo E50-80 ALSA: usb: Add native DSD support for Oppo HA-1 ASoC: Make aux_dev more like a generic component ASoC: bcm2835: cleanup includes by ordering them alphabetically ASoC: AMD: Manage ACP 2.x SRAM banks power ... commit e535d74bc50df2357d3253f8f3ca48c66d0d892a Merge: ece6267 ec3fc58 Author: Linus Torvalds Date: Sun Jan 17 11:55:07 2016 -0800 Merge tag 'docs-4.5' of git://git.lwn.net/linux Pull documentation updates from Jon Corbet: "A relatively boring cycle in the docs tree. There's a few kernel-doc fixes and various document tweaks. One patch reaches out of the documentation subtree to fix a comment in init/do_mounts_rd.c. There didn't seem to be anybody more appropriate to take that one, so I accepted it" * tag 'docs-4.5' of git://git.lwn.net/linux: (29 commits) thermal: add description for integral_cutoff unit Documentation: update libhugetlbfs site url Documentation: Explain pci=conf1,conf2 more verbosely DMA-API: fix confusing sentence in Documentation/DMA-API.txt Documentation: translations: update linux cross reference link Documentation: fix typo in CodingStyle init, Documentation: Remove ramdisk_blocksize mentions Documentation-getdelays: Apply a recommendation from "checkpatch.pl" in main() Documentation: HOWTO: update versions from 3.x to 4.x Documentation: remove outdated references from translations Doc: treewide: Fix grammar "a" to "an" Documentation: cpu-hotplug: Fix sysfs mount instructions can-doc: Add hint about getting timestamps Fix CFQ I/O scheduler parameter name in documentation Documentation: arm: remove dead links from Marvell Berlin docs Documentation: HOWTO: update code cross reference link Doc: Docbook/iio: Fix typo in iio.tmpl DocBook: make index.html generation less verbose by default DocBook: Cleanup: remove an unused $(call) line DocBook: Add a help message for DOCBOOKS env var ... commit 0b6e26ce89391327d955a756a7823272238eb867 Author: Doron Tsur Date: Sun Jan 17 11:25:47 2016 +0200 net/mlx5_core: Fix trimming down IRQ number With several ConnectX-4 cards installed on a server, one may receive irqn > 255 from the kernel API, which we mistakenly trim to 8bit. This causes EQ creation failure with the following stack trace: [] dump_stack+0x48/0x64 [] __setup_irq+0x3a1/0x4f0 [] request_threaded_irq+0x120/0x180 [] ? mlx5_eq_int+0x450/0x450 [mlx5_core] [] mlx5_create_map_eq+0x1e4/0x2b0 [mlx5_core] [] alloc_comp_eqs+0xb1/0x180 [mlx5_core] [] mlx5_dev_init+0x5e9/0x6e0 [mlx5_core] [] init_one+0x99/0x1c0 [mlx5_core] [] local_pci_probe+0x4c/0xa0 Fixing it by changing of the irqn type from u8 to unsigned int to support values > 255 Fixes: 61d0e73e0a5a ('net/mlx5_core: Use the the real irqn in eq->irqn') Reported-by: Jiri Pirko Signed-off-by: Doron Tsur Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/cq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 ++- include/linux/mlx5/cq.h | 2 +- include/linux/mlx5/driver.h | 5 +++-- 5 files changed, 10 insertions(+), 8 deletions(-) commit cdb00777ffadb15b06627dd6c3f716a02f6b36e8 Author: Geert Uytterhoeven Date: Sun Jan 17 11:30:37 2016 +0100 tcp_memcontrol: Forward declare cgroup_subsys and mem_cgroup stucts In file included from net/ipv4/tcp_ipv4.c:77 (and many more): include/net/tcp_memcontrol.h:5: warning: ‘struct cgroup_subsys’ declared inside parameter list include/net/tcp_memcontrol.h:5: warning: its scope is only this definition or declaration, which is probably not what you want Add forward declarations for all used structures to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller include/net/tcp_memcontrol.h | 3 +++ 1 file changed, 3 insertions(+) commit 51cbb5242a41700a3f250ecfb48dcfb7e4375ea4 Author: Thomas Gleixner Date: Thu Jan 14 16:54:48 2016 +0000 itimers: Handle relative timers with CONFIG_TIME_LOW_RES proper As Helge reported for timerfd we have the same issue in itimers. We return remaining time larger than the programmed relative time to user space in case of CONFIG_TIME_LOW_RES=y. Use the proper function to adjust the extra time added in hrtimer_start_range_ns(). Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Helge Deller Cc: John Stultz Cc: linux-m68k@lists.linux-m68k.org Cc: dhowells@redhat.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160114164159.528222587@linutronix.de Signed-off-by: Thomas Gleixner kernel/time/itimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 572c39172684c3711e4a03c9a7380067e2b0661c Author: Thomas Gleixner Date: Thu Jan 14 16:54:47 2016 +0000 posix-timers: Handle relative timers with CONFIG_TIME_LOW_RES proper As Helge reported for timerfd we have the same issue in posix timers. We return remaining time larger than the programmed relative time to user space in case of CONFIG_TIME_LOW_RES=y. Use the proper function to adjust the extra time added in hrtimer_start_range_ns(). Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Helge Deller Cc: John Stultz Cc: linux-m68k@lists.linux-m68k.org Cc: dhowells@redhat.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160114164159.450510905@linutronix.de Signed-off-by: Thomas Gleixner kernel/time/posix-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b62526ed11a1fe3861ab98d40b7fdab8981d788a Author: Thomas Gleixner Date: Thu Jan 14 16:54:46 2016 +0000 timerfd: Handle relative timers with CONFIG_TIME_LOW_RES proper Helge reported that a relative timer can return a remaining time larger than the programmed relative time on parisc and other architectures which have CONFIG_TIME_LOW_RES set. This happens because we add a jiffie to the resulting expiry time to prevent short timeouts. Use the new function hrtimer_expires_remaining_adjusted() to calculate the remaining time. It takes that extra added time into account for relative timers. Reported-and-tested-by: Helge Deller Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Cc: linux-m68k@lists.linux-m68k.org Cc: dhowells@redhat.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160114164159.354500742@linutronix.de Signed-off-by: Thomas Gleixner fs/timerfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 203cbf77de59fc8f13502dcfd11350c6d4a5c95f Author: Thomas Gleixner Date: Thu Jan 14 16:54:46 2016 +0000 hrtimer: Handle remaining time proper for TIME_LOW_RES If CONFIG_TIME_LOW_RES is enabled we add a jiffie to the relative timeout to prevent short sleeps, but we do not account for that in interfaces which retrieve the remaining time. Helge observed that timerfd can return a remaining time larger than the relative timeout. That's not expected and breaks userland test programs. Store the information that the timer was armed relative and provide functions to adjust the remaining time. To avoid bloating the hrtimer struct make state a u8, which as a bonus results in better code on x86 at least. Reported-and-tested-by: Helge Deller Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Cc: linux-m68k@lists.linux-m68k.org Cc: dhowells@redhat.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160114164159.273328486@linutronix.de Signed-off-by: Thomas Gleixner include/linux/hrtimer.h | 34 +++++++++++++++++++++++++++--- kernel/time/hrtimer.c | 55 ++++++++++++++++++++++++++++++++---------------- kernel/time/timer_list.c | 2 +- 3 files changed, 69 insertions(+), 22 deletions(-) commit 78c5b2c66758f2dad354fcc59c529954e07f078e Merge: 6c3f5ae 42eff6a Author: David S. Miller Date: Sun Jan 17 01:01:51 2016 -0500 Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== pull request [net]: batman-adv 20160117 here you have a bunch of patches intended for net. This patchset is provided by Sven Eckelmann and it is basically fixing 2 major issues that exist in several parts of the code - that is why we have 8 patches. The first bugfix (patch 1 and 2) is preventing call_rcu from being invoked recursively. This would deceive any user waiting on rcu_barrier() because the latter won't be able to wait for the nested invocation thus triggering any sort of undefined behaviours. The second bugfix (patches from 3 to 8) prevents the code from freeing rcu protected objects without waiting for the proper grace period. This issue can potentially lead to wrong memory access and thus kernel crashes. Unfortunately this bogus code pattern was copy/pasted all around the place when developing new features, therefore Sven diligently created several patches to address each component independently. Given that such bugs were introduced quite some time ago, all the patches except patch 5 should be considered for submission to stable. Included changes: - avoid recursive invocations of call_rcu() which would fool users waiting on rcu_barrier() - prevent immediate kfree of objects used in rcu protected contexts ==================== Signed-off-by: David S. Miller commit 06b031de22d28ae76b2e5bfaf22c56a265a1e106 Author: Sergey Senozhatsky Date: Fri Jan 15 16:59:23 2016 -0800 printk: change recursion_bug type to bool `recursion_bug' is used as recursion_bug toggle, so make it `bool'. Signed-off-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/printk/printk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5b17aecfcdd3dc82c237677f5efc9a44deeaa39e Author: Andy Shevchenko Date: Fri Jan 15 16:59:20 2016 -0800 lib/vsprintf: factor out %pN[F] handler as netdev_bits() Move switch case to the netdev_features_string() and rename it to netdev_bits(). In the future we can extend it as needed. Here we replace the fallback of %pN from '%p' with possible flags to sticter '0x%p' without any flags variation. Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 3cab1e711297c4fbc526ca9b802ef61894c06545 Author: Andy Shevchenko Date: Fri Jan 15 16:59:18 2016 -0800 lib/vsprintf: refactor duplicate code to special_hex_number() special_hex_number() is a helper to print a fixed size type in a hex format with '0x' prefix, zero padding, and small letters. In the module we have already several copies of such code. Consolidate them under special_hex_number() helper. There are couple of differences though. It seems nobody cared about the output in case of CONFIG_KALLSYMS=n, when printing symbol address, because the asked field width is not enough to care last 2 characters in the string represantation of the pointer. Fixed here. The %pNF specifier used to be allowed with a specific field width, though there is neither any user of it nor mention the possibility in the documentation. Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit 64c734be70c0091fa069baf5f2e58db54368f1b3 Author: Rasmus Villemoes Date: Fri Jan 15 16:59:15 2016 -0800 printk-formats.txt: remove unimplemented %pT %pT for task->comm has been proposed (several times, I think), but is not actually implemented. Remove it from printk-formats.txt and add it back if/when it gets implemented. Signed-off-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/printk-formats.txt | 9 --------- 1 file changed, 9 deletions(-) commit fe22cd9b7c980b8b948ec85f034a8668c57ec867 Author: Aaron Conole Date: Fri Jan 15 16:59:12 2016 -0800 printk: help pr_debug and pr_devel to optimize out arguments Currently, pr_debug and pr_devel will not elide function call arguments appearing in calls to the no_printk for these macros. This is because all side effects must be honored before proceeding to the 0-value assignment in no_printk. The behavior is contrary to documentation found in the CodingStyle and the header file where these functions are declared. This patch corrects that behavior by shunting out the call to no_printk completely. The format string is still checked by gcc for correctness, but no code seems to be emitted in common cases. [akpm@linux-foundation.org: remove braces, per Joe] Fixes: 5264f2f75d86 ("include/linux/printk.h: use and neaten no_printk") Signed-off-by: Aaron Conole Reported-by: Dmitry Vyukov Cc: Joe Perches Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/printk.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 251c72345579b82df59eddfa184af53d6830959c Author: Rasmus Villemoes Date: Fri Jan 15 16:59:09 2016 -0800 lib/test_printf.c: test dentry printing Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_printf.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 857cca4d565d85857597ccf0b6f72cf0f06e046c Author: Rasmus Villemoes Date: Fri Jan 15 16:59:06 2016 -0800 lib/test_printf.c: add test for large bitmaps Following "lib/vsprintf.c: expand field_width to 24 bits", let's add a test to see that we now actually support bitmaps with 65536 bits. Signed-off-by: Rasmus Villemoes Acked-by: Kees Cook Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_printf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b79a7db37d560c9e4b6fdb5314cb8b226a2d6567 Author: Rasmus Villemoes Date: Fri Jan 15 16:59:02 2016 -0800 lib/test_printf.c: account for kvasprintf tests These should also count as performed tests. Signed-off-by: Rasmus Villemoes Acked-by: Kees Cook Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_printf.c | 1 + 1 file changed, 1 insertion(+) commit 1ca8e8ebe991ff628d7e03ad4b5a11817a9655d5 Author: Rasmus Villemoes Date: Fri Jan 15 16:58:59 2016 -0800 lib/test_printf.c: add a few number() tests This adds a few tests to test_number, one of which serves to document another deviation from POSIX/C99 (printing 0 with an explicit precision of 0). Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_printf.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit f176eb4ce9d433184178d37a598ffdfe1cee1463 Author: Rasmus Villemoes Date: Fri Jan 15 16:58:56 2016 -0800 lib/test_printf.c: test precision quirks The kernel's printf doesn't follow the standards in a few corner cases (which are probably mostly irrelevant). Add tests that document the current behaviour. Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_printf.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 331e4deb6dfdac50d3f9c4ccbc41b1427335e212 Author: Rasmus Villemoes Date: Fri Jan 15 16:58:53 2016 -0800 lib/test_printf.c: check for out-of-bound writes Add a few padding bytes on either side of the test buffer, and check that these (and the part of the buffer not used) are untouched by vsnprintf. Signed-off-by: Rasmus Villemoes Acked-by: Kees Cook Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_printf.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit fd0515d50ff33865d0f8cdd74510e8bd1aee88ac Author: Rasmus Villemoes Date: Fri Jan 15 16:58:50 2016 -0800 lib/test_printf.c: don't BUG BUG is a completely unnecessarily big hammer, and we're more likely to get the internal bug reported if we just pr_err() and ensure the test suite fails. Signed-off-by: Rasmus Villemoes Acked-by: Kees Cook Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_printf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8e2a2bfdb86ecb2421e3dd18d0fbbb42f2d943ad Author: Rasmus Villemoes Date: Fri Jan 15 16:58:47 2016 -0800 lib/kasprintf.c: add sanity check to kvasprintf kasprintf relies on being able to replay the formatting and getting the same result (in particular, the same length). This will almost always work, but it is possible that the object pointed to by a %s or %p argument changed under us (so we might get truncated output). Add a somewhat paranoid sanity check and let's see if it ever triggers. Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/kasprintf.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 4d72ba014b4b0913f448ccaaaa2e8b39c54e3738 Author: Rasmus Villemoes Date: Fri Jan 15 16:58:44 2016 -0800 lib/vsprintf.c: warn about too large precisions and field widths The field width is overloaded to pass some extra information for some %p extensions (e.g. #bits for %pb). But we might silently truncate the passed value when we stash it in struct printf_spec (see e.g. "lib/vsprintf.c: expand field_width to 24 bits"). Hopefully 23 value bits should now be enough for everybody, but if not, let's make some noise. Do the same for the precision. In both cases, clamping seems more sensible than truncating. While, according to POSIX, "A negative precision is taken as if the precision were omitted.", the kernel's printf has always treated that case as if the precision was 0, so we use that as lower bound. For the field width, the smallest representable value is actually -(1<<23), but a negative field width means 'set the LEFT flag and use the absolute value', so we want the absolute value to fit. Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit 1c7a8e622e84c9164dd665f5ad4879eac71bdc1e Author: Rasmus Villemoes Date: Fri Jan 15 16:58:41 2016 -0800 lib/vsprintf.c: help gcc make number() smaller One consequence of the reorganization of struct printf_spec to make field_width 24 bits was that number() gained about 180 bytes. Since spec is never passed to other functions, we can help gcc make number() lose most of that extra weight by using local variables for the field width and precision. Reviewed-by: Andy Shevchenko Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit d048419311ff16ba420f4b1bdf93a3d74057b53a Author: Rasmus Villemoes Date: Fri Jan 15 16:58:37 2016 -0800 lib/vsprintf.c: expand field_width to 24 bits Maurizio Lombardi reported a problem [1] with the %pb extension: It doesn't work for sufficiently large bitmaps, since the size is stashed in the field_width field of the struct printf_spec, which is currently an s16. Concretely, this manifested itself in /sys/bus/pseudo/drivers/scsi_debug/map being empty, since the bitmap printer got a size of 0, which is the 16 bit truncation of the actual bitmap size. We do want to keep struct printf_spec at 8 bytes so that it can cheaply be passed by value. The qualifier field is only used for internal bookkeeping in format_decode, so we might as well use a local variable for that. This gives us an additional 8 bits, which we can then use for the field width. To stay in 8 bytes, we need to do a little rearranging and make the type member a bitfield as well. For consistency, change all the members to bit fields. gcc doesn't generate much worse code with these changes (in fact, bloat-o-meter says we save 300 bytes - which I think is a little surprising). I didn't find a BUILD_BUG/compiletime_assertion/... which would work outside function context, so for now I just open-coded it. [1] http://thread.gmane.org/gmane.linux.kernel/2034835 [akpm@linux-foundation.org: avoid open-coded BUILD_BUG_ON] Signed-off-by: Rasmus Villemoes Reported-by: Maurizio Lombardi Acked-by: Tejun Heo Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 34fc8b9076254513e00607134792a1b67483d2cf Author: Rasmus Villemoes Date: Fri Jan 15 16:58:34 2016 -0800 lib/vsprintf.c: eliminate potential race in string() If the string corresponding to a %s specifier can change under us, we might end up copying a \0 byte to the output buffer. There might be callers who expect the output buffer to contain a genuine C string whose length is exactly the snprintf return value (assuming truncation hasn't happened or has been checked for). We can avoid this by only passing over the source string once, stopping the first time we meet a nul byte (or when we reach the given precision), and then letting widen_string() handle left/right space padding. As a small bonus, this code reuse also makes the generated code slightly smaller. Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit 95508cfa10503bbe5adb78bd1b2b56a01ab3dd2d Author: Rasmus Villemoes Date: Fri Jan 15 16:58:31 2016 -0800 lib/vsprintf.c: move string() below widen_string() This is pure code movement, making sure the widen_string() helper is defined before the string() function. Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 62 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit cfccde04e28d26e9f102e535b7358bf6cf3bc6fb Author: Rasmus Villemoes Date: Fri Jan 15 16:58:28 2016 -0800 lib/vsprintf.c: pull out padding code from dentry_name() Pull out the logic in dentry_name() which handles field width space padding, in preparation for reusing it from string(). Rename the widen() helper to move_right(), since it is used for handling the !(flags & LEFT) case. Signed-off-by: Rasmus Villemoes Cc: Al Viro Cc: Andy Shevchenko Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Maurizio Lombardi Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) commit 8d91f8b15361dfb438ab6eb3b319e2ded43458ff Author: Tejun Heo Date: Fri Jan 15 16:58:24 2016 -0800 printk: do cond_resched() between lines while outputting to consoles @console_may_schedule tracks whether console_sem was acquired through lock or trylock. If the former, we're inside a sleepable context and console_conditional_schedule() performs cond_resched(). This allows console drivers which use console_lock for synchronization to yield while performing time-consuming operations such as scrolling. However, the actual console outputting is performed while holding irq-safe logbuf_lock, so console_unlock() clears @console_may_schedule before starting outputting lines. Also, only a few drivers call console_conditional_schedule() to begin with. This means that when a lot of lines need to be output by console_unlock(), for example on a console registration, the task doing console_unlock() may not yield for a long time on a non-preemptible kernel. If this happens with a slow console devices, for example a serial console, the outputting task may occupy the cpu for a very long time. Long enough to trigger softlockup and/or RCU stall warnings, which in turn pile more messages, sometimes enough to trigger the next cycle of warnings incapacitating the system. Fix it by making console_unlock() insert cond_resched() between lines if @console_may_schedule. Signed-off-by: Tejun Heo Reported-by: Calvin Owens Acked-by: Jan Kara Cc: Dave Jones Cc: Kyle McMartin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/console.h | 1 + kernel/panic.c | 3 +-- kernel/printk/printk.c | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) commit 81cc26f2bd11ba4421a17a2d5cebe4bba206c239 Author: Thierry Reding Date: Fri Jan 15 16:58:21 2016 -0800 printk: only unregister boot consoles when necessary Boot consoles are typically replaced by proper consoles during the boot process. This can be problematic if the boot console data is part of the init section that is reclaimed late during boot. If the proper console does not register before this point in time, the boot console will need to be removed (so that the freed memory is not accessed), leaving the system without output for some time. There are various reasons why the proper console may not register early enough, such as deferred probe or the driver being a loadable module. If that happens, there is some amount of time where no console messages are visible to the user, which in turn can mean that they won't see crashes or other potentially useful information. To avoid this situation, only remove the boot console when it resides in the init section. Code exists to replace the boot console by the proper console when it is registered, keeping a seamless transition between the boot and proper consoles. Signed-off-by: Thierry Reding Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/printk/printk.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 979559362516bb0f5424505c607210ac054e30ae Author: Thierry Reding Date: Fri Jan 15 16:58:18 2016 -0800 asm/sections: add helpers to check for section data Add a helper to check if an object (given an address and a size) is part of a section (given beginning and end addresses). For convenience, also provide a helper that performs this check for __init data using the __init_begin and __init_end limits. Signed-off-by: Thierry Reding Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/sections.h | 65 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit b493c34309cb4aebc44272897067ebf54cb07271 Author: Andrew Morton Date: Fri Jan 15 16:58:16 2016 -0800 kernel/stop_machine.c: remove CONFIG_SMP dependencies stop_machine.o is only built if CONFIG_SMP=y, so this ifdef always evaluates to true. [akpm@linux-foundation.org: remove now-unneeded ifdef] Reported-by: Valentin Rothberg Cc: Chris Wilson Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/stop_machine.c | 4 ---- 1 file changed, 4 deletions(-) commit b2113a417c4f414eb19c11a6a72abedabd81dc1b Author: Riku Voipio Date: Fri Jan 15 16:58:13 2016 -0800 uselib: default depending if libc5 was used uselib hasn't been used since libc5; glibc does not use it. Deprecate uselib a bit more, by making the default y only if libc5 was widely used on the plaform. This makes arm64 kernel built with defconfig slightly smaller bloat-o-meter: add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-1390 (-1390) function old new delta kernel_config_data 18164 18162 -2 uselib_flags 20 - -20 padzero 216 192 -24 sys_uselib 380 - -380 load_elf_library 964 - -964 Signed-off-by: Riku Voipio Reviewed-by: Josh Triplett Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfffa587a6bcd84f2087f88e11600b0e8b0aa1ee Author: Viresh Kumar Date: Fri Jan 15 16:58:10 2016 -0800 err.h: add (missing) unlikely() to IS_ERR_OR_NULL() IS_ERR_VALUE() already contains it and so we need to add this only to the !ptr check. That will allow users of IS_ERR_OR_NULL(), to not add this compiler flag. Signed-off-by: Viresh Kumar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/err.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da48d094ce5d7c7dcdad9011648a81c42fd1c2ef Author: Will Deacon Date: Fri Jan 15 16:58:07 2016 -0800 Kconfig: remove HAVE_LATENCYTOP_SUPPORT As illustrated by commit a3afe70b83fd ("[S390] latencytop s390 support."), HAVE_LATENCYTOP_SUPPORT is defined by an architecture to advertise an implementation of save_stack_trace_tsk. However, as of 9212ddb5eada ("stacktrace: provide save_stack_trace_tsk() weak alias") a dummy implementation is provided if STACKTRACE=y. Given that LATENCYTOP already depends on STACKTRACE_SUPPORT and selects STACKTRACE, we can remove HAVE_LATENCYTOP_SUPPORT altogether. Signed-off-by: Will Deacon Acked-by: Heiko Carstens Cc: Vineet Gupta Cc: Russell King Cc: James Hogan Cc: Michal Simek Cc: Helge Deller Acked-by: Michael Ellerman Cc: "David S. Miller" Cc: Guan Xuetao Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/Kconfig | 3 --- arch/arm/Kconfig | 5 ----- arch/metag/Kconfig | 3 --- arch/microblaze/Kconfig | 3 --- arch/parisc/Kconfig | 3 --- arch/powerpc/Kconfig | 3 --- arch/s390/Kconfig | 3 --- arch/sh/Kconfig | 3 --- arch/sparc/Kconfig | 4 ---- arch/unicore32/Kconfig | 3 --- arch/x86/Kconfig | 3 --- lib/Kconfig.debug | 1 - 12 files changed, 37 deletions(-) commit 3f1bfd94136ecb85889e6e22893c08e8a9c697c2 Author: Yaowei Bai Date: Fri Jan 15 16:58:04 2016 -0800 include/linux/kdev_t.h: remove new_valid_dev() As all new_valid_dev() checks have been removed it's time to drop new_valid_dev() itself. No functional change. Signed-off-by: Yaowei Bai Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kdev_t.h | 5 ----- 1 file changed, 5 deletions(-) commit 4c416f42ee961cbea1e1d9de27a7acb571e62622 Author: Yaowei Bai Date: Fri Jan 15 16:58:01 2016 -0800 fs/stat.c: drop the last new_valid_dev check New_valid_dev() always returns true, so that's unnecessary to perform new_valid_dev() checks in some filesystems. Most checks of new_valid_dev() have been removed so let's drop this last one and then we can remove new_valid_dev() from the source code. No functional change. Signed-off-by: Yaowei Bai Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f57e4d930d48217268315898212518d4d3e0773 Author: Michal Nazarewicz Date: Fri Jan 15 16:57:58 2016 -0800 include/linux/kernel.h: change abs() macro so it uses consistent return type Rewrite abs() so that its return type does not depend on the architecture and no unexpected type conversion happen inside of it. The only conversion is from unsigned to signed type. char is left as a return type but treated as a signed type regradless of it's actual signedness. With the old version, int arguments were promoted to long and depending on architecture a long argument might result in s64 or long return type (which may or may not be the same). This came after some back and forth with Nicolas. The current macro has different return type (for the same input type) depending on architecture which might be midly iritating. An alternative version would promote to int like so: #define abs(x) __abs_choose_expr(x, long long, \ __abs_choose_expr(x, long, \ __builtin_choose_expr( \ sizeof(x) <= sizeof(int), \ ({ int __x = (x); __x<0?-__x:__x; }), \ ((void)0)))) I have no preference but imagine Linus might. :] Nicolas argument against is that promoting to int causes iconsistent behaviour: int main(void) { unsigned short a = 0, b = 1, c = a - b; unsigned short d = abs(a - b); unsigned short e = abs(c); printf("%u %u\n", d, e); // prints: 1 65535 } Then again, no sane person expects consistent behaviour from C integer arithmetic. ;) Note: __builtin_types_compatible_p(unsigned char, char) is always false, and __builtin_types_compatible_p(signed char, char) is also always false. Signed-off-by: Michal Nazarewicz Reviewed-by: Nicolas Pitre Cc: Srinivas Pandruvada Cc: Wey-Yi Guy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/iio/industrialio-core.c | 9 +++---- drivers/net/wireless/intel/iwlwifi/dvm/calib.c | 2 +- include/linux/kernel.h | 36 +++++++++++++------------- 3 files changed, 23 insertions(+), 24 deletions(-) commit b8a0255db958b8f70c5267dda152e93b6fda1778 Author: Vasily Kulikov Date: Fri Jan 15 16:57:55 2016 -0800 include/linux/poison.h: use POISON_POINTER_DELTA for poison pointers TIMER_ENTRY_STATIC and TAIL_MAPPING are defined as poison pointers which should point to nowhere. Redefine them using POISON_POINTER_DELTA arithmetics to make sure they really point to non-mappable area declared by the target architecture. Signed-off-by: Vasily Kulikov Acked-by: Thomas Gleixner Cc: Solar Designer Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/poison.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b0e551313ebde17764f3a5ed273df524d1e7e690 Author: Helge Deller Date: Thu Nov 26 21:14:02 2015 +0100 parisc: Protect huge page pte changes with spinlocks PA-RISC doesn't have atomic instructions to modify page table entries, so it takes spinlock in the TLB handler and modifies the page table entry non-atomically. If you modify the page table entry without the spinlock, you may race with TLB handler on another CPU and your modification may be lost. Protect against that with usage of purge_tlb_start() and purge_tlb_end() which handles the TLB spinlock. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v4.4 arch/parisc/include/asm/hugetlb.h | 20 +++---------- arch/parisc/mm/hugetlbpage.c | 60 +++++++++++++++++++++++++++++++-------- 2 files changed, 52 insertions(+), 28 deletions(-) commit 8931f8e02979e4180566907019d432527c80abf7 Author: Jianqun xu Date: Thu Jan 7 17:18:07 2016 +0800 clk: rockchip: rk3368: fix some clock gates Reference to the Rockchip RK3368 TRM v1.1, some clock gates need to be updated. Signed-off-by: Jianqun xu Signed-off-by: Caesar Wang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3368.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 3d667920bc8fc0c3b39e4e740352d9367fa4916e Author: Xing Zheng Date: Thu Jan 7 20:17:36 2016 +0800 clk: rockchip: rk3036: rename emac ext source clock There is only support rmii in the RK3036, so we should use the correct ext clock name as described in the TRM. Signed-off-by: Xing Zheng [update dt-binding document as well] Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/clock/rockchip,rk3036-cru.txt | 2 +- drivers/clk/rockchip/clk-rk3036.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c40519350e1d7db03e35e57509352c55948648ba Author: Xing Zheng Date: Thu Jan 7 20:17:35 2016 +0800 clk: rockchip: rk3036: fix the div offset for emac clock Due to reference to old version TRM, there are incorrect emac clock node. The SEL_21_9 is used for the parent div, the SEL_21_4 is used for the child div. Signed-off-by: Xing Zheng Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3036.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b29de2de5049e064d172862b1feeddeb650c3ee8 Author: Xing Zheng Date: Thu Jan 7 20:17:34 2016 +0800 clk: rockchip: rk3036: fix uarts clock error Due to a copy-paste error the uart1 and uart2 clock div set incorrect, fix it. Signed-off-by: Xing Zheng Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3036.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 99222c9e4de7feb22c93b19a92b35fcdad73ed42 Author: Xing Zheng Date: Thu Jan 7 20:17:33 2016 +0800 clk: rockchip: rk3036: fix the FLAGs for clock mux The DFLAGS are used for the clock dividers, the CLKSEL_CON flags of COMPOSITE_NODIV type should be MFLAGS. Signed-off-by: Xing Zheng Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3036.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 42eff6a617e23b691f8e4467f4687ed7245a92db Author: Sven Eckelmann Date: Tue Jan 5 12:06:20 2016 +0100 batman-adv: Drop immediate orig_node free function It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore. But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_orig_node_free_ref. Fixes: 72822225bd41 ("batman-adv: Fix rcu_barrier() miss due to double call_rcu() in TT code") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/originator.c | 11 ----------- net/batman-adv/originator.h | 1 - net/batman-adv/translation-table.c | 28 +++++++++++++--------------- 3 files changed, 13 insertions(+), 27 deletions(-) commit b4d922cfc9c08318eeb77d53b7633740e6b0efb0 Author: Sven Eckelmann Date: Tue Jan 5 12:06:25 2016 +0100 batman-adv: Drop immediate batadv_hard_iface free function It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore. But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_hardif_free_ref. Fixes: 89652331c00f ("batman-adv: split tq information in neigh_node struct") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/hard-interface.h | 12 ------------ net/batman-adv/originator.c | 15 +++++++-------- 2 files changed, 7 insertions(+), 20 deletions(-) commit ae3e1e36e3cb6c686a7a2725af20ca86aa46d62a Author: Sven Eckelmann Date: Tue Jan 5 12:06:24 2016 +0100 batman-adv: Drop immediate neigh_ifinfo free function It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore. But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_neigh_ifinfo_free_ref. Fixes: 89652331c00f ("batman-adv: split tq information in neigh_node struct") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/originator.c | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) commit f63896928760a7c3ce9c5d3f882ba9f10ae73ad0 Author: Sven Eckelmann Date: Tue Jan 5 12:06:23 2016 +0100 batman-adv: Drop immediate batadv_hardif_neigh_node free function It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore. But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_hardif_neigh_free_ref. Fixes: cef63419f7db ("batman-adv: add list of unique single hop neighbors per hard-interface") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/originator.c | 46 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) commit 2baa753c276f27f8e844637561ad597867aa6fb6 Author: Sven Eckelmann Date: Tue Jan 5 12:06:22 2016 +0100 batman-adv: Drop immediate batadv_neigh_node free function It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore. But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_neigh_node_free_ref. Fixes: 89652331c00f ("batman-adv: split tq information in neigh_node struct") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/originator.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) commit deed96605f5695cb945e0b3d79429581857a2b9d Author: Sven Eckelmann Date: Tue Jan 5 12:06:21 2016 +0100 batman-adv: Drop immediate batadv_orig_ifinfo free function It is not allowed to free the memory of an object which is part of a list which is protected by rcu-read-side-critical sections without making sure that no other context is accessing the object anymore. This usually happens by removing the references to this object and then waiting until the rcu grace period is over and no one (allowedly) accesses it anymore. But the _now functions ignore this completely. They free the object directly even when a different context still tries to access it. This has to be avoided and thus these functions must be removed and all functions have to use batadv_orig_ifinfo_free_ref. Fixes: 7351a4822d42 ("batman-adv: split out router from orig_node") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/originator.c | 59 ++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 28 deletions(-) commit 44e8e7e91d6c7c7ab19688750f7257292640d1a0 Author: Sven Eckelmann Date: Tue Jan 5 12:06:19 2016 +0100 batman-adv: Avoid recursive call_rcu for batadv_nc_node The batadv_nc_node_free_ref function uses call_rcu to delay the free of the batadv_nc_node object until no (already started) rcu_read_lock is enabled anymore. This makes sure that no context is still trying to access the object which should be removed. But batadv_nc_node also contains a reference to orig_node which must be removed. The reference drop of orig_node was done in the call_rcu function batadv_nc_node_free_rcu but should actually be done in the batadv_nc_node_release function to avoid nested call_rcus. This is important because rcu_barrier (e.g. batadv_softif_free or batadv_exit) will not detect the inner call_rcu as relevant for its execution. Otherwise this barrier will most likely be inserted in the queue before the callback of the first call_rcu was executed. The caller of rcu_barrier will therefore continue to run before the inner call_rcu callback finished. Fixes: d56b1705e28c ("batman-adv: network coding - detect coding nodes and remove these after timeout") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/network-coding.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 63b399272294e7a939cde41792dca38c549f0484 Author: Sven Eckelmann Date: Thu Jan 14 15:28:19 2016 +0100 batman-adv: Avoid recursive call_rcu for batadv_bla_claim The batadv_claim_free_ref function uses call_rcu to delay the free of the batadv_bla_claim object until no (already started) rcu_read_lock is enabled anymore. This makes sure that no context is still trying to access the object which should be removed. But batadv_bla_claim also contains a reference to backbone_gw which must be removed. The reference drop of backbone_gw was done in the call_rcu function batadv_claim_free_rcu but should actually be done in the batadv_claim_release function to avoid nested call_rcus. This is important because rcu_barrier (e.g. batadv_softif_free or batadv_exit) will not detect the inner call_rcu as relevant for its execution. Otherwise this barrier will most likely be inserted in the queue before the callback of the first call_rcu was executed. The caller of rcu_barrier will therefore continue to run before the inner call_rcu callback finished. Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") Signed-off-by: Sven Eckelmann Acked-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/bridge_loop_avoidance.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 9d0be85d4e2cfa2519ae16efe7ff4a7150c43c0b Author: Jonathan Cameron Date: Fri Jan 1 18:05:34 2016 +0000 iio:adc:ti_am335x_adc Fix buffered mode by identifying as software buffer. Whilst this part has a hardware buffer, the identifcation that IIO cares about is the userspace facing end. It this case we push individual elements from the hardware fifo into the software interface (specifically a kfifo) rather than providing direct reads through to a hardware buffer (as we still do in the sca3000 for example). Technically the original specification as a hardware buffer could be considered wrong, but it didn't matter until the patch listed below. Result is that any attempt to enable the buffer will return -EINVAL Fixes: 225d59adf1c8 ("iio: Specify supported modes for buffers") Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ti_am335x_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa34e6dd44d7c02c8a8468ce4a52a7506f907bef Author: Gabriele Mazzotta Date: Tue Jan 12 16:21:39 2016 +0100 iio: light: acpi-als: Report data as processed As per the ACPI specification (Revision 5.0) [1], the data coming from the sensor represent the ambient light illuminance reading expressed in lux. So use IIO_CHAN_INFO_PROCESSED to signify that the data are pre-processed. However, to keep backward ABI compatibility, the IIO_CHAN_INFO_RAW bit is not removed. [1] http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf This issue has also been responsible for at least one userspace bug report hence marking what is a small semantic fix really for stable. [2] https://github.com/hadess/iio-sensor-proxy/issues/46 Signed-off-by: Gabriele Mazzotta Cc: Signed-off-by: Jonathan Cameron drivers/iio/light/acpi-als.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6c3f5aef1159a278b54642ebc0bbb5cdab7630cf Author: Ivan Vecera Date: Fri Jan 15 13:45:28 2016 +0100 bna: fix Rx data corruption with VLAN stripping enabled and MTU > 4096 The multi-buffer Rx mode implemented in the past introduced a regression that causes a data corruption for received VLAN traffic when VLAN tag stripping is enabled. This mode is supported only be newer chipsets (1860) and is enabled when MTU > 4096. When this mode is enabled Rx queue contains buffers with fixed size 2048 bytes. Any incoming packet larger than 2048 is divided into multiple buffers that are attached as skb frags in polling routine. The driver assumes that all buffers associated with a packet except the last one is fully used (e.g. packet with size 5000 are divided into 3 buffers 2048 + 2048 + 904 bytes) and ignores true size reported in completions. This assumption is usually true but not when VLAN packet is received and VLAN tag stripping is enabled. In this case the first buffer is 2044 bytes long but as the driver always assumes 2048 bytes then 4 extra random bytes are included between the first and the second frag. Additionally the driver sets checksum as correct so the packet is properly processed by the core. The driver needs to check the size of used space in each Rx buffer reported by FW and not blindly use the fixed value. Cc: Rasesh Mody Signed-off-by: Ivan Vecera Reviewed-by: Rasesh Mody Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bnad.c | 37 +++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) commit ece6267878aed4eadff766112f1079984315d8c8 Merge: d45187a 3da834e Author: Linus Torvalds Date: Fri Jan 15 18:21:28 2016 -0800 Merge tag 'clk-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk framework updates from Michael Turquette: "The clk framework and driver changes for 4.5 look pretty typical. The bulk of the changes are to clk controller drivers, though some improvements to the core and some re-usable blocks/templates also received some love. In this past cycle the clk maintainers developed a good workflow for handling the common case of patch submissions containing a new drivers, new shared Device Tree header and a new Device Tree binding description. This requires coordination with the Device Tree maintainers and with the architecture maintainers (typically the arm-soc tree in our case). This explains the increase in changes to include/dt-bindings/... and to Documentation/devicetree/bindings/clock/... coming from the clk tree. The same commits can be expected to come through those trees on occasion, through the use of shared, immutable branches" * tag 'clk-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (125 commits) clk: remove duplicated COMMON_CLK_NXP record from clk/Kconfig clk: fix clk-gpio.c with optional clock= DT property clk: rockchip: fix section mismatches with new child-clocks clk: gpio: handle error codes for of_clk_get_parent_count() clk: gpio: fix memory leak clk: shmobile: r8a7795: Add SATA0 clock clk: bcm2835: Add PWM clock support clk: bcm2835: Support for clock parent selection clk: bcm2835: add a round up ability to the clock divisor clk: lpc32xx: add common clock framework driver clk: lpc18xx: add NXP specific COMMON_CLK_NXP configuration symbol dt-bindings: clock: add NXP LPC32xx clock list for consumers dt-bindings: clock: add description of LPC32xx USB clock controller dt-bindings: clock: add description of LPC32xx clock controller clk: rockchip: rk3036: include downstream muxes into fractional dividers clk: add flag for clocks that need to be enabled on rate changes clk: rockchip: Allow the RK3288 SPDIF clocks to change their parent clk: rockchip: include downstream muxes into fractional dividers clk: rockchip: handle mux dependency of fractional dividers clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. ... commit d45187aaf0e256d23da2f7694a7826524499aa31 Merge: 4e5448a e5b6c15 Author: Linus Torvalds Date: Fri Jan 15 18:12:18 2016 -0800 Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi updates from Jean Delvare. * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: firmware: dmi_scan: Save SMBIOS Type 9 System Slots firmware: dmi_scan: Fix dmi_find_device description firmware: dmi_scan: Clarify dmi_save_extended_devices firmware: dmi_scan: Optimize dmi_save_extended_devices commit 6611d8d76132f86faa501de9451a89bf23fb2371 Author: Martijn Coenen Date: Fri Jan 15 16:57:49 2016 -0800 memcg: only free spare array when readers are done A spare array holding mem cgroup threshold events is kept around to make sure we can always safely deregister an event and have an array to store the new set of events in. In the scenario where we're going from 1 to 0 registered events, the pointer to the primary array containing 1 event is copied to the spare slot, and then the spare slot is freed because no events are left. However, it is freed before calling synchronize_rcu(), which means readers may still be accessing threshold->primary after it is freed. Fixed by only freeing after synchronize_rcu(). Signed-off-by: Martijn Coenen Cc: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 98fd1ef4241ce0c700a174dd3e33c643b4774690 Author: Naoya Horiguchi Date: Fri Jan 15 16:57:46 2016 -0800 mm: soft-offline: exit with failure for non anonymous thp Currently memory_failure() doesn't handle non anonymous thp case, because we can hardly expect the error handling to be successful, and it can just hit some corner case which results in BUG_ON or something severe like that. This is also the case for soft offline code, so let's make it in the same way. Orignal code has a MF_COUNT_INCREASED check before put_hwpoison_page(), but it's unnecessary because get_any_page() is already called when running on this code, which takes a refcount of the target page regardress of the flag. So this patch also removes it. [akpm@linux-foundation.org: fix build] Signed-off-by: Naoya Horiguchi Cc: Andi Kleen Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit acc14dc4bd484f1fc8c227dd9fc2a1e592312d2b Author: Naoya Horiguchi Date: Fri Jan 15 16:57:43 2016 -0800 mm: soft-offline: clean up soft_offline_page() soft_offline_page() has some deeply indented code, that's the sign of demand for cleanup. So let's do this. No functionality change. Signed-off-by: Naoya Horiguchi Cc: Andi Kleen Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 78 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 31 deletions(-) commit 4aae8d1c051ea00b456da6811bc36d1f69de5445 Author: Mike Kravetz Date: Fri Jan 15 16:57:40 2016 -0800 mm/hugetlbfs: unmap pages if page fault raced with hole punch Page faults can race with fallocate hole punch. If a page fault happens between the unmap and remove operations, the page is not removed and remains within the hole. This is not the desired behavior. The race is difficult to detect in user level code as even in the non-race case, a page within the hole could be faulted back in before fallocate returns. If userfaultfd is expanded to support hugetlbfs in the future, this race will be easier to observe. If this race is detected and a page is mapped, the remove operation (remove_inode_hugepages) will unmap the page before removing. The unmap within remove_inode_hugepages occurs with the hugetlb_fault_mutex held so that no other faults will be processed until the page is removed. The (unmodified) routine hugetlb_vmdelete_list was moved ahead of remove_inode_hugepages to satisfy the new reference. [akpm@linux-foundation.org: move hugetlb_vmdelete_list()] Signed-off-by: Mike Kravetz Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: Hillf Danton Cc: Davidlohr Bueso Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 144 +++++++++++++++++++++++++++------------------------ 1 file changed, 75 insertions(+), 69 deletions(-) commit 9aacdd354d197ad64685941b36d28ea20ab88757 Author: Mike Kravetz Date: Fri Jan 15 16:57:37 2016 -0800 fs/hugetlbfs/inode.c: fix bugs in hugetlb_vmtruncate_list() Hillf Danton noticed bugs in the hugetlb_vmtruncate_list routine. The argument end is of type pgoff_t. It was being converted to a vaddr offset and passed to unmap_hugepage_range. However, end was also being used as an argument to the vma_interval_tree_foreach controlling loop. In addition, the conversion of end to vaddr offset was incorrect. hugetlb_vmtruncate_list is called as part of a file truncate or fallocate hole punch operation. When truncating a hugetlbfs file, this bug could prevent some pages from being unmapped. This is possible if there are multiple vmas mapping the file, and there is a sufficiently sized hole between the mappings. The size of the hole between two vmas (A,B) must be such that the starting virtual address of B is greater than (ending virtual address of A << PAGE_SHIFT). In this case, the pages in B would not be unmapped. If pages are not properly unmapped during truncate, the following BUG is hit: kernel BUG at fs/hugetlbfs/inode.c:428! In the fallocate hole punch case, this bug could prevent pages from being unmapped as in the truncate case. However, for hole punch the result is that unmapped pages will not be removed during the operation. For hole punch, it is also possible that more pages than desired will be unmapped. This unnecessary unmapping will cause page faults to reestablish the mappings on subsequent page access. Fixes: 1bfad99ab (" hugetlbfs: hugetlb_vmtruncate_list() needs to take a range")Reported-by: Hillf Danton Signed-off-by: Mike Kravetz Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: Davidlohr Bueso Cc: Dave Hansen Cc: [4.3] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 9f8bdb3f3dad3f8f20df3e8903316cd5bb1c408e Author: Hugh Dickins Date: Fri Jan 15 16:57:34 2016 -0800 mm: make swapoff more robust against soft dirty Both s390 and powerpc have hit the issue of swapoff hanging, when CONFIG_HAVE_ARCH_SOFT_DIRTY and CONFIG_MEM_SOFT_DIRTY ifdefs were not quite as x86_64 had them. I think it would be much clearer if HAVE_ARCH_SOFT_DIRTY was just a Kconfig option set by architectures to determine whether the MEM_SOFT_DIRTY option should be offered, and the actual code depend upon CONFIG_MEM_SOFT_DIRTY alone. But won't embark on that change myself: instead make swapoff more robust, by using pte_swp_clear_soft_dirty() on each pte it encounters, without an explicit #ifdef CONFIG_MEM_SOFT_DIRTY. That being a no-op, whether the bit in question is defined as 0 or the asm-generic fallback is used, unless soft dirty is fully turned on. Why "maybe" in maybe_same_pte()? Rename it pte_same_as_swp(). Signed-off-by: Hugh Dickins Reviewed-by: Aneesh Kumar K.V Acked-by: Cyrill Gorcunov Cc: Laurent Dufour Cc: Michael Ellerman Cc: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 88f306b68cbb36e500da4b9601b2e3d13dd683c4 Author: Kirill A. Shutemov Date: Fri Jan 15 16:57:31 2016 -0800 mm: fix locking order in mm_take_all_locks() Dmitry Vyukov has reported[1] possible deadlock (triggered by his syzkaller fuzzer): Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&hugetlbfs_i_mmap_rwsem_key); lock(&mapping->i_mmap_rwsem); lock(&hugetlbfs_i_mmap_rwsem_key); lock(&mapping->i_mmap_rwsem); Both traces points to mm_take_all_locks() as a source of the problem. It doesn't take care about ordering or hugetlbfs_i_mmap_rwsem_key (aka mapping->i_mmap_rwsem for hugetlb mapping) vs. i_mmap_rwsem. huge_pmd_share() does memory allocation under hugetlbfs_i_mmap_rwsem_key and allocator can take i_mmap_rwsem if it hit reclaim. So we need to take i_mmap_rwsem from all hugetlb VMAs before taking i_mmap_rwsem from rest of VMAs. The patch also documents locking order for hugetlbfs_i_mmap_rwsem_key. [1] http://lkml.kernel.org/r/CACT4Y+Zu95tBs-0EvdiAKzUOsb4tczRRfCRTpLr4bg_OP9HuVg@mail.gmail.com Signed-off-by: Kirill A. Shutemov Reported-by: Dmitry Vyukov Reviewed-by: Michal Hocko Cc: Peter Zijlstra Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 2 +- mm/mmap.c | 25 ++++++++++++++++++++----- mm/rmap.c | 31 ++++++++++++++++--------------- 3 files changed, 37 insertions(+), 21 deletions(-) commit d645fc0eabbe783d34a14fbb31768ad8571f0ad4 Author: Liang Chen Date: Fri Jan 15 16:57:28 2016 -0800 mm: mempolicy: skip non-migratable VMAs when setting MPOL_MF_LAZY MPOL_MF_LAZY is not visible from userspace since a720094ded8c ("mm: mempolicy: Hide MPOL_NOOP and MPOL_MF_LAZY from userspace for now"), but it should still skip non-migratable VMAs such as VM_IO, VM_PFNMAP, and VM_HUGETLB VMAs, and avoid useless overhead of minor faults. Signed-off-by: Liang Chen Signed-off-by: Gavin Guo Acked-by: Rik van Riel Cc: Mel Gorman Cc: Andi Kleen Cc: Vlastimil Babka Cc: David Rientjes Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f16f091b5916857de2aa36724a15d4bd5e16e9d8 Author: Alexander Kuleshov Date: Fri Jan 15 16:57:25 2016 -0800 mm/page_alloc.c: remove unused struct zone *z variable Remove unused struct zone *z variable which appeared in 86051ca5eaf5 ("mm: fix usemap initialization"). Signed-off-by: Alexander Kuleshov Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 -- 1 file changed, 2 deletions(-) commit 7f43add451d2a0d235074b72d254ae266a6a023f Author: Wang Xiaoqiang Date: Fri Jan 15 16:57:22 2016 -0800 mm/mlock.c: change can_do_mlock return value type to boolean Since can_do_mlock only return 1 or 0, so make it boolean. No functional change. [akpm@linux-foundation.org: update declaration in mm.h] Signed-off-by: Wang Xiaoqiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- mm/mlock.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 61e165578dc7ec4ee044e9ca581a315d9ca9c656 Author: Wang Xiaoqiang Date: Fri Jan 15 16:57:19 2016 -0800 mm/vmalloc.c: use macro IS_ALIGNED to judge the aligment Just cleanup, no functional change. Signed-off-by: Wang Xiaoqiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 654a0dd0953fcd87ff7bbb468fb889f0eb67df33 Author: Tejun Heo Date: Fri Jan 15 16:57:16 2016 -0800 cgroup, memcg, writeback: drop spurious rcu locking around mem_cgroup_css_from_page() In earlier versions, mem_cgroup_css_from_page() could return non-root css on a legacy hierarchy which can go away and required rcu locking; however, the eventual version simply returns the root cgroup if memcg is on a legacy hierarchy and thus doesn't need rcu locking around or in it. Remove spurious rcu lockings. Signed-off-by: Tejun Heo Reported-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fs-writeback.c | 2 -- mm/memcontrol.c | 3 --- 2 files changed, 5 deletions(-) commit 6f8d2b8a262c6b71e1464d488f41cccf9aafbc07 Author: Wang Xiaoqiang Date: Fri Jan 15 16:57:13 2016 -0800 mm/page_isolation: do some cleanup in "undo_isolate_page_range" Use "IS_ALIGNED" to judge the alignment, rather than directly judging. Signed-off-by: Wang Xiaoqiang Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_isolation.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 036fbb21de7c74d5637bf41110c47005363f3000 Author: Kirill A. Shutemov Date: Fri Jan 15 16:57:11 2016 -0800 memblock: fix section mismatch allmodconfig produces following warning for me: WARNING: vmlinux.o(.text.unlikely+0x10314): Section mismatch in reference from the function movable_node_is_enabled() to the variable .meminit.data:movable_node_enabled The function movable_node_is_enabled() references the variable __meminitdata movable_node_enabled. This is often because movable_node_is_enabled lacks a __meminitdata annotation or the annotation of movable_node_enabled is wrong. Let's mark the function with __meminit. It fixes the warning. Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit fef8953ae4e2b87392434a1a3774694c3f8164f6 Author: Dominik Dingel Date: Fri Jan 15 16:57:07 2016 -0800 s390/mm: enable fixup_user_fault retrying By passing a non-null flag we allow fixup_user_fault to retry, which enables userfaultfd. As during these retries we might drop the mmap_sem we need to check if that happened and redo the complete chain of actions. Signed-off-by: Dominik Dingel Reviewed-by: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Martin Schwidefsky Cc: Christian Borntraeger Cc: "Jason J. Herne" Cc: David Rientjes Cc: Eric B Munson Cc: Naoya Horiguchi Cc: Mel Gorman Cc: Heiko Carstens Cc: Dominik Dingel Cc: Paolo Bonzini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/mm/pgtable.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 4a9e1cda274893eca7d178d7dc265503ccb9d87a Author: Dominik Dingel Date: Fri Jan 15 16:57:04 2016 -0800 mm: bring in additional flag for fixup_user_fault to signal unlock During Jason's work with postcopy migration support for s390 a problem regarding gmap faults was discovered. The gmap code will call fixup_user_fault which will end up always in handle_mm_fault. Till now we never cared about retries, but as the userfaultfd code kind of relies on it. this needs some fix. This patchset does not take care of the futex code. I will now look closer at this. This patch (of 2): With the introduction of userfaultfd, kvm on s390 needs fixup_user_fault to pass in FAULT_FLAG_ALLOW_RETRY and give feedback if during the faulting we ever unlocked mmap_sem. This patch brings in the logic to handle retries as well as it cleans up the current documentation. fixup_user_fault was not having the same semantics as filemap_fault. It never indicated if a retry happened and so a caller wasn't able to handle that case. So we now changed the behaviour to always retry a locked mmap_sem. Signed-off-by: Dominik Dingel Reviewed-by: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Martin Schwidefsky Cc: Christian Borntraeger Cc: "Jason J. Herne" Cc: David Rientjes Cc: Eric B Munson Cc: Naoya Horiguchi Cc: Mel Gorman Cc: Heiko Carstens Cc: Dominik Dingel Cc: Paolo Bonzini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/mm/pgtable.c | 8 +++++--- include/linux/mm.h | 5 +++-- kernel/futex.c | 2 +- mm/gup.c | 30 +++++++++++++++++++++++++----- 4 files changed, 34 insertions(+), 11 deletions(-) commit c046c321cb4a0bdac9fb922db3859893ca556d27 Author: Dan Williams Date: Fri Jan 15 16:57:01 2016 -0800 dax: re-enable dax pmd mappings Now that the get_user_pages() path knows how to handle dax-pmd mappings, remove the protections that disabled dax-pmd support. Tests available from github.com/pmem/ndctl: make TESTS="lib/test-dax.sh lib/test-mmap.sh" check Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/Kconfig | 3 ++- fs/dax.c | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) commit cbb38e41a931aaae5b2fef3b1c74d0d6f866b698 Author: Dan Williams Date: Fri Jan 15 16:56:58 2016 -0800 dax: provide diagnostics for pmd mapping failures There is a wide gamut of conditions that can trigger the dax pmd path to fallback to pte mappings. Ideally we'd have a syscall interface to determine mapping characteristics after the fact. In the meantime provide debug messages. Signed-off-by: Dan Williams Suggested-by: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 57 insertions(+), 8 deletions(-) commit 3565fce3a6597e91b8dee3e8e36ebf70f8b7ef9b Author: Dan Williams Date: Fri Jan 15 16:56:55 2016 -0800 mm, x86: get_user_pages() for dax mappings A dax mapping establishes a pte with _PAGE_DEVMAP set when the driver has established a devm_memremap_pages() mapping, i.e. when the pfn_t return from ->direct_access() has PFN_DEV and PFN_MAP set. Later, when encountering _PAGE_DEVMAP during a page table walk we lookup and pin a struct dev_pagemap instance to keep the result of pfn_to_page() valid until put_page(). Signed-off-by: Dan Williams Tested-by: Logan Gunthorpe Cc: Dave Hansen Cc: Mel Gorman Cc: Peter Zijlstra Cc: Andrea Arcangeli Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 7 ++++ arch/x86/mm/gup.c | 57 ++++++++++++++++++++++++++++++-- include/linux/huge_mm.h | 10 +++++- include/linux/mm.h | 59 +++++++++++++++++++++++---------- kernel/memremap.c | 12 +++++++ mm/gup.c | 30 +++++++++++++++-- mm/huge_memory.c | 75 +++++++++++++++++++++++++++++++++--------- mm/swap.c | 1 + 8 files changed, 212 insertions(+), 39 deletions(-) commit 5c7fb56e5e3f7035dd798a8e1adee639f87043e5 Author: Dan Williams Date: Fri Jan 15 16:56:52 2016 -0800 mm, dax: dax-pmd vs thp-pmd vs hugetlbfs-pmd A dax-huge-page mapping while it uses some thp helpers is ultimately not a transparent huge page. The distinction is especially important in the get_user_pages() path. pmd_devmap() is used to distinguish dax-pmds from pmd_huge() and pmd_trans_huge() which have slightly different semantics. Explicitly mark the pmd_trans_huge() helpers that dax needs by adding pmd_devmap() checks. [kirill.shutemov@linux.intel.com: fix regression in handling mlocked pages in __split_huge_pmd()] Signed-off-by: Dan Williams Cc: Dave Hansen Cc: Mel Gorman Cc: Peter Zijlstra Cc: Andrea Arcangeli Cc: Matthew Wilcox Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 9 ++++++++- include/linux/huge_mm.h | 5 +++-- include/linux/mm.h | 7 +++++++ mm/huge_memory.c | 38 +++++++++++++++++++++----------------- mm/memory.c | 8 ++++---- mm/mprotect.c | 5 +++-- mm/pgtable-generic.c | 2 +- 7 files changed, 47 insertions(+), 27 deletions(-) commit 5c2c2587b13235bf8b5c9027589f22eff68bdf49 Author: Dan Williams Date: Fri Jan 15 16:56:49 2016 -0800 mm, dax, pmem: introduce {get|put}_dev_pagemap() for dax-gup get_dev_page() enables paths like get_user_pages() to pin a dynamically mapped pfn-range (devm_memremap_pages()) while the resulting struct page objects are in use. Unlike get_page() it may fail if the device is, or is in the process of being, disabled. While the initial lookup of the range may be an expensive list walk, the result is cached to speed up subsequent lookups which are likely to be in the same mapped range. devm_memremap_pages() now requires a reference counter to be specified at init time. For pmem this means moving request_queue allocation into pmem_alloc() so the existing queue usage counter can track "device pages". ZONE_DEVICE pages always have an elevated count and will never be on an lru reclaim list. That space in 'struct page' can be redirected for other uses, but for safety introduce a poison value that will always trip __list_add() to assert. This allows half of the struct list_head storage to be reclaimed with some assurance to back up the assumption that the page count never goes to zero and a list_add() is never attempted. Signed-off-by: Dan Williams Tested-by: Logan Gunthorpe Cc: Dave Hansen Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/nvdimm/pmem.c | 6 ++++-- include/linux/list.h | 11 ++++++++++ include/linux/memremap.h | 49 ++++++++++++++++++++++++++++++++++++++++++-- include/linux/mm_types.h | 5 +++++ kernel/memremap.c | 53 ++++++++++++++++++++++++++++++++++++++++++++---- lib/list_debug.c | 9 ++++++++ 6 files changed, 125 insertions(+), 8 deletions(-) commit 468ded03c07e0f2b5f05332bc255add47b1b0dee Author: Dan Williams Date: Fri Jan 15 16:56:46 2016 -0800 libnvdimm, pmem: move request_queue allocation earlier in probe Before the dynamically allocated struct pages from devm_memremap_pages() can be put to use outside the driver, we need a mechanism to track whether they are still in use at teardown. Towards that goal reorder the initialization sequence to allow the 'q_usage_counter' from the request_queue to be used by the devm_memremap_pages() implementation (in subsequent patches). Signed-off-by: Dan Williams Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/nvdimm/pmem.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit f25748e3c34eb8bb54853e9adba2d3dcf030503c Author: Dan Williams Date: Fri Jan 15 16:56:43 2016 -0800 mm, dax: convert vmf_insert_pfn_pmd() to pfn_t Similar to the conversion of vm_insert_mixed() use pfn_t in the vmf_insert_pfn_pmd() to tag the resulting pte with _PAGE_DEVICE when the pfn is backed by a devm_memremap_pages() mapping. Signed-off-by: Dan Williams Cc: Dave Hansen Cc: Matthew Wilcox Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 5 +++++ arch/x86/mm/pat.c | 5 +++-- fs/dax.c | 2 +- include/asm-generic/pgtable.h | 6 ++++-- include/linux/huge_mm.h | 2 +- include/linux/pfn_t.h | 8 ++++++++ mm/huge_memory.c | 11 +++++++---- mm/memory.c | 2 +- 8 files changed, 30 insertions(+), 11 deletions(-) commit 01c8f1c44b83a0825b573e7c723b033cece37b86 Author: Dan Williams Date: Fri Jan 15 16:56:40 2016 -0800 mm, dax, gpu: convert vm_insert_mixed to pfn_t Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose of evaluating the PFN_MAP and PFN_DEV flags. When both are set it triggers _PAGE_DEVMAP to be set in the resulting pte. There are no functional changes to the gpu drivers as a result of this conversion. Signed-off-by: Dan Williams Cc: Dave Hansen Cc: David Airlie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 5 +++++ drivers/gpu/drm/exynos/exynos_drm_gem.c | 4 +++- drivers/gpu/drm/gma500/framebuffer.c | 4 +++- drivers/gpu/drm/msm/msm_gem.c | 4 +++- drivers/gpu/drm/omapdrm/omap_gem.c | 7 +++++-- drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 +++- fs/dax.c | 2 +- include/linux/mm.h | 2 +- include/linux/pfn_t.h | 27 +++++++++++++++++++++++++++ mm/memory.c | 16 ++++++++++------ 10 files changed, 61 insertions(+), 14 deletions(-) commit 69660fd797c3e52f7f20478a27687f293d1a41be Author: Dan Williams Date: Fri Jan 15 16:56:37 2016 -0800 x86, mm: introduce _PAGE_DEVMAP _PAGE_DEVMAP is a hardware-unused pte bit that will later be used in the get_user_pages() path to identify pfns backed by the dynamic allocation established by devm_memremap_pages. Upon seeing that bit the gup path will lookup and pin the allocation while the pages are in use. Since the _PAGE_DEVMAP bit is > 32 it must be cast to u64 instead of a pteval_t to allow pmd_flags() usage in the realmode boot code to build. Signed-off-by: Dan Williams Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable_types.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6d8113c75a72f80164cc68b1af45f1608f9a36c6 Author: Dan Williams Date: Fri Jan 15 16:56:35 2016 -0800 frv: fix compiler warning from definition of __pmd() Take into account that the pmd_t type is a array inside a struct, so it needs two levels of brackets to initialize. Otherwise, a usage of __pmd generates a warning: include/linux/mm.h:986:2: warning: missing braces around initializer [-Wmissing-braces] Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/include/asm/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 888cdbc2c9a76a0e450f533b1957cdbfe7d483d5 Author: Dan Williams Date: Fri Jan 15 16:56:32 2016 -0800 hugetlb: fix compile error on tile Inlude asm/pgtable.h to get the definition for pud_t to fix: include/linux/hugetlb.h:203:29: error: unknown type name 'pud_t' Signed-off-by: Dan Williams Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 1 + 1 file changed, 1 insertion(+) commit 083fc21409ca053102cb4421007cc740e128817e Author: Dan Williams Date: Fri Jan 15 16:56:29 2016 -0800 avr32: convert to asm-generic/memory_model.h Switch avr32/include/asm/page.h to use the common defintions for pfn_to_page(), page_to_pfn(), and ARCH_PFN_OFFSET. Signed-off-by: Dan Williams Cc: Haavard Skinnemoen Cc: Hans-Christian Egtvedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/avr32/include/asm/page.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d2c0f041e1bb1260629ecea2161adb9778945aa3 Author: Dan Williams Date: Fri Jan 15 16:56:26 2016 -0800 libnvdimm, pfn, pmem: allocate memmap array in persistent memory Use the new vmem_altmap capability to enable the pmem driver to arrange for a struct page memmap to be established in persistent memory. [linux@roeck-us.net: mn10300: declare __pfn_to_phys() to fix build error] Signed-off-by: Dan Williams Cc: Christoph Hellwig Cc: Dave Chinner Cc: Ross Zwisler Signed-off-by: Guenter Roeck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/include/asm/page.h | 1 + arch/mn10300/include/asm/page.h | 1 + drivers/nvdimm/pfn_devs.c | 3 +-- drivers/nvdimm/pmem.c | 19 +++++++++++++++++-- 4 files changed, 20 insertions(+), 4 deletions(-) commit 4b94ffdc4163bae1ec73b6e977ffb7a7da3d06d3 Author: Dan Williams Date: Fri Jan 15 16:56:22 2016 -0800 x86, mm: introduce vmem_altmap to augment vmemmap_populate() In support of providing struct page for large persistent memory capacities, use struct vmem_altmap to change the default policy for allocating memory for the memmap array. The default vmemmap_populate() allocates page table storage area from the page allocator. Given persistent memory capacities relative to DRAM it may not be feasible to store the memmap in 'System Memory'. Instead vmem_altmap represents pre-allocated "device pages" to satisfy vmemmap_alloc_block_buf() requests. Signed-off-by: Dan Williams Reported-by: kbuild test robot Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/init_64.c | 33 ++++++++++++++---- drivers/nvdimm/pmem.c | 6 ++-- include/linux/memory_hotplug.h | 3 +- include/linux/memremap.h | 39 +++++++++++++++++++--- include/linux/mm.h | 9 ++++- kernel/memremap.c | 72 +++++++++++++++++++++++++++++++++++++-- mm/memory_hotplug.c | 67 ++++++++++++++++++++++++++----------- mm/page_alloc.c | 11 +++++- mm/sparse-vmemmap.c | 76 ++++++++++++++++++++++++++++++++++++++++-- mm/sparse.c | 8 +++-- 10 files changed, 282 insertions(+), 42 deletions(-) commit 9476df7d80dfc425b37bfecf1d89edf8ec81fcb6 Author: Dan Williams Date: Fri Jan 15 16:56:19 2016 -0800 mm: introduce find_dev_pagemap() There are several scenarios where we need to retrieve and update metadata associated with a given devm_memremap_pages() mapping, and the only lookup key available is a pfn in the range: 1/ We want to augment vmemmap_populate() (called via arch_add_memory()) to allocate memmap storage from pre-allocated pages reserved by the device driver. At vmemmap_alloc_block_buf() time it grabs device pages rather than page allocator pages. This is in support of devm_memremap_pages() mappings where the memmap is too large to fit in main memory (i.e. large persistent memory devices). 2/ Taking a reference against the mapping when inserting device pages into the address_space radix of a given inode. This facilitates unmap_mapping_range() and truncate_inode_pages() operations when the driver is tearing down the mapping. 3/ get_user_pages() operations on ZONE_DEVICE memory require taking a reference against the mapping so that the driver teardown path can revoke and drain usage of device pages. Signed-off-by: Dan Williams Tested-by: Logan Gunthorpe Cc: Christoph Hellwig Cc: Dave Chinner Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/nvdimm/pmem.c | 2 +- include/linux/io.h | 15 --------- include/linux/memremap.h | 38 ++++++++++++++++++++++ kernel/memremap.c | 85 +++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 116 insertions(+), 24 deletions(-) commit 260ae3f7db614a5c4aa4b773599f99adc1d9859e Author: Dan Williams Date: Fri Jan 15 16:56:17 2016 -0800 mm: skip memory block registration for ZONE_DEVICE Prevent userspace from trying and failing to online ZONE_DEVICE pages which are meant to never be onlined. For example on platforms with a udev rule like the following: SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online" ...will generate futile attempts to online the ZONE_DEVICE sections. Example kernel messages: Built 1 zonelists in Node order, mobility grouping on. Total pages: 1004747 Policy zone: Normal online_pages [mem 0x248000000-0x24fffffff] failed Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 13 +++++++++++++ include/linux/mm.h | 12 ++++++++++++ 2 files changed, 25 insertions(+) commit 34c0fd540e79fb49ef9ce864dae1058cca265780 Author: Dan Williams Date: Fri Jan 15 16:56:14 2016 -0800 mm, dax, pmem: introduce pfn_t For the purpose of communicating the optional presence of a 'struct page' for the pfn returned from ->direct_access(), introduce a type that encapsulates a page-frame-number plus flags. These flags contain the historical "page_link" encoding for a scatterlist entry, but can also denote "device memory". Where "device memory" is a set of pfns that are not part of the kernel's linear mapping by default, but are accessed via the same memory controller as ram. The motivation for this new type is large capacity persistent memory that needs struct page entries in the 'memmap' to support 3rd party DMA (i.e. O_DIRECT I/O with a persistent memory source/target). However, we also need it in support of maintaining a list of mapped inodes which need to be unmapped at driver teardown or freeze_bdev() time. Signed-off-by: Dan Williams Cc: Christoph Hellwig Cc: Dave Hansen Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/sysdev/axonram.c | 9 +++--- drivers/block/brd.c | 7 +++-- drivers/nvdimm/pmem.c | 13 ++++++--- drivers/s390/block/dcssblk.c | 11 ++++--- fs/dax.c | 11 ++++--- include/linux/blkdev.h | 5 ++-- include/linux/pfn.h | 9 ++++++ include/linux/pfn_t.h | 67 +++++++++++++++++++++++++++++++++++++++++++ kernel/memremap.c | 7 +++++ 9 files changed, 116 insertions(+), 23 deletions(-) commit ba049e93aef7e8c571567088b1b73f4f5b99272a Author: Dan Williams Date: Fri Jan 15 16:56:11 2016 -0800 kvm: rename pfn_t to kvm_pfn_t To date, we have implemented two I/O usage models for persistent memory, PMEM (a persistent "ram disk") and DAX (mmap persistent memory into userspace). This series adds a third, DAX-GUP, that allows DAX mappings to be the target of direct-i/o. It allows userspace to coordinate DMA/RDMA from/to persistent memory. The implementation leverages the ZONE_DEVICE mm-zone that went into 4.3-rc1 (also discussed at kernel summit) to flag pages that are owned and dynamically mapped by a device driver. The pmem driver, after mapping a persistent memory range into the system memmap via devm_memremap_pages(), arranges for DAX to distinguish pfn-only versus page-backed pmem-pfns via flags in the new pfn_t type. The DAX code, upon seeing a PFN_DEV+PFN_MAP flagged pfn, flags the resulting pte(s) inserted into the process page tables with a new _PAGE_DEVMAP flag. Later, when get_user_pages() is walking ptes it keys off _PAGE_DEVMAP to pin the device hosting the page range active. Finally, get_page() and put_page() are modified to take references against the device driver established page mapping. Finally, this need for "struct page" for persistent memory requires memory capacity to store the memmap array. Given the memmap array for a large pool of persistent may exhaust available DRAM introduce a mechanism to allocate the memmap from persistent memory. The new "struct vmem_altmap *" parameter to devm_memremap_pages() enables arch_add_memory() to use reserved pmem capacity rather than the page allocator. This patch (of 18): The core has developed a need for a "pfn_t" type [1]. Move the existing pfn_t in KVM to kvm_pfn_t [2]. [1]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002199.html [2]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002218.html Signed-off-by: Dan Williams Acked-by: Christoffer Dall Cc: Paolo Bonzini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/kvm_mmu.h | 5 ++-- arch/arm/kvm/mmu.c | 10 ++++---- arch/arm64/include/asm/kvm_mmu.h | 3 ++- arch/mips/include/asm/kvm_host.h | 6 ++--- arch/mips/kvm/emulate.c | 2 +- arch/mips/kvm/tlb.c | 14 +++++------ arch/powerpc/include/asm/kvm_book3s.h | 4 +-- arch/powerpc/include/asm/kvm_ppc.h | 2 +- arch/powerpc/kvm/book3s.c | 6 ++--- arch/powerpc/kvm/book3s_32_mmu_host.c | 2 +- arch/powerpc/kvm/book3s_64_mmu_host.c | 2 +- arch/powerpc/kvm/e500.h | 2 +- arch/powerpc/kvm/e500_mmu_host.c | 8 +++--- arch/powerpc/kvm/trace_pr.h | 2 +- arch/x86/kvm/iommu.c | 11 ++++---- arch/x86/kvm/mmu.c | 37 +++++++++++++-------------- arch/x86/kvm/mmu_audit.c | 2 +- arch/x86/kvm/paging_tmpl.h | 6 ++--- arch/x86/kvm/vmx.c | 2 +- arch/x86/kvm/x86.c | 2 +- include/linux/kvm_host.h | 37 +++++++++++++-------------- include/linux/kvm_types.h | 2 +- virt/kvm/kvm_main.c | 47 ++++++++++++++++++----------------- 23 files changed, 110 insertions(+), 104 deletions(-) commit 16da306849d0335af7c353ec14121cf422433d33 Author: Dan Williams Date: Fri Jan 15 16:56:08 2016 -0800 um: kill pfn_t The core has developed a need for a "pfn_t" type [1]. Convert the usage of pfn_t by usermode-linux to an unsigned long, and update pfn_to_phys() to drop its expectation of a typed pfn. [1]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002199.html Signed-off-by: Dan Williams Cc: Dave Hansen Cc: Jeff Dike Cc: Richard Weinberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/um/include/asm/page.h | 7 +++---- arch/um/include/asm/pgtable-3level.h | 4 ++-- arch/um/include/asm/pgtable.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) commit 59bf4fb9d386601cbaa70a9b00159abb846dedaa Author: Toshi Kani Date: Fri Jan 15 16:56:05 2016 -0800 dax: Split pmd map when fallback on COW An infinite loop of PMD faults was observed when attempted to mlock() a private read-only PMD mmap'd range of a DAX file. __dax_pmd_fault() simply returns with VM_FAULT_FALLBACK when falling back to PTE on COW. However, __handle_mm_fault() returns without falling back to handle_pte_fault() because a PMD map is present in this case. Change __dax_pmd_fault() to split the PMD map, if present, before returning with VM_FAULT_FALLBACK. Signed-off-by: Toshi Kani Signed-off-by: Dan Williams Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 01871e59af5cc1cbf290ad6b4b95cd2f0cec9e8c Author: Ross Zwisler Date: Fri Jan 15 16:56:02 2016 -0800 mm, dax: fix livelock, allow dax pmd mappings to become writeable Prior to this change DAX PMD mappings that were made read-only were never able to be made writable again. This is because the code in insert_pfn_pmd() that calls pmd_mkdirty() and pmd_mkwrite() would skip these calls if the PMD already existed in the page table. Instead, if we are doing a write always mark the PMD entry as dirty and writeable. Without this code we can get into a condition where we mark the PMD as read-only, and then on a subsequent write fault we get into an infinite loop of PMD faults where we try unsuccessfully to make the PMD writeable. Signed-off-by: Ross Zwisler Signed-off-by: Dan Williams Reported-by: Jeff Moyer Reported-by: Toshi Kani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit b2e0d1625e193b40cbbd45b799f82d54d34e015c Author: Dan Williams Date: Fri Jan 15 16:55:59 2016 -0800 dax: fix lifetime of in-kernel dax mappings with dax_map_atomic() The DAX implementation needs to protect new calls to ->direct_access() and usage of its return value against the driver for the underlying block device being disabled. Use blk_queue_enter()/blk_queue_exit() to hold off blk_cleanup_queue() from proceeding, or otherwise fail new mapping requests if the request_queue is being torn down. This also introduces blk_dax_ctl to simplify the interface from fs/dax.c through dax_map_atomic() to bdev_direct_access(). [willy@linux.intel.com: fix read() of a hole] Signed-off-by: Dan Williams Reviewed-by: Jeff Moyer Cc: Jan Kara Cc: Jens Axboe Cc: Dave Chinner Cc: Ross Zwisler Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 13 ++-- fs/dax.c | 208 ++++++++++++++++++++++++++++++------------------- include/linux/blkdev.h | 17 +++- 3 files changed, 150 insertions(+), 88 deletions(-) commit fe683adabfe6629c0b6db32bbbc1ce6cacbf2117 Author: Dan Williams Date: Fri Jan 15 16:55:56 2016 -0800 dax: guarantee page aligned results from bdev_direct_access() If a ->direct_access() implementation ever returns a map count less than PAGE_SIZE, catch the error in bdev_direct_access(). This simplifies error checking in upper layers. Signed-off-by: Dan Williams Reported-by: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 2 ++ fs/dax.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit 0e749e54244eec87b2a3cd0a4314e60bc6781115 Author: Dan Williams Date: Fri Jan 15 16:55:53 2016 -0800 dax: increase granularity of dax_clear_blocks() operations dax_clear_blocks is currently performing a cond_resched() after every PAGE_SIZE memset. We need not check so frequently, for example md-raid only calls cond_resched() at stripe granularity. Also, in preparation for introducing a dax_map_atomic() operation that temporarily pins a dax mapping move the call to cond_resched() to the outer loop. The worst case latency between calls to cond_resched() after this change is 500us the average latency is 133us. This is up from a 10us max and 4us average. Signed-off-by: Dan Williams Reviewed-by: Jan Kara Reviewed-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 52db400fcd50216dd8511a0880b936235755836f Author: Dan Williams Date: Fri Jan 15 16:55:49 2016 -0800 pmem, dax: clean up clear_pmem() To date, we have implemented two I/O usage models for persistent memory, PMEM (a persistent "ram disk") and DAX (mmap persistent memory into userspace). This series adds a third, DAX-GUP, that allows DAX mappings to be the target of direct-i/o. It allows userspace to coordinate DMA/RDMA from/to persistent memory. The implementation leverages the ZONE_DEVICE mm-zone that went into 4.3-rc1 (also discussed at kernel summit) to flag pages that are owned and dynamically mapped by a device driver. The pmem driver, after mapping a persistent memory range into the system memmap via devm_memremap_pages(), arranges for DAX to distinguish pfn-only versus page-backed pmem-pfns via flags in the new pfn_t type. The DAX code, upon seeing a PFN_DEV+PFN_MAP flagged pfn, flags the resulting pte(s) inserted into the process page tables with a new _PAGE_DEVMAP flag. Later, when get_user_pages() is walking ptes it keys off _PAGE_DEVMAP to pin the device hosting the page range active. Finally, get_page() and put_page() are modified to take references against the device driver established page mapping. Finally, this need for "struct page" for persistent memory requires memory capacity to store the memmap array. Given the memmap array for a large pool of persistent may exhaust available DRAM introduce a mechanism to allocate the memmap from persistent memory. The new "struct vmem_altmap *" parameter to devm_memremap_pages() enables arch_add_memory() to use reserved pmem capacity rather than the page allocator. This patch (of 25): Both __dax_pmd_fault, and clear_pmem() were taking special steps to clear memory a page at a time to take advantage of non-temporal clear_page() implementations. However, x86_64 does not use non-temporal instructions for clear_page(), and arch_clear_pmem() was always incurring the cost of __arch_wb_cache_pmem(). Clean up the assumption that doing clear_pmem() a page at a time is more performant. Signed-off-by: Dan Williams Reported-by: Dave Hansen Reviewed-by: Ross Zwisler Reviewed-by: Jeff Moyer Cc: "H. Peter Anvin" Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Christoffer Dall Cc: Christoph Hellwig Cc: Dave Chinner Cc: David Airlie Cc: Ingo Molnar Cc: Jan Kara Cc: Jeff Dike Cc: Jens Axboe Cc: Kirill A. Shutemov Cc: Logan Gunthorpe Cc: Matthew Wilcox Cc: Mel Gorman Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Richard Weinberger Cc: Thomas Gleixner Cc: Toshi Kani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pmem.h | 7 +------ fs/dax.c | 4 +--- 2 files changed, 2 insertions(+), 9 deletions(-) commit bd56086f10186e2c205429cc12b16e43aacb1c7e Author: Kirill A. Shutemov Date: Fri Jan 15 16:55:46 2016 -0800 thp: fix split_huge_page() after mremap() of THP Sasha Levin has reported KASAN out-of-bounds bug[1]. It points to "if (!is_swap_pte(pte[i]))" in unfreeze_page_vma() as a problematic access. The cause is that split_huge_page() doesn't handle THP correctly if it's not allingned to PMD boundary. It can happen after mremap(). Test-case (not always triggers the bug): #define _GNU_SOURCE #include #include #include #define MB (1024UL*1024) #define SIZE (2*MB) #define BASE ((void *)0x400000000000) int main() { char *p; p = mmap(BASE, SIZE, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0); if (p == MAP_FAILED) perror("mmap"), exit(1); p = mremap(BASE, SIZE, SIZE, MREMAP_FIXED | MREMAP_MAYMOVE, BASE + SIZE + 8192); if (p == MAP_FAILED) perror("mremap"), exit(1); system("echo 1 > /sys/kernel/debug/split_huge_pages"); return 0; } The patch fixes freeze and unfreeze paths to handle page table boundary crossing. It also makes mapcount vs count check in split_huge_page_to_list() stricter: - after freeze we don't expect any subpage mapped as we remove them from rmap when setting up migration entries; - count must be 1, meaning only caller has reference to the page; [1] https://gist.github.com/sashalevin/c67fbea55e7c0576972a Signed-off-by: Kirill A. Shutemov Reported-by: Sasha Levin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 70 +++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 21 deletions(-) commit b8d3c4c3009d42869dc03a1da0efc2aa687d0ab4 Author: Minchan Kim Date: Fri Jan 15 16:55:42 2016 -0800 mm/huge_memory.c: don't split THP page when MADV_FREE syscall is called We don't need to split THP page when MADV_FREE syscall is called if [start, len] is aligned with THP size. The split could be done when VM decide to free it in reclaim path if memory pressure is heavy. With that, we could avoid unnecessary THP split. For the feature, this patch changes pte dirtness marking logic of THP. Now, it marks every ptes of pages dirty unconditionally in splitting, which makes MADV_FREE void. So, instead, this patch propagates pmd dirtiness to all pages via PG_dirty and restores pte dirtiness from PG_dirty. With this, if pmd is clean(ie, MADV_FREEed) when split happens(e,g, shrink_page_list), all of pages are clean too so we could discard them. Signed-off-by: Minchan Kim Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Ivan Kokshaysky Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Matt Turner Cc: Max Filippov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Michal Hocko Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Rik van Riel Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 3 ++ mm/huge_memory.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++--- mm/madvise.c | 8 ++++- 3 files changed, 92 insertions(+), 6 deletions(-) commit 05ee26d9e7e29ab026995eab79be3c6e8351908c Author: Minchan Kim Date: Fri Jan 15 16:55:37 2016 -0800 arch/arm64/include/asm/pgtable.h: add pmd_mkclean for THP MADV_FREE needs pmd_dirty and pmd_mkclean for detecting recent overwrite of the contents since MADV_FREE syscall is called for THP page. This patch adds pmd_mkclean for THP page MADV_FREE support. Signed-off-by: Minchan Kim Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Hugh Dickins Cc: Ivan Kokshaysky Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Max Filippov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Michal Hocko Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Rik van Riel Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) commit 44842045e4baaf406db2954dd2e07152fa61528d Author: Minchan Kim Date: Fri Jan 15 16:55:33 2016 -0800 arch/arm/include/asm/pgtable-3level.h: add pmd_mkclean for THP MADV_FREE needs pmd_dirty and pmd_mkclean for detecting recent overwrite of the contents since MADV_FREE syscall is called for THP page. This patch adds pmd_mkclean for THP page MADV_FREE support. Signed-off-by: Minchan Kim Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Hugh Dickins Cc: Ivan Kokshaysky Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Max Filippov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Michal Hocko Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Rik van Riel Cc: Roland Dreier Cc: Shaohua Li Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/pgtable-3level.h | 1 + 1 file changed, 1 insertion(+) commit d5d6a443b24304711fe83b312d29ff26cfa03f0c Author: Minchan Kim Date: Fri Jan 15 16:55:29 2016 -0800 arch/powerpc/include/asm/pgtable-ppc64.h: add pmd_[dirty|mkclean] for THP MADV_FREE needs pmd_dirty and pmd_mkclean for detecting recent overwrite of the contents since MADV_FREE syscall is called for THP page. This patch adds pmd_dirty and pmd_mkclean for THP page MADV_FREE support. Signed-off-by: Minchan Kim Cc: Benjamin Herrenschmidt Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Hugh Dickins Cc: Ivan Kokshaysky Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Max Filippov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Michal Hocko Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Rik van Riel Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/book3s/64/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) commit 79cedb8f62f116e72079c4d424edbc3d90302333 Author: Minchan Kim Date: Fri Jan 15 16:55:24 2016 -0800 arch/sparc/include/asm/pgtable_64.h: add pmd_[dirty|mkclean] for THP MADV_FREE needs pmd_dirty and pmd_mkclean for detecting recent overwrite of the contents since MADV_FREE syscall is called for THP page. This patch adds pmd_dirty and pmd_mkclean for THP page MADV_FREE support. Signed-off-by: Minchan Kim Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Hugh Dickins Cc: Ivan Kokshaysky Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Max Filippov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Michal Hocko Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Rik van Riel Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/pgtable_64.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 590a471ce92355bc6c93a48769e8616b80071991 Author: Minchan Kim Date: Fri Jan 15 16:55:20 2016 -0800 arch/x86/include/asm/pgtable.h: add pmd_[dirty|mkclean] for THP MADV_FREE needs pmd_dirty and pmd_mkclean for detecting recent overwrite of the contents since MADV_FREE syscall is called for THP page. This patch adds pmd_dirty and pmd_mkclean for THP page MADV_FREE support. Signed-off-by: Minchan Kim Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Hugh Dickins Cc: Ivan Kokshaysky Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Max Filippov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Michal Hocko Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Rik van Riel Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 5 +++++ 1 file changed, 5 insertions(+) commit 337ed7eb5fada305c7d5bf168cf5032f825faddf Author: Minchan Kim Date: Fri Jan 15 16:55:15 2016 -0800 mm/ksm.c: mark stable page dirty The MADV_FREE patchset changes page reclaim to simply free a clean anonymous page with no dirty ptes, instead of swapping it out; but KSM uses clean write-protected ptes to reference the stable ksm page. So be sure to mark that page dirty, so it's never mistakenly discarded. [hughd@google.com: adjusted comments] Signed-off-by: Minchan Kim Acked-by: Hugh Dickins Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Ivan Kokshaysky Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Max Filippov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Michal Hocko Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Rik van Riel Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 10853a039208c4afaa322a7d802456c8dca222f4 Author: Minchan Kim Date: Fri Jan 15 16:55:11 2016 -0800 mm: move lazily freed pages to inactive list MADV_FREE is a hint that it's okay to discard pages if there is memory pressure and we use reclaimers(ie, kswapd and direct reclaim) to free them so there is no value keeping them in the active anonymous LRU so this patch moves them to inactive LRU list's head. This means that MADV_FREE-ed pages which were living on the inactive list are reclaimed first because they are more likely to be cold rather than recently active pages. An arguable issue for the approach would be whether we should put the page to the head or tail of the inactive list. I chose head because the kernel cannot make sure it's really cold or warm for every MADV_FREE usecase but at least we know it's not *hot*, so landing of inactive head would be a comprimise for various usecases. This fixes suboptimal behavior of MADV_FREE when pages living on the active list will sit there for a long time even under memory pressure while the inactive list is reclaimed heavily. This basically breaks the whole purpose of using MADV_FREE to help the system to free memory which is might not be used. Signed-off-by: Minchan Kim Acked-by: Hugh Dickins Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Cc: Rik van Riel Cc: Shaohua Li Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Ivan Kokshaysky Cc: Jason Evans Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Max Filippov Cc: Michael Kerrisk Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Roland Dreier Cc: Russell King Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 1 + mm/madvise.c | 2 ++ mm/swap.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit 64b42bc1cfdf6e2c3ab7315f2ff56c31cd257370 Author: Minchan Kim Date: Fri Jan 15 16:55:06 2016 -0800 mm/madvise.c: free swp_entry in madvise_free When I test below piece of code with 12 processes(ie, 512M * 12 = 6G consume) on my (3G ram + 12 cpu + 8G swap, the madvise_free is siginficat slower (ie, 2x times) than madvise_dontneed. loop = 5; mmap(512M); while (loop--) { memset(512M); madvise(MADV_FREE or MADV_DONTNEED); } The reason is lots of swapin. 1) dontneed: 1,612 swapin 2) madvfree: 879,585 swapin If we find hinted pages were already swapped out when syscall is called, it's pointless to keep the swapped-out pages in pte. Instead, let's free the cold page because swapin is more expensive than (alloc page + zeroing). With this patch, it reduced swapin from 879,585 to 1,878 so elapsed time 1) dontneed: 6.10user 233.50system 0:50.44elapsed 2) madvfree: 6.03user 401.17system 1:30.67elapsed 2) madvfree + below patch: 6.70user 339.14system 1:04.45elapsed Signed-off-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Hugh Dickins Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Ivan Kokshaysky Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Max Filippov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Mika Penttil Cc: Ralf Baechle Cc: Richard Henderson Cc: Rik van Riel Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 21f55b018ba57897f4d3590ecbe11516bdc540af Author: Chen Gang Date: Fri Jan 15 16:55:02 2016 -0800 arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures For uapi, need try to let all macros have same value, and MADV_FREE is added into main branch recently, so need redefine MADV_FREE for it. At present, '8' can be shared with all architectures, so redefine it to '8'. [sudipm.mukherjee@gmail.com: correct uniform value of MADV_FREE] Signed-off-by: Chen Gang Signed-off-by: Minchan Kim Acked-by: Hugh Dickins Cc: Ralf Baechle Cc: Arnd Bergmann Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Chris Zankel Cc: Max Filippov Cc: Roland Dreier Cc: Darrick J. Wong Cc: David S. Miller Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Daniel Micay Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Michael Kerrisk Cc: Michal Hocko Cc: Mika Penttil Cc: Rik van Riel Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/uapi/asm/mman.h | 1 + arch/mips/include/uapi/asm/mman.h | 1 + arch/parisc/include/uapi/asm/mman.h | 1 + arch/xtensa/include/uapi/asm/mman.h | 1 + include/uapi/asm-generic/mman-common.h | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) commit ef58978f1eaab140081ec1808d96ee06e933e760 Author: Minchan Kim Date: Fri Jan 15 16:54:57 2016 -0800 mm: define MADV_FREE for some arches Most architectures use asm-generic, but alpha, mips, parisc, xtensa need their own definitions. This patch defines MADV_FREE for them so it should fix build break for their architectures. Maybe, I should split and feed pieces to arch maintainers but included here for mmotm convenience. [gang.chen.5i5j@gmail.com: let MADV_FREE have same value for all architectures] Signed-off-by: Minchan Kim Acked-by: Max Filippov Cc: Wu Fengguang Cc: Michael Kerrisk Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Ralf Baechle Cc: Chris Zankel Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Daniel Micay Cc: Darrick J. Wong Cc: David S. Miller Cc: Hugh Dickins Cc: Jason Evans Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Kirill A. Shutemov Cc: Matt Turner Cc: Mel Gorman Cc: Michal Hocko Cc: Mika Penttil Cc: Rik van Riel Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Signed-off-by: Chen Gang Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/uapi/asm/mman.h | 1 + arch/mips/include/uapi/asm/mman.h | 1 + arch/parisc/include/uapi/asm/mman.h | 1 + arch/xtensa/include/uapi/asm/mman.h | 1 + 4 files changed, 4 insertions(+) commit 854e9ed09dedf0c19ac8640e91bcc74bc3f9e5c9 Author: Minchan Kim Date: Fri Jan 15 16:54:53 2016 -0800 mm: support madvise(MADV_FREE) Linux doesn't have an ability to free pages lazy while other OS already have been supported that named by madvise(MADV_FREE). The gain is clear that kernel can discard freed pages rather than swapping out or OOM if memory pressure happens. Without memory pressure, freed pages would be reused by userspace without another additional overhead(ex, page fault + allocation + zeroing). Jason Evans said: : Facebook has been using MAP_UNINITIALIZED : (https://lkml.org/lkml/2012/1/18/308) in some of its applications for : several years, but there are operational costs to maintaining this : out-of-tree in our kernel and in jemalloc, and we are anxious to retire it : in favor of MADV_FREE. When we first enabled MAP_UNINITIALIZED it : increased throughput for much of our workload by ~5%, and although the : benefit has decreased using newer hardware and kernels, there is still : enough benefit that we cannot reasonably retire it without a replacement. : : Aside from Facebook operations, there are numerous broadly used : applications that would benefit from MADV_FREE. The ones that immediately : come to mind are redis, varnish, and MariaDB. I don't have much insight : into Android internals and development process, but I would hope to see : MADV_FREE support eventually end up there as well to benefit applications : linked with the integrated jemalloc. : : jemalloc will use MADV_FREE once it becomes available in the Linux kernel. : In fact, jemalloc already uses MADV_FREE or equivalent everywhere it's : available: *BSD, OS X, Windows, and Solaris -- every platform except Linux : (and AIX, but I'm not sure it even compiles on AIX). The lack of : MADV_FREE on Linux forced me down a long series of increasingly : sophisticated heuristics for madvise() volume reduction, and even so this : remains a common performance issue for people using jemalloc on Linux. : Please integrate MADV_FREE; many people will benefit substantially. How it works: When madvise syscall is called, VM clears dirty bit of ptes of the range. If memory pressure happens, VM checks dirty bit of page table and if it found still "clean", it means it's a "lazyfree pages" so VM could discard the page instead of swapping out. Once there was store operation for the page before VM peek a page to reclaim, dirty bit is set so VM can swap out the page instead of discarding. One thing we should notice is that basically, MADV_FREE relies on dirty bit in page table entry to decide whether VM allows to discard the page or not. IOW, if page table entry includes marked dirty bit, VM shouldn't discard the page. However, as a example, if swap-in by read fault happens, page table entry doesn't have dirty bit so MADV_FREE could discard the page wrongly. For avoiding the problem, MADV_FREE did more checks with PageDirty and PageSwapCache. It worked out because swapped-in page lives on swap cache and since it is evicted from the swap cache, the page has PG_dirty flag. So both page flags check effectively prevent wrong discarding by MADV_FREE. However, a problem in above logic is that swapped-in page has PG_dirty still after they are removed from swap cache so VM cannot consider the page as freeable any more even if madvise_free is called in future. Look at below example for detail. ptr = malloc(); memset(ptr); .. .. .. heavy memory pressure so all of pages are swapped out .. .. var = *ptr; -> a page swapped-in and could be removed from swapcache. Then, page table doesn't mark dirty bit and page descriptor includes PG_dirty .. .. madvise_free(ptr); -> It doesn't clear PG_dirty of the page. .. .. .. .. heavy memory pressure again. .. In this time, VM cannot discard the page because the page .. has *PG_dirty* To solve the problem, this patch clears PG_dirty if only the page is owned exclusively by current process when madvise is called because PG_dirty represents ptes's dirtiness in several processes so we could clear it only if we own it exclusively. Firstly, heavy users would be general allocators(ex, jemalloc, tcmalloc and hope glibc supports it) and jemalloc/tcmalloc already have supported the feature for other OS(ex, FreeBSD) barrios@blaptop:~/benchmark/ebizzy$ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 12 On-line CPU(s) list: 0-11 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 12 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 2 Stepping: 3 CPU MHz: 3200.185 BogoMIPS: 6400.53 Virtualization: VT-x Hypervisor vendor: KVM Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 4096K NUMA node0 CPU(s): 0-11 ebizzy benchmark(./ebizzy -S 10 -n 512) Higher avg is better. vanilla-jemalloc MADV_free-jemalloc 1 thread records: 10 records: 10 avg: 2961.90 avg: 12069.70 std: 71.96(2.43%) std: 186.68(1.55%) max: 3070.00 max: 12385.00 min: 2796.00 min: 11746.00 2 thread records: 10 records: 10 avg: 5020.00 avg: 17827.00 std: 264.87(5.28%) std: 358.52(2.01%) max: 5244.00 max: 18760.00 min: 4251.00 min: 17382.00 4 thread records: 10 records: 10 avg: 8988.80 avg: 27930.80 std: 1175.33(13.08%) std: 3317.33(11.88%) max: 9508.00 max: 30879.00 min: 5477.00 min: 21024.00 8 thread records: 10 records: 10 avg: 13036.50 avg: 33739.40 std: 170.67(1.31%) std: 5146.22(15.25%) max: 13371.00 max: 40572.00 min: 12785.00 min: 24088.00 16 thread records: 10 records: 10 avg: 11092.40 avg: 31424.20 std: 710.60(6.41%) std: 3763.89(11.98%) max: 12446.00 max: 36635.00 min: 9949.00 min: 25669.00 32 thread records: 10 records: 10 avg: 11067.00 avg: 34495.80 std: 971.06(8.77%) std: 2721.36(7.89%) max: 12010.00 max: 38598.00 min: 9002.00 min: 30636.00 In summary, MADV_FREE is about much faster than MADV_DONTNEED. This patch (of 12): Add core MADV_FREE implementation. [akpm@linux-foundation.org: small cleanups] Signed-off-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Hugh Dickins Cc: Mika Penttil Cc: Michael Kerrisk Cc: Johannes Weiner Cc: Rik van Riel Cc: Mel Gorman Cc: KOSAKI Motohiro Cc: Jason Evans Cc: Daniel Micay Cc: "Kirill A. Shutemov" Cc: Shaohua Li Cc: Cc: Andy Lutomirski Cc: "James E.J. Bottomley" Cc: "Kirill A. Shutemov" Cc: "Shaohua Li" Cc: Andrea Arcangeli Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Gang Cc: Chris Zankel Cc: Darrick J. Wong Cc: David S. Miller Cc: Helge Deller Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Max Filippov Cc: Ralf Baechle Cc: Richard Henderson Cc: Roland Dreier Cc: Russell King Cc: Shaohua Li Cc: Will Deacon Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 2 + include/linux/vm_event_item.h | 1 + include/uapi/asm-generic/mman-common.h | 1 + mm/madvise.c | 170 +++++++++++++++++++++++++++++++++ mm/rmap.c | 36 ++++++- mm/swap_state.c | 5 +- mm/vmscan.c | 14 ++- mm/vmstat.c | 1 + 8 files changed, 221 insertions(+), 9 deletions(-) commit 17ec4cd985780a7e30aa45bb8f272237c12502a4 Author: Jerome Marchand Date: Fri Jan 15 16:54:48 2016 -0800 zram: don't call idr_remove() from zram_remove() The use of idr_remove() is forbidden in the callback functions of idr_for_each(). It is therefore unsafe to call idr_remove in zram_remove(). This patch moves the call to idr_remove() from zram_remove() to hot_remove_store(). In the detroy_devices() path, idrs are removed by idr_destroy(). This solves an use-after-free detected by KASan. [akpm@linux-foundation.org: fix coding stype, per Sergey] Signed-off-by: Jerome Marchand Acked-by: Sergey Senozhatsky Cc: Minchan Kim Cc: [4.2+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8749cfea11f3fffe8f7cad891470a77b36e0185f Author: Vladimir Davydov Date: Fri Jan 15 16:54:45 2016 -0800 mm: add page_check_address_transhuge() helper page_referenced_one() and page_idle_clear_pte_refs_one() duplicate the code for looking up pte of a (possibly transhuge) page. Move this code to a new helper function, page_check_address_transhuge(), and make the above mentioned functions use it. This is just a cleanup, no functional changes are intended. Signed-off-by: Vladimir Davydov Reviewed-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 19 +++++++++ mm/page_idle.c | 63 ++++------------------------ mm/rmap.c | 115 +++++++++++++++++++++++++++++++-------------------- 3 files changed, 99 insertions(+), 98 deletions(-) commit d965432234db94ee8e185f8fd8e3181bed7459fd Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:43 2016 -0800 thp: increase split_huge_page() success rate During freeze_page(), we remove the page from rmap. It munlocks the page if it was mlocked. clear_page_mlock() uses thelru cache, which temporary pins the page. Let's drain the lru cache before checking page's count vs. mapcount. The change makes mlocked page split on first attempt, if it was not pinned by somebody else. Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 49071d436b51b58aeaf7abcd1877f38ca0146e31 Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:40 2016 -0800 thp: add debugfs handle to split all huge pages Writing 1 into 'split_huge_pages' will try to find and split all huge pages in the system. This is useful for debuging. [akpm@linux-foundation.org: fix printk text, per Vlastimil] Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Cc: Andrea Arcangeli Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit b20ce5e03b936be077463015661dcf52be274e5b Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:37 2016 -0800 mm: prepare page_referenced() and page_idle to new THP refcounting Both page_referenced() and page_idle_clear_pte_refs_one() assume that THP can only be mapped with PMD, so there's no reason to look on PTEs for PageTransHuge() pages. That's no true anymore: THP can be mapped with PTEs too. The patch removes PageTransHuge() test from the functions and opencode page table check. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Kirill A. Shutemov Cc: Vladimir Davydov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: Sasha Levin Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 5 --- include/linux/mm.h | 23 ++++++---- mm/huge_memory.c | 73 ++++++++---------------------- mm/page_idle.c | 65 +++++++++++++++++++++++---- mm/rmap.c | 117 +++++++++++++++++++++++++++++++++--------------- mm/util.c | 14 ++++++ 6 files changed, 185 insertions(+), 112 deletions(-) commit e90309c9f7722db4ff5bce3b9e6e04d1460f2553 Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:33 2016 -0800 thp: allow mlocked THP again Before THP refcounting rework, THP was not allowed to cross VMA boundary. So, if we have THP and we split it, PG_mlocked can be safely transferred to small pages. With new THP refcounting and naive approach to mlocking we can end up with this scenario: 1. we have a mlocked THP, which belong to one VM_LOCKED VMA. 2. the process does munlock() on the *part* of the THP: - the VMA is split into two, one of them VM_LOCKED; - huge PMD split into PTE table; - THP is still mlocked; 3. split_huge_page(): - it transfers PG_mlocked to *all* small pages regrardless if it blong to any VM_LOCKED VMA. We probably could munlock() all small pages on split_huge_page(), but I think we have accounting issue already on step two. Instead of forbidding mlocked pages altogether, we just avoid mlocking PTE-mapped THPs and munlock THPs on split_huge_pmd(). This means PTE-mapped THPs will be on normal lru lists and will be split under memory pressure by vmscan. After the split vmscan will detect unevictable small pages and mlock them. With this approach we shouldn't hit situation like described above. Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 6 +++-- mm/huge_memory.c | 37 ++++++++++++++++++++++++------ mm/memory.c | 6 ++--- mm/mlock.c | 68 +++++++++++++++++++++++++++++++++++++++----------------- mm/rmap.c | 3 +++ mm/swap.c | 1 + 6 files changed, 88 insertions(+), 33 deletions(-) commit a46e63764eb6d0252ab4e96f96ad447594673274 Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:30 2016 -0800 thp: update documentation The patch updates Documentation/vm/transhuge.txt to reflect changes in THP design. Signed-off-by: Kirill A. Shutemov Acked-by: Jerome Marchand Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/transhuge.txt | 151 ++++++++++++++++++++++++++--------------- 1 file changed, 96 insertions(+), 55 deletions(-) commit 61f5d698cc97600e813ca5cf8e449b1ea1c11492 Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:26 2016 -0800 mm: re-enable THP All parts of THP with new refcounting are now in place. We can now allow to enable THP. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a982250f773cc8c76f1eee68a770b7cbf2faf78 Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:17 2016 -0800 thp: introduce deferred_split_huge_page() Currently we don't split huge page on partial unmap. It's not an ideal situation. It can lead to memory overhead. Furtunately, we can detect partial unmap on page_remove_rmap(). But we cannot call split_huge_page() from there due to locking context. It's also counterproductive to do directly from munmap() codepath: in many cases we will hit this from exit(2) and splitting the huge page just to free it up in small pages is not what we really want. The patch introduce deferred_split_huge_page() which put the huge page into queue for splitting. The splitting itself will happen when we get memory pressure via shrinker interface. The page will be dropped from list on freeing through compound page destructor. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 5 ++ include/linux/mm.h | 5 ++ include/linux/mm_types.h | 2 + mm/huge_memory.c | 139 +++++++++++++++++++++++++++++++++++++++++++++-- mm/migrate.c | 1 + mm/page_alloc.c | 27 ++++++--- mm/rmap.c | 7 ++- 7 files changed, 174 insertions(+), 12 deletions(-) commit 248db92da13f25073e7ebbd5fb95615aafd771d1 Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:14 2016 -0800 migrate_pages: try to split pages on queuing We are not able to migrate THPs. It means it's not enough to split only PMD on migration -- we need to split compound page under it too. Signed-off-by: Kirill A. Shutemov Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Sasha Levin Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) commit e9b61f19858a5d6c42ce2298cf138279375d0d9b Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:10 2016 -0800 thp: reintroduce split_huge_page() This patch adds implementation of split_huge_page() for new refcountings. Unlike previous implementation, new split_huge_page() can fail if somebody holds GUP pin on the page. It also means that pin on page would prevent it from bening split under you. It makes situation in many places much cleaner. The basic scheme of split_huge_page(): - Check that sum of mapcounts of all subpage is equal to page_count() plus one (caller pin). Foll off with -EBUSY. This way we can avoid useless PMD-splits. - Freeze the page counters by splitting all PMD and setup migration PTEs. - Re-check sum of mapcounts against page_count(). Page's counts are stable now. -EBUSY if page is pinned. - Split compound page. - Unfreeze the page by removing migration entries. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 7 +- include/linux/pagemap.h | 13 +- mm/huge_memory.c | 374 +++++++++++++++++++++++++++++++++++++++++++++++- mm/internal.h | 26 +++- mm/rmap.c | 40 +----- 5 files changed, 415 insertions(+), 45 deletions(-) commit 4e41a30c6d506c884d3da9aeb316352e70679d4b Author: Naoya Horiguchi Date: Fri Jan 15 16:54:07 2016 -0800 mm: hwpoison: adjust for new thp refcounting Some mm-related BUG_ON()s could trigger from hwpoison code due to recent changes in thp refcounting rule. This patch fixes them up. In the new refcounting, we no longer use tail->_mapcount to keep tail's refcount, and thereby we can simplify get/put_hwpoison_page(). And another change is that tail's refcount is not transferred to the raw page during thp split (more precisely, in new rule we don't take refcount on tail page any more.) So when we need thp split, we have to transfer the refcount properly to the 4kB soft-offlined page before migration. thp split code goes into core code only when precheck (total_mapcount(head) == page_count(head) - 1) passes to avoid useless split, where we assume that one refcount is held by the caller of thp split and the others are taken via mapping. To meet this assumption, this patch moves thp split part in soft_offline_page() after get_any_page(). [akpm@linux-foundation.org: remove unneeded #define, per Kirill] Signed-off-by: Naoya Horiguchi Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- mm/memory-failure.c | 73 +++++++++++++++-------------------------------------- 2 files changed, 22 insertions(+), 53 deletions(-) commit d96b339f453997f2f08c52da3f41423be48c978f Author: Naoya Horiguchi Date: Fri Jan 15 16:54:03 2016 -0800 mm: soft-offline: check return value in second __get_any_page() call I saw the following BUG_ON triggered in a testcase where a process calls madvise(MADV_SOFT_OFFLINE) on thps, along with a background process that calls migratepages command repeatedly (doing ping-pong among different NUMA nodes) for the first process: Soft offlining page 0x60000 at 0x700000600000 __get_any_page: 0x60000 free buddy page page:ffffea0001800000 count:0 mapcount:-127 mapping: (null) index:0x1 flags: 0x1fffc0000000000() page dumped because: VM_BUG_ON_PAGE(atomic_read(&page->_count) == 0) ------------[ cut here ]------------ kernel BUG at /src/linux-dev/include/linux/mm.h:342! invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC Modules linked in: cfg80211 rfkill crc32c_intel serio_raw virtio_balloon i2c_piix4 virtio_blk virtio_net ata_generic pata_acpi CPU: 3 PID: 3035 Comm: test_alloc_gene Tainted: G O 4.4.0-rc8-v4.4-rc8-160107-1501-00000-rc8+ #74 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 task: ffff88007c63d5c0 ti: ffff88007c210000 task.ti: ffff88007c210000 RIP: 0010:[] [] put_page+0x5c/0x60 RSP: 0018:ffff88007c213e00 EFLAGS: 00010246 Call Trace: put_hwpoison_page+0x4e/0x80 soft_offline_page+0x501/0x520 SyS_madvise+0x6bc/0x6f0 entry_SYSCALL_64_fastpath+0x12/0x6a Code: 8b fc ff ff 5b 5d c3 48 89 df e8 b0 fa ff ff 48 89 df 31 f6 e8 c6 7d ff ff 5b 5d c3 48 c7 c6 08 54 a2 81 48 89 df e8 a4 c5 01 00 <0f> 0b 66 90 66 66 66 66 90 55 48 89 e5 41 55 41 54 53 48 8b 47 RIP [] put_page+0x5c/0x60 RSP The root cause resides in get_any_page() which retries to get a refcount of the page to be soft-offlined. This function calls put_hwpoison_page(), expecting that the target page is putback to LRU list. But it can be also freed to buddy. So the second check need to care about such case. Fixes: af8fae7c0886 ("mm/memory-failure.c: clean up soft_offline_page()") Signed-off-by: Naoya Horiguchi Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Vlastimil Babka Cc: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Cc: [3.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d2fa965483f4c39bd097ff9bbf3efe62d4cf367 Author: Kirill A. Shutemov Date: Fri Jan 15 16:54:00 2016 -0800 thp, mm: split_huge_page(): caller need to lock page We're going to use migration entries instead of compound_lock() to stabilize page refcounts. Setup and remove migration entries require page to be locked. Some of split_huge_page() callers already have the page locked. Let's require everybody to lock the page before calling split_huge_page(). Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 8 +++++++- mm/migrate.c | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit ba98828088ad3ffa7ee4d5b017c291934fcbaeb9 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:56 2016 -0800 thp: add option to setup migration entries during PMD split We are going to use migration PTE entries to stabilize page counts. If the page is mapped with PMDs we need to split the PMD and setup migration entries. It's reasonable to combine these operations to avoid double-scanning over the page table. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit eef1b3ba053aa68967d294c80a50c4a26db30f52 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:53 2016 -0800 thp: implement split_huge_pmd() Original split_huge_page() combined two operations: splitting PMDs into tables of PTEs and splitting underlying compound page. This patch implements split_huge_pmd() which split given PMD without splitting other PMDs this page mapped with or underlying compound page. Without tail page refcounting, implementation of split_huge_pmd() is pretty straight-forward. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 11 ++++- mm/huge_memory.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 1 deletion(-) commit e81c48024f43b4aabe1ec4709786fa1f96814717 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:49 2016 -0800 mm, numa: skip PTE-mapped THP on numa fault We're going to have THP mapped with PTEs. It will confuse numabalancing. Let's skip them for now. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e1534ae95004d6a307839a44eed40389d608c935 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:46 2016 -0800 mm: differentiate page_mapped() from page_mapcount() for compound pages Let's define page_mapped() to be true for compound pages if any sub-pages of the compound page is mapped (with PMD or PTE). On other hand page_mapcount() return mapcount for this particular small page. This will make cases like page_get_anon_vma() behave correctly once we allow huge pages to be mapped with PTE. Most users outside core-mm should use page_mapcount() instead of page_mapped(). Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/mm/cache.c | 4 ++-- arch/arm/mm/flush.c | 2 +- arch/mips/mm/c-r4k.c | 3 ++- arch/mips/mm/cache.c | 2 +- arch/mips/mm/init.c | 6 +++--- arch/sh/mm/cache-sh4.c | 2 +- arch/sh/mm/cache.c | 8 ++++---- arch/xtensa/mm/tlb.c | 2 +- fs/proc/page.c | 4 ++-- include/linux/mm.h | 15 +++++++++++++-- mm/filemap.c | 2 +- 11 files changed, 31 insertions(+), 19 deletions(-) commit 53f9263baba69fc1630e3c780c4d11b72643f962 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:42 2016 -0800 mm: rework mapcount accounting to enable 4k mapping of THPs We're going to allow mapping of individual 4k pages of THP compound. It means we need to track mapcount on per small page basis. Straight-forward approach is to use ->_mapcount in all subpages to track how many time this subpage is mapped with PMDs or PTEs combined. But this is rather expensive: mapping or unmapping of a THP page with PMD would require HPAGE_PMD_NR atomic operations instead of single we have now. The idea is to store separately how many times the page was mapped as whole -- compound_mapcount. This frees up ->_mapcount in subpages to track PTE mapcount. We use the same approach as with compound page destructor and compound order to store compound_mapcount: use space in first tail page, ->mapping this time. Any time we map/unmap whole compound page (THP or hugetlb) -- we increment/decrement compound_mapcount. When we map part of compound page with PTE we operate on ->_mapcount of the subpage. page_mapcount() counts both: PTE and PMD mappings of the page. Basically, we have mapcount for a subpage spread over two counters. It makes tricky to detect when last mapcount for a page goes away. We introduced PageDoubleMap() for this. When we split THP PMD for the first time and there's other PMD mapping left we offset up ->_mapcount in all subpages by one and set PG_double_map on the compound page. These additional references go away with last compound_mapcount. This approach provides a way to detect when last mapcount goes away on per small page basis without introducing new overhead for most common cases. [akpm@linux-foundation.org: fix typo in comment] [mhocko@suse.com: ignore partial THP when moving task] Signed-off-by: Kirill A. Shutemov Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 26 +++++++++++- include/linux/mm_types.h | 1 + include/linux/page-flags.h | 36 +++++++++++++++++ include/linux/rmap.h | 4 +- mm/debug.c | 5 ++- mm/huge_memory.c | 2 +- mm/hugetlb.c | 4 +- mm/memcontrol.c | 8 ++++ mm/memory.c | 2 +- mm/migrate.c | 2 +- mm/page_alloc.c | 13 ++++-- mm/rmap.c | 98 +++++++++++++++++++++++++++++++++++----------- 12 files changed, 166 insertions(+), 35 deletions(-) commit 4b471e8898c3d0f5c97a3c73ac32d0549fe01c87 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:39 2016 -0800 mm, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .../vm/pmdp_splitting_flush/arch-support.txt | 40 ------------- fs/proc/task_mmu.c | 8 +-- include/asm-generic/pgtable.h | 9 --- include/linux/huge_mm.h | 21 ++----- mm/gup.c | 12 +--- mm/huge_memory.c | 67 ++++++---------------- mm/memcontrol.c | 13 +---- mm/memory.c | 18 +----- mm/mincore.c | 2 +- mm/mremap.c | 15 +++-- mm/page_idle.c | 3 +- mm/pgtable-generic.c | 12 ---- mm/rmap.c | 4 +- 13 files changed, 41 insertions(+), 183 deletions(-) commit 1f19617d775879c0863e697fb648154e56918051 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:35 2016 -0800 x86, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Acked-by: Jerome Marchand Cc: Aneesh Kumar K.V Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 9 --------- arch/x86/include/asm/pgtable_types.h | 2 -- arch/x86/mm/gup.c | 13 +------------ arch/x86/mm/pgtable.c | 13 ------------- 4 files changed, 1 insertion(+), 36 deletions(-) commit 702b63ca328496d5577b6edb40d44fa6a6db8aa0 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:31 2016 -0800 tile, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/tile/include/asm/pgtable.h | 10 ---------- 1 file changed, 10 deletions(-) commit 99f1bc0116ccfe28058dc83a6a6895d97dd300d3 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:28 2016 -0800 sparc, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/pgtable_64.h | 16 ---------------- arch/sparc/mm/fault_64.c | 3 --- arch/sparc/mm/gup.c | 2 +- 3 files changed, 1 insertion(+), 20 deletions(-) commit fecffad25458f0217e3d34613be09faaca208bad Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:24 2016 -0800 s390, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. pmdp_splitting_flush() is not needed too: on splitting PMD we will do pmdp_clear_flush() + set_pte_at(). pmdp_clear_flush() will do IPI as needed for fast_gup. Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/include/asm/pgtable.h | 16 +--------------- arch/s390/mm/gup.c | 11 +---------- arch/s390/mm/pgtable.c | 16 ---------------- 3 files changed, 2 insertions(+), 41 deletions(-) commit 7aa9a23c69eae5bfba4f1f92c58d89edc334c8ae Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:21 2016 -0800 powerpc, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. pmdp_splitting_flush() is not needed too: on splitting PMD we will do pmdp_clear_flush() + set_pte_at(). pmdp_clear_flush() will do IPI as needed for fast_gup. Signed-off-by: Kirill A. Shutemov Tested-by: Aneesh Kumar K.V Reviewed-by: Aneesh Kumar K.V Cc: Sasha Levin Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------- arch/powerpc/include/asm/book3s/64/hash.h | 10 ++---- arch/powerpc/include/asm/book3s/64/pgtable.h | 4 --- arch/powerpc/mm/hugepage-hash64.c | 3 -- arch/powerpc/mm/hugetlbpage.c | 4 --- arch/powerpc/mm/pgtable_64.c | 49 --------------------------- 6 files changed, 2 insertions(+), 80 deletions(-) commit b27873702b0604dc4000811e6aa43e18457013de Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:17 2016 -0800 mips, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. pmdp_splitting_flush() is not needed too: on splitting PMD we will do pmdp_clear_flush() + set_pte_at(). pmdp_clear_flush() will do IPI as needed for fast_gup. Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/pgtable-bits.h | 10 ++++------ arch/mips/include/asm/pgtable.h | 18 ------------------ arch/mips/mm/gup.c | 13 +------------ arch/mips/mm/pgtable-64.c | 14 -------------- arch/mips/mm/tlbex.c | 1 - 5 files changed, 5 insertions(+), 51 deletions(-) commit 0ebd74461559320364a8228efd1c12d91dd68db3 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:14 2016 -0800 arm, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. pmdp_splitting_flush() is not needed too: on splitting PMD we will do pmdp_clear_flush() + set_pte_at(). pmdp_clear_flush() will do IPI as needed for fast_gup. [arnd@arndb.de: fix unterminated ifdef in header file] Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/pgtable-3level.h | 9 --------- arch/arm/lib/uaccess_with_memcpy.c | 5 ++--- arch/arm/mm/flush.c | 15 --------------- 3 files changed, 2 insertions(+), 27 deletions(-) commit b7ed934a7c3fd4d2651eae81cb658cf1926ff54f Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:10 2016 -0800 arm64, thp: remove infrastructure for handling splitting PMDs With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. pmdp_splitting_flush() is not needed too: on splitting PMD we will do pmdp_clear_flush() + set_pte_at(). pmdp_clear_flush() will do IPI as needed for fast_gup. Signed-off-by: Kirill A. Shutemov Cc: Sasha Levin Cc: Aneesh Kumar K.V Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/include/asm/pgtable.h | 8 -------- arch/arm64/mm/flush.c | 16 ---------------- 2 files changed, 24 deletions(-) commit 3ac808fdd2b835547af81de75c813cf7ba2ab58f Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:07 2016 -0800 mm, thp: remove compound_lock() We are going to use migration entries to stabilize page counts. It means we don't need compound_lock() for that. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 35 ----------------------------------- include/linux/page-flags.h | 12 +----------- mm/debug.c | 3 --- mm/memcontrol.c | 11 +++-------- 4 files changed, 4 insertions(+), 57 deletions(-) commit f765f540598a129dc4bb6f698fd4acc92f296c14 Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:03 2016 -0800 ksm: prepare to new THP semantics We don't need special code to stabilize THP. If you've got reference to any subpage of THP it will not be split under you. New split_huge_page() also accepts tail pages: no need in special code to get reference to head page. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 57 ++++++++++----------------------------------------------- 1 file changed, 10 insertions(+), 47 deletions(-) commit 14d27abd1d12a64c89df1ce8c00ef1403226db5a Author: Kirill A. Shutemov Date: Fri Jan 15 16:53:00 2016 -0800 futex, thp: remove special case for THP in get_futex_key With new THP refcounting, we don't need tricks to stabilize huge page. If we've got reference to tail page, it can't split under us. This patch effectively reverts a5b338f2b0b1 ("thp: update futex compound knowledge"). Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Tested-by: Artem Savkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/futex.c | 63 +++++++++++++--------------------------------------------- 1 file changed, 14 insertions(+), 49 deletions(-) commit ddc58f27f9eee9117219936f77e90ad5b2e00e96 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:56 2016 -0800 mm: drop tail page refcounting Tail page refcounting is utterly complicated and painful to support. It uses ->_mapcount on tail pages to store how many times this page is pinned. get_page() bumps ->_mapcount on tail page in addition to ->_count on head. This information is required by split_huge_page() to be able to distribute pins from head of compound page to tails during the split. We will need ->_mapcount to account PTE mappings of subpages of the compound page. We eliminate need in current meaning of ->_mapcount in tail pages by forbidding split entirely if the page is pinned. The only user of tail page refcounting is THP which is marked BROKEN for now. Let's drop all this mess. It makes get_page() and put_page() much simpler. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/mm/gup.c | 4 - arch/powerpc/mm/hugetlbpage.c | 13 +- arch/s390/mm/gup.c | 13 +- arch/sparc/mm/gup.c | 14 +-- arch/x86/mm/gup.c | 4 - include/linux/mm.h | 47 ++------ include/linux/mm_types.h | 17 +-- mm/gup.c | 34 +----- mm/huge_memory.c | 41 +------ mm/hugetlb.c | 2 +- mm/internal.h | 44 ------- mm/swap.c | 273 +++--------------------------------------- 12 files changed, 40 insertions(+), 466 deletions(-) commit ad0bed24e98bcae9952c2d1f663ec7cb6344a387 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:53 2016 -0800 thp: drop all split_huge_page()-related code We will re-introduce new version with new refcounting later in patchset. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 28 +--- mm/huge_memory.c | 401 +----------------------------------------------- 2 files changed, 7 insertions(+), 422 deletions(-) commit 56a17b8836398ffab52c00dda8442f1680dc251b Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:49 2016 -0800 mm: temporarily mark THP broken Up to this point we tried to keep patchset bisectable, but next patches are going to change how core of THP refcounting work. It would be beneficial to split the change into several patches and make it more reviewable. Unfortunately, I don't see how we can achieve that while keeping THP working. Let's hide THP under CONFIG_BROKEN for now and bring it back when new refcounting get established. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 122afea9626ab3f717b250a8dd3d5ebf57cdb56c Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:46 2016 -0800 mm, vmstats: new THP splitting event The patch replaces THP_SPLIT with tree events: THP_SPLIT_PAGE, THP_SPLIT_PAGE_FAILED and THP_SPLIT_PMD. It reflects the fact that we are going to be able split PMD without the compound page and that split_huge_page() can fail. Signed-off-by: Kirill A. Shutemov Acked-by: Christoph Lameter Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vm_event_item.h | 4 +++- mm/huge_memory.c | 2 +- mm/vmstat.c | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) commit 78ddc53473419073ffb2e91178001e87bc513524 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:42 2016 -0800 thp: rename split_huge_page_pmd() to split_huge_pmd() We are going to decouple splitting THP PMD from splitting underlying compound page. This patch renames split_huge_page_pmd*() functions to split_huge_pmd*() to reflect the fact that it doesn't imply page splitting, only PMD. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/mm/subpage-prot.c | 2 +- arch/x86/kernel/vm86_32.c | 6 +++++- include/linux/huge_mm.h | 8 ++------ mm/gup.c | 2 +- mm/huge_memory.c | 32 +++++++++++--------------------- mm/memory.c | 2 +- mm/mempolicy.c | 2 +- mm/mprotect.c | 2 +- mm/mremap.c | 2 +- mm/pagewalk.c | 2 +- 10 files changed, 25 insertions(+), 35 deletions(-) commit b1caa957ae6da3142a73ba8c5c9b2ca821021f0f Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:39 2016 -0800 khugepaged: ignore pmd tables with THP mapped with ptes Prepare khugepaged to see compound pages mapped with pte. For now we won't collapse the pmd table with such pte. khugepaged is subject for future rework wrt new refcounting. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/huge_memory.h | 1 + mm/huge_memory.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 7479df6da9506a624ae214588269ed42221494f9 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:35 2016 -0800 thp, mlock: do not allow huge pages in mlocked area With new refcounting THP can belong to several VMAs. This makes tricky to track THP pages, when they partially mlocked. It can lead to leaking mlocked pages to non-VM_LOCKED vmas and other problems. With this patch we will split all pages on mlock and avoid fault-in/collapse new THP in VM_LOCKED vmas. I've tried alternative approach: do not mark THP pages mlocked and keep them on normal LRUs. This way vmscan could try to split huge pages on memory pressure and free up subpages which doesn't belong to VM_LOCKED vmas. But this is user-visible change: we screw up Mlocked accouting reported in meminfo, so I had to leave this approach aside. We can bring something better later, but this should be good enough for now. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 3 ++- mm/huge_memory.c | 5 ++++- mm/memory.c | 3 ++- mm/mlock.c | 51 +++++++++++++++++++-------------------------------- 4 files changed, 27 insertions(+), 35 deletions(-) commit 7aef4172c7957d7e65fc172be4c99becaef855d4 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:32 2016 -0800 mm: handle PTE-mapped tail pages in gerneric fast gup implementaiton With new refcounting we are going to see THP tail pages mapped with PTE. Generic fast GUP rely on page_cache_get_speculative() to obtain reference on page. page_cache_get_speculative() always fails on tail pages, because ->_count on tail pages is always zero. Let's handle tail pages in gup_pte_range(). New split_huge_page() will rely on migration entries to freeze page's counts. Recheck PTE value after page_cache_get_speculative() on head page should be enough to serialize against split. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6742d293cbe01d6d87251c9d4dfa246f9833357f Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:28 2016 -0800 mm: adjust FOLL_SPLIT for new refcounting We need to prepare kernel to allow transhuge pages to be mapped with ptes too. We need to handle FOLL_SPLIT in follow_page_pte(). Also we use split_huge_page() directly instead of split_huge_page_pmd(). split_huge_page_pmd() will gone. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 18 deletions(-) commit 1f25fe20a76af0d960172fb104d4b13697cafa84 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:24 2016 -0800 mm, thp: adjust conditions when we can reuse the page on WP fault With new refcounting we will be able map the same compound page with PTEs and PMDs. It requires adjustment to conditions when we can reuse the page on write-protection fault. For PTE fault we can't reuse the page if it's part of huge page. For PMD we can only reuse the page if nobody else maps the huge page or it's part. We can do it by checking page_mapcount() on each sub-page, but it's expensive. The cheaper way is to check page_count() to be equal 1: every mapcount takes page reference, so this way we can guarantee, that the PMD is the only mapping. This approach can give false negative if somebody pinned the page, but that doesn't affect correctness. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 3 ++- mm/huge_memory.c | 12 +++++++++++- mm/swapfile.c | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) commit f627c2f53786b0445abca47f6aa84c96a1fffec2 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:20 2016 -0800 memcg: adjust to support new THP refcounting As with rmap, with new refcounting we cannot rely on PageTransHuge() to check if we need to charge size of huge page form the cgroup. We need to get information from caller to know whether it was mapped with PMD or PTE. We do uncharge when last reference on the page gone. At that point if we see PageTransHuge() it means we need to unchange whole huge page. The tricky part is partial unmap -- when we try to unmap part of huge page. We don't do a special handing of this situation, meaning we don't uncharge the part of huge page unless last user is gone or split_huge_page() is triggered. In case of cgroup memory pressure happens the partial unmapped page will be split through shrinker. This should be good enough. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 16 +++++++----- kernel/events/uprobes.c | 7 +++--- mm/filemap.c | 8 +++--- mm/huge_memory.c | 32 +++++++++++++----------- mm/memcontrol.c | 62 +++++++++++++++++----------------------------- mm/memory.c | 28 ++++++++++----------- mm/shmem.c | 21 +++++++++------- mm/swapfile.c | 9 ++++--- mm/userfaultfd.c | 6 ++--- 9 files changed, 92 insertions(+), 97 deletions(-) commit d281ee6145183594788ab6d5b55f8d144e69eace Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:16 2016 -0800 rmap: add argument to charge compound page We're going to allow mapping of individual 4k pages of THP compound page. It means we cannot rely on PageTransHuge() check to decide if map/unmap small page or THP. The patch adds new argument to rmap functions to indicate whether we want to operate on whole compound page or only the small page. [n-horiguchi@ah.jp.nec.com: fix mapcount mismatch in hugepage migration] Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Vlastimil Babka Acked-by: Jerome Marchand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 12 +++++++++--- kernel/events/uprobes.c | 4 ++-- mm/huge_memory.c | 16 ++++++++-------- mm/hugetlb.c | 4 ++-- mm/ksm.c | 4 ++-- mm/memory.c | 14 +++++++------- mm/migrate.c | 8 ++++---- mm/rmap.c | 48 +++++++++++++++++++++++++++++++----------------- mm/swapfile.c | 4 ++-- mm/userfaultfd.c | 2 +- 10 files changed, 68 insertions(+), 48 deletions(-) commit afd9883f93b6d030682d7072852b50c5a1b17b63 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:13 2016 -0800 mm, proc: adjust PSS calculation The goal of this patchset is to make refcounting on THP pages cheaper with simpler semantics and allow the same THP compound page to be mapped with PMD and PTEs. This is required to get reasonable THP-pagecache implementation. With the new refcounting design it's much easier to protect against split_huge_page(): simple reference on a page will make you the deal. It makes gup_fast() implementation simpler and doesn't require special-case in futex code to handle tail THP pages. It should improve THP utilization over the system since splitting THP in one process doesn't necessary lead to splitting the page in all other processes have the page mapped. The patchset drastically lower complexity of get_page()/put_page() codepaths. I encourage people look on this code before-and-after to justify time budget on reviewing this patchset. This patch (of 37): With new refcounting all subpages of the compound page are not necessary have the same mapcount. We need to take into account mapcount of every sub-page. Signed-off-by: Kirill A. Shutemov Tested-by: Sasha Levin Tested-by: Aneesh Kumar K.V Acked-by: Jerome Marchand Acked-by: Vlastimil Babka Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Naoya Horiguchi Cc: Steve Capper Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit 685eaade56c66c806dbe8102f12e2926cf4ec870 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:10 2016 -0800 page-flags: drop __TestClearPage*() helpers Nobody uses them. Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 10 +--------- scripts/tags.sh | 2 -- 2 files changed, 1 insertion(+), 11 deletions(-) commit 1c290f642101e64f379e38ea0361d097c08e824d Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:07 2016 -0800 mm: sanitize page->mapping for tail pages We don't define meaning of page->mapping for tail pages. Currently it's always NULL, which can be inconsistent with head page and potentially lead to problems. Let's poison the pointer to catch all illigal uses. page_rmapping(), page_mapping() and page_anon_vma() are changed to look on head page. The only illegal use I've caught so far is __GPF_COMP pages from sound subsystem, mapped with PTEs. do_shared_fault() is changed to use page_rmapping() instead of direct access to fault_page->mapping. Signed-off-by: Kirill A. Shutemov Reviewed-by: Jérôme Glisse Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/poison.h | 4 ++++ mm/huge_memory.c | 2 +- mm/memory.c | 2 +- mm/page_alloc.c | 6 ++++++ mm/util.c | 10 ++++++---- 5 files changed, 18 insertions(+), 6 deletions(-) commit 822cdd1152265d87fcfc974e06c3b68f762987fd Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:03 2016 -0800 page-flags: look at head page if the flag is encoded in page->mapping PageAnon() and PageKsm() look at lower bits of page->mapping to check if the page is Anon or KSM. page->mapping can be overloaded in tail pages. Let's always look at head page to avoid false-positives. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d2998c4de2937b964ea63aa2c08183f28462d532 Author: Kirill A. Shutemov Date: Fri Jan 15 16:52:00 2016 -0800 page-flags: define PG_uptodate behavior on compound pages We use PG_uptodate on head pages on transparent huge page. Let's use PF_NO_TAIL. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b9d418170aefb020ebd4c60040d69c4399851aa3 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:56 2016 -0800 page-flags: define PG_uncached behavior on compound pages So far, only IA64 uses PG_uncached and only on non-compound pages. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4f87d5d752d259b274681420b010c65006301a6 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:53 2016 -0800 page-flags: define PG_mlocked behavior on compound pages Transparent huge pages can be mlocked -- whole compund page at once. Something went wrong if we're trying to mlock() tail page. Let's use PF_NO_TAIL. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 50ea78d676d4282a403f956229505b9fddf69f3a Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:49 2016 -0800 page-flags: define PG_swapcache behavior on compound pages Swap cannot handle compound pages so far. Transparent huge pages are split on the way to swap. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da5efc408baefd686b0ee2cbd1353eb10ec71a0f Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:46 2016 -0800 page-flags: define PG_swapbacked behavior on compound pages PG_swapbacked is used for transparent huge pages. For head pages only. Let's use PF_NO_TAIL policy. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit de09d31dd38a50fdce106c15abd68432eebbd014 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:42 2016 -0800 page-flags: define PG_reserved behavior on compound pages As far as I can see there's no users of PG_reserved on compound pages. Let's use PF_NO_COMPOUND here. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 3 ++- mm/hugetlb.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit c13985fa800312fdcd4c7d67a1f55abcbc2f6b7d Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:39 2016 -0800 page-flags: define behavior of Xen-related flags on compound pages PG_pinned and PG_savepinned are about page table's pages which are never compound. I'm not so sure about PG_foreign, but it seems we shouldn't see compound pages there too. Let's use PF_NO_COMPOUND for all of them. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit dcb351cd095a3a1e1100b74f15a0100cf9a0c700 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:35 2016 -0800 page-flags: define behavior SL*B-related flags on compound pages SL*B uses compound pages and marks head pages with PG_slab. __SetPageSlab() and __ClearPageSlab() are never called for tail pages. The same situation with PG_slob_free in SLOB allocator. PF_NO_TAIL is appropriate for these flags. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8cb38fabb6bc1ba8bcec83eaf04848d886b54d28 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:32 2016 -0800 page-flags: define behavior of LRU-related flags on compound pages Only head pages are ever on LRU. Let's use PF_HEAD policy to avoid any confusion for all LRU-related flags. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit df8c94d13c7e30f4471f8faa8d544809a0e52865 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:28 2016 -0800 page-flags: define behavior of FS/IO-related flags on compound pages It seems we don't have compound page on FS/IO path currently. Use PF_NO_COMPOUND to catch if we have. The odd exception is PG_dirty: sound uses compound pages and maps them with PTEs. PF_NO_COMPOUND triggers VM_BUG_ON() in set_page_dirty() on handling shared fault. Let's use PF_HEAD for PG_dirty. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 48c935ad88f5be20eb5445a77c171351b1eb5111 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:24 2016 -0800 page-flags: define PG_locked behavior on compound pages lock_page() must operate on the whole compound page. It doesn't make much sense to lock part of compound page. Change code to use head page's PG_locked, if tail page is passed. This patch also gets rid of custom helper functions -- __set_page_locked() and __clear_page_locked(). They are replaced with helpers generated by __SETPAGEFLAG/__CLEARPAGEFLAG. Tail pages to these helper would trigger VM_BUG_ON(). SLUB uses PG_locked as a bit spin locked. IIUC, tail pages should never appear there. VM_BUG_ON() is added to make sure that this assumption is correct. [akpm@linux-foundation.org: fix fs/cifs/file.c] Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/cifs/file.c | 8 ++++---- include/linux/page-flags.h | 2 +- include/linux/pagemap.h | 25 ++++++++----------------- mm/filemap.c | 15 +++++++++------ mm/ksm.c | 2 +- mm/memory-failure.c | 2 +- mm/migrate.c | 2 +- mm/shmem.c | 4 ++-- mm/slub.c | 2 ++ mm/swap_state.c | 4 ++-- mm/vmscan.c | 2 +- 11 files changed, 32 insertions(+), 36 deletions(-) commit 95ad97554ac81b31139d4fe5ed8757a07087cd90 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:21 2016 -0800 page-flags: introduce page flags policies wrt compound pages This patch adds a third argument to macros which create function definitions for page flags. This argument defines how page-flags helpers behave on compound functions. For now we define four policies: - PF_ANY: the helper function operates on the page it gets, regardless if it's non-compound, head or tail. - PF_HEAD: the helper function operates on the head page of the compound page if it gets tail page. - PF_NO_TAIL: only head and non-compond pages are acceptable for this helper function. - PF_NO_COMPOUND: only non-compound pages are acceptable for this helper function. For now we use policy PF_ANY for all helpers, which matches current behaviour. We do not enforce the policy for TESTPAGEFLAG, because we have flags checked for random pages all over the kernel. Noticeable exception to this is PageTransHuge() which triggers VM_BUG_ON() for tail page. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmdebug.h | 6 ++ include/linux/page-flags.h | 166 ++++++++++++++++++++++++++++----------------- lib/Kconfig.debug | 8 +++ 3 files changed, 116 insertions(+), 64 deletions(-) commit 0e6d31a7336f41ef0375f5398c79e54de8e219b6 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:17 2016 -0800 page-flags: move code around The preparation patch: we are going to use compound_head(), PageTail() and PageCompound() to define page-flags helpers. Let's define them before macros. We cannot user PageHead() helper in PageCompound() as it's not yet defined -- use test_bit(PG_head, &page->flags) instead. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit d8c1bdeb5d6b62b34a78391206a5e55e4a02d58f Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:13 2016 -0800 page-flags: trivial cleanup for PageTrans* helpers Use TESTPAGEFLAG_FALSE() to get it a bit cleaner. Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Dave Hansen Cc: Mel Gorman Cc: Rik van Riel Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Naoya Horiguchi Cc: Steve Capper Cc: "Aneesh Kumar K.V" Cc: Johannes Weiner Cc: Michal Hocko Cc: Jerome Marchand Cc: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-flags.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit c2e771b02792d222cbcd9617fe71482a64f52647 Author: Simon Horman Date: Fri Dec 11 11:30:12 2015 +0900 PCI: Limit config space size for Netronome NFP4000 Like the NFP6000, the NFP4000 as an erratum where reading/writing to PCI config space addresses above 0x600 can cause the NFP to generate PCIe completion timeouts. Limit the NFP4000's PF's config space size to 0x600 bytes as is already done for the NFP6000. The NFP4000's VF is 0x6004 (PCI_DEVICE_ID_NETRONOME_NFP6000_VF), the same device ID as the NFP6000's VF. Thus, its config space is already limited by the existing use of quirk_nfp6000(). Signed-off-by: Simon Horman Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 69874ec233871a62e1bc8c89e643993af93a8630 Author: Simon Horman Date: Fri Dec 11 11:30:11 2015 +0900 PCI: Add Netronome NFP4000 PF device ID Add the device ID for the PF of the NFP4000. The device ID for the VF, 0x6003, is already present as PCI_DEVICE_ID_NETRONOME_NFP6000_VF. Signed-off-by: Simon Horman Signed-off-by: Bjorn Helgaas include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) commit 3a6384ba105ebbb5e83d040a55bfad2fa43f3048 Merge: 4723584 185a383 Author: Bjorn Helgaas Date: Fri Jan 15 16:14:39 2016 -0600 Merge branch 'pci/host-vmd' into next * pci/host-vmd: x86/PCI: Add driver for Intel Volume Management Device (VMD) PCI/AER: Use 32 bit PCI domain numbers x86/PCI: Allow DMA ops specific to a PCI domain irqdomain: Export irq_domain_set_info() for module use genirq/MSI: Relax msi_domain_alloc() to support parentless MSI irqdomains commit 10475b34f4d71cf71cfe7c5d1f27d8ff3a4eb9bc Author: Jean Delvare Date: Mon Jan 11 17:43:02 2016 +0100 cpuidle: Don't enable all governors by default Since commit d6f346f2d2 (cpuidle: improve governor Kconfig options) the best cpuidle governor is selected automatically. There is little point in additionally selecting the other one as it will not be used, so don't select both governors by default. Being able to select more than one governor is still good for developers booting with cpuidle_sysfs_switch, though. This fixes the second half of kernel BZ #65531. Link: https://bugzilla.kernel.org/show_bug.cgi?id=65531 Signed-off-by: Jean Delvare Signed-off-by: Rafael J. Wysocki drivers/cpuidle/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 66a5f6b63996d8aa7cbe8841b38297bf3b338194 Author: Jean Delvare Date: Mon Jan 11 17:41:53 2016 +0100 cpuidle: Default to ladder governor on ticking systems The menu governor is currently the default on all systems. However the documentation claims that the ladder governor is preferred on ticking systems. So bump the rating of the ladder governor when NO_HZ is disabled, or when booting with nohz=off. This fixes the first half of kernel BZ #65531. Link: https://bugzilla.kernel.org/show_bug.cgi?id=65531 Signed-off-by: Jean Delvare Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/ladder.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 46373a15f65fe862f31c19a484acdf551f2b442f Author: Jean Delvare Date: Mon Jan 11 17:40:31 2016 +0100 time: nohz: Expose tick_nohz_enabled The cpuidle subsystem needs it. Signed-off-by: Jean Delvare Reviewed-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki include/linux/tick.h | 2 ++ kernel/time/tick-sched.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 4e5448a31d73d0e944b7adb9049438a09bc332cb Merge: 5a18d26 750afbf Author: Linus Torvalds Date: Fri Jan 15 13:33:12 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "A quick set of bug fixes after there initial networking merge: 1) Netlink multicast group storage allocator only was tested with nr_groups equal to 1, make it work for other values too. From Matti Vaittinen. 2) Check build_skb() return value in macb and hip04_eth drivers, from Weidong Wang. 3) Don't leak x25_asy on x25_asy_open() failure. 4) More DMA map/unmap fixes in 3c59x from Neil Horman. 5) Don't clobber IP skb control block during GSO segmentation, from Konstantin Khlebnikov. 6) ECN helpers for ipv6 don't fixup the checksum, from Eric Dumazet. 7) Fix SKB segment utilization estimation in xen-netback, from David Vrabel. 8) Fix lockdep splat in bridge addrlist handling, from Nikolay Aleksandrov" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits) bgmac: Fix reversed test of build_skb() return value. bridge: fix lockdep addr_list_lock false positive splat net: smsc: Add support h8300 xen-netback: free queues after freeing the net device xen-netback: delete NAPI instance when queue fails to initialize xen-netback: use skb to determine number of required guest Rx requests net: sctp: Move sequence start handling into sctp_transport_get_idx() ipv6: update skb->csum when CE mark is propagated net: phy: turn carrier off on phy attach net: macb: clear interrupts when disabling them sctp: support to lookup with ep+paddr in transport rhashtable net: hns: fixes no syscon error when init mdio dts: hisi: fixes no syscon fault when init mdio net: preserve IP control block during GSO segmentation fsl/fman: Delete one function call "put_device" in dtsec_config() hip04_eth: fix missing error handle for build_skb failed 3c59x: fix another page map/single unmap imbalance 3c59x: balance page maps and unmaps x25_asy: Free x25_asy on x25_asy_open() failure. mlxsw: fix SWITCHDEV_OBJ_ID_PORT_MDB ... commit 5a18d263f8d27418c98b8e8551dadfe975c054e3 Merge: f689b74 36beca6 Author: Linus Torvalds Date: Fri Jan 15 13:28:12 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Two sparc bug fixes" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix numa node distance initialization sparc64: fix incorrect sign extension in sys_sparc64_personality commit 770188f79e91771b95bd9b015fbbff19873bbea6 Author: Bob Moore Date: Fri Jan 15 08:17:20 2016 +0800 ACPICA: Update version to 20160108 Version 20160108 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c11e5dd3eadf3abcddcc509605eb24c20c03fc6d Author: Lv Zheng Date: Fri Jan 15 08:17:11 2016 +0800 ACPICA: Silence a -Wbad-function-cast warning when acpi_uintptr_t is 'uintptr_t' Do not pass the return value of strtoul() to the ACPI_TO_POINTER() macro to avoid a -Wbad-function-cast warning. Signed-off-by: Sascha Wildner Signed-off-by: Lv Zheng [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbdisply.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f689b742f217b2ffe7925f8a6521b208ee995309 Merge: 37cea93 be6bfc2 Author: Linus Torvalds Date: Fri Jan 15 13:18:47 2016 -0800 Merge tag 'powerpc-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Core: - Ground work for the new Power9 MMU from Aneesh Kumar K.V - Optimise FP/VMX/VSX context switching from Anton Blanchard Misc: - Various cleanups from Krzysztof Kozlowski, John Ogness, Rashmica Gupta, Russell Currey, Gavin Shan, Daniel Axtens, Michael Neuling, Andrew Donnellan - Allow wrapper to work on non-english system from Laurent Vivier - Add rN aliases to the pt_regs_offset table from Rashmica Gupta - Fix module autoload for rackmeter & axonram drivers from Luis de Bethencourt - Include KVM guest test in all interrupt vectors from Paul Mackerras - Fix DSCR inheritance over fork() from Anton Blanchard - Make value-returning atomics & {cmp}xchg* & their atomic_ versions fully ordered from Boqun Feng - Print MSR TM bits in oops messages from Michael Neuling - Add TM signal return & invalid stack selftests from Michael Neuling - Limit EPOW reset event warnings from Vipin K Parashar - Remove the Cell QPACE code from Rashmica Gupta - Append linux_banner to exception information in xmon from Rashmica Gupta - Add selftest to check if VSRs are corrupted from Rashmica Gupta - Remove broken GregorianDay() from Daniel Axtens - Import Anton's context_switch2 benchmark into selftests from Michael Ellerman - Add selftest script to test HMI functionality from Daniel Axtens - Remove obsolete OPAL v2 support from Stewart Smith - Make enter_rtas() private from Michael Ellerman - PPR exception cleanups from Michael Ellerman - Add page soft dirty tracking from Laurent Dufour - Add support for Nvlink NPUs from Alistair Popple - Add support for kexec on 476fpe from Alistair Popple - Enable kernel CPU dlpar from sysfs from Nathan Fontenot - Copy only required pieces of the mm_context_t to the paca from Michael Neuling - Add a kmsg_dumper that flushes OPAL console output on panic from Russell Currey - Implement save_stack_trace_regs() to enable kprobe stack tracing from Steven Rostedt - Add HWCAP bits for Power9 from Michael Ellerman - Fix _PAGE_PTE breaking swapoff from Aneesh Kumar K.V - Fix _PAGE_SWP_SOFT_DIRTY breaking swapoff from Hugh Dickins - scripts/recordmcount.pl: support data in text section on powerpc from Ulrich Weigand - Handle R_PPC64_ENTRY relocations in modules from Ulrich Weigand cxl: - cxl: Fix possible idr warning when contexts are released from Vaibhav Jain - cxl: use correct operator when writing pcie config space values from Andrew Donnellan - cxl: Fix DSI misses when the context owning task exits from Vaibhav Jain - cxl: fix build for GCC 4.6.x from Brian Norris - cxl: use -Werror only with CONFIG_PPC_WERROR from Brian Norris - cxl: Enable PCI device ID for future IBM CXL adapter from Uma Krishnan Freescale: - Freescale updates from Scott: Highlights include moving QE code out of arch/powerpc (to be shared with arm), device tree updates, and minor fixes" * tag 'powerpc-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (149 commits) powerpc/module: Handle R_PPC64_ENTRY relocations scripts/recordmcount.pl: support data in text section on powerpc powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages powerpc/mm: fix _PAGE_SWP_SOFT_DIRTY breaking swapoff powerpc/mm: Fix _PAGE_PTE breaking swapoff cxl: Enable PCI device ID for future IBM CXL adapter cxl: use -Werror only with CONFIG_PPC_WERROR cxl: fix build for GCC 4.6.x powerpc: Add HWCAP bits for Power9 powerpc/powernv: Reserve PE#0 on NPU powerpc/powernv: Change NPU PE# assignment powerpc/powernv: Fix update of NVLink DMA mask powerpc/powernv: Remove misleading comment in pci.c powerpc: Implement save_stack_trace_regs() to enable kprobe stack tracing powerpc: Fix build break due to paca mm_context_t changes cxl: Fix DSI misses when the context owning task exits MAINTAINERS: Update Scott Wood's e-mail address powerpc/powernv: Fix minor off-by-one error in opal_mce_check_early_recovery() powerpc: Fix style of self-test config prompts powerpc/powernv: Only delay opal_rtc_read() retry when necessary ... commit c8100dc4643d80a94f074dfc8a2af3d3d327b7aa Author: Bob Moore Date: Fri Jan 15 08:17:03 2016 +0800 ACPICA: Additional 2016 copyright changes All tool/utility signons. Dual-license module header. Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acapps.h | 4 ++-- drivers/acpi/acpica/accommon.h | 2 +- drivers/acpi/acpica/acdebug.h | 2 +- drivers/acpi/acpica/acdispat.h | 2 +- drivers/acpi/acpica/acevents.h | 2 +- drivers/acpi/acpica/acglobal.h | 2 +- drivers/acpi/acpica/achware.h | 2 +- drivers/acpi/acpica/acinterp.h | 2 +- drivers/acpi/acpica/aclocal.h | 2 +- drivers/acpi/acpica/acmacros.h | 2 +- drivers/acpi/acpica/acnamesp.h | 2 +- drivers/acpi/acpica/acobject.h | 2 +- drivers/acpi/acpica/acopcode.h | 2 +- drivers/acpi/acpica/acparser.h | 2 +- drivers/acpi/acpica/acpredef.h | 2 +- drivers/acpi/acpica/acresrc.h | 2 +- drivers/acpi/acpica/acstruct.h | 2 +- drivers/acpi/acpica/actables.h | 2 +- drivers/acpi/acpica/acutils.h | 2 +- drivers/acpi/acpica/amlcode.h | 2 +- drivers/acpi/acpica/amlresrc.h | 2 +- drivers/acpi/acpica/dbcmds.c | 2 +- drivers/acpi/acpica/dbconvert.c | 2 +- drivers/acpi/acpica/dbdisply.c | 2 +- drivers/acpi/acpica/dbexec.c | 2 +- drivers/acpi/acpica/dbfileio.c | 2 +- drivers/acpi/acpica/dbhistry.c | 2 +- drivers/acpi/acpica/dbinput.c | 2 +- drivers/acpi/acpica/dbmethod.c | 2 +- drivers/acpi/acpica/dbnames.c | 2 +- drivers/acpi/acpica/dbobject.c | 2 +- drivers/acpi/acpica/dbstats.c | 2 +- drivers/acpi/acpica/dbtest.c | 2 +- drivers/acpi/acpica/dbutils.c | 2 +- drivers/acpi/acpica/dbxface.c | 2 +- drivers/acpi/acpica/dsargs.c | 2 +- drivers/acpi/acpica/dscontrol.c | 2 +- drivers/acpi/acpica/dsdebug.c | 2 +- drivers/acpi/acpica/dsfield.c | 2 +- drivers/acpi/acpica/dsinit.c | 2 +- drivers/acpi/acpica/dsmethod.c | 2 +- drivers/acpi/acpica/dsmthdat.c | 2 +- drivers/acpi/acpica/dsobject.c | 2 +- drivers/acpi/acpica/dsopcode.c | 2 +- drivers/acpi/acpica/dsutils.c | 2 +- drivers/acpi/acpica/dswexec.c | 2 +- drivers/acpi/acpica/dswload.c | 2 +- drivers/acpi/acpica/dswload2.c | 2 +- drivers/acpi/acpica/dswscope.c | 2 +- drivers/acpi/acpica/dswstate.c | 2 +- drivers/acpi/acpica/evevent.c | 2 +- drivers/acpi/acpica/evglock.c | 2 +- drivers/acpi/acpica/evgpe.c | 2 +- drivers/acpi/acpica/evgpeblk.c | 2 +- drivers/acpi/acpica/evgpeinit.c | 2 +- drivers/acpi/acpica/evgpeutil.c | 2 +- drivers/acpi/acpica/evhandler.c | 2 +- drivers/acpi/acpica/evmisc.c | 2 +- drivers/acpi/acpica/evregion.c | 2 +- drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/evsci.c | 2 +- drivers/acpi/acpica/evxface.c | 2 +- drivers/acpi/acpica/evxfevnt.c | 2 +- drivers/acpi/acpica/evxfgpe.c | 2 +- drivers/acpi/acpica/evxfregn.c | 2 +- drivers/acpi/acpica/exconfig.c | 2 +- drivers/acpi/acpica/exconvrt.c | 2 +- drivers/acpi/acpica/excreate.c | 2 +- drivers/acpi/acpica/exdebug.c | 2 +- drivers/acpi/acpica/exdump.c | 2 +- drivers/acpi/acpica/exfield.c | 2 +- drivers/acpi/acpica/exfldio.c | 2 +- drivers/acpi/acpica/exmisc.c | 2 +- drivers/acpi/acpica/exmutex.c | 2 +- drivers/acpi/acpica/exnames.c | 2 +- drivers/acpi/acpica/exoparg1.c | 2 +- drivers/acpi/acpica/exoparg2.c | 2 +- drivers/acpi/acpica/exoparg3.c | 2 +- drivers/acpi/acpica/exoparg6.c | 2 +- drivers/acpi/acpica/exprep.c | 2 +- drivers/acpi/acpica/exregion.c | 2 +- drivers/acpi/acpica/exresnte.c | 2 +- drivers/acpi/acpica/exresolv.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/exstore.c | 2 +- drivers/acpi/acpica/exstoren.c | 2 +- drivers/acpi/acpica/exstorob.c | 2 +- drivers/acpi/acpica/exsystem.c | 2 +- drivers/acpi/acpica/extrace.c | 2 +- drivers/acpi/acpica/exutils.c | 2 +- drivers/acpi/acpica/hwacpi.c | 2 +- drivers/acpi/acpica/hwesleep.c | 2 +- drivers/acpi/acpica/hwgpe.c | 2 +- drivers/acpi/acpica/hwpci.c | 2 +- drivers/acpi/acpica/hwregs.c | 2 +- drivers/acpi/acpica/hwsleep.c | 2 +- drivers/acpi/acpica/hwtimer.c | 2 +- drivers/acpi/acpica/hwvalid.c | 2 +- drivers/acpi/acpica/hwxface.c | 2 +- drivers/acpi/acpica/hwxfsleep.c | 2 +- drivers/acpi/acpica/nsaccess.c | 2 +- drivers/acpi/acpica/nsalloc.c | 2 +- drivers/acpi/acpica/nsarguments.c | 2 +- drivers/acpi/acpica/nsconvert.c | 2 +- drivers/acpi/acpica/nsdump.c | 2 +- drivers/acpi/acpica/nsdumpdv.c | 2 +- drivers/acpi/acpica/nseval.c | 2 +- drivers/acpi/acpica/nsinit.c | 2 +- drivers/acpi/acpica/nsload.c | 2 +- drivers/acpi/acpica/nsnames.c | 2 +- drivers/acpi/acpica/nsobject.c | 2 +- drivers/acpi/acpica/nsparse.c | 2 +- drivers/acpi/acpica/nspredef.c | 2 +- drivers/acpi/acpica/nsprepkg.c | 2 +- drivers/acpi/acpica/nsrepair.c | 2 +- drivers/acpi/acpica/nsrepair2.c | 2 +- drivers/acpi/acpica/nssearch.c | 2 +- drivers/acpi/acpica/nsutils.c | 2 +- drivers/acpi/acpica/nswalk.c | 2 +- drivers/acpi/acpica/nsxfeval.c | 2 +- drivers/acpi/acpica/nsxfname.c | 2 +- drivers/acpi/acpica/nsxfobj.c | 2 +- drivers/acpi/acpica/psargs.c | 2 +- drivers/acpi/acpica/psloop.c | 2 +- drivers/acpi/acpica/psobject.c | 2 +- drivers/acpi/acpica/psopcode.c | 2 +- drivers/acpi/acpica/psopinfo.c | 2 +- drivers/acpi/acpica/psparse.c | 2 +- drivers/acpi/acpica/psscope.c | 2 +- drivers/acpi/acpica/pstree.c | 2 +- drivers/acpi/acpica/psutils.c | 2 +- drivers/acpi/acpica/pswalk.c | 2 +- drivers/acpi/acpica/psxface.c | 2 +- drivers/acpi/acpica/rsaddr.c | 2 +- drivers/acpi/acpica/rscalc.c | 2 +- drivers/acpi/acpica/rscreate.c | 2 +- drivers/acpi/acpica/rsdump.c | 2 +- drivers/acpi/acpica/rsdumpinfo.c | 2 +- drivers/acpi/acpica/rsinfo.c | 2 +- drivers/acpi/acpica/rsio.c | 2 +- drivers/acpi/acpica/rsirq.c | 2 +- drivers/acpi/acpica/rslist.c | 2 +- drivers/acpi/acpica/rsmemory.c | 2 +- drivers/acpi/acpica/rsmisc.c | 2 +- drivers/acpi/acpica/rsserial.c | 2 +- drivers/acpi/acpica/rsutils.c | 2 +- drivers/acpi/acpica/rsxface.c | 2 +- drivers/acpi/acpica/tbdata.c | 2 +- drivers/acpi/acpica/tbfadt.c | 2 +- drivers/acpi/acpica/tbfind.c | 2 +- drivers/acpi/acpica/tbinstal.c | 2 +- drivers/acpi/acpica/tbprint.c | 2 +- drivers/acpi/acpica/tbutils.c | 2 +- drivers/acpi/acpica/tbxface.c | 2 +- drivers/acpi/acpica/tbxfload.c | 2 +- drivers/acpi/acpica/tbxfroot.c | 2 +- drivers/acpi/acpica/utaddress.c | 2 +- drivers/acpi/acpica/utalloc.c | 2 +- drivers/acpi/acpica/utbuffer.c | 2 +- drivers/acpi/acpica/utcache.c | 2 +- drivers/acpi/acpica/utcopy.c | 2 +- drivers/acpi/acpica/utdebug.c | 2 +- drivers/acpi/acpica/utdecode.c | 2 +- drivers/acpi/acpica/utdelete.c | 2 +- drivers/acpi/acpica/uterror.c | 2 +- drivers/acpi/acpica/uteval.c | 2 +- drivers/acpi/acpica/utexcep.c | 2 +- drivers/acpi/acpica/utglobal.c | 2 +- drivers/acpi/acpica/uthex.c | 2 +- drivers/acpi/acpica/utids.c | 2 +- drivers/acpi/acpica/utinit.c | 2 +- drivers/acpi/acpica/utlock.c | 2 +- drivers/acpi/acpica/utmath.c | 2 +- drivers/acpi/acpica/utmisc.c | 2 +- drivers/acpi/acpica/utmutex.c | 2 +- drivers/acpi/acpica/utnonansi.c | 2 +- drivers/acpi/acpica/utobject.c | 2 +- drivers/acpi/acpica/utosi.c | 2 +- drivers/acpi/acpica/utownerid.c | 2 +- drivers/acpi/acpica/utpredef.c | 2 +- drivers/acpi/acpica/utprint.c | 2 +- drivers/acpi/acpica/utresrc.c | 2 +- drivers/acpi/acpica/utstate.c | 2 +- drivers/acpi/acpica/utstring.c | 2 +- drivers/acpi/acpica/uttrack.c | 2 +- drivers/acpi/acpica/utuuid.c | 2 +- drivers/acpi/acpica/utxface.c | 2 +- drivers/acpi/acpica/utxferror.c | 2 +- drivers/acpi/acpica/utxfinit.c | 2 +- drivers/acpi/acpica/utxfmutex.c | 2 +- include/acpi/acbuffer.h | 2 +- include/acpi/acconfig.h | 2 +- include/acpi/acexcep.h | 2 +- include/acpi/acnames.h | 2 +- include/acpi/acoutput.h | 2 +- include/acpi/acpi.h | 2 +- include/acpi/acpiosxf.h | 2 +- include/acpi/acpixf.h | 2 +- include/acpi/acrestyp.h | 2 +- include/acpi/actbl.h | 2 +- include/acpi/actbl1.h | 2 +- include/acpi/actbl2.h | 2 +- include/acpi/actbl3.h | 2 +- include/acpi/actypes.h | 2 +- include/acpi/acuuid.h | 2 +- include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acenvex.h | 2 +- include/acpi/platform/acgcc.h | 2 +- include/acpi/platform/aclinux.h | 2 +- include/acpi/platform/aclinuxex.h | 2 +- include/acpi/platform/acmsvcex.h | 2 +- include/acpi/platform/acwinex.h | 2 +- tools/power/acpi/common/cmfsize.c | 2 +- tools/power/acpi/common/getopt.c | 2 +- tools/power/acpi/os_specific/service_layers/oslibcfs.c | 2 +- tools/power/acpi/os_specific/service_layers/oslinuxtbl.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixdir.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixmap.c | 2 +- tools/power/acpi/os_specific/service_layers/osunixxf.c | 2 +- tools/power/acpi/tools/acpidump/acpidump.h | 2 +- tools/power/acpi/tools/acpidump/apdump.c | 2 +- tools/power/acpi/tools/acpidump/apfiles.c | 2 +- tools/power/acpi/tools/acpidump/apmain.c | 2 +- 223 files changed, 224 insertions(+), 224 deletions(-) commit 66e42ee57cf7fb39601100230ff5bba40513f71b Author: Lv Zheng Date: Fri Jan 15 08:16:57 2016 +0800 ACPICA: Reduce regression fix divergence from upstream ACPICA Linux has been fixed during 20151218 release cycle by reverting wrong code in the following commit: ACPICA commit: 071eff738c59eda1792ac24b3b688b61691d7e7c Subject: Add per-table execution of module-level code, early region handlers While upstream ACPICA fixes later in the following commit: ACPICA commit: bf6cfddb4784c349f781758981b207253b5a1252 Subject: Fix for module-level-code regression introduced in 20151218 This results in the divergences and this patch is meant to reduce such divergences. Lv Zheng. Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nseval.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b21f2e81bd3fd8ed260590e72901254bca2193cd Author: Hans de Goede Date: Thu Jan 14 14:24:39 2016 +0100 ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Satellite R830 The Toshiba Satellite R830 needs disable_backlight_sysfs_if=1, just like the Toshiba Portege R830. Add a quirk for this. Link: https://bugzilla.kernel.org/show_bug.cgi?id=21012 Cc: 4.2+ # 4.2+ Tested-by: To Do Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 95565f884137e5d38caaa674a6813d854713e801 Author: Hans de Goede Date: Thu Jan 14 09:41:48 2016 +0100 ACPI / video: Revert "thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()" acpi_video_handles_brightness_key_presses()'s may return false if the i915 driver is not loaded yet when thinkpad_acpi loads, and then return true after the i915 driver has loaded. This means that thinkpad_acpi cannot use it as is since thinkpad_acpi caches the return value. This reverts commit 7714687a2b2d ("thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()"). Fixes: 7714687a2b2d "thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()" Signed-off-by: Hans de Goede Acked-by: Darren Hart Acked-by: Henrique de Moraes Holschuh Signed-off-by: Rafael J. Wysocki drivers/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 382d11639f7ca6d3ddca3a231267081bd29b45bd Author: Hans de Goede Date: Thu Jan 14 09:41:47 2016 +0100 ACPI / video: Document acpi_video_handles_brightness_key_presses() a bit Document that acpi_video_handles_brightness_key_presses()'s return value may change over time and should not be cached. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki include/acpi/video.h | 4 ++++ 1 file changed, 4 insertions(+) commit 14e9355363fc5bf98ba63875e117f29d1902d253 Author: Hans de Goede Date: Thu Jan 14 09:41:46 2016 +0100 ACPI / video: Fix using an uninitialized mutex / list_head in acpi_video_handles_brightness_key_presses() If acpi_video_handles_brightness_key_presses() was called before acpi_video_register(), it would use the video_list mutex / list_head uninitialized. This patch fixes this by using DEFINE_MUTEX / LIST_HEAD when declaring these, instead of initializing them runtime from acpi_video_register(). Fixes: 90b066b15eda "ACPI / video: Add a acpi_video_handles_brightness_key_presses() helper" Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 970530cd00578d9dd9de45ecf297b28f6809c738 Author: Hans de Goede Date: Thu Jan 14 09:41:45 2016 +0100 ACPI / video: Revert "ACPI / video: driver must be registered before checking for keypresses" On systems with an intel video opcode region, the completion used in the patch this commit reverts will only complete if the i915 driver loads. If for some reason the i915 driver never loads calls to acpi_video_handles_brightness_key_presses() may be delayed indefinitely. This reverts commit aecbd9b1bff6 ("ACPI / video: driver must be registered before checking for keypresses") fixing this. This reintroduces a potential NULL pointer deref due to using an uninitalized mutex, this is fixed differently in a follow-up patch. Fixes: aecbd9b1bff6 (ACPI / video: driver must be registered before checking for keypresses) Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit e5b6c1518878e157df4121c1caf70d9c470a6d31 Author: Jordan Hargrave Date: Fri Jan 15 22:08:45 2016 +0100 firmware: dmi_scan: Save SMBIOS Type 9 System Slots Save SMBIOS Type 9 System Slots during DMI scan. PCI address of onboard devices was already saved but not for slots. Signed-off-by: Jordan Hargrave Signed-off-by: Jean Delvare drivers/firmware/dmi_scan.c | 51 ++++++++++++++++++++++++++++++++------------- include/linux/dmi.h | 1 + 2 files changed, 37 insertions(+), 15 deletions(-) commit bfab8b48598f851dfeca2b40fd06969bf8634d37 Author: Jean Delvare Date: Fri Jan 15 22:08:44 2016 +0100 firmware: dmi_scan: Fix dmi_find_device description The description of dmi_find_device was apparently copied from a similar function in a different subsystem, but the parameter names were not adjusted as needed. Signed-off-by: Jean Delvare Cc: Andrey Panin drivers/firmware/dmi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45b9825708198311cbe00daf9d1a40098c12c45b Author: Jean Delvare Date: Fri Jan 15 22:08:44 2016 +0100 firmware: dmi_scan: Clarify dmi_save_extended_devices Get rid of the arbitrary 5-byte pointer offset, it served no purpose and made it harder to match the code with the SMBIOS specification. Signed-off-by: Jean Delvare Cc: Jordan Hargrave Cc: Narendra K drivers/firmware/dmi_scan.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 96e239434c629491e57a359a2f876b6d41476336 Author: Jean Delvare Date: Fri Jan 15 22:08:44 2016 +0100 firmware: dmi_scan: Optimize dmi_save_extended_devices Calling dmi_string_nosave isn't cheap, so avoid calling it twice in a row for the same string. Signed-off-by: Jean Delvare Cc: Jordan Hargrave Cc: Narendra K drivers/firmware/dmi_scan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 750afbf8ee9c6a1c74a1fe5fc9852146b1d72687 Author: David S. Miller Date: Fri Jan 15 16:07:13 2016 -0500 bgmac: Fix reversed test of build_skb() return value. Fixes: f1640c3ddeec ("bgmac: fix a missing check for build_skb") Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37cea93b99d2d89bef3adcb4632d71e1f377c447 Merge: cc80fe0 d4f50ee Author: Linus Torvalds Date: Fri Jan 15 13:01:01 2016 -0800 Merge tag 'vfio-v4.5-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Fixes in AMD xgbe reset, spapr structure padding, type 1 flags (Dan Carpenter, Alexey Kardashevskiy, Pierre Morel) - Re-introduce no-iommu mode, with a user this time (Alex Williamson) * tag 'vfio-v4.5-rc1' of git://github.com/awilliam/linux-vfio: vfio/iommu_type1: make use of info.flags vfio: Include No-IOMMU mode vfio: Add explicit alignments in vfio_iommu_spapr_tce_create VFIO: platform: reset: fix a warning message condition commit f9727999694f76d329738614f2fd61d800509319 Author: Andy Lutomirski Date: Wed Jan 13 14:25:19 2016 -0800 ACPI / fan: Improve acpi_device_update_power error message On my laptop, I see "Setting initial power state" on boot. It's a firmware bug on my laptop, but the message made me think that the initial power state was bogus and the driver fixed it. The error actually means that the driver failed to set the initial power state. Fix the message. Signed-off-by: Andy Lutomirski Signed-off-by: Rafael J. Wysocki drivers/acpi/fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de588b8ff057d4de0751f337b930f90ca522bab2 Author: Hans de Goede Date: Mon Jan 11 14:46:17 2016 +0100 ACPI / video: Add disable_backlight_sysfs_if quirk for the Toshiba Portege R700 The Toshiba Portege R700 needs disable_backlight_sysfs_if=1, just like the Toshiba Portege R830. Add a quirk for this. Link: https://bugzilla.kernel.org/show_bug.cgi?id=21012 Cc: 4.2+ # 4.2+ Tested-by: Emma Reisz Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit cc80fe0eefbbbd7b4e32f631bb2fa639d76af075 Merge: c7b6c5f 6e8b50d Author: Linus Torvalds Date: Fri Jan 15 12:49:44 2016 -0800 Merge tag 'nfsd-4.5' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Smaller bugfixes and cleanup, including a fix for a failures of kerberized NFSv4.1 mounts, and Scott Mayhew's work addressing ACK storms that can affect some high-availability NFS setups" * tag 'nfsd-4.5' of git://linux-nfs.org/~bfields/linux: nfsd: add new io class tracepoint nfsd: give up on CB_LAYOUTRECALLs after two lease periods nfsd: Fix nfsd leaks sunrpc module references lockd: constify nlmsvc_binding structure lockd: use to_delayed_work nfsd: use to_delayed_work Revert "svcrdma: Do not send XDR roundup bytes for a write chunk" lockd: Register callbacks on the inetaddr_chain and inet6addr_chain nfsd: Register callbacks on the inetaddr_chain and inet6addr_chain sunrpc: Add a function to close temporary transports immediately nfsd: don't base cl_cb_status on stale information nfsd4: fix gss-proxy 4.1 mounts for some AD principals nfsd: fix unlikely NULL deref in mach_creds_match nfsd: minor consolidation of mach_cred handling code nfsd: helper for dup of possibly NULL string svcrpc: move some initialization to common code nfsd: fix a warning message nfsd: constify nfsd4_callback_ops structure nfsd: recover: constify nfsd4_client_tracking_ops structures svcrdma: Do not send XDR roundup bytes for a write chunk commit c7b6c5fe67d1519759de2014a2c44f50fb1426f3 Merge: 3c28c9c 39c01bf Author: Linus Torvalds Date: Fri Jan 15 12:41:32 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs regression fix from Al Viro: "Fix for braino introduced in vfs.git#work.misc" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: amdkfd: Copy from the proper user command pointer commit c6894dec8ea9ae05747124dce98b3b5c2e69b168 Author: Nikolay Aleksandrov Date: Fri Jan 15 19:03:54 2016 +0100 bridge: fix lockdep addr_list_lock false positive splat After promisc mode management was introduced a bridge device could do dev_set_promiscuity from its ndo_change_rx_flags() callback which in turn can be called after the bridge's addr_list_lock has been taken (e.g. by dev_uc_add). This causes a false positive lockdep splat because the port interfaces' addr_list_lock is taken when br_manage_promisc() runs after the bridge's addr list lock was already taken. To remove the false positive introduce a custom bridge addr_list_lock class and set it on bridge init. A simple way to reproduce this is with the following: $ brctl addbr br0 $ ip l add l br0 br0.100 type vlan id 100 $ ip l set br0 up $ ip l set br0.100 up $ echo 1 > /sys/class/net/br0/bridge/vlan_filtering $ brctl addif br0 eth0 Splat: [ 43.684325] ============================================= [ 43.684485] [ INFO: possible recursive locking detected ] [ 43.684636] 4.4.0-rc8+ #54 Not tainted [ 43.684755] --------------------------------------------- [ 43.684906] brctl/1187 is trying to acquire lock: [ 43.685047] (_xmit_ETHER){+.....}, at: [] dev_set_rx_mode+0x1e/0x40 [ 43.685460] but task is already holding lock: [ 43.685618] (_xmit_ETHER){+.....}, at: [] dev_uc_add+0x27/0x80 [ 43.686015] other info that might help us debug this: [ 43.686316] Possible unsafe locking scenario: [ 43.686743] CPU0 [ 43.686967] ---- [ 43.687197] lock(_xmit_ETHER); [ 43.687544] lock(_xmit_ETHER); [ 43.687886] *** DEADLOCK *** [ 43.688438] May be due to missing lock nesting notation [ 43.688882] 2 locks held by brctl/1187: [ 43.689134] #0: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 [ 43.689852] #1: (_xmit_ETHER){+.....}, at: [] dev_uc_add+0x27/0x80 [ 43.690575] stack backtrace: [ 43.690970] CPU: 0 PID: 1187 Comm: brctl Not tainted 4.4.0-rc8+ #54 [ 43.691270] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014 [ 43.691770] ffffffff826a25c0 ffff8800369fb8e0 ffffffff81360ceb ffffffff826a25c0 [ 43.692425] ffff8800369fb9b8 ffffffff810d0466 ffff8800369fb968 ffffffff81537139 [ 43.693071] ffff88003a08c880 0000000000000000 00000000ffffffff 0000000002080020 [ 43.693709] Call Trace: [ 43.693931] [] dump_stack+0x4b/0x70 [ 43.694199] [] __lock_acquire+0x1e46/0x1e90 [ 43.694483] [] ? netlink_broadcast_filtered+0x139/0x3e0 [ 43.694789] [] ? nlmsg_notify+0x5a/0xc0 [ 43.695064] [] lock_acquire+0xe5/0x1f0 [ 43.695340] [] ? dev_set_rx_mode+0x1e/0x40 [ 43.695623] [] _raw_spin_lock_bh+0x45/0x80 [ 43.695901] [] ? dev_set_rx_mode+0x1e/0x40 [ 43.696180] [] dev_set_rx_mode+0x1e/0x40 [ 43.696460] [] dev_set_promiscuity+0x3c/0x50 [ 43.696750] [] br_port_set_promisc+0x25/0x50 [bridge] [ 43.697052] [] br_manage_promisc+0x8a/0xe0 [bridge] [ 43.697348] [] br_dev_change_rx_flags+0x1e/0x20 [bridge] [ 43.697655] [] __dev_set_promiscuity+0x132/0x1f0 [ 43.697943] [] __dev_set_rx_mode+0x82/0x90 [ 43.698223] [] dev_uc_add+0x5e/0x80 [ 43.698498] [] vlan_device_event+0x542/0x650 [8021q] [ 43.698798] [] notifier_call_chain+0x5d/0x80 [ 43.699083] [] raw_notifier_call_chain+0x16/0x20 [ 43.699374] [] call_netdevice_notifiers_info+0x6e/0x80 [ 43.699678] [] call_netdevice_notifiers+0x16/0x20 [ 43.699973] [] br_add_if+0x47e/0x4c0 [bridge] [ 43.700259] [] add_del_if+0x6e/0x80 [bridge] [ 43.700548] [] br_dev_ioctl+0xaf/0xc0 [bridge] [ 43.700836] [] dev_ifsioc+0x30c/0x3c0 [ 43.701106] [] dev_ioctl+0xf9/0x6f0 [ 43.701379] [] ? mntput_no_expire+0x5/0x450 [ 43.701665] [] ? mntput_no_expire+0xae/0x450 [ 43.701947] [] sock_do_ioctl+0x42/0x50 [ 43.702219] [] sock_ioctl+0x1e5/0x290 [ 43.702500] [] do_vfs_ioctl+0x2cb/0x5c0 [ 43.702771] [] SyS_ioctl+0x79/0x90 [ 43.703033] [] entry_SYSCALL_64_fastpath+0x16/0x7a CC: Vlad Yasevich CC: Stephen Hemminger CC: Bridge list CC: Andy Gospodarek CC: Roopa Prabhu Fixes: 2796d0c648c9 ("bridge: Automatically manage port promiscuous mode.") Reported-by: Andy Gospodarek Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3c28c9ccafd8bfb30ede7f36bf099b071b977209 Merge: 4b43ea2 1501efa Author: Linus Torvalds Date: Fri Jan 15 12:28:00 2016 -0800 Merge tag 'md/4.5' of git://neil.brown.name/md Pull md updates from Neil Brown: "Mostly clustered-raid1 and raid5 journal updates. one Y2038 fix and other minor stuff. One patch removes me from the MAINTAINERS file and adds a record of my md maintainership to Credits" Many thanks to Neil, who has been around for a _looong_ time. * tag 'md/4.5' of git://neil.brown.name/md: (26 commits) md/raid: only permit hot-add of compatible integrity profiles Remove myself as MD Maintainer, and add to Credits. raid5-cache: handle journal hotadd in quiesce MD: add journal with array suspended md: set MD_HAS_JOURNAL in correct places md: Remove 'ready' field from mddev. md: remove unnecesary md_new_event_inintr raid5: allow r5l_io_unit allocations to fail raid5-cache: use a mempool for the metadata block raid5-cache: use a bio_set raid5-cache: add journal hot add/remove support drivers: md: use ktime_get_real_seconds() md: avoid warning for 32-bit sector_t raid5-cache: free meta_page earlier raid5-cache: simplify r5l_move_io_unit_list md: update comment for md_allow_write md-cluster: update comments for MD_CLUSTER_SEND_LOCKED_ALREADY md-cluster: Protect communication with mutexes md-cluster: Defer MD reloading to mddev->thread md-cluster: update the documentation ... commit 4b43ea2a7c763ab4a1fef69b7c7e2cb091fdea6c Merge: 7aca74e d3bd4e0 Author: Linus Torvalds Date: Fri Jan 15 12:14:47 2016 -0800 Merge tag 'regulator-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "Aside from a fix for a spurious warning (which caused more problems than it fixed in the fixing really) this is all driver updates, including new drivers for Dialog PV88060/90 and TI LM363x and TPS65086 devices. The qcom_smd driver has had PM8916 and PMA8084 support added" * tag 'regulator-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (36 commits) regulator: core: remove some dead code regulator: core: use dev_to_rdev regulator: lp872x: Get rid of duplicate reference to DVS GPIO regulator: lp872x: Add missing of_match in regulators descriptions regulator: axp20x: Fix GPIO LDO enable value for AXP22x regulator: lp8788: constify regulator_ops structures regulator: wm8*: constify regulator_ops structures regulator: da9*: constify regulator_ops structures regulator: mt6311: Use REGCACHE_RBTREE regulator: tps65917/palmas: Add bypass ops for LDOs with bypass capability regulator: qcom-smd: Add support for PMA8084 regulator: qcom-smd: Add PM8916 support soc: qcom: documentation: Update SMD/RPM Docs regulator: pv88090: logical vs bitwise AND typo regulator: pv88090: Fix irq leak regulator: pv88090: new regulator driver regulator: wm831x-ldo: Use platform_register/unregister_drivers() regulator: wm831x-dcdc: Use platform_register/unregister_drivers() regulator: lp8788-ldo: Use platform_register/unregister_drivers() regulator: core: Fix nested locking of supplies ... commit f147d0b320f02e799a8eec4b95f9f989f65b8a34 Author: Yoshinori Sato Date: Sat Jan 16 00:05:09 2016 +0900 net: smsc: Add support h8300 Add H8/300 platform support for smc91x Signed-off-by: Yoshinori Sato Signed-off-by: David S. Miller drivers/net/ethernet/smsc/Kconfig | 4 ++-- drivers/net/ethernet/smsc/smc91x.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) commit 39c01bf933106296e43e46cdbd9edce13ae5a5b7 Author: Borislav Petkov Date: Fri Jan 15 19:26:44 2016 +0100 amdkfd: Copy from the proper user command pointer 8f1d57c17248 ("amdkfd: don't open-code memdup_user()") mistakenly uses an uninitialized local pointer, gcc complains: drivers/gpu/drm/amd/amdkfd/kfd_chardev.c: In function ‘kfd_ioctl_dbg_address_watch’: drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:562:12: warning: ‘args_buff’ may be used uninitialized in this function [-Wmaybe-uninitialized] args_buff = memdup_user(args_buff, ^ Fix it. Signed-off-by: Borislav Petkov Cc: Al Viro Signed-off-by: Al Viro drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7aca74e7c1bbd2beed50d7d77065f26457e35b03 Merge: 1d3671d bfbcfa7 Author: Linus Torvalds Date: Fri Jan 15 12:13:58 2016 -0800 Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox fixlet from Jussi Brar. * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: constify mbox_chan_ops structure commit 973365dc2de93a79950d2d2483ca8fbc2ad2ca18 Merge: fb33118 9c6f3ff Author: David S. Miller Date: Fri Jan 15 15:13:19 2016 -0500 Merge branch 'xen-netback-fixes' David Vrabel says: ==================== xen-netback: use skb to determine number of required (etc.) "xen-netback: use skb to determine number of required" plus two other minor fixes I found down the back of the sofa. ==================== Signed-off-by: David S. Miller commit 9c6f3ffe8200327d1cf2aad2ff2b414adaacbe96 Author: David Vrabel Date: Fri Jan 15 14:55:36 2016 +0000 xen-netback: free queues after freeing the net device If a queue still has a NAPI instance added to the net device, freeing the queues early results in a use-after-free. The shouldn't ever happen because we disconnect and tear down all queues before freeing the net device, but doing this makes it obviously safe. Signed-off-by: David Vrabel Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 4a658527271bce43afb1cf4feec89afe6716ca59 Author: David Vrabel Date: Fri Jan 15 14:55:35 2016 +0000 xen-netback: delete NAPI instance when queue fails to initialize When xenvif_connect() fails it may leave a stale NAPI instance added to the device. Make sure we delete it in the error path. Signed-off-by: David Vrabel Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 1 + 1 file changed, 1 insertion(+) commit 99a2dea50d5deff134b6c346f53a3ad1f583ee96 Author: David Vrabel Date: Fri Jan 15 14:55:34 2016 +0000 xen-netback: use skb to determine number of required guest Rx requests Using the MTU or GSO size to determine the number of required guest Rx requests for an skb was subtly broken since these value may change at runtime. After 1650d5455bd2dc6b5ee134bd6fc1a3236c266b5b (xen-netback: always fully coalesce guest Rx packets) we always fully pack a packet into its guest Rx slots. Calculating the number of required slots from the packet length is then easy. Signed-off-by: David Vrabel Signed-off-by: David S. Miller drivers/net/xen-netback/netback.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit fb3311853c0f23391fc3441d49a46d076de57757 Author: Geert Uytterhoeven Date: Fri Jan 15 14:44:31 2016 +0100 net: sctp: Move sequence start handling into sctp_transport_get_idx() net/sctp/proc.c: In function ‘sctp_transport_get_idx’: net/sctp/proc.c:313: warning: ‘obj’ may be used uninitialized in this function This is currently a false positive, as all callers check for a zero offset first, and handle this case in the exact same way. Move the check and handling into sctp_transport_get_idx() to kill the compiler warning, and avoid future bugs. Signed-off-by: Geert Uytterhoeven Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 34ae6a1aa0540f0f781dd265366036355fdc8930 Author: Eric Dumazet Date: Fri Jan 15 04:56:56 2016 -0800 ipv6: update skb->csum when CE mark is propagated When a tunnel decapsulates the outer header, it has to comply with RFC 6080 and eventually propagate CE mark into inner header. It turns out IP6_ECN_set_ce() does not correctly update skb->csum for CHECKSUM_COMPLETE packets, triggering infamous "hw csum failure" messages and stack traces. Signed-off-by: Eric Dumazet Acked-by: Herbert Xu Signed-off-by: David S. Miller include/net/inet_ecn.h | 19 ++++++++++++++++--- net/ipv6/xfrm6_mode_tunnel.c | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) commit 185a383ada2e7794b0e82e040223e741b24d2bf8 Author: Keith Busch Date: Tue Jan 12 13:18:10 2016 -0700 x86/PCI: Add driver for Intel Volume Management Device (VMD) The Intel Volume Management Device (VMD) is a Root Complex Integrated Endpoint that acts as a host bridge to a secondary PCIe domain. BIOS can reassign one or more Root Ports to appear within a VMD domain instead of the primary domain. The immediate benefit is that additional PCIe domains allow more than 256 buses in a system by letting bus numbers be reused across different domains. VMD domains do not define ACPI _SEG, so to avoid domain clashing with host bridges defining this segment, VMD domains start at 0x10000, which is greater than the highest possible 16-bit ACPI defined _SEG. This driver enumerates and enables the domain using the root bus configuration interface provided by the PCI subsystem. The driver provides configuration space accessor functions (pci_ops), bus and memory resources, an MSI IRQ domain with irq_chip implementation, and DMA operations necessary to use devices through the VMD endpoint's interface. VMD routes I/O as follows: 1) Configuration Space: BAR 0 ("CFGBAR") of VMD provides the base address and size for configuration space register access to VMD-owned root ports. It works similarly to MMCONFIG for extended configuration space. Bus numbering is independent and does not conflict with the primary domain. 2) MMIO Space: BARs 2 and 4 ("MEMBAR1" and "MEMBAR2") of VMD provide the base address, size, and type for MMIO register access. These addresses are not translated by VMD hardware; they are simply reservations to be distributed to root ports' memory base/limit registers and subdivided among devices downstream. 3) DMA: To interact appropriately with an IOMMU, the source ID DMA read and write requests are translated to the bus-device-function of the VMD endpoint. Otherwise, DMA operates normally without VMD-specific address translation. 4) Interrupts: Part of VMD's BAR 4 is reserved for VMD's MSI-X Table and PBA. MSIs from VMD domain devices and ports are remapped to appear as if they were issued using one of VMD's MSI-X table entries. Each MSI and MSI-X address of VMD-owned devices and ports has a special format where the address refers to specific entries in the VMD's MSI-X table. As with DMA, the interrupt source ID is translated to VMD's bus-device-function. The driver provides its own MSI and MSI-X configuration functions specific to how MSI messages are used within the VMD domain, and provides an irq_chip for independent IRQ allocation to relay interrupts from VMD's interrupt handler to the appropriate device driver's handler. 5) Errors: PCIe error message are intercepted by the root ports normally (e.g., AER), except with VMD, system errors (i.e., firmware first) are disabled by default. AER and hotplug interrupts are translated in the same way as endpoint interrupts. 6) VMD does not support INTx interrupts or IO ports. Devices or drivers requiring these features should either not be placed below VMD-owned root ports, or VMD should be disabled by BIOS for such endpoints. [bhelgaas: add VMD BAR #defines, factor out vmd_cfg_addr(), rework VMD resource setup, whitespace, changelog] Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Acked-by: Thomas Gleixner (IRQ-related parts) MAINTAINERS | 6 + arch/x86/Kconfig | 13 + arch/x86/include/asm/hw_irq.h | 5 + arch/x86/pci/Makefile | 2 + arch/x86/pci/vmd.c | 723 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 749 insertions(+) commit 28ef241f05c20c2f04b349d43c615438f7e6f811 Author: Keith Busch Date: Tue Jan 12 13:18:09 2016 -0700 PCI/AER: Use 32 bit PCI domain numbers The Intel Volume Management Device (VMD) supports 32-bit domain numbers. To accommodate this, use u32 instead of u16 to store domain numbers. [bhelgaas: changelog] Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aer/aer_inject.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d9c3d6ff227cbdf05399ba8303bdcd0d35bbfccb Author: Keith Busch Date: Tue Jan 12 13:18:08 2016 -0700 x86/PCI: Allow DMA ops specific to a PCI domain The Intel Volume Management Device (VMD) is a PCIe endpoint that acts as a host bridge to another PCI domain. When devices below the VMD perform DMA, the VMD replaces their DMA source IDs with its own source ID. Therefore, those devices require special DMA ops. Add interfaces to allow the VMD driver to set up dma_ops for the devices below it. [bhelgaas: remove "extern", add "static", changelog] Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas arch/x86/include/asm/device.h | 10 ++++++++++ arch/x86/pci/common.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 64bce3e8bfb3cf2cbc638296390af3e02e747347 Author: Keith Busch Date: Tue Jan 12 13:18:07 2016 -0700 irqdomain: Export irq_domain_set_info() for module use Export irq_domain_set_info() for module use. It will be used by the Volume Management Device driver. [bhelgaas: changelog] Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Acked-by: Thomas Gleixner kernel/irq/irqdomain.c | 1 + 1 file changed, 1 insertion(+) commit 1d3671df72e0fe28d7cc686cb432e87c06f4accc Merge: 875fc4f bb00c89 Author: Linus Torvalds Date: Fri Jan 15 11:51:51 2016 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF fixes and quota cleanups from Jan Kara: "Several UDF fixes and some minor quota cleanups" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Check output buffer length when converting name to CS0 udf: Prevent buffer overrun with multi-byte characters quota: constify qtree_fmt_operations structures udf: avoid uninitialized variable use udf: Fix lost indirect extent block udf: Factor out code for creating indirect extent udf: limit the maximum number of indirect extents in a row udf: limit the maximum number of TD redirections fs: make quota/dquot.c explicitly non-modular fs: make quota/netlink.c explicitly non-modular commit 113c74d83eef870e43a0d9279044e9d5435f0d07 Author: Sjoerd Simons Date: Thu Jan 14 21:57:18 2016 +0100 net: phy: turn carrier off on phy attach The operstate of a networking device initially IF_OPER_UNKNOWN aka "unknown", updated on carrier state changes (with carrier state being on by default). This means it will stay unknown unless the carrier state goes to off at some point, which is not the case if the phy is already up/connected at startup. Explicitly turn off the carrier on phy attach, leaving the phy state machine to turn the carrier on when it has done the initial negotiation. Signed-off-by: Sjoerd Simons Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 5 +++++ 1 file changed, 5 insertions(+) commit 244683749e3c632ab45655098259d5514c179c8a Author: Nathan Sullivan Date: Thu Jan 14 13:27:27 2016 -0600 net: macb: clear interrupts when disabling them Disabling interrupts with the IDR register does not stop the macb hardware from asserting its interrupt line if there are interrupts pending. Always clear the interrupts using ISR, and be sure to write it on hardware that is not read-to-clear, like Zynq. Not doing so will cause interrupts when the driver doesn't expect them. Signed-off-by: Nathan Sullivan Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 4 ++++ 1 file changed, 4 insertions(+) commit 875fc4f5ddf35605581f9a5900c14afef48611f2 Merge: 7d1fc01 7dfa461 Author: Linus Torvalds Date: Fri Jan 15 11:41:44 2016 -0800 Merge branch 'akpm' (patches from Andrew) Merge first patch-bomb from Andrew Morton: - A few hotfixes which missed 4.4 becasue I was asleep. cc'ed to -stable - A few misc fixes - OCFS2 updates - Part of MM. Including pretty large changes to page-flags handling and to thp management which have been buffered up for 2-3 cycles now. I have a lot of MM material this time. [ It turns out the THP part wasn't quite ready, so that got dropped from this series - Linus ] * emailed patches from Andrew Morton : (117 commits) zsmalloc: reorganize struct size_class to pack 4 bytes hole mm/zbud.c: use list_last_entry() instead of list_tail_entry() zram/zcomp: do not zero out zcomp private pages zram: pass gfp from zcomp frontend to backend zram: try vmalloc() after kmalloc() zram/zcomp: use GFP_NOIO to allocate streams mm: add tracepoint for scanning pages drivers/base/memory.c: fix kernel warning during memory hotplug on ppc64 mm/page_isolation: use macro to judge the alignment mm: fix noisy sparse warning in LIBCFS_ALLOC_PRE() mm: rework virtual memory accounting include/linux/memblock.h: fix ordering of 'flags' argument in comments mm: move lru_to_page to mm_inline.h Documentation/filesystems: describe the shared memory usage/accounting memory-hotplug: don't BUG() in register_memory_resource() hugetlb: make mm and fs code explicitly non-modular mm/swapfile.c: use list_for_each_entry_safe in free_swap_count_continuations mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd() mm: make sure isolate_lru_page() is never called for tail page vmstat: make vmstat_updater deferrable again and shut down on idle ... commit 65a5124a71e85c35fa8d047a471950325855dccf Author: Xin Long Date: Thu Jan 14 13:49:34 2016 +0800 sctp: support to lookup with ep+paddr in transport rhashtable Now, when we sendmsg, we translate the ep to laddr by selecting the first element of the list, and then do a lookup for a transport. But sctp_hash_cmp() will compare it against asoc addr_list, which may be a subset of ep addr_list, meaning that this chosen laddr may not be there, and thus making it impossible to find the transport. So we fix it by using ep + paddr to lookup transports in hashtable. In sctp_hash_cmp, if .ep is set, we will check if this ep == asoc->ep, or we will do the laddr check. Fixes: d6c0256a60e6 ("sctp: add the rhashtable apis for sctp global transport hashtable") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Reported-by: Vlad Yasevich Signed-off-by: David S. Miller net/sctp/input.c | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit 7dfa4612204b511c934ca2a0e4f306f9981bd9aa Author: Weijie Yang Date: Thu Jan 14 15:22:40 2016 -0800 zsmalloc: reorganize struct size_class to pack 4 bytes hole Reoder the pages_per_zspage field in struct size_class which can eliminate the 4 bytes hole between it and stats field. Signed-off-by: Weijie Yang Reviewed-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f58fb5e7f0ab05c9083869c1ec27854af2afc7b7 Author: Geliang Tang Date: Thu Jan 14 15:22:38 2016 -0800 mm/zbud.c: use list_last_entry() instead of list_tail_entry() list_last_entry*( has been defined in list.h, so replace list_tail_entry() with it. Signed-off-by: Geliang Tang Cc: Seth Jennings Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zbud.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e02d238c9852a91b30da9ea32ce36d1416cdc683 Author: Sergey Senozhatsky Date: Thu Jan 14 15:22:35 2016 -0800 zram/zcomp: do not zero out zcomp private pages Do not __GFP_ZERO allocated zcomp ->private pages. We keep allocated streams around and use them for read/write requests, so we supply a zeroed out ->private to compression algorithm as a scratch buffer only once -- the first time we use that stream. For the rest of IO requests served by this stream ->private usually contains some temporarily data from the previous requests. Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zcomp_lz4.c | 4 ++-- drivers/block/zram/zcomp_lzo.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 75d8947a36d0c9aedd69118d1f14bf424005c7c2 Author: Minchan Kim Date: Thu Jan 14 15:22:32 2016 -0800 zram: pass gfp from zcomp frontend to backend Each zcomp backend uses own gfp flag but it's pointless because the context they could be called is driven by upper layer(ie, zcomp frontend). As well, zcomp frondend could call them in different context. One context(ie, zram init part) is it should be better to make sure successful allocation other context(ie, further stream allocation part for accelarating I/O speed) is just optional so let's pass gfp down from driver (ie, zcomp frontend) like normal MM convention. [sergey.senozhatsky@gmail.com: add missing __vmalloc zero and highmem gfps] Signed-off-by: Minchan Kim Signed-off-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zcomp.c | 24 ++++++++++++++++-------- drivers/block/zram/zcomp.h | 2 +- drivers/block/zram/zcomp_lz4.c | 16 +++------------- drivers/block/zram/zcomp_lzo.c | 16 +++------------- 4 files changed, 23 insertions(+), 35 deletions(-) commit d913897abace843bba20249f3190167f7895e9c3 Author: Kyeongdon Kim Date: Thu Jan 14 15:22:29 2016 -0800 zram: try vmalloc() after kmalloc() When we're using LZ4 multi compression streams for zram swap, we found out page allocation failure message in system running test. That was not only once, but a few(2 - 5 times per test). Also, some failure cases were continually occurring to try allocation order 3. In order to make parallel compression private data, we should call kzalloc() with order 2/3 in runtime(lzo/lz4). But if there is no order 2/3 size memory to allocate in that time, page allocation fails. This patch makes to use vmalloc() as fallback of kmalloc(), this prevents page alloc failure warning. After using this, we never found warning message in running test, also It could reduce process startup latency about 60-120ms in each case. For reference a call trace : Binder_1: page allocation failure: order:3, mode:0x10c0d0 CPU: 0 PID: 424 Comm: Binder_1 Tainted: GW 3.10.49-perf-g991d02b-dirty #20 Call trace: dump_backtrace+0x0/0x270 show_stack+0x10/0x1c dump_stack+0x1c/0x28 warn_alloc_failed+0xfc/0x11c __alloc_pages_nodemask+0x724/0x7f0 __get_free_pages+0x14/0x5c kmalloc_order_trace+0x38/0xd8 zcomp_lz4_create+0x2c/0x38 zcomp_strm_alloc+0x34/0x78 zcomp_strm_multi_find+0x124/0x1ec zcomp_strm_find+0xc/0x18 zram_bvec_rw+0x2fc/0x780 zram_make_request+0x25c/0x2d4 generic_make_request+0x80/0xbc submit_bio+0xa4/0x15c __swap_writepage+0x218/0x230 swap_writepage+0x3c/0x4c shrink_page_list+0x51c/0x8d0 shrink_inactive_list+0x3f8/0x60c shrink_lruvec+0x33c/0x4cc shrink_zone+0x3c/0x100 try_to_free_pages+0x2b8/0x54c __alloc_pages_nodemask+0x514/0x7f0 __get_free_pages+0x14/0x5c proc_info_read+0x50/0xe4 vfs_read+0xa0/0x12c SyS_read+0x44/0x74 DMA: 3397*4kB (MC) 26*8kB (RC) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 13796kB [minchan@kernel.org: change vmalloc gfp and adding comment about gfp] [sergey.senozhatsky@gmail.com: tweak comments and styles] Signed-off-by: Kyeongdon Kim Signed-off-by: Minchan Kim Acked-by: Sergey Senozhatsky Sergey Senozhatsky Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zcomp_lz4.c | 23 +++++++++++++++++++++-- drivers/block/zram/zcomp_lzo.c | 23 +++++++++++++++++++++-- 2 files changed, 42 insertions(+), 4 deletions(-) commit 3d5fe03a3ea013060ebba2a811aeb0f23f56aefa Author: Sergey Senozhatsky Date: Thu Jan 14 15:22:26 2016 -0800 zram/zcomp: use GFP_NOIO to allocate streams We can end up allocating a new compression stream with GFP_KERNEL from within the IO path, which may result is nested (recursive) IO operations. That can introduce problems if the IO path in question is a reclaimer, holding some locks that will deadlock nested IOs. Allocate streams and working memory using GFP_NOIO flag, forbidding recursive IO and FS operations. An example: inconsistent {IN-RECLAIM_FS-W} -> {RECLAIM_FS-ON-W} usage. git/20158 [HC0[0]:SC0[0]:HE1:SE1] takes: (jbd2_handle){+.+.?.}, at: start_this_handle+0x4ca/0x555 {IN-RECLAIM_FS-W} state was registered at: __lock_acquire+0x8da/0x117b lock_acquire+0x10c/0x1a7 start_this_handle+0x52d/0x555 jbd2__journal_start+0xb4/0x237 __ext4_journal_start_sb+0x108/0x17e ext4_dirty_inode+0x32/0x61 __mark_inode_dirty+0x16b/0x60c iput+0x11e/0x274 __dentry_kill+0x148/0x1b8 shrink_dentry_list+0x274/0x44a prune_dcache_sb+0x4a/0x55 super_cache_scan+0xfc/0x176 shrink_slab.part.14.constprop.25+0x2a2/0x4d3 shrink_zone+0x74/0x140 kswapd+0x6b7/0x930 kthread+0x107/0x10f ret_from_fork+0x3f/0x70 irq event stamp: 138297 hardirqs last enabled at (138297): debug_check_no_locks_freed+0x113/0x12f hardirqs last disabled at (138296): debug_check_no_locks_freed+0x33/0x12f softirqs last enabled at (137818): __do_softirq+0x2d3/0x3e9 softirqs last disabled at (137813): irq_exit+0x41/0x95 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(jbd2_handle); lock(jbd2_handle); *** DEADLOCK *** 5 locks held by git/20158: #0: (sb_writers#7){.+.+.+}, at: [] mnt_want_write+0x24/0x4b #1: (&type->i_mutex_dir_key#2/1){+.+.+.}, at: [] lock_rename+0xd9/0xe3 #2: (&sb->s_type->i_mutex_key#11){+.+.+.}, at: [] lock_two_nondirectories+0x3f/0x6b #3: (&sb->s_type->i_mutex_key#11/4){+.+.+.}, at: [] lock_two_nondirectories+0x66/0x6b #4: (jbd2_handle){+.+.?.}, at: [] start_this_handle+0x4ca/0x555 stack backtrace: CPU: 2 PID: 20158 Comm: git Not tainted 4.1.0-rc7-next-20150615-dbg-00016-g8bdf555-dirty #211 Call Trace: dump_stack+0x4c/0x6e mark_lock+0x384/0x56d mark_held_locks+0x5f/0x76 lockdep_trace_alloc+0xb2/0xb5 kmem_cache_alloc_trace+0x32/0x1e2 zcomp_strm_alloc+0x25/0x73 [zram] zcomp_strm_multi_find+0xe7/0x173 [zram] zcomp_strm_find+0xc/0xe [zram] zram_bvec_rw+0x2ca/0x7e0 [zram] zram_make_request+0x1fa/0x301 [zram] generic_make_request+0x9c/0xdb submit_bio+0xf7/0x120 ext4_io_submit+0x2e/0x43 ext4_bio_write_page+0x1b7/0x300 mpage_submit_page+0x60/0x77 mpage_map_and_submit_buffers+0x10f/0x21d ext4_writepages+0xc8c/0xe1b do_writepages+0x23/0x2c __filemap_fdatawrite_range+0x84/0x8b filemap_flush+0x1c/0x1e ext4_alloc_da_blocks+0xb8/0x117 ext4_rename+0x132/0x6dc ? mark_held_locks+0x5f/0x76 ext4_rename2+0x29/0x2b vfs_rename+0x540/0x636 SyS_renameat2+0x359/0x44d SyS_rename+0x1e/0x20 entry_SYSCALL_64_fastpath+0x12/0x6f [minchan@kernel.org: add stable mark] Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Kyeongdon Kim Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zcomp.c | 4 ++-- drivers/block/zram/zcomp_lz4.c | 2 +- drivers/block/zram/zcomp_lzo.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 628a96e7d3b684baf5584462de32345e997d7dbe Merge: 9207f9d 28052e7 Author: David S. Miller Date: Fri Jan 15 14:40:04 2016 -0500 Merge branch 'hisi-fixes' Kejian Yan says: ==================== dts: hisi: fixes no syscon fault when init mdio This patchset fixes the bug that eth can't initial successful on hip05-D02 because the dts files doesn't match the source code. ==================== Signed-off-by: David S. Miller commit 28052e75834a84b006893735debedb8ee6b6cbc0 Author: yankejian Date: Wed Jan 13 15:09:59 2016 +0800 net: hns: fixes no syscon error when init mdio As dtsi files use the normal naming conventions using '-' instead of '_' inside of property names, the driver needs to update the phandle name strings of the of_parse_phandle func. Signed-off-by: Kejian Yan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b70ce2ab41cb67ab3d661eda078f7c4029bbca95 Author: yankejian Date: Wed Jan 13 15:09:58 2016 +0800 dts: hisi: fixes no syscon fault when init mdio When linux start up, we get the log below: "Hi-HNS_MDIO 803c0000.mdio: no syscon hisilicon,peri-c-subctrl mdio_bus mdio@803c0000: mdio sys ctl reg has not maped" The source code about the subctrl is dealt syscon, but dts doesn't. It cause such fault, so this patch adds the syscon info on dts files to fixes it. Signed-off-by: Kejian Yan Acked-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/arm/hisilicon/hisilicon.txt | 16 ++++++++++++++++ arch/arm64/boot/dts/hisilicon/hip05.dtsi | 5 +++++ arch/arm64/boot/dts/hisilicon/hip05_hns.dtsi | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) commit 9207f9d45b0ad071baa128e846d7e7ed85016df3 Author: Konstantin Khlebnikov Date: Fri Jan 8 15:21:46 2016 +0300 net: preserve IP control block during GSO segmentation Skb_gso_segment() uses skb control block during segmentation. This patch adds 32-bytes room for previous control block which will be copied into all resulting segments. This patch fixes kernel crash during fragmenting forwarded packets. Fragmentation requires valid IP CB in skb for clearing ip options. Also patch removes custom save/restore in ovs code, now it's redundant. Signed-off-by: Konstantin Khlebnikov Link: http://lkml.kernel.org/r/CALYGNiP-0MZ-FExV2HutTvE9U-QQtkKSoE--KN=JQE5STYsjAA@mail.gmail.com Signed-off-by: David S. Miller include/linux/skbuff.h | 3 ++- net/core/dev.c | 5 +++++ net/ipv4/ip_output.c | 1 + net/openvswitch/datapath.c | 5 +---- net/xfrm/xfrm_output.c | 2 ++ 5 files changed, 11 insertions(+), 5 deletions(-) commit 96b9e70b8e6cd65f71ee71889143976f3afb038a Author: Jiri Olsa Date: Fri Jan 15 04:00:18 2016 +0000 perf build: Introduce FEATURES_DUMP make variable Introducing FEATURES_DUMP make variable to provide features detection dump file and bypass the feature detection. The intention is to use this during build tests to skip repeated features detection, like: Get feature dump static build into /tmp/fd file: $ make feature-dump FEATURE_DUMP_COPY=/tmp/fd LDFLAGS=-static BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ OFF ] SNIP FEATURE-DUMP file copied into /tmp/fd Use /tmp/fd to build perf: $ make FEATURES_DUMP=/tmp/fd LDFLAGS=-static $ file perf perf: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for ... Suggested-by: Wang Nan Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452830421-77757-7-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 14 +++++++++++++- tools/perf/config/Makefile | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit b8e52be00ca7e7659e8ee172ce9e6f0c6af28ec8 Author: Jiri Olsa Date: Fri Jan 15 04:00:17 2016 +0000 perf build: Add feature-dump target To provide FEATURE-DUMP into $(FEATURE_DUMP_COPY) if defined, with no further action. Get feature dump of the current build: $ make feature-dump BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ on ] FEATURE-DUMP file available in FEATURE-DUMP Get feature dump static build into /tmp/fd file: $ make feature-dump FEATURE_DUMP_COPY=/tmp/fd LDFLAGS=-static BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ OFF ] SNIP FEATURE-DUMP file copied into /tmp/fd Suggested-by: Wang Nan Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452830421-77757-6-git-send-email-wangnan0@huawei.com Signed-off-by: Wang Nan Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c15e758c4bd7fbe38983e36258541ffcf81e1500 Author: Wang Nan Date: Fri Jan 15 04:00:16 2016 +0000 perf build: Pass O option to kernel makefile in build-test Kernel makefile only follows an 'O' option passed from command line explicitely. In build-test with 'O' option set, kernel makefile contaminate kernel source directory. Build test also fail if we don't create output directory manually. K_O_OPT is added and passed to kernel makefile if 'O' is passed to build-test. Signed-off-by: Wang Nan Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452830421-77757-5-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/make | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 68824de19a0b4cdc17193cb004c55d82c06af8bd Author: Wang Nan Date: Fri Jan 15 04:00:15 2016 +0000 perf build: Test correct path of perf in build-test If an 'O' is passed to 'make build-test', many 'test -x' and 'test -f' will fail because perf resides in a different directory. Fix this by computing PERF_OUT according to 'O' and test correct output files. For make_kernelsrc and make_kernelsrc_tools, set KBUILD_OUTPUT_DIR instead because the path is different from others ($(O)/perf vs $(O)/tools/perf). Signed-off-by: Wang Nan Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452830421-77757-4-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/make | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit eb807730c034090599135bc03578015ebf8974af Author: Wang Nan Date: Fri Jan 15 04:00:14 2016 +0000 perf build: Pass O option to Makefile.perf in build-test Unlike tools/perf/Makefile, tools/perf/Makefile.perf obey 'O' option when it is passed through cmdline only, due to code in tools/scripts/Makefile.include: ifneq ($(O),) ifeq ($(origin O), command line) ... ABSOLUTE_O := $(shell cd $(O) ; pwd) OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/) endif endif This patch passes 'O' to Makefile.perf through cmdline explicitly to make it follow O variable during build-test. 'make clean' should have identical 'O' option with 'make'. If not, config-clean may error. Signed-off-by: Wang Nan Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452830421-77757-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/make | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 7be43dfb1e617b87bf2d936d82c026be39b43910 Author: Wang Nan Date: Wed Jan 13 12:17:14 2016 +0000 perf build: Set parallel making options build-test 'make build-test' is painful because of time consuming. In a full test, all test cases are built twice with tools/perf/Makefile and tools/perf/Makefile.perf. 'Makefile' automatically computes parallel options for make, but 'Makefile.perf' not, so all test cases is built with one job. It is very slow. This patch adds '-j' options to Makefile.perf testing. It computes parallel building options like what tools/perf/Makefile does, and pass '-j' option to Makefile.perf test. Signed-off-by: Wang Nan Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452687442-6186-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/make | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 40c4a0f92aed570cc529a1e5c24c7e04a0ce8b85 Author: Ben Hutchings Date: Wed Jan 13 17:23:01 2016 +0000 perf symbols: Fix reading of build-id from vDSO We need to use the long name (the filename) when reading the build-id from a DSO. Using the short name doesn't work for (at least) vDSOs. Signed-off-by: Ben Hutchings Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160113172301.GT28542@decadent.org.uk Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3caeaa562733c4836e61086ec07666635006a787 Author: Ravi Bangoria Date: Mon Dec 7 12:25:02 2015 +0530 perf kvm record/report: 'unprocessable sample' error while recording/reporting guest data While recording guest samples in host using perf kvm record, it will populate unprocessable sample error, though samples will be recorded properly. While generating report using perf kvm report, no samples will be processed and same error will populate. We have seen this behaviour with upstream perf(4.4-rc3) on x86 and ppc64 hardware. Reason behind this failure is, when it tries to fetch machine from rb_tree of machines, it fails. As a part of tracing a bug, we figured out that this code was incorrectly refactored in commit 54245fdc3576 ("perf session: Remove wrappers to machines__find"). This patch will change the functionality such that if it can't fetch machine in first trial, it will create one node of machine and add that to rb_tree. So next time when it tries to fetch same machine from rb_tree, it won't fail. Actually it was the case before refactoring of code in aforementioned commit. This patch is generated from acme perf/core branch. Below I've mention an example that demonstrate the behaviour before and after applying patch. Before applying patch: [Note: One needs to run guest before recording data in host] ravi@ravi-bangoria:~$ ./perf kvm record -a Warning: 5903 unprocessable samples recorded. Do you have a KVM guest running and not using 'perf kvm'? [ perf record: Captured and wrote 1.409 MB perf.data.guest (285 samples) ] ravi@ravi-bangoria:~$ ./perf kvm report --stdio Warning: 5903 unprocessable samples recorded. Do you have a KVM guest running and not using 'perf kvm'? # To display the perf.data header info, please use --header/--header-only options. # # Total Lost Samples: 0 # # Samples: 285 of event 'cycles' # Event count (approx.): 88715406 # # Overhead Command Shared Object Symbol # ........ ....... ............. ...... # # (For a higher level overview, try: perf report --sort comm,dso) # After applying patch: ravi@ravi-bangoria:~$ ./perf kvm record -a [ perf record: Captured and wrote 1.188 MB perf.data.guest (17 samples) ] ravi@ravi-bangoria:~$ ./perf kvm report --stdio # To display the perf.data header info, please use --header/--header-only options. # # Total Lost Samples: 0 # # Samples: 17 of event 'cycles' # Event count (approx.): 700746 # # Overhead Command Shared Object Symbol # ........ ....... ................ ...................... # 34.19% :5758 [unknown] [g] 0xffffffff818682ab 22.79% :5758 [unknown] [g] 0xffffffff812dc7f8 22.79% :5758 [unknown] [g] 0xffffffff818650d0 14.83% :5758 [unknown] [g] 0xffffffff8161a1b6 2.49% :5758 [unknown] [g] 0xffffffff818692bf 0.48% :5758 [unknown] [g] 0xffffffff81869253 0.05% :5758 [unknown] [g] 0xffffffff81869250 Signed-off-by: Ravi Bangoria Cc: Naveen N. Rao Cc: stable@vger.kernel.org # v3.19+ Fixes: 54245fdc3576 ("perf session: Remove wrappers to machines__find") Link: http://lkml.kernel.org/r/1449471302-11283-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 472358412b93025b13f39e46008af3ed9541ae2b Merge: c111e8b 4058937 47b975d Author: Bjorn Helgaas Date: Fri Jan 15 12:33:29 2016 -0600 Merge branches 'pci/hotplug' and 'pci/resource' into next * pci/hotplug: PCI: ibmphp: Remove unneeded NULL test PCI: hotplug: Use list_for_each_entry() to simplify code PCI: acpiphp_ibm: Fix null dereferences on null ibm_slot * pci/resource: PCI: Avoid iterating through memory outside the resource window PCI: Fix minimum allocation address overwrite commit c111e8bf6edfead5602aafa2cda937781737d4f9 Merge: 65d5b10 40704b1 67de2dc 5930fe4 668f472 581d943 Author: Bjorn Helgaas Date: Fri Jan 15 12:33:14 2016 -0600 Merge branches 'pci/host', 'pci/host-designware', 'pci/host-hisi', 'pci/host-qcom' and 'pci/host-rcar' into next * pci/host: PCI: host: Add of_pci_get_host_bridge_resources() stub PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD * pci/host-designware: PCI: designware: Make config accessor override checking symmetric PCI: designware: Simplify control flow * pci/host-hisi: PCI: hisi: Add support for HiSilicon Hip06 PCIe host controllers * pci/host-qcom: ARM: dts: ifc6410: enable PCIe DT node for this board ARM: dts: apq8064: add PCIe devicetree node PCI: qcom: Add Qualcomm PCIe controller driver PCI: qcom: Document PCIe devicetree bindings PCI: designware: Ensure ATU is enabled before IO/conf space accesses * pci/host-rcar: PCI: rcar: Add Gen2 PHY setup to pcie-rcar PCI: rcar: Add runtime PM support to pcie-rcar PCI: rcar: Remove unused pci_sys_data struct from pcie-rcar commit 40704b129092eafce9c754199aea5a1f55c47fbc Author: Arnd Bergmann Date: Fri Dec 18 16:02:41 2015 +0100 PCI: host: Add of_pci_get_host_bridge_resources() stub The pcie-rcar driver can be built for any ARM platform (for COMPILE_TEST) including those without CONFIG_OF enabled, and that results in a compile-time error: drivers/pci/host/pcie-rcar.c: In function 'rcar_pcie_parse_request_of_pci_ranges': drivers/pci/host/pcie-rcar.c:939:8: error: implicit declaration of function 'of_pci_get_host_bridge_resources' [-Werror=implicit-function-declaration] err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources, &iobase); Add a of_pci_get_host_bridge_resources() stub function defined when CONFIG_OF_ADDRESS is disabled to allow compile-testing on all platforms. This mirrors what we do for other OF-specific functions. Fixes: 5d2917d469fa ("PCI: rcar: Convert to DT resource parsing API") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Acked-by: Wolfram Sang Acked-by: Simon Horman include/linux/of_pci.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 546bed631203344611f42b2af1d224d2eedb4e6b Author: Sebastian Andrzej Siewior Date: Fri Jan 15 14:37:15 2016 +0100 btrfs: initialize the seq counter in struct btrfs_device I managed to trigger this: | INFO: trying to register non-static key. | the code is fine but needs lockdep annotation. | turning off the locking correctness validator. | CPU: 1 PID: 781 Comm: systemd-gpt-aut Not tainted 4.4.0-rt2+ #14 | Hardware name: ARM-Versatile Express | [<80307cec>] (dump_stack) | [<80070e98>] (__lock_acquire) | [<8007184c>] (lock_acquire) | [<80287800>] (btrfs_ioctl) | [<8012a8d4>] (do_vfs_ioctl) | [<8012ac14>] (SyS_ioctl) so I think that btrfs_device_data_ordered_init() is not invoked behind a macro somewhere. Fixes: 7cc8e58d53cd ("Btrfs: fix unprotected device's variants on 32bits machine") Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 1 + 1 file changed, 1 insertion(+) commit 0dc924c5f2a3c4d999e12feaccee5f970cea1315 Author: Dan Carpenter Date: Wed Jan 13 15:21:17 2016 +0300 Btrfs: clean up an error code in btrfs_init_space_info() If we return 1 here, then the caller treats it as an error and returns -EINVAL. It causes a static checker warning to treat positive returns as an error. Fixes: 1aba86d67f34 ('Btrfs: fix easily get into ENOSPC in mixed case') Signed-off-by: Dan Carpenter Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e217858eea0d63de9d818f52fa98b5f9e502e5a Author: Geliang Tang Date: Wed Jan 13 22:08:01 2016 +0800 btrfs: fix iterator with update error in backref.c Fix the following error: fs/btrfs/backref.c:565:1-20: iterator with update on line 577 Fixes: a7ca422('btrfs: use list_for_each_entry* in backref.c') Signed-off-by: Geliang Tang Signed-off-by: David Sterba fs/btrfs/backref.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b7c47bbb2d1856330f71ba04c8eb03b39aca87cd Author: Tsutomu Itoh Date: Wed Jan 6 17:03:40 2016 +0900 Btrfs: fix output of compression message in btrfs_parse_options() The compression message might not be correctly output. Fix it. [[before fix]] # mount -o compress /dev/sdb3 /test3 [ 996.874264] BTRFS info (device sdb3): disk space caching is enabled [ 996.874268] BTRFS: has skinny extents # mount | grep /test3 /dev/sdb3 on /test3 type btrfs (rw,relatime,compress=zlib,space_cache,subvolid=5,subvol=/) # mount -o remount,compress-force /dev/sdb3 /test3 [ 1035.075017] BTRFS info (device sdb3): force zlib compression [ 1035.075021] BTRFS info (device sdb3): disk space caching is enabled # mount | grep /test3 /dev/sdb3 on /test3 type btrfs (rw,relatime,compress-force=zlib,space_cache,subvolid=5,subvol=/) # mount -o remount,compress /dev/sdb3 /test3 [ 1053.679092] BTRFS info (device sdb3): disk space caching is enabled # mount | grep /test3 /dev/sdb3 on /test3 type btrfs (rw,relatime,compress=zlib,space_cache,subvolid=5,subvol=/) [[after fix]] # mount -o compress /dev/sdb3 /test3 [ 401.021753] BTRFS info (device sdb3): use zlib compression [ 401.021758] BTRFS info (device sdb3): disk space caching is enabled [ 401.021760] BTRFS: has skinny extents # mount | grep /test3 /dev/sdb3 on /test3 type btrfs (rw,relatime,compress=zlib,space_cache,subvolid=5,subvol=/) # mount -o remount,compress-force /dev/sdb3 /test3 [ 439.824624] BTRFS info (device sdb3): force zlib compression [ 439.824629] BTRFS info (device sdb3): disk space caching is enabled # mount | grep /test3 /dev/sdb3 on /test3 type btrfs (rw,relatime,compress-force=zlib,space_cache,subvolid=5,subvol=/) # mount -o remount,compress /dev/sdb3 /test3 [ 459.918430] BTRFS info (device sdb3): use zlib compression [ 459.918434] BTRFS info (device sdb3): disk space caching is enabled # mount | grep /test3 /dev/sdb3 on /test3 type btrfs (rw,relatime,compress=zlib,space_cache,subvolid=5,subvol=/) Signed-off-by: Tsutomu Itoh Signed-off-by: David Sterba fs/btrfs/super.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit f32e48e925964c4f8ab917850788a87e1cef3bad Author: Chandan Rajendra Date: Thu Jan 7 18:56:59 2016 +0530 Btrfs: Initialize btrfs_root->highest_objectid when loading tree root and subvolume roots The following call trace is seen when btrfs/031 test is executed in a loop, [ 158.661848] ------------[ cut here ]------------ [ 158.662634] WARNING: CPU: 2 PID: 890 at /home/chandan/repos/linux/fs/btrfs/ioctl.c:558 create_subvol+0x3d1/0x6ea() [ 158.664102] BTRFS: Transaction aborted (error -2) [ 158.664774] Modules linked in: [ 158.665266] CPU: 2 PID: 890 Comm: btrfs Not tainted 4.4.0-rc6-g511711a #2 [ 158.666251] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 158.667392] ffffffff81c0a6b0 ffff8806c7c4f8e8 ffffffff81431fc8 ffff8806c7c4f930 [ 158.668515] ffff8806c7c4f920 ffffffff81051aa1 ffff880c85aff000 ffff8800bb44d000 [ 158.669647] ffff8808863b5c98 0000000000000000 00000000fffffffe ffff8806c7c4f980 [ 158.670769] Call Trace: [ 158.671153] [] dump_stack+0x44/0x5c [ 158.671884] [] warn_slowpath_common+0x81/0xc0 [ 158.672769] [] warn_slowpath_fmt+0x47/0x50 [ 158.673620] [] create_subvol+0x3d1/0x6ea [ 158.674440] [] btrfs_mksubvol.isra.30+0x369/0x520 [ 158.675376] [] ? percpu_down_read+0x1a/0x50 [ 158.676235] [] btrfs_ioctl_snap_create_transid+0x101/0x180 [ 158.677268] [] btrfs_ioctl_snap_create+0x52/0x70 [ 158.678183] [] btrfs_ioctl+0x474/0x2f90 [ 158.678975] [] ? vma_merge+0xee/0x300 [ 158.679751] [] ? alloc_pages_vma+0x91/0x170 [ 158.680599] [] ? lru_cache_add_active_or_unevictable+0x22/0x70 [ 158.681686] [] ? selinux_file_ioctl+0xff/0x1d0 [ 158.682581] [] do_vfs_ioctl+0x2c1/0x490 [ 158.683399] [] ? security_file_ioctl+0x3e/0x60 [ 158.684297] [] SyS_ioctl+0x74/0x80 [ 158.685051] [] entry_SYSCALL_64_fastpath+0x12/0x6a [ 158.685958] ---[ end trace 4b63312de5a2cb76 ]--- [ 158.686647] BTRFS: error (device loop0) in create_subvol:558: errno=-2 No such entry [ 158.709508] BTRFS info (device loop0): forced readonly [ 158.737113] BTRFS info (device loop0): disk space caching is enabled [ 158.738096] BTRFS error (device loop0): Remounting read-write after error is not allowed [ 158.851303] BTRFS error (device loop0): cleaner transaction attach returned -30 This occurs because, Mount filesystem Create subvol with ID 257 Unmount filesystem Mount filesystem Delete subvol with ID 257 btrfs_drop_snapshot() Add root corresponding to subvol 257 into btrfs_transaction->dropped_roots list Create new subvol (i.e. create_subvol()) 257 is returned as the next free objectid btrfs_read_fs_root_no_name() Finds the btrfs_root instance corresponding to the old subvol with ID 257 in btrfs_fs_info->fs_roots_radix. Returns error since btrfs_root_item->refs has the value of 0. To fix the issue the commit initializes tree root's and subvolume root's highest_objectid when loading the roots from disk. Signed-off-by: Chandan Rajendra Signed-off-by: David Sterba fs/btrfs/disk-io.c | 27 +++++++++++++++++++++++++++ fs/btrfs/inode-map.c | 9 +-------- fs/btrfs/inode-map.h | 1 + fs/btrfs/ioctl.c | 4 ++++ 4 files changed, 33 insertions(+), 8 deletions(-) commit 95617d69326ce386c95e33db7aeb832b45ee9f8f Author: Jeff Mahoney Date: Wed Jun 3 10:55:48 2015 -0400 btrfs: cleanup, stop casting for extent_map->lookup everywhere Overloading extent_map->bdev to struct map_lookup * might have started out as a means to an end, but it's a pattern that's used all over the place now. Let's get rid of the casting and just add a union instead. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 2 +- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/extent_map.c | 2 +- fs/btrfs/extent_map.h | 10 +++++++++- fs/btrfs/scrub.c | 2 +- fs/btrfs/volumes.c | 24 ++++++++++++------------ 6 files changed, 25 insertions(+), 17 deletions(-) commit 2935bf43ef12a8d68b96776ec11155cfa120cb0d Author: Xiubo Li Date: Fri Jan 15 13:33:08 2016 +0800 ASoC: fsl: document DT compatible string "fsl,imx-audio-wm8960" The devicetree compatible string "fsl,imx-audio-wm8960" for fsl-asoc-card is missing. Signed-off-by: Xiubo Li Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 2 ++ 1 file changed, 2 insertions(+) commit ec3995da27e782cc407ce48101c98c19c9ce738d Author: Arnd Bergmann Date: Wed Jan 13 23:14:54 2016 +0100 ASoC: mediatek: add i2c dependency The newly added mediatek drivers for mt8173 select codes that depend on I2C, which cuases a build failure if I2C is disabled: warning: (SND_SOC_ADAU1761_I2C && SND_SOC_ADAU1781_I2C && SND_SOC_ADAU1977_I2C && SND_SOC_RT5677 && EXTCON_MAX14577 && EXTCON_MAX77693 && EXTCON_MAX77843 && BMC150_ACCEL_I2C && BMG160_I2C) selects REGMAP_I2C which has unmet direct dependencies (I2C) codecs/rt5645.c:3854:1: warning: data definition has no type or storage class codecs/rt5645.c:3854:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int] codecs/rt5677.c:5270:1: warning: data definition has no type or storage class 77_i2c_driver); codecs/rt5677.c:5270:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int] This adds an explicit dependency. Signed-off-by: Arnd Bergmann Acked-by: Koro Chen Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebea7c0545d4d5e554b84c3ee8072f13c3fdd2ba Author: Arnd Bergmann Date: Wed Jan 13 21:51:29 2016 +0100 spi: fix counting in spi-loopback-test code These variables are always used uninitialized: drivers/spi/spi-loopback-test.c: In function 'spi_test_run_iter': drivers/spi/spi-loopback-test.c:768:17: warning: 'rx_count' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/spi/spi-loopback-test.c:762:17: warning: 'tx_count' may be used uninitialized in this function [-Wmaybe-uninitialized] Adding an explicit initialization seems to be the only workable solution here, to make the code behave correctly and build without warning. Fixes: 84e0c4e5e2c4 ("spi: add loopback test driver to allow for spi_master regression tests") Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 1 + 1 file changed, 1 insertion(+) commit 7776a69386179ea477f501aa222692b9856ec56c Author: Alex Deucher Date: Thu Oct 15 10:59:16 2015 -0400 drm/amdgpu: Add some tweaks to gfx 8 soft reset Reviewed-by: Junwei Zhang Reviewed-by: Christian König Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit e160e4db833c7e8587ec3c88efaed0d84f1bcf42 Author: Alex Deucher Date: Thu Jan 14 13:48:24 2016 -0500 drm/amdgpu: fix tonga smu resume Need to make sure smu buffers are pinned on resume. This matches what Fiji does. Cc: stable@vger.kernel.org Reviewed-by: Junwei Zhang Reviewed-by: Christian König Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/tonga_dpm.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 02f1cc3c1a121c70cdf95e986f7f2fb4323cc5a3 Author: Felipe Balbi Date: Mon Jan 11 15:26:12 2016 -0600 ARM: omap2plus_defconfig: enable SPLIT and DWARF4 CONFIG_DEBUG_INFO_SPLIT will split debug info on .dwo files. This will generate a smaller vmlinux and smaller .ko modules, which will be easier to ship on certain products. CONFIG_DEBUG_INFO_DWARF4 will generate debug info in DWARF4 format, which ends up being larger, but improves the probability of resolving variables in optmized code. Signed-off-by: Felipe Balbi [tony@atomide.com: this makes initramfs quite a bit smaller] Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit c08659d431b40ad5beb97d7dde49ad9796cb812c Author: H. Nikolaus Schaller Date: Tue Jan 5 13:01:37 2016 +0100 ARM: dts: omap5-board-common: enable rtc and charging of backup battery tested on OMP5432 EVM Cc: stable@vger.kernel.org # v4.4 Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 171b5682aa8597174e80ec4128c87538103f2213 Merge: 45bdbcf b4d7f16 Author: Paolo Bonzini Date: Fri Jan 15 17:49:39 2016 +0100 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD commit c3b1681375dc6e71d89a3ae00cc3ce9e775a8917 Author: Takashi Iwai Date: Thu Jan 14 17:01:46 2016 +0100 ALSA: timer: Code cleanup This is a minor code cleanup without any functional changes: - Kill keep_flag argument from _snd_timer_stop(), as all callers pass only it false. - Remove redundant NULL check in _snd_timer_stop(). Signed-off-by: Takashi Iwai sound/core/timer.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit b5a663aa426f4884c71cd8580adae73f33570f0d Author: Takashi Iwai Date: Thu Jan 14 16:30:58 2016 +0100 ALSA: timer: Harden slave timer list handling A slave timer instance might be still accessible in a racy way while operating the master instance as it lacks of locking. Since the master operation is mostly protected with timer->lock, we should cope with it while changing the slave instance, too. Also, some linked lists (active_list and ack_list) of slave instances aren't unlinked immediately at stopping or closing, and this may lead to unexpected accesses. This patch tries to address these issues. It adds spin lock of timer->lock (either from master or slave, which is equivalent) in a few places. For avoiding a deadlock, we ensure that the global slave_active_lock is always locked at first before each timer lock. Also, ack and active_list of slave instances are properly unlinked at snd_timer_stop() and snd_timer_close(). Last but not least, remove the superfluous call of _snd_timer_stop() at removing slave links. This is a noop, and calling it may confuse readers wrt locking. Further cleanup will follow in a later patch. Actually we've got reports of use-after-free by syzkaller fuzzer, and this hopefully fixes these issues. Reported-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit cf52103a218744f3fd18111325c28e95aa9cd226 Author: Takashi Iwai Date: Fri Jan 15 12:59:25 2016 +0100 ALSA: hda - Add fixup for Dell Latitidue E6540 Another Dell model, another fixup entry: Latitude E6540 needs the same fixup as other Latitude E series as workaround for noise problems. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=104341 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 98229aa36caa9c769b13565523de9b813013c703 Author: Thomas Gleixner Date: Thu Dec 31 16:30:54 2015 +0000 x86/irq: Plug vector cleanup race We still can end up with a stale vector due to the following: CPU0 CPU1 CPU2 lock_vector() data->move_in_progress=0 sendIPI() unlock_vector() set_affinity() assign_irq_vector() lock_vector() handle_IPI move_in_progress = 1 lock_vector() unlock_vector() move_in_progress == 1 So we need to serialize the vector assignment against a pending cleanup. The solution is rather simple now. We not only check for the move_in_progress flag in assign_irq_vector(), we also check whether there is still a cleanup pending in the old_domain cpumask. If so, we return -EBUSY to the caller and let him deal with it. Though we have to be careful in the cpu unplug case. If the cleanout has not yet completed then the following setaffinity() call would return -EBUSY. Add code which prevents this. Full context is here: http://lkml.kernel.org/r/5653B688.4050809@stratus.com Reported-and-tested-by: Joe Lawrence Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160107.207265407@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 63 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 10 deletions(-) commit 90a2282e23f0522e4b3f797ad447c5e91bf7fe32 Author: Thomas Gleixner Date: Thu Dec 31 16:30:53 2015 +0000 x86/irq: Call irq_force_move_complete with irq descriptor First of all there is no point in looking up the irq descriptor again, but we also need the descriptor for the final cleanup race fix in the next patch. Make that change seperate. No functional difference. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160107.125211743@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/irq.h | 5 +++-- arch/x86/kernel/apic/vector.c | 11 +++++++---- arch/x86/kernel/irq.c | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) commit 56d7d2f4bbd00fb198b7907cb3ab657d06115a42 Author: Thomas Gleixner Date: Thu Dec 31 16:30:52 2015 +0000 x86/irq: Remove outgoing CPU from vector cleanup mask We want to synchronize new vector assignments with a pending cleanup. Remove a dying cpu from a pending cleanup mask. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160107.045961667@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 5da0c1217f05d2ccc9a8ed6e6e5c23a8a1d24dd6 Author: Thomas Gleixner Date: Thu Dec 31 16:30:52 2015 +0000 x86/irq: Remove the cpumask allocation from send_cleanup_vector() There is no need to allocate a new cpumask for sending the cleanup vector. The old_domain mask is now protected by the vector_lock, so we can safely remove the offline cpus from it and send the IPI with the resulting mask. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.967993932@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit c1684f5035b60e9f98566493e869496fb5de1d89 Author: Thomas Gleixner Date: Thu Dec 31 16:30:51 2015 +0000 x86/irq: Clear move_in_progress before sending cleanup IPI send_cleanup_vector() fiddles with the old_domain mask unprotected because it relies on the protection by the move_in_progress flag. But this is fatal, as the flag is reset after the IPI has been sent. So a cpu which receives the IPI can still see the flag set and therefor ignores the cleanup request. If no other cleanup request happens then the vector stays stale on that cpu and in case of an irq removal the vector still persists. That can lead to use after free when the next cleanup IPI happens. Protect the code with vector_lock and clear move_in_progress before sending the IPI. This does not plug the race which Joe reported because: CPU0 CPU1 CPU2 lock_vector() data->move_in_progress=0 sendIPI() unlock_vector() set_affinity() assign_irq_vector() lock_vector() handle_IPI move_in_progress = 1 lock_vector() unlock_vector() move_in_progress == 1 The full fix comes with a later patch. Reported-and-tested-by: Joe Lawrence Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.892412198@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 847667ef10356b824a11c853fc8a8b1b437b6a8d Author: Thomas Gleixner Date: Thu Dec 31 16:30:50 2015 +0000 x86/irq: Remove offline cpus from vector cleanup No point of keeping offline cpus in the cleanup mask. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.808642683@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ab25ac02148b600e645f77cfb8b8ea415ed75bb4 Author: Thomas Gleixner Date: Thu Dec 31 16:30:49 2015 +0000 x86/irq: Get rid of code duplication Reusing an existing vector and assigning a new vector has duplicated code. Consolidate it. This is also a preparatory patch for finally plugging the cleanup race. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.721599216@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 9ac15b7a8af4cf3337a101498c0ed690d23ade75 Author: Thomas Gleixner Date: Thu Dec 31 16:30:49 2015 +0000 x86/irq: Copy vectormask instead of an AND operation In the case that the new vector mask is a subset of the existing mask there is no point to do a AND operation of currentmask & newmask. The result is newmask. So we can simply copy the new mask to the current mask and be done with it. Preparatory patch for further consolidation. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.640253454@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3716fd27a604d61a91cda47083504971486b80f1 Author: Thomas Gleixner Date: Thu Dec 31 16:30:48 2015 +0000 x86/irq: Check vector allocation early __assign_irq_vector() uses the vector_cpumask which is assigned by apic->vector_allocation_domain() without doing basic sanity checks. That can result in a situation where the final assignement of a newly found vector fails in apic->cpu_mask_to_apicid_and(). So we have to do rollbacks for no reason. apic->cpu_mask_to_apicid_and() only fails if vector_cpumask & requested_cpumask & cpu_online_mask is empty. Check for this condition right away and if the result is empty try immediately the next possible cpu in the requested mask. So in case of a failure the old setting is unchanged and we can remove the rollback code. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.561877324@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 95ffeb4b5baca266e1d0d2bc90f1513e6f419cdd Author: Thomas Gleixner Date: Thu Dec 31 16:30:47 2015 +0000 x86/irq: Reorganize the search in assign_irq_vector Split out the code which advances the target cpu for the search so we can reuse it for the next patch which adds an early validation check for the vectormask which we get from the apic. Add comments while at it. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.484562040@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 433cbd57d190a1cdd02f243df41c3d7f55ec4b94 Author: Thomas Gleixner Date: Thu Dec 31 16:30:46 2015 +0000 x86/irq: Reorganize the return path in assign_irq_vector Use an explicit goto for the cases where we have success in the search/update and return -ENOSPC if the search loop ends due to no space. Preparatory patch for fixes. No functional change. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.403491024@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 8a580f70f6936ec095da217018cdeeb5835c0207 Author: Jiang Liu Date: Thu Dec 31 16:30:46 2015 +0000 x86/irq: Do not use apic_chip_data.old_domain as temporary buffer Function __assign_irq_vector() makes use of apic_chip_data.old_domain as a temporary buffer, which is in the way of using apic_chip_data.old_domain for synchronizing the vector cleanup with the vector assignement code. Use a proper temporary cpumask for this. [ tglx: Renamed the mask to searched_cpumask for clarity ] Signed-off-by: Jiang Liu Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/1450880014-11741-1-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 36f34c8c63da3e272fd66f91089228c22d2b6e8b Author: Thomas Gleixner Date: Thu Dec 31 16:30:45 2015 +0000 x86/irq: Validate that irq descriptor is still active In fixup_irqs() we unconditionally dereference the irq chip of an irq descriptor. The descriptor might still be valid, but already cleaned up, i.e. the chip removed. Add a check for this condition. Signed-off-by: Thomas Gleixner Cc: Jiang Liu Cc: Joe Lawrence Cc: Jeremiah Mahler Cc: Borislav Petkov Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160106.236423282@linutronix.de Signed-off-by: Thomas Gleixner arch/x86/kernel/irq.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 111abeba67e0dbdc26537429de9155e4f1d807d8 Author: Jiang Liu Date: Thu Dec 31 16:30:44 2015 +0000 x86/irq: Fix a race in x86_vector_free_irqs() There's a race condition between x86_vector_free_irqs() { free_apic_chip_data(irq_data->chip_data); xxxxx //irq_data->chip_data has been freed, but the pointer //hasn't been reset yet irq_domain_reset_irq_data(irq_data); } and smp_irq_move_cleanup_interrupt() { raw_spin_lock(&vector_lock); data = apic_chip_data(irq_desc_get_irq_data(desc)); access data->xxxx // may access freed memory raw_spin_unlock(&desc->lock); } which may cause smp_irq_move_cleanup_interrupt() to access freed memory. Call irq_domain_reset_irq_data(), which clears the pointer with vector lock held. [ tglx: Free memory outside of lock held region. ] Signed-off-by: Jiang Liu Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/1450880014-11741-3-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e23b257c293ce4bcc8cabb2aa3097b6ed8a8261a Author: Thomas Gleixner Date: Thu Jan 14 08:43:38 2016 +0100 x86/irq: Call chip->irq_set_affinity in proper context setup_ioapic_dest() calls irqchip->irq_set_affinity() completely unprotected. That's wrong in several aspects: - it opens a race window where irq_set_affinity() can be interrupted and the irq chip left in unconsistent state. - it triggers a lockdep splat when we fix the vector race for 4.3+ because vector lock is taken with interrupts enabled. The proper calling convention is irq descriptor lock held and interrupts disabled. Reported-and-tested-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: Joe Lawrence Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1601140919420.3575@nanos Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/io_apic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f02b4b72d12cbae7020a959e2ed0410a464b4cc4 Author: Alexandre Belloni Date: Fri Jan 15 11:34:21 2016 +0100 clockevents/tcb_clksrc: Prevent disabling an already disabled clock clockevents_exchange_device is calling clockevents_shutdown() on the new clockenvents device but it may have never been enabled in the first place. This results in the tcb clock being disabled without being enabled first: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:680 clk_disable+0x28/0x34() Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0+ #6 Hardware name: Atmel AT91SAM9 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (warn_slowpath_common+0x78/0xa0) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x18/0x20) [] (warn_slowpath_null) from [] (clk_disable+0x28/0x34) [] (clk_disable) from [] (tc_shutdown+0x38/0x4c) [] (tc_shutdown) from [] (clockevents_switch_state+0x38/0x6c) [] (clockevents_switch_state) from [] (clockevents_shutdown+0x10/0x24) [] (clockevents_shutdown) from [] (tick_check_new_device+0x84/0xac) [] (tick_check_new_device) from [] (clockevents_register_device+0x7c/0x108) [] (clockevents_register_device) from [] (tcb_clksrc_init+0x390/0x3e8) [] (tcb_clksrc_init) from [] (do_one_initcall+0x114/0x1d4) [] (do_one_initcall) from [] (kernel_init_freeable+0xfc/0x1b8) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xe0) [] (kernel_init) from [] (ret_from_fork+0x14/0x24) ---[ end trace 0000000000000001 ]--- Check what state we were in before trying to disable the clock. Fixes: cf4541c101ea ("clockevents/drivers/tcb_clksrc: Migrate to new 'set-state' interface") Signed-off-by: Alexandre Belloni Cc: Nicolas Ferre Cc: Boris Brezillon Cc: linux-arm-kernel@lists.infradead.org Cc: Daniel Lezcano Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1452854061-30370-1-git-send-email-alexandre.belloni@free-electrons.com Signed-off-by: Thomas Gleixner drivers/clocksource/tcb_clksrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4314e19ef4ae0ba8872bd8610f6fef5e8743e236 Author: Maxime Ripard Date: Thu Jan 14 16:24:56 2016 +0100 drm/fb_cma_helper: Remove implicit call to disable_unused_functions The drm_fbdev_cma_init function always calls the drm_helper_disable_unused_functions. Since it's part of the usual probe process, all the drivers using that helper will end up having their encoder and CRTC disable functions called at probe if their device has not been reported as enabled. This could be fixed by reading out from the registers the current state of the device if it is enabled, but even that will not handle the case where the device is actually disabled. Moreover, the drivers using the atomic modesetting expect that their enable and disable callback to be called when the device is already enabled or disabled (respectively). We can however fix this issue by moving the call to drm_helper_disable_unused_functions out of drm_fbdev_cma_init and make the drivers needing it (all the drivers calling drm_fbdev_cma_init and not using the atomic modesetting) explicitly call it. Signed-off-by: Maxime Ripard Link: http://patchwork.freedesktop.org/patch/msgid/1452785109-6172-14-git-send-email-maxime.ripard@free-electrons.com Acked-by: Laurent Pinchart Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_fb_cma_helper.c | 3 --- drivers/gpu/drm/imx/imx-drm-core.c | 1 + drivers/gpu/drm/sti/sti_drv.c | 1 + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) commit 7d1fc01afc5af35e5197e0e75abe900f6bd279b8 Merge: 0f0836b bcf4299 Author: Linus Torvalds Date: Thu Jan 14 17:04:19 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: floppy: make local variable non-static exynos: fixes an incorrect header guard dt-bindings: fixes some incorrect header guards cpufreq-dt: correct dead link in documentation cpufreq: ARM big LITTLE: correct dead link in documentation treewide: Fix typos in printk Documentation: filesystem: Fix typo in fs/eventfd.c fs/super.c: use && instead of & for warn_on condition Documentation: fix sysfs-ptp lib: scatterlist: fix Kconfig description commit 0f0836b7eb1b9d14862ee40c7856227a3ead70db Merge: c2848f2 b56b36e Author: Linus Torvalds Date: Thu Jan 14 16:38:02 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching updates from Jiri Kosina: - RO/NX attribute fixes for patch module relocations from Josh Poimboeuf. As part of this effort, module.c has been cleaned up as well and livepatching is piggy-backing on this cleanup. Rusty is OK with this whole lot going through livepatching tree. - symbol disambiguation support from Chris J Arges. That series is also Reviewed-by: Miroslav Benes but this came in only after I've alredy pushed out. Didn't want to rebase because of that, hence I am mentioning it here. - symbol lookup fix from Miroslav Benes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: Cleanup module page permission changes module: keep percpu symbols in module's symtab module: clean up RO/NX handling. module: use a structure to encapsulate layout. gcov: use within_module() helper. module: Use the same logic for setting and unsetting RO/NX livepatch: function,sympos scheme in livepatch sysfs directory livepatch: add sympos as disambiguator field to klp_reloc livepatch: add old_sympos as disambiguator field to klp_func commit c2848f2eef4dd08b0fd2a8eba1694fd8e77ddb67 Merge: 75f26df 83f1bfd Author: Linus Torvalds Date: Thu Jan 14 16:20:42 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - appoint Benjamin Tissoires as co-maintainer / designated reviewer - sysfs report_descriptor visibility fix for unclaimed devices, from Andy Lutomirski - suspend/resume fixes for Sony driver from Frank Praznik - IRQ deadlock fix from Ioan-Adrian Ratiu - hid-i2c fixes affecting (at least) Yoga 900 from Mika Westerberg and Srinivas Pandruvada - a lot of new device support (especially, but not limited to, Wacom) and assorted small misc fixes - almost complete G920 support; the only bit that is missing is switching the device to HID mode automatically; Simon Wood and Michal Maly are working on it. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (46 commits) Revert "INPUT: xpad: switch Logitech G920 Wheel into HID mode" HID: sensor-hub: Add quirk for Lenovo Yoga 900 with ITE Chips HID: Add new PID for Microchip Pick16F1454 HID: wacom: Use correct report to query pen ID from INTUOSHT2 devices HID: i2c-hid: Prevent sending reports from racing with device reset HID: use kobj_to_dev() HID: wiimote: use dev_to_wii() HID: add a new helper to_hid_driver() HID: use to_hid_device() HID: move to_hid_device() to hid.h HID: usbhid: use to_usb_device HID: corsair: Convert to use module_hid_driver HID: input: ignore the battery in OKLICK Laser BTmouse HID: wacom: Fix pad button range for CINTIQ_COMPANION_2 HID: wacom: Fix touchring value reporting HID: wacom: Report 'strip2' values in ABS_RY HID: wacom: Limit touchstrip data to 13 bits HID: wacom: bitwise vs logical ORs HID: wacom: Apply lowres quirk to BAMBOO_TOUCH devices HID: enable hid device to suspend/resume asynchronously ... commit 75f26df6ae6f8787fc6198609c8be17400a69e25 Merge: 63f729c 44aab3e Author: Linus Torvalds Date: Thu Jan 14 16:08:23 2016 -0800 Merge tag 'nfs-for-4.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Stable fixes: - Fix a regression in the SunRPC socket polling code - Fix the attribute cache revalidation code - Fix race in __update_open_stateid() - Fix an lo->plh_block_lgets imbalance in layoutreturn - Fix an Oopsable typo in ff_mirror_match_fh() Features: - pNFS layout recall performance improvements. - pNFS/flexfiles: Support server-supplied layoutstats sampling period Bugfixes + cleanups: - NFSv4: Don't perform cached access checks before we've OPENed the file - Fix starvation issues with background flushes - Reclaim writes should be flushed as unstable writes if there are already entries in the commit lists - Various bugfixes from Chuck to fix NFS/RDMA send queue ordering problems - Ensure that we propagate fatal layoutget errors back to the application - Fixes for sundry flexfiles layoutstats bugs - Fix files/flexfiles to not cache invalidated layouts in the DS commit buckets" * tag 'nfs-for-4.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (68 commits) NFS: Fix a compile warning about unused variable in nfs_generic_pg_pgios() NFSv4: Fix a compile warning about no prototype for nfs4_ioctl() NFS: Use wait_on_atomic_t() for unlock after readahead SUNRPC: Fixup socket wait for memory NFSv4.1/pNFS: Cleanup constify struct pnfs_layout_range arguments NFSv4.1/pnfs: Cleanup copying of pnfs_layout_range structures NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid() NFSv4.1/pNFS: Fix a race in initiate_file_draining() NFSv4.1/pNFS: pnfs_error_mark_layout_for_return() must always return layout NFSv4.1/pNFS: pnfs_mark_matching_lsegs_return() should set the iomode NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids NFSv4.1/pNFS: Don't pass stateids by value to pnfs_send_layoutreturn() NFS: Relax requirements in nfs_flush_incompatible NFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid NFS: Allow multiple commit requests in flight per file NFS/pNFS: Fix up pNFS write reschedule layering violations and bugs SUNRPC: Fix a missing break in rpc_anyaddr() pNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh() NFS: Fix attribute cache revalidation NFS: Ensure we revalidate attributes before using execute_ok() ... commit 63f729cb4aa9a224cfd6bb35eab6b4556c29115d Merge: 10a0c0f e8ecde2 Author: Linus Torvalds Date: Thu Jan 14 16:03:57 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fix from Al Viro: "Don't put symlink bodies in pagecache into highmem" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Make sure that highmem pages are not added to symlink page cache commit 7d2eba0557c18f7522b98befed98799990dd4fdb Author: Ebru Akagunduz Date: Thu Jan 14 15:22:19 2016 -0800 mm: add tracepoint for scanning pages This patch series makes swapin readahead up to a certain number to gain more thp performance and adds tracepoint for khugepaged_scan_pmd, collapse_huge_page, __collapse_huge_page_isolate. This patch series was written to deal with programs that access most, but not all, of their memory after they get swapped out. Currently these programs do not get their memory collapsed into THPs after the system swapped their memory out, while they would get THPs before swapping happened. This patch series was tested with a test program, it allocates 400MB of memory, writes to it, and then sleeps. I force the system to swap out all. Afterwards, the test program touches the area by writing and leaves a piece of it without writing. This shows how much swap in readahead made by the patch. Test results: After swapped out ------------------------------------------------------------------- | Anonymous | AnonHugePages | Swap | Fraction | ------------------------------------------------------------------- With patch | 90076 kB | 88064 kB | 309928 kB | %99 | ------------------------------------------------------------------- Without patch | 194068 kB | 192512 kB | 205936 kB | %99 | ------------------------------------------------------------------- After swapped in ------------------------------------------------------------------- | Anonymous | AnonHugePages | Swap | Fraction | ------------------------------------------------------------------- With patch | 201408 kB | 198656 kB | 198596 kB | %98 | ------------------------------------------------------------------- Without patch | 292624 kB | 192512 kB | 107380 kB | %65 | ------------------------------------------------------------------- This patch (of 3): Using static tracepoints, data of functions is recorded. It is good to automatize debugging without doing a lot of changes in the source code. This patch adds tracepoint for khugepaged_scan_pmd, collapse_huge_page and __collapse_huge_page_isolate. [dan.carpenter@oracle.com: add a missing tab] Signed-off-by: Ebru Akagunduz Acked-by: Kirill A. Shutemov Acked-by: Rik van Riel Cc: Naoya Horiguchi Cc: Andrea Arcangeli Cc: Joonsoo Kim Cc: Xie XiuQi Cc: Cyrill Gorcunov Cc: Mel Gorman Cc: David Rientjes Cc: Vlastimil Babka Cc: Aneesh Kumar K.V Cc: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/huge_memory.h | 136 ++++++++++++++++++++++++++++++ mm/huge_memory.c | 166 ++++++++++++++++++++++++++++++------- 2 files changed, 270 insertions(+), 32 deletions(-) commit cb5490a5eea415106d7438df440da5fb1e17318d Author: John Allen Date: Thu Jan 14 15:22:16 2016 -0800 drivers/base/memory.c: fix kernel warning during memory hotplug on ppc64 Fix a bug where a kernel warning is triggered when performing a memory hotplug on ppc64. This warning may also occur on any architecture that uses the memory_probe_store interface. WARNING: at drivers/base/memory.c:200 CPU: 9 PID: 13042 Comm: systemd-udevd Not tainted 4.4.0-rc4-00113-g0bd0f1e-dirty #7 NIP [c00000000055e034] pages_correctly_reserved+0x134/0x1b0 LR [c00000000055e7f8] memory_subsys_online+0x68/0x140 Call Trace: memory_subsys_online+0x68/0x140 device_online+0xb4/0x120 store_mem_state+0xb0/0x180 dev_attr_store+0x34/0x60 sysfs_kf_write+0x64/0xa0 kernfs_fop_write+0x17c/0x1e0 __vfs_write+0x40/0x160 vfs_write+0xb8/0x200 SyS_write+0x60/0x110 system_call+0x38/0xd0 The warning is triggered because there is a udev rule that automatically tries to online memory after it has been added. The udev rule varies from distro to distro, but will generally look something like: SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online" On any architecture that uses memory_probe_store to reserve memory, the udev rule will be triggered after the first section of the block is reserved and will subsequently attempt to online the entire block, interrupting the memory reservation process and causing the warning. This patch modifies memory_probe_store to add a block of memory with a single call to add_memory as opposed to looping through and adding each section individually. A single call to add_memory is protected by the mem_hotplug mutex which will prevent the udev rule from onlining memory until the reservation of the entire block is complete. Signed-off-by: John Allen Acked-by: Dave Hansen Cc: Nathan Fontenot Cc: Michael Ellerman Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit fec174d6699e2e39d34c7c6ee2fe360e518e68c0 Author: Naoya Horiguchi Date: Thu Jan 14 15:22:13 2016 -0800 mm/page_isolation: use macro to judge the alignment Signed-off-by: Wang Xiaoqiang Reviewed-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_isolation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 543dfb2df8ebb3eb0b499eae1d63de1701a99b40 Author: Joshua Clayton Date: Thu Jan 14 15:22:10 2016 -0800 mm: fix noisy sparse warning in LIBCFS_ALLOC_PRE() Running sparse on drivers/staging/lustre results in dozens of warnings: include/linux/gfp.h:281:41: warning: odd constant _Bool cast (400000 becomes 1) Use "!!" to explicitly convert to bool and get rid of the warning. Signed-off-by: Joshua Clayton Cc: Mel Gorman Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84638335900f1995495838fe1bd4870c43ec1f67 Author: Konstantin Khlebnikov Date: Thu Jan 14 15:22:07 2016 -0800 mm: rework virtual memory accounting When inspecting a vague code inside prctl(PR_SET_MM_MEM) call (which testing the RLIMIT_DATA value to figure out if we're allowed to assign new @start_brk, @brk, @start_data, @end_data from mm_struct) it's been commited that RLIMIT_DATA in a form it's implemented now doesn't do anything useful because most of user-space libraries use mmap() syscall for dynamic memory allocations. Linus suggested to convert RLIMIT_DATA rlimit into something suitable for anonymous memory accounting. But in this patch we go further, and the changes are bundled together as: * keep vma counting if CONFIG_PROC_FS=n, will be used for limits * replace mm->shared_vm with better defined mm->data_vm * account anonymous executable areas as executable * account file-backed growsdown/up areas as stack * drop struct file* argument from vm_stat_account * enforce RLIMIT_DATA for size of data areas This way code looks cleaner: now code/stack/data classification depends only on vm_flags state: VM_EXEC & ~VM_WRITE -> code (VmExe + VmLib in proc) VM_GROWSUP | VM_GROWSDOWN -> stack (VmStk) VM_WRITE & ~VM_SHARED & !stack -> data (VmData) The rest (VmSize - VmData - VmStk - VmExe - VmLib) could be called "shared", but that might be strange beast like readonly-private or VM_IO area. - RLIMIT_AS limits whole address space "VmSize" - RLIMIT_STACK limits stack "VmStk" (but each vma individually) - RLIMIT_DATA now limits "VmData" Signed-off-by: Konstantin Khlebnikov Signed-off-by: Cyrill Gorcunov Cc: Quentin Casasnovas Cc: Vegard Nossum Acked-by: Linus Torvalds Cc: Willy Tarreau Cc: Andy Lutomirski Cc: Kees Cook Cc: Vladimir Davydov Cc: Pavel Emelyanov Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/kernel/perfmon.c | 3 +-- fs/proc/task_mmu.c | 7 +++--- include/linux/mm.h | 13 +++------- include/linux/mm_types.h | 2 +- kernel/fork.c | 5 ++-- mm/debug.c | 4 +-- mm/mmap.c | 63 +++++++++++++++++++++++----------------------- mm/mprotect.c | 8 ++++-- mm/mremap.c | 7 +++--- 9 files changed, 54 insertions(+), 58 deletions(-) commit d30b5545bdcf802ffc24ec7dbc6dc4036f6e3820 Author: Florian Fainelli Date: Thu Jan 14 15:22:04 2016 -0800 include/linux/memblock.h: fix ordering of 'flags' argument in comments for_each_free_mem_range() and for_each_free_mem_range_reverse() both accept a 'flags' argument, the comment surrounding the macro placed the 'flags' documentation at the very end, while 'flags' is in fact the 3rd argument to the macro, so let's preserve natural ordering here. Fixes: fc6daaf931518 ("mm/memblock: add extra "flags" to memblock to allow selection of memory based on attribute") Signed-off-by: Florian Fainelli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d72ee911130631b50a8ccc615a7d4622c2062194 Author: Geliang Tang Date: Thu Jan 14 15:22:01 2016 -0800 mm: move lru_to_page to mm_inline.h Move lru_to_page() from internal.h to mm_inline.h. Signed-off-by: Geliang Tang Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_inline.h | 2 ++ mm/internal.h | 2 -- mm/readahead.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 0bc126d460453736c0e03d9da7ae0e9d4fcf86b3 Author: Rodrigo Freire Date: Thu Jan 14 15:21:58 2016 -0800 Documentation/filesystems: describe the shared memory usage/accounting The Shared Memory accounting support is present in Kernel since commit 4b02108ac1b3 ("mm: oom analysis: add shmem vmstat") and in userland free(1) since 2014. This patch updates the Documentation to reflect this change. Signed-off-by: Rodrigo Freire Acked-by: Vlastimil Babka Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 2 ++ Documentation/filesystems/tmpfs.txt | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) commit 6f754ba4cfcc044078d4836056ac45404e1b6e85 Author: Vitaly Kuznetsov Date: Thu Jan 14 15:21:55 2016 -0800 memory-hotplug: don't BUG() in register_memory_resource() Out of memory condition is not a bug and while we can't add new memory in such case crashing the system seems wrong. Propagating the return value from register_memory_resource() requires interface change. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Igor Mammedov Acked-by: David Rientjes Cc: Tang Chen Cc: Naoya Horiguchi Cc: Xishi Qiu Cc: Sheng Yong Cc: Zhu Guihua Cc: Dan Williams Cc: David Vrabel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3e89e1c5ea84211b99199c7636a7d73c50c6b512 Author: Paul Gortmaker Date: Thu Jan 14 15:21:52 2016 -0800 hugetlb: make mm and fs code explicitly non-modular The Kconfig currently controlling compilation of this code is: config HUGETLBFS bool "HugeTLB file system support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering gets moved to earlier levels when we use the more appropriate initcalls here. Originally I had the fs part and the mm part as separate commits, just by happenstance of the nature of how I detected these non-modular use cases. But that can possibly introduce regressions if the patch merge ordering puts the fs part 1st -- as the 0-day testing reported a splat at mount time. Investigating with "initcall_debug" showed that the delta was init_hugetlbfs_fs being called _before_ hugetlb_init instead of after. So both the fs change and the mm change are here together. In addition, it worked before due to luck of link order, since they were both in the same initcall category. So we now have the fs part using fs_initcall, and the mm part using subsys_initcall, which puts it one bucket earlier. It now passes the basic sanity test that failed in earlier 0-day testing. We delete the MODULE_LICENSE tag and capture that information at the top of the file alongside author comments, etc. We don't replace module.h with init.h since the file already has that. Also note that MODULE_ALIAS is a no-op for non-modular code. Signed-off-by: Paul Gortmaker Reported-by: kernel test robot Cc: Nadia Yvette Chambers Cc: Alexander Viro Cc: Naoya Horiguchi Reviewed-by: Mike Kravetz Cc: David Rientjes Cc: Hillf Danton Acked-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 27 ++------------------------- mm/hugetlb.c | 39 +-------------------------------------- 2 files changed, 3 insertions(+), 63 deletions(-) commit 0d576d20ccdeffbb7ba28053107fa6f838b67f3a Author: Geliang Tang Date: Thu Jan 14 15:21:49 2016 -0800 mm/swapfile.c: use list_for_each_entry_safe in free_swap_count_continuations Use list_for_each_entry_safe() instead of list_for_each_safe() to simplify the code. Signed-off-by: Geliang Tang Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0e41e277971799bad2764ad4e6284817e9a6da5b Author: Oleg Nesterov Date: Thu Jan 14 15:21:46 2016 -0800 mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd() clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), VM_SOFTDIRTY was already cleared before walk_page_range(). Signed-off-by: Oleg Nesterov Acked-by: Kirill A. Shutemov Acked-by: Cyrill Gorcunov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 3 --- 1 file changed, 3 deletions(-) commit bb5b8589767a300014ba21c5984e6a4d15f0702d Author: Kirill A. Shutemov Date: Thu Jan 14 15:21:43 2016 -0800 mm: make sure isolate_lru_page() is never called for tail page The VM_BUG_ON_PAGE() would catch such cases if any still exists. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 1 + 1 file changed, 1 insertion(+) commit 0eb77e9880321915322d42913c3b53241739c8aa Author: Christoph Lameter Date: Thu Jan 14 15:21:40 2016 -0800 vmstat: make vmstat_updater deferrable again and shut down on idle Currently the vmstat updater is not deferrable as a result of commit ba4877b9ca51 ("vmstat: do not use deferrable delayed work for vmstat_update"). This in turn can cause multiple interruptions of the applications because the vmstat updater may run at Make vmstate_update deferrable again and provide a function that folds the differentials when the processor is going to idle mode thus addressing the issue of the above commit in a clean way. Note that the shepherd thread will continue scanning the differentials from another processor and will reenable the vmstat workers if it detects any changes. Fixes: ba4877b9ca51 ("vmstat: do not use deferrable delayed work for vmstat_update") Signed-off-by: Christoph Lameter Cc: Michal Hocko Cc: Johannes Weiner Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vmstat.h | 2 ++ kernel/sched/idle.c | 1 + mm/vmstat.c | 69 ++++++++++++++++++++++++++++++++------------------ 3 files changed, 47 insertions(+), 25 deletions(-) commit 686739f6af5e8d5687ffebbf1193ff066aada6d9 Author: Hugh Dickins Date: Thu Jan 14 15:21:37 2016 -0800 memcg: avoid vmpressure oops when memcg disabled A CONFIG_MEMCG=y kernel booted with "cgroup_disable=memory" crashes on a NULL memcg (but non-NULL root_mem_cgroup) when vmpressure kicks in. Here's the patch I use to avoid that, but you might prefer a test on mem_cgroup_disabled() somewhere. Signed-off-by: Hugh Dickins Acked-by: Johannes Weiner Cc: David S. Miller Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmpressure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef12947c9c5a96af549c49f10e5503f0612a397c Author: Johannes Weiner Date: Thu Jan 14 15:21:34 2016 -0800 mm: memcontrol: switch to the updated jump-label API According to the direct use of struct static_key is deprecated. Update the socket and slab accounting code accordingly. Signed-off-by: Johannes Weiner Acked-by: David S. Miller Reported-by: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 8 ++++---- mm/memcontrol.c | 12 ++++++------ net/ipv4/tcp_memcontrol.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) commit 8e8ae645249b85c8ed6c178557f8db8613a6bcc7 Author: Johannes Weiner Date: Thu Jan 14 15:21:32 2016 -0800 mm: memcontrol: hook up vmpressure to socket pressure Let the networking stack know when a memcg is under reclaim pressure so that it can clamp its transmit windows accordingly. Whenever the reclaim efficiency of a cgroup's LRU lists drops low enough for a MEDIUM or HIGH vmpressure event to occur, assert a pressure state in the socket and tcp memory code that tells it to curb consumption growth from sockets associated with said control group. Traditionally, vmpressure reports for the entire subtree of a memcg under pressure, which drops useful information on the individual groups reclaimed. However, it's too late to change the userinterface, so add a second reporting mode that reports on the level of reclaim instead of at the level of pressure, and use that report for sockets. vmpressure events are naturally edge triggered, so for hysteresis assert socket pressure for a second to allow for subsequent vmpressure events to occur before letting the socket code return to normal. This will likely need finetuning for a wider variety of workloads, but for now stick to the vmpressure presets and keep hysteresis simple. Signed-off-by: Johannes Weiner Acked-by: David S. Miller Reviewed-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 32 ++++++++++++++++--- include/linux/vmpressure.h | 7 +++-- mm/memcontrol.c | 17 ++-------- mm/vmpressure.c | 78 +++++++++++++++++++++++++++++++++++----------- mm/vmscan.c | 10 +++++- 5 files changed, 104 insertions(+), 40 deletions(-) commit f7e1cb6ec51b041335b5ad4dd7aefb37a56d79a6 Author: Johannes Weiner Date: Thu Jan 14 15:21:29 2016 -0800 mm: memcontrol: account socket memory in unified hierarchy memory controller Socket memory can be a significant share of overall memory consumed by common workloads. In order to provide reasonable resource isolation in the unified hierarchy, this type of memory needs to be included in the tracking/accounting of a cgroup under active memory resource control. Overhead is only incurred when a non-root control group is created AND the memory controller is instructed to track and account the memory footprint of that group. cgroup.memory=nosocket can be specified on the boot commandline to override any runtime configuration and forcibly exclude socket memory from active memory resource control. Signed-off-by: Johannes Weiner Acked-by: David S. Miller Reviewed-by: Vladimir Davydov Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/kernel-parameters.txt | 4 ++ include/linux/memcontrol.h | 9 ++- mm/memcontrol.c | 122 +++++++++++++++++++++++++++++------- 3 files changed, 110 insertions(+), 25 deletions(-) commit 1109208766d9fa7059a9b66ad488e66d99ce49af Author: Johannes Weiner Date: Thu Jan 14 15:21:26 2016 -0800 mm: memcontrol: move socket code for unified hierarchy accounting The unified hierarchy memory controller will account socket memory. Move the infrastructure functions accordingly. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Vladimir Davydov Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 148 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 74 insertions(+), 74 deletions(-) commit 7941d2145abc4def5583f9d8d0b2e02647b6d1de Author: Johannes Weiner Date: Thu Jan 14 15:21:23 2016 -0800 mm: memcontrol: do not account memory+swap on unified hierarchy The unified hierarchy memory controller doesn't expose the memory+swap counter to userspace, but its accounting is hardcoded in all charge paths right now, including the per-cpu charge cache ("the stock"). To avoid adding yet more pointless memory+swap accounting with the socket memory support in unified hierarchy, disable the counter altogether when in unified hierarchy mode. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Vladimir Davydov Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) commit 80e95fe0fdcde2812c341ad4209d62dc1a7af53b Author: Johannes Weiner Date: Thu Jan 14 15:21:20 2016 -0800 mm: memcontrol: generalize the socket accounting jump label The unified hierarchy memory controller is going to use this jump label as well to control the networking callbacks. Move it to the memory controller code and give it a more generic name. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Vladimir Davydov Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 3 +++ include/net/sock.h | 7 ------- mm/memcontrol.c | 3 +++ net/core/sock.c | 5 ----- net/ipv4/tcp_memcontrol.c | 4 ++-- 5 files changed, 8 insertions(+), 14 deletions(-) commit baac50bbc3cdfd184ebf586b1704edbfcee866df Author: Johannes Weiner Date: Thu Jan 14 15:21:17 2016 -0800 net: tcp_memcontrol: simplify linkage between socket and page counter There won't be any separate counters for socket memory consumed by protocols other than TCP in the future. Remove the indirection and link sockets directly to their owning memory cgroup. Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 20 ++++--------- include/net/sock.h | 25 +++-------------- include/net/tcp.h | 4 +-- include/net/tcp_memcontrol.h | 1 - mm/memcontrol.c | 57 +++++++++++++++---------------------- net/core/sock.c | 52 +++++----------------------------- net/ipv4/tcp_ipv4.c | 7 +---- net/ipv4/tcp_memcontrol.c | 67 +++++++++++++++++--------------------------- net/ipv4/tcp_output.c | 4 +-- net/ipv6/tcp_ipv6.c | 3 -- 10 files changed, 69 insertions(+), 171 deletions(-) commit e805605c721021879a1469bdae45c6f80bc985f4 Author: Johannes Weiner Date: Thu Jan 14 15:21:14 2016 -0800 net: tcp_memcontrol: sanitize tcp memory accounting callbacks There won't be a tcp control soft limit, so integrating the memcg code into the global skmem limiting scheme complicates things unnecessarily. Replace this with simple and clear charge and uncharge calls--hidden behind a jump label--to account skb memory. Note that this is not purely aesthetic: as a result of shoehorning the per-memcg code into the same memory accounting functions that handle the global level, the old code would compare the per-memcg consumption against the smaller of the per-memcg limit and the global limit. This allowed the total consumption of multiple sockets to exceed the global limit, as long as the individual sockets stayed within bounds. After this change, the code will always compare the per-memcg consumption to the per-memcg limit, and the global consumption to the global limit, and thus close this loophole. Without a soft limit, the per-memcg memory pressure state in sockets is generally questionable. However, we did it until now, so we continue to enter it when the hard limit is hit, and packets are dropped, to let other sockets in the cgroup know that they shouldn't grow their transmit windows, either. However, keep it simple in the new callback model and leave memory pressure lazily when the next packet is accepted (as opposed to doing it synchroneously when packets are processed). When packets are dropped, network performance will already be in the toilet, so that should be a reasonable trade-off. As described above, consumption is now checked on the per-memcg level and the global level separately. Likewise, memory pressure states are maintained on both the per-memcg level and the global level, and a socket is considered under pressure when either level asserts as much. Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 19 +++++++++----- include/net/sock.h | 64 ++++++---------------------------------------- include/net/tcp.h | 5 ++-- mm/memcontrol.c | 32 +++++++++++++++++++++++ net/core/sock.c | 26 +++++++++++-------- net/ipv4/tcp_output.c | 7 +++-- 6 files changed, 77 insertions(+), 76 deletions(-) commit 80f23124f57c77915a7b4201d8dcba38a38b23f0 Author: Johannes Weiner Date: Thu Jan 14 15:21:11 2016 -0800 net: tcp_memcontrol: simplify the per-memcg limit access tcp_memcontrol replicates the global sysctl_mem limit array per cgroup, but it only ever sets these entries to the value of the memory_allocated page_counter limit. Use the latter directly. Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 1 - include/net/sock.h | 8 +++++--- net/ipv4/tcp_memcontrol.c | 8 -------- 3 files changed, 5 insertions(+), 12 deletions(-) commit af95d7df4059cfeab7e7c244f3564214aada7dad Author: Johannes Weiner Date: Thu Jan 14 15:21:08 2016 -0800 net: tcp_memcontrol: remove dead per-memcg count of allocated sockets The number of allocated sockets is used for calculations in the soft limit phase, where packets are accepted but the socket is under memory pressure. Since there is no soft limit phase in tcp_memcontrol, and memory pressure is only entered when packets are already dropped, this is actually dead code. Remove it. As this is the last user of parent_cg_proto(), remove that too. Signed-off-by: Johannes Weiner Acked-by: David S. Miller Reviewed-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 1 - include/net/sock.h | 39 +++------------------------------------ net/ipv4/tcp_memcontrol.c | 3 --- 3 files changed, 3 insertions(+), 40 deletions(-) commit 3d596f7b907b0281b997cf30c92994a71ad0a1a9 Author: Johannes Weiner Date: Thu Jan 14 15:21:05 2016 -0800 net: tcp_memcontrol: protect all tcp_memcontrol calls by jump-label Move the jump-label from sock_update_memcg() and sock_release_memcg() to the callsite, and so eliminate those function calls when socket accounting is not enabled. This also eliminates the need for dummy functions because the calls will be optimized away if the Kconfig options are not enabled. Signed-off-by: Johannes Weiner Acked-by: David S. Miller Reviewed-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 9 -------- mm/memcontrol.c | 56 +++++++++++++++++++++------------------------- net/core/sock.c | 9 ++------ net/ipv4/tcp.c | 3 ++- net/ipv4/tcp_ipv4.c | 4 +++- 5 files changed, 32 insertions(+), 49 deletions(-) commit 931f3f4beb031cd483c1c8ab159ef1f8bdbe8888 Author: Johannes Weiner Date: Thu Jan 14 15:21:02 2016 -0800 net: tcp_memcontrol: remove bogus hierarchy pressure propagation When a cgroup currently breaches its socket memory limit, it enters memory pressure mode for itself and its *ancestors*. This throttles transmission in unrelated sibling and cousin subtrees that have nothing to do with the breached limit. On the contrary, breaching a limit should make that group and its *children* enter memory pressure mode. But this happens already, albeit lazily: if an ancestor limit is breached, siblings will enter memory pressure on their own once the next packet arrives for them. So no additional hierarchy code is needed. Remove the bogus stuff. Signed-off-by: Johannes Weiner Acked-by: David S. Miller Reviewed-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/net/sock.h | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 8c2c2358b236530bc2c79b4c2a447cbdbc3d96d7 Author: Johannes Weiner Date: Thu Jan 14 15:20:59 2016 -0800 net: tcp_memcontrol: properly detect ancestor socket pressure When charging socket memory, the code currently checks only the local page counter for excess to determine whether the memcg is under socket pressure. But even if the local counter is fine, one of the ancestors could have breached its limit, which should also force this child to enter socket pressure. This currently doesn't happen. Fix this by using page_counter_try_charge() first. If that fails, it means that either the local counter or one of the ancestors are in excess of their limit, and the child should enter socket pressure. Fixes: 3e32cb2e0a12 ("mm: memcontrol: lockless page counters") Signed-off-by: Johannes Weiner Acked-by: David S. Miller Reviewed-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/net/sock.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7d828602e5ef3297a69392a2d31264e4ab9c8bb7 Author: Johannes Weiner Date: Thu Jan 14 15:20:56 2016 -0800 mm: memcontrol: export root_mem_cgroup A later patch will need this symbol in files other than memcontrol.c, so export it now and replace mem_cgroup_root_css at the same time. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: David S. Miller Reviewed-by: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 3 ++- mm/backing-dev.c | 2 +- mm/memcontrol.c | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 036404183eb3ebff93dea7b572fc718e9d652c7f Author: Geliang Tang Date: Thu Jan 14 15:20:54 2016 -0800 mm/ksm.c: use list_for_each_entry_safe Use list_for_each_entry_safe() instead of list_for_each_safe() to simplify the code. Signed-off-by: Geliang Tang Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit c8ad6302c2b664e73f0abb3517c16531e294b9d7 Author: Geliang Tang Date: Thu Jan 14 15:20:51 2016 -0800 mm/readahead.c, mm/vmscan.c: use lru_to_page instead of list_to_page list_to_page() in readahead.c is the same as lru_to_page() in vmscan.c. So I move lru_to_page to internal.h and drop list_to_page(). Signed-off-by: Geliang Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 2 ++ mm/readahead.c | 8 +++----- mm/vmscan.c | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) commit 7546934570f48283b7fe64a56d1c984fcb1e341e Author: Joonsoo Kim Date: Thu Jan 14 15:20:48 2016 -0800 mm/compaction.c: __compact_pgdat() code cleanuup This patch uses is_via_compact_memory() to distinguish compaction from sysfs or sysctl. And, this patch also reduces indentation on compaction_defer_reset() by filtering these cases first before checking watermark. There is no functional change. Signed-off-by: Joonsoo Kim Acked-by: Yaowei Bai Acked-by: David Rientjes Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit a8ae49917077facbe4ed7b3a89bf025b1cefa0ed Author: Geliang Tang Date: Thu Jan 14 15:20:45 2016 -0800 mm/swapfile.c: use list_{next,first}_entry To make the intention clearer, use list_{next,first}_entry instead of list_entry(). Signed-off-by: Geliang Tang Cc: "Kirill A. Shutemov" Cc: Jerome Marchand Cc: Vlastimil Babka Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 8c9c1701c7c23a57ebfd1a0b27b87053ae43cfb5 Author: Alexander Kuleshov Date: Thu Jan 14 15:20:42 2016 -0800 mm/memblock: introduce for_each_memblock_type() We already have the for_each_memblock() macro in which provides ability to iterate over memblock regions of a known type. The for_each_memblock() macro allows us to pass the pointer to the struct memblock_type, instead we need to pass name of the type. This patch introduces a new macro for_each_memblock_type() which allows us iterate over memblock regions with the given type when the type is unknown. Signed-off-by: Alexander Kuleshov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 5 +++++ mm/memblock.c | 32 ++++++++++++++++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) commit f14516fbf0f6bec7d98c1cb5b5c73ccd2bb4a5e9 Author: Alexander Kuleshov Date: Thu Jan 14 15:20:39 2016 -0800 mm/memblock: remove rgnbase and rgnsize variables Remove rgnbase and rgnsize variables from memblock_overlaps_region(). We use these variables only for passing to the memblock_addrs_overlap() function and that's all. Let's remove them. Signed-off-by: Alexander Kuleshov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memblock.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 5020e285856cb406224e6f977fd893a006077806 Author: Michal Hocko Date: Thu Jan 14 15:20:36 2016 -0800 mm, oom: give __GFP_NOFAIL allocations access to memory reserves __GFP_NOFAIL is a big hammer used to ensure that the allocation request can never fail. This is a strong requirement and as such it also deserves a special treatment when the system is OOM. The primary problem here is that the allocation request might have come with some locks held and the oom victim might be blocked on the same locks. This is basically an OOM deadlock situation. This patch tries to reduce the risk of such a deadlocks by giving __GFP_NOFAIL allocations a special treatment and let them dive into memory reserves after oom killer invocation. This should help them to make a progress and release resources they are holding. The OOM victim should compensate for the reserves consumption. Signed-off-by: Michal Hocko Suggested-by: Andrea Arcangeli Cc: Mel Gorman Cc: Johannes Weiner Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 86760a2c6e827858f8eaf020b12b72b3210faf79 Author: Geliang Tang Date: Thu Jan 14 15:20:33 2016 -0800 mm/page_alloc.c: use list_for_each_entry in mark_free_pages() Use list_for_each_entry instead of list_for_each + list_entry to simplify the code. Signed-off-by: Geliang Tang Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a16601c5458eb702f26cd48b9e8e1a9471700e72 Author: Geliang Tang Date: Thu Jan 14 15:20:30 2016 -0800 mm/page_alloc.c: use list_{first,last}_entry instead of list_entry To make the intention clearer, use list_{first,last}_entry instead of list_entry. Signed-off-by: Geliang Tang Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 6ac0206bc0d13381e3ede3594bc0a3f8cd1d8ec9 Author: Mel Gorman Date: Thu Jan 14 15:20:28 2016 -0800 mm/page_alloc.c: remove unnecessary parameter from __rmqueue Commit 0aaa29a56e4f ("mm, page_alloc: reserve pageblocks for high-order atomic allocations on demand") added an unnecessary and unused parameter to __rmqueue. It was a parameter that was used in an earlier version of the patch and then left behind. This patch cleans it up. Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cc292b0b43027cce9310a18ec3239b5e9b4ea301 Author: Seth Jennings Date: Thu Jan 14 15:20:24 2016 -0800 drivers/base/memory.c: rename remove_memory_block() to remove_memory_section() The function removes a section, not a block. Rename to reflect actual functionality. Signed-off-by: Seth Jennings Cc: Andrew Banman Cc: Daniel J Blueman Cc: Yinghai Lu Cc: Greg KH Cc: Russ Anderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56c6b5d3acd8e0cfc302ff56f58c15fea27064de Author: Seth Jennings Date: Thu Jan 14 15:20:21 2016 -0800 drivers/base/memory.c: clean up section counting Right now, section_count is calculated in add_memory_block(). However, init_memory_block() increments section_count as well, which, at first, seems like it would lead to an off-by-one error. There is no harm done because add_memory_block() immediately overwrites the mem->section_count, but it is messy. This commit moves the increment out of the common init_memory_block() (called by both add_memory_block() and register_new_memory()) and adds it to register_new_memory(). Signed-off-by: Seth Jennings Cc: Andrew Banman Cc: Daniel J Blueman Cc: Yinghai Lu Cc: Greg KH Cc: Russ Anderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84ad5802a33a4964a49b8f7d24d80a214a096b19 Author: Johannes Weiner Date: Thu Jan 14 15:20:18 2016 -0800 proc: meminfo: estimate available memory more conservatively The MemAvailable item in /proc/meminfo is to give users a hint of how much memory is allocatable without causing swapping, so it excludes the zones' low watermarks as unavailable to userspace. However, for a userspace allocation, kswapd will actually reclaim until the free pages hit a combination of the high watermark and the page allocator's lowmem protection that keeps a certain amount of DMA and DMA32 memory from userspace as well. Subtract the full amount we know to be unavailable to userspace from the number of free pages when calculating MemAvailable. Signed-off-by: Johannes Weiner Cc: Rik van Riel Cc: Mel Gorman Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/meminfo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a8d0143730d7b42c9fe6d1435d92ecce6863a62a Author: Johannes Weiner Date: Thu Jan 14 15:20:15 2016 -0800 mm: page_alloc: generalize the dirty balance reserve The dirty balance reserve that dirty throttling has to consider is merely memory not available to userspace allocations. There is nothing writeback-specific about it. Generalize the name so that it's reusable outside of that context. Signed-off-by: Johannes Weiner Cc: Rik van Riel Cc: Mel Gorman Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 6 +++--- include/linux/swap.h | 1 - mm/page-writeback.c | 14 ++++++++++++-- mm/page_alloc.c | 21 +++------------------ 4 files changed, 18 insertions(+), 24 deletions(-) commit c20cd45eb01748f0fba77a504f956b000df4ea73 Author: Michal Hocko Date: Thu Jan 14 15:20:12 2016 -0800 mm: allow GFP_{FS,IO} for page_cache_read page cache allocation page_cache_read has been historically using page_cache_alloc_cold to allocate a new page. This means that mapping_gfp_mask is used as the base for the gfp_mask. Many filesystems are setting this mask to GFP_NOFS to prevent from fs recursion issues. page_cache_read is called from the vm_operations_struct::fault() context during the page fault. This context doesn't need the reclaim protection normally. ceph and ocfs2 which call filemap_fault from their fault handlers seem to be OK because they are not taking any fs lock before invoking generic implementation. xfs which takes XFS_MMAPLOCK_SHARED is safe from the reclaim recursion POV because this lock serializes truncate and punch hole with the page faults and it doesn't get involved in the reclaim. There is simply no reason to deliberately use a weaker allocation context when a __GFP_FS | __GFP_IO can be used. The GFP_NOFS protection might be even harmful. There is a push to fail GFP_NOFS allocations rather than loop within allocator indefinitely with a very limited reclaim ability. Once we start failing those requests the OOM killer might be triggered prematurely because the page cache allocation failure is propagated up the page fault path and end up in pagefault_out_of_memory. We cannot play with mapping_gfp_mask directly because that would be racy wrt. parallel page faults and it might interfere with other users who really rely on NOFS semantic from the stored gfp_mask. The mask is also inode proper so it would even be a layering violation. What we can do instead is to push the gfp_mask into struct vm_fault and allow fs layer to overwrite it should the callback need to be called with a different allocation context. Initialize the default to (mapping_gfp_mask | __GFP_FS | __GFP_IO) because this should be safe from the page fault path normally. Why do we care about mapping_gfp_mask at all then? Because this doesn't hold only reclaim protection flags but it also might contain zone and movability restrictions (GFP_DMA32, __GFP_MOVABLE and others) so we have to respect those. Signed-off-by: Michal Hocko Reported-by: Tetsuo Handa Acked-by: Jan Kara Acked-by: Vlastimil Babka Cc: Tetsuo Handa Cc: Mel Gorman Cc: Dave Chinner Cc: Mark Fasheh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 4 ++++ mm/filemap.c | 9 ++++----- mm/memory.c | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) commit fec4eb2c8d89bf8d18136df3d688c42b7959a057 Author: Yaowei Bai Date: Thu Jan 14 15:20:09 2016 -0800 mm/compaction: improve comment for compact_memory tunable knob handler sysctl_compaction_handler() is the handler function for compact_memory tunable knob under /proc/sys/vm, add the missing knob name to make this more accurate in comment. No functional change. Signed-off-by: Yaowei Bai Acked-by: Vlastimil Babka Acked-by: Michal Nazarewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9e08f57d684ac2f40685f55f659564bfd91a971e Author: Daniel Cashman Date: Thu Jan 14 15:20:06 2016 -0800 x86: mm: support ARCH_MMAP_RND_BITS x86: arch_mmap_rnd() uses hard-coded values, 8 for 32-bit and 28 for 64-bit, to generate the random offset for the mmap base address. This value represents a compromise between increased ASLR effectiveness and avoiding address-space fragmentation. Replace it with a Kconfig option, which is sensibly bounded, so that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman Cc: Russell King Acked-by: Kees Cook Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Don Zickus Cc: Eric W. Biederman Cc: Heinrich Schuchardt Cc: Josh Poimboeuf Cc: Kirill A. Shutemov Cc: Naoya Horiguchi Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Thomas Gleixner Cc: David Rientjes Cc: Mark Salyzyn Cc: Jeff Vander Stoep Cc: Nick Kralevich Cc: Catalin Marinas Cc: Will Deacon Cc: "H. Peter Anvin" Cc: Hector Marco-Gisbert Cc: Borislav Petkov Cc: Ralf Baechle Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig | 16 ++++++++++++++++ arch/x86/mm/mmap.c | 12 ++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) commit 8f0d3aa9de57662fe35d8bacfbd9d7ef85ffe98f Author: Daniel Cashman Date: Thu Jan 14 15:20:01 2016 -0800 arm64: mm: support ARCH_MMAP_RND_BITS arm64: arch_mmap_rnd() uses STACK_RND_MASK to generate the random offset for the mmap base address. This value represents a compromise between increased ASLR effectiveness and avoiding address-space fragmentation. Replace it with a Kconfig option, which is sensibly bounded, so that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman Cc: Russell King Acked-by: Kees Cook Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Don Zickus Cc: Eric W. Biederman Cc: Heinrich Schuchardt Cc: Josh Poimboeuf Cc: Kirill A. Shutemov Cc: Naoya Horiguchi Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Thomas Gleixner Cc: David Rientjes Cc: Mark Salyzyn Cc: Jeff Vander Stoep Cc: Nick Kralevich Cc: Catalin Marinas Cc: Will Deacon Cc: "H. Peter Anvin" Cc: Hector Marco-Gisbert Cc: Borislav Petkov Cc: Ralf Baechle Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/Kconfig | 29 +++++++++++++++++++++++++++++ arch/arm64/mm/mmap.c | 8 ++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) commit e0c25d958f78acfd5c97df5776eeba3e0684101b Author: Daniel Cashman Date: Thu Jan 14 15:19:57 2016 -0800 arm: mm: support ARCH_MMAP_RND_BITS arm: arch_mmap_rnd() uses a hard-code value of 8 to generate the random offset for the mmap base address. This value represents a compromise between increased ASLR effectiveness and avoiding address-space fragmentation. Replace it with a Kconfig option, which is sensibly bounded, so that platform developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. [arnd@arndb.de: ARM: avoid ARCH_MMAP_RND_BITS for NOMMU] Signed-off-by: Daniel Cashman Cc: Russell King Acked-by: Kees Cook Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Don Zickus Cc: Eric W. Biederman Cc: Heinrich Schuchardt Cc: Josh Poimboeuf Cc: Kirill A. Shutemov Cc: Naoya Horiguchi Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Thomas Gleixner Cc: David Rientjes Cc: Mark Salyzyn Cc: Jeff Vander Stoep Cc: Nick Kralevich Cc: Catalin Marinas Cc: Will Deacon Cc: "H. Peter Anvin" Cc: Hector Marco-Gisbert Cc: Borislav Petkov Cc: Ralf Baechle Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/Kconfig | 9 +++++++++ arch/arm/mm/mmap.c | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) commit d07e22597d1d355829b7b18ac19afa912cf758d1 Author: Daniel Cashman Date: Thu Jan 14 15:19:53 2016 -0800 mm: mmap: add new /proc tunable for mmap_base ASLR Address Space Layout Randomization (ASLR) provides a barrier to exploitation of user-space processes in the presence of security vulnerabilities by making it more difficult to find desired code/data which could help an attack. This is done by adding a random offset to the location of regions in the process address space, with a greater range of potential offset values corresponding to better protection/a larger search-space for brute force, but also to greater potential for fragmentation. The offset added to the mmap_base address, which provides the basis for the majority of the mappings for a process, is set once on process exec in arch_pick_mmap_layout() and is done via hard-coded per-arch values, which reflect, hopefully, the best compromise for all systems. The trade-off between increased entropy in the offset value generation and the corresponding increased variability in address space fragmentation is not absolute, however, and some platforms may tolerate higher amounts of entropy. This patch introduces both new Kconfig values and a sysctl interface which may be used to change the amount of entropy used for offset generation on a system. The direct motivation for this change was in response to the libstagefright vulnerabilities that affected Android, specifically to information provided by Google's project zero at: http://googleprojectzero.blogspot.com/2015/09/stagefrightened.html The attack presented therein, by Google's project zero, specifically targeted the limited randomness used to generate the offset added to the mmap_base address in order to craft a brute-force-based attack. Concretely, the attack was against the mediaserver process, which was limited to respawning every 5 seconds, on an arm device. The hard-coded 8 bits used resulted in an average expected success rate of defeating the mmap ASLR after just over 10 minutes (128 tries at 5 seconds a piece). With this patch, and an accompanying increase in the entropy value to 16 bits, the same attack would take an average expected time of over 45 hours (32768 tries), which makes it both less feasible and more likely to be noticed. The introduced Kconfig and sysctl options are limited by per-arch minimum and maximum values, the minimum of which was chosen to match the current hard-coded value and the maximum of which was chosen so as to give the greatest flexibility without generating an invalid mmap_base address, generally a 3-4 bits less than the number of bits in the user-space accessible virtual address space. When decided whether or not to change the default value, a system developer should consider that mmap_base address could be placed anywhere up to 2^(value) bits away from the non-randomized location, which would introduce variable-sized areas above and below the mmap_base address such that the maximum vm_area_struct size may be reduced, preventing very large allocations. This patch (of 4): ASLR only uses as few as 8 bits to generate the random offset for the mmap base address on 32 bit architectures. This value was chosen to prevent a poorly chosen value from dividing the address space in such a way as to prevent large allocations. This may not be an issue on all platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman Cc: Russell King Acked-by: Kees Cook Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Don Zickus Cc: Eric W. Biederman Cc: Heinrich Schuchardt Cc: Josh Poimboeuf Cc: Kirill A. Shutemov Cc: Naoya Horiguchi Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Thomas Gleixner Cc: David Rientjes Cc: Mark Salyzyn Cc: Jeff Vander Stoep Cc: Nick Kralevich Cc: Catalin Marinas Cc: Will Deacon Cc: "H. Peter Anvin" Cc: Hector Marco-Gisbert Cc: Borislav Petkov Cc: Ralf Baechle Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 29 +++++++++++++++++++ arch/Kconfig | 68 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/mm.h | 11 ++++++++ kernel/sysctl.c | 22 +++++++++++++++ mm/mmap.c | 12 ++++++++ 5 files changed, 142 insertions(+) commit bc36f7017c39d1fe3c01aecd09cb2fe14753be90 Author: Piotr Kwapulinski Date: Thu Jan 14 15:19:50 2016 -0800 mm/mmap.c: remove incorrect MAP_FIXED flag comparison from mmap_region The following flag comparison in mmap_region makes no sense: if (!(vm_flags & MAP_FIXED)) return -ENOMEM; The condition is always false and thus the above "return -ENOMEM" is never executed. The vm_flags must not be compared with MAP_FIXED flag. The vm_flags may only be compared with VM_* flags. MAP_FIXED has the same value as VM_MAYREAD. Hitting the rlimit is a slow path and find_vma_intersection should realize that there is no overlapping VMA for !MAP_FIXED case pretty quickly. Signed-off-by: Piotr Kwapulinski Acked-by: Michal Hocko Cc: Oleg Nesterov Cc: Chris Metcalf Reviewed-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 3 --- 1 file changed, 3 deletions(-) commit 9f6c399ddc369856d787bd43ccd43b19ed1e4e32 Author: Michal Hocko Date: Thu Jan 14 15:19:47 2016 -0800 mm, vmscan: consider isolated pages in zone_reclaimable_pages zone_reclaimable_pages counts how many pages are reclaimable in the given zone. This currently includes all pages on file lrus and anon lrus if there is an available swap storage. We do not consider NR_ISOLATED_{ANON,FILE} counters though which is not correct because these counters reflect temporarily isolated pages which are still reclaimable because they either get back to their LRU or get freed either by the page reclaim or page migration. The number of these pages might be sufficiently high to confuse users of zone_reclaimable_pages (e.g. mbind can migrate large ranges of memory at once). Signed-off-by: Michal Hocko Suggested-by: Johannes Weiner Acked-by: Johannes Weiner Reviewed-by: Vladimir Davydov Acked-by: David Rientjes Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b832861cca231c0ef27e238b28788045da3262f2 Author: Andrew Morton Date: Thu Jan 14 15:19:44 2016 -0800 fs/block_dev.c:bdev_write_page(): use blk_queue_enter(..., GFP_NOIO) bdev_write_page() is used by swapout and by writepage where we cannot use __GFP_FS or __GFP_IO. So it is misleading to mention GFP_KERNEL here. blk_queue_enter() only actually looks at __GFP_DIRECT_RECLAIM, so no bugs were harmed in the making of this patch. Cc: Dan Williams Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ee11ba4251dddf1b0e507d184b25b1bd7820773 Author: Vladimir Davydov Date: Thu Jan 14 15:19:41 2016 -0800 memcg: do not allow to disable tcp accounting after limit is set There are two bits defined for cg_proto->flags - MEMCG_SOCK_ACTIVATED and MEMCG_SOCK_ACTIVE - both are set in tcp_update_limit, but the former is never cleared while the latter can be cleared by unsetting the limit. This allows to disable tcp socket accounting for new sockets after it was enabled by writing -1 to memory.kmem.tcp.limit_in_bytes while still guaranteeing that memcg_socket_limit_enabled static key will be decremented on memcg destruction. This functionality looks dubious, because it is not clear what a use case would be. By enabling tcp accounting a user accepts the price. If they then find the performance degradation unacceptable, they can always restart their workload with tcp accounting disabled. It does not seem there is any need to flip it while the workload is running. Besides, it contradicts to how kmem accounting API works: writing whatever to memory.kmem.limit_in_bytes enables kmem accounting for the cgroup in question, after which it cannot be disabled. Therefore one might expect that writing -1 to memory.kmem.tcp.limit_in_bytes just enables socket accounting w/o limiting it, which might be useful by itself, but it isn't true. Since this API peculiarity is not documented anywhere, I propose to drop it. This will allow to simplify the code by dropping cg_proto->flags. Signed-off-by: Vladimir Davydov Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 12 +----------- mm/memcontrol.c | 2 +- net/ipv4/tcp_memcontrol.c | 17 +++++------------ 3 files changed, 7 insertions(+), 24 deletions(-) commit 316bda0e6cc5f36f94b4af8bded16d642c90ad75 Author: Vladimir Davydov Date: Thu Jan 14 15:19:38 2016 -0800 vmscan: do not force-scan file lru if its absolute size is small We assume there is enough inactive page cache if the size of inactive file lru is greater than the size of active file lru, in which case we force-scan file lru ignoring anonymous pages. While this logic works fine when there are plenty of page cache pages, it fails if the size of file lru is small (several MB): in this case (lru_size >> prio) will be 0 for normal scan priorities, as a result, if inactive file lru happens to be larger than active file lru, anonymous pages of a cgroup will never get evicted unless the system experiences severe memory pressure, even if there are gigabytes of unused anonymous memory there, which is unfair in respect to other cgroups, whose workloads might be page cache oriented. This patch attempts to fix this by elaborating the "enough inactive page cache" check: it makes it not only check that inactive lru size > active lru size, but also that we will scan something from the cgroup at the current scan priority. If these conditions do not hold, we proceed to SCAN_FRACT as usual. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 244d63ee345bd9d45c87f665ef5e3f7bcd5db45b Author: David Rientjes Date: Thu Jan 14 15:19:35 2016 -0800 mm, vmalloc: remove VM_VPAGES VM_VPAGES is unnecessary, it's easier to check is_vmalloc_addr() when reading /proc/vmallocinfo. [akpm@linux-foundation.org: remove VM_VPAGES reference via kvfree()] Signed-off-by: David Rientjes Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vmalloc.h | 1 - mm/vmalloc.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) commit 146693471f1df44115cf4aaf13c33618619ad855 Author: Geliang Tang Date: Thu Jan 14 15:19:32 2016 -0800 mm, thp: use list_first_entry_or_null() Simplify the code with list_first_entry_or_null(). Signed-off-by: Geliang Tang Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/pgtable-generic.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 8cee852ec53fb530f10ccabf1596734209ae336b Author: Jerome Marchand Date: Thu Jan 14 15:19:29 2016 -0800 mm, procfs: breakdown RSS for anon, shmem and file in /proc/pid/status There are several shortcomings with the accounting of shared memory (SysV shm, shared anonymous mapping, mapping of a tmpfs file). The values in /proc//status and <...>/statm don't allow to distinguish between shmem memory and a shared mapping to a regular file, even though theirs implication on memory usage are quite different: during reclaim, file mapping can be dropped or written back on disk, while shmem needs a place in swap. Also, to distinguish the memory occupied by anonymous and file mappings, one has to read the /proc/pid/statm file, which has a field for the file mappings (again, including shmem) and total memory occupied by these mappings (i.e. equivalent to VmRSS in the <...>/status file. Getting the value for anonymous mappings only is thus not exactly user-friendly (the statm file is intended to be rather efficiently machine-readable). To address both of these shortcomings, this patch adds a breakdown of VmRSS in /proc//status via new fields RssAnon, RssFile and RssShmem, making use of the previous preparatory patch. These fields tell the user the memory occupied by private anonymous pages, mapped regular files and shmem, respectively. Other existing fields in /status and /statm files are left without change. The /statm file can be extended in the future, if there's a need for that. Example (part of) /proc/pid/status output including the new Rss* fields: VmPeak: 2001008 kB VmSize: 2001004 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 5108 kB VmRSS: 5108 kB RssAnon: 92 kB RssFile: 1324 kB RssShmem: 3692 kB VmData: 192 kB VmStk: 136 kB VmExe: 4 kB VmLib: 1784 kB VmPTE: 3928 kB VmPMD: 20 kB VmSwap: 0 kB HugetlbPages: 0 kB [vbabka@suse.cz: forward-porting, tweak changelog] Signed-off-by: Jerome Marchand Signed-off-by: Vlastimil Babka Acked-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 13 +++++++++++-- fs/proc/task_mmu.c | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) commit eca56ff906bdd0239485e8b47154a6e73dd9a2f3 Author: Jerome Marchand Date: Thu Jan 14 15:19:26 2016 -0800 mm, shmem: add internal shmem resident memory accounting Currently looking at /proc//status or statm, there is no way to distinguish shmem pages from pages mapped to a regular file (shmem pages are mapped to /dev/zero), even though their implication in actual memory use is quite different. The internal accounting currently counts shmem pages together with regular files. As a preparation to extend the userspace interfaces, this patch adds MM_SHMEMPAGES counter to mm_rss_stat to account for shmem pages separately from MM_FILEPAGES. The next patch will expose it to userspace - this patch doesn't change the exported values yet, by adding up MM_SHMEMPAGES to MM_FILEPAGES at places where MM_FILEPAGES was used before. The only user-visible change after this patch is the OOM killer message that separates the reported "shmem-rss" from "file-rss". [vbabka@suse.cz: forward-porting, tweak changelog] Signed-off-by: Jerome Marchand Signed-off-by: Vlastimil Babka Acked-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/mm/pgtable.c | 5 +---- fs/proc/task_mmu.c | 3 ++- include/linux/mm.h | 18 +++++++++++++++++- include/linux/mm_types.h | 7 ++++--- kernel/events/uprobes.c | 2 +- mm/memory.c | 30 ++++++++++-------------------- mm/oom_kill.c | 5 +++-- mm/rmap.c | 12 +++--------- 8 files changed, 41 insertions(+), 41 deletions(-) commit 48131e03ca4ed71d73fbe55c311a258c6fa2a090 Author: Vlastimil Babka Date: Thu Jan 14 15:19:23 2016 -0800 mm, proc: reduce cost of /proc/pid/smaps for unpopulated shmem mappings Following the previous patch, further reduction of /proc/pid/smaps cost is possible for private writable shmem mappings with unpopulated areas where the page walk invokes the .pte_hole function. We can use radix tree iterator for each such area instead of calling find_get_entry() in a loop. This is possible at the extra maintenance cost of introducing another shmem function shmem_partial_swap_usage(). To demonstrate the diference, I have measured this on a process that creates a private writable 2GB mapping of a partially swapped out /dev/shm/file (which cannot employ the optimizations from the prvious patch) and doesn't populate it at all. I time how long does it take to cat /proc/pid/smaps of this process 100 times. Before this patch: real 0m3.831s user 0m0.180s sys 0m3.212s After this patch: real 0m1.176s user 0m0.180s sys 0m0.684s The time is similar to the case where a radix tree iterator is employed on the whole mapping. Signed-off-by: Vlastimil Babka Cc: Hugh Dickins Cc: Jerome Marchand Cc: Konstantin Khlebnikov Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 42 ++++++++++--------------------- include/linux/shmem_fs.h | 2 ++ mm/shmem.c | 65 ++++++++++++++++++++++++++++-------------------- 3 files changed, 53 insertions(+), 56 deletions(-) commit 6a15a37097c7e02390bb08d83dac433c9f10144f Author: Vlastimil Babka Date: Thu Jan 14 15:19:20 2016 -0800 mm, proc: reduce cost of /proc/pid/smaps for shmem mappings The previous patch has improved swap accounting for shmem mapping, which however made /proc/pid/smaps more expensive for shmem mappings, as we consult the radix tree for each pte_none entry, so the overal complexity is O(n*log(n)). We can reduce this significantly for mappings that cannot contain COWed pages, because then we can either use the statistics tha shmem object itself tracks (if the mapping contains the whole object, or the swap usage of the whole object is zero), or use the radix tree iterator, which is much more effective than repeated find_get_entry() calls. This patch therefore introduces a function shmem_swap_usage(vma) and makes /proc/pid/smaps use it when possible. Only for writable private mappings of shmem objects (i.e. tmpfs files) with the shmem object itself (partially) swapped outwe have to resort to the find_get_entry() approach. Hopefully such mappings are relatively uncommon. To demonstrate the diference, I have measured this on a process that creates a 2GB mapping and dirties single pages with a stride of 2MB, and time how long does it take to cat /proc/pid/smaps of this process 100 times. Private writable mapping of a /dev/shm/file (the most complex case): real 0m3.831s user 0m0.180s sys 0m3.212s Shared mapping of an almost full mapping of a partially swapped /dev/shm/file (which needs to employ the radix tree iterator). real 0m1.351s user 0m0.096s sys 0m0.768s Same, but with /dev/shm/file not swapped (so no radix tree walk needed) real 0m0.935s user 0m0.128s sys 0m0.344s Private anonymous mapping: real 0m0.949s user 0m0.116s sys 0m0.348s The cost is now much closer to the private anonymous mapping case, unless the shmem mapping is private and writable. Signed-off-by: Vlastimil Babka Cc: Hugh Dickins Cc: Jerome Marchand Cc: Konstantin Khlebnikov Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 22 +++++++++++++-- include/linux/shmem_fs.h | 2 ++ mm/shmem.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 2 deletions(-) commit c261e7d94f0dd33a34b6cf98686e8b9699b62340 Author: Vlastimil Babka Date: Thu Jan 14 15:19:17 2016 -0800 mm, proc: account for shmem swap in /proc/pid/smaps Currently, /proc/pid/smaps will always show "Swap: 0 kB" for shmem-backed mappings, even if the mapped portion does contain pages that were swapped out. This is because unlike private anonymous mappings, shmem does not change pte to swap entry, but pte_none when swapping the page out. In the smaps page walk, such page thus looks like it was never faulted in. This patch changes smaps_pte_entry() to determine the swap status for such pte_none entries for shmem mappings, similarly to how mincore_page() does it. Swapped out shmem pages are thus accounted for. For private mappings of tmpfs files that COWed some of the pages, swaped out status of the original shmem pages is naturally ignored. If some of the private copies was also swapped out, they are accounted via their page table swap entries, so the resulting reported swap usage is then a sum of both swapped out private copies, and swapped out shmem pages that were not COWed. No double accounting can thus happen. The accounting is arguably still not as precise as for private anonymous mappings, since now we will count also pages that the process in question never accessed, but another process populated them and then let them become swapped out. I believe it is still less confusing and subtle than not showing any swap usage by shmem mappings at all. Swapped out counter might of interest of users who would like to prevent from future swapins during performance critical operation and pre-fault them at their convenience. Especially for larger swapped out regions the cost of swapin is much higher than a fresh page allocation. So a differentiation between pte_none vs. swapped out is important for those usecases. One downside of this patch is that it makes /proc/pid/smaps more expensive for shmem mappings, as we consult the radix tree for each pte_none entry, so the overal complexity is O(n*log(n)). I have measured this on a process that creates a 2GB mapping and dirties single pages with a stride of 2MB, and time how long does it take to cat /proc/pid/smaps of this process 100 times. Private anonymous mapping: real 0m0.949s user 0m0.116s sys 0m0.348s Mapping of a /dev/shm/file: real 0m3.831s user 0m0.180s sys 0m3.212s The difference is rather substantial, so the next patch will reduce the cost for shared or read-only mappings. In a less controlled experiment, I've gathered pids of processes on my desktop that have either '/dev/shm/*' or 'SYSV*' in smaps. This included the Chrome browser and some KDE processes. Again, I've run cat /proc/pid/smaps on each 100 times. Before this patch: real 0m9.050s user 0m0.518s sys 0m8.066s After this patch: real 0m9.221s user 0m0.541s sys 0m8.187s This suggests low impact on average systems. Note that this patch doesn't attempt to adjust the SwapPss field for shmem mappings, which would need extra work to determine who else could have the pages mapped. Thus the value stays zero except for COWed swapped out pages in a shmem mapping, which are accounted as usual. Signed-off-by: Vlastimil Babka Acked-by: Konstantin Khlebnikov Acked-by: Jerome Marchand Acked-by: Michal Hocko Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 5 +++- fs/proc/task_mmu.c | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) commit bf9683d6990589390b5178dafe8fd06808869293 Author: Vlastimil Babka Date: Thu Jan 14 15:19:14 2016 -0800 mm, documentation: clarify /proc/pid/status VmSwap limitations for shmem This series is based on Jerome Marchand's [1] so let me quote the first paragraph from there: There are several shortcomings with the accounting of shared memory (sysV shm, shared anonymous mapping, mapping to a tmpfs file). The values in /proc//status and statm don't allow to distinguish between shmem memory and a shared mapping to a regular file, even though their implications on memory usage are quite different: at reclaim, file mapping can be dropped or written back on disk while shmem needs a place in swap. As for shmem pages that are swapped-out or in swap cache, they aren't accounted at all. The original motivation for myself is that a customer found (IMHO rightfully) confusing that e.g. top output for process swap usage is unreliable with respect to swapped out shmem pages, which are not accounted for. The fundamental difference between private anonymous and shmem pages is that the latter has PTE's converted to pte_none, and not swapents. As such, they are not accounted to the number of swapents visible e.g. in /proc/pid/status VmSwap row. It might be theoretically possible to use swapents when swapping out shmem (without extra cost, as one has to change all mappers anyway), and on swap in only convert the swapent for the faulting process, leaving swapents in other processes until they also fault (so again no extra cost). But I don't know how many assumptions this would break, and it would be too disruptive change for a relatively small benefit. Instead, my approach is to document the limitation of VmSwap, and provide means to determine the swap usage for shmem areas for those who are interested and willing to pay the price, using /proc/pid/smaps. Because outside of ipcs, I don't think it's possible to currently to determine the usage at all. The previous patchset [1] did introduce new shmem-specific fields into smaps output, and functions to determine the values. I take a simpler approach, noting that smaps output already has a "Swap: X kB" line, where currently X == 0 always for shmem areas. I think we can just consider this a bug and provide the proper value by consulting the radix tree, as e.g. mincore_page() does. In the patch changelog I explain why this is also not perfect (and cannot be without swapents), but still arguably much better than showing a 0. The last two patches are adapted from Jerome's patchset and provide a VmRSS breakdown to RssAnon, RssFile and RssShm in /proc/pid/status. Hugh noted that this is a welcome addition, and I agree that it might help e.g. debugging process memory usage at albeit non-zero, but still rather low cost of extra per-mm counter and some page flag checks. [1] http://lwn.net/Articles/611966/ This patch (of 6): The documentation for /proc/pid/status does not mention that the value of VmSwap counts only swapped out anonymous private pages, and not swapped out pages of the underlying shmem objects (for shmem mappings). This is not obvious, so document this limitation. Signed-off-by: Vlastimil Babka Acked-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Jerome Marchand Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5b80287a65da927742c6d43b1369bd5ed133aad1 Author: Yaowei Bai Date: Thu Jan 14 15:19:11 2016 -0800 mm/mmzone.c: memmap_valid_within() can be boolean Make memmap_valid_within return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 6 +++--- mm/mmzone.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 6219c2a2ec990f80a586216172c811a9099c5cdf Author: Geliang Tang Date: Thu Jan 14 15:19:08 2016 -0800 mm/vmalloc.c: use list_{next,first}_entry To make the intention clearer, use list_{next,first}_entry instead of list_entry. Signed-off-by: Geliang Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 33d5310306ec244d96533da5f9183e05a7a51106 Author: Michal Hocko Date: Thu Jan 14 15:19:05 2016 -0800 mm/page_alloc.c: do not loop over ALLOC_NO_WATERMARKS without triggering reclaim __alloc_pages_slowpath is looping over ALLOC_NO_WATERMARKS requests if __GFP_NOFAIL is requested. This is fragile because we are basically relying on somebody else to make the reclaim (be it the direct reclaim or OOM killer) for us. The caller might be holding resources (e.g. locks) which block other other reclaimers from making any progress for example. Remove the retry loop and rely on __alloc_pages_slowpath to invoke all allowed reclaim steps and retry logic. We have to be careful about __GFP_NOFAIL allocations from the PF_MEMALLOC context even though this is a very bad idea to begin with because no progress can be gurateed at all. We shouldn't break the __GFP_NOFAIL semantic here though. It could be argued that this is essentially GFP_NOWAIT context which we do not support but PF_MEMALLOC is much harder to check for existing users because they might happen deep down the code path performed much later after setting the flag so we cannot really rule out there is no kernel path triggering this combination. Signed-off-by: Michal Hocko Acked-by: Mel Gorman Acked-by: David Rientjes Cc: Tetsuo Handa Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit fde82aaa731de8a23d817971f6080041a4917d06 Author: Michal Hocko Date: Thu Jan 14 15:19:03 2016 -0800 mm/page_alloc.c: get rid of __alloc_pages_high_priority() __alloc_pages_high_priority doesn't do anything special other than it calls get_page_from_freelist and loops around GFP_NOFAIL allocation until it succeeds. It would be better if the first part was done in __alloc_pages_slowpath where we modify the zonelist because this would be easier to read and understand. Opencoding the function into its only caller allows to simplify it a bit as well. This patch doesn't introduce any functional changes. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Michal Hocko Acked-by: Mel Gorman Acked-by: David Rientjes Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) commit c00eb15a8914b8ba84032a36044a5aaf7f71709d Author: Yaowei Bai Date: Thu Jan 14 15:19:00 2016 -0800 mm/zonelist: enumerate zonelists array index Hardcoding index to zonelists array in gfp_zonelist() is not a good idea, let's enumerate it to improve readability. No functional change. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: fix CONFIG_NUMA=n build] [n-horiguchi@ah.jp.nec.com: fix warning in comparing enumerator] Signed-off-by: Yaowei Bai Cc: Michal Hocko Cc: David Rientjes Signed-off-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 9 +++++---- include/linux/mmzone.h | 20 +++++++++----------- mm/page_alloc.c | 9 ++++----- 3 files changed, 18 insertions(+), 20 deletions(-) commit 06640290bfc6688062387f915c5df094e9872133 Author: Yaowei Bai Date: Thu Jan 14 15:18:57 2016 -0800 include/linux/mmzone.h: remove unused is_unevictable_lru() Since commit a0b8cab3b9b2 ("mm: remove lru parameter from __pagevec_lru_add and remove parts of pagevec API") there's no user of this function anymore, so remove it. Signed-off-by: Yaowei Bai Acked-by: Michal Hocko Acked-by: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 5 ----- 1 file changed, 5 deletions(-) commit b4ad0c7e004a2cc0e52790eff72f5176b59ca386 Author: Yaowei Bai Date: Thu Jan 14 15:18:54 2016 -0800 mm/memblock.c: memblock_is_memory()/reserved() can be boolean Make memblock_is_memory() and memblock_is_reserved return bool to improve readability due to these particular functions only using either one or zero as their return value. No functional change. Signed-off-by: Yaowei Bai Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 4 ++-- mm/memblock.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 719ff32162865522273d8fa975bf99b32875738b Author: Yaowei Bai Date: Thu Jan 14 15:18:51 2016 -0800 include/linux/hugetlb.h: is_file_hugepages() can be boolean Make is_file_hugepages() return bool to improve readability due to this particular function only using either one or zero as its return value. This patch also removed the if condition to make is_file_hugepages return directly. No functional change. Signed-off-by: Yaowei Bai Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ba5e9579433aefcdccdec207601e124d3bdf2a71 Author: yalin wang Date: Thu Jan 14 15:18:48 2016 -0800 mm: change mm_vmscan_lru_shrink_inactive() proto types Move node_id zone_idx shrink flags into trace function, so thay we don't need caculate these args if the trace is disabled, and will make this function have less arguments. Signed-off-by: yalin wang Reviewed-by: Steven Rostedt Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/vmscan.h | 14 +++++++------- mm/vmscan.c | 7 ++----- 2 files changed, 9 insertions(+), 12 deletions(-) commit 8ef5849fa8a2c7894885e27ee8c8fe06e21a88fd Author: Joonsoo Kim Date: Thu Jan 14 15:18:45 2016 -0800 mm/cma: always check which page caused allocation failure Now, we have tracepoint in test_pages_isolated() to notify pfn which cannot be isolated. But, in alloc_contig_range(), some error path doesn't call test_pages_isolated() so it's still hard to know exact pfn that causes allocation failure. This patch change this situation by calling test_pages_isolated() in almost error path. In allocation failure case, some overhead is added by this change, but, allocation failure is really rare event so it would not matter. In fatal signal pending case, we don't call test_pages_isolated() because this failure is intentional one. There was a bogus outer_start problem due to unchecked buddy order and this patch also fix it. Before this patch, it didn't matter, because end result is same thing. But, after this patch, tracepoint will report failed pfn so it should be accurate. Signed-off-by: Joonsoo Kim Acked-by: Vlastimil Babka Acked-by: Michal Nazarewicz Cc: David Rientjes Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 0f0848e5118a4cb2cb92cef0c3af6f647649ff47 Author: Joonsoo Kim Date: Thu Jan 14 15:18:42 2016 -0800 mm/page_isolation.c: add new tracepoint, test_pages_isolated cma allocation should be guranteeded to succeed. But sometimes it can fail in the current implementation. To track down the problem, we need to know which page is problematic and this new tracepoint will report it. Signed-off-by: Joonsoo Kim Acked-by: Michal Nazarewicz Acked-by: David Rientjes Cc: Minchan Kim Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/page_isolation.h | 38 +++++++++++++++++++++++++++++++++++ mm/page_isolation.c | 5 +++++ 2 files changed, 43 insertions(+) commit fea85cff11de4377040deff0e85eb2793fb078aa Author: Joonsoo Kim Date: Thu Jan 14 15:18:39 2016 -0800 mm/page_isolation.c: return last tested pfn rather than failure indicator This is preparation step to report test failed pfn in new tracepoint to analyze cma allocation failure problem. There is no functional change in this patch. Signed-off-by: Joonsoo Kim Acked-by: David Rientjes Acked-by: Michal Nazarewicz Cc: Minchan Kim Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_isolation.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 4a8c7bb59ac85b038c29adf6d32ff56e11fbb267 Author: Nathan Zimmer Date: Thu Jan 14 15:18:36 2016 -0800 mm/mempolicy.c: convert the shared_policy lock to a rwlock When running the SPECint_rate gcc on some very large boxes it was noticed that the system was spending lots of time in mpol_shared_policy_lookup(). The gamess benchmark can also show it and is what I mostly used to chase down the issue since the setup for that I found to be easier. To be clear the binaries were on tmpfs because of disk I/O requirements. We then used text replication to avoid icache misses and having all the copies banging on the memory where the instruction code resides. This results in us hitting a bottleneck in mpol_shared_policy_lookup() since lookup is serialised by the shared_policy lock. I have only reproduced this on very large (3k+ cores) boxes. The problem starts showing up at just a few hundred ranks getting worse until it threatens to livelock once it gets large enough. For example on the gamess benchmark at 128 ranks this area consumes only ~1% of time, at 512 ranks it consumes nearly 13%, and at 2k ranks it is over 90%. To alleviate the contention in this area I converted the spinlock to an rwlock. This allows a large number of lookups to happen simultaneously. The results were quite good reducing this consumtion at max ranks to around 2%. [akpm@linux-foundation.org: tidy up code comments] Signed-off-by: Nathan Zimmer Acked-by: David Rientjes Acked-by: Vlastimil Babka Cc: Nadia Yvette Chambers Cc: Naoya Horiguchi Cc: Mel Gorman Cc: "Aneesh Kumar K.V" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 2 +- include/linux/mempolicy.h | 2 +- mm/mempolicy.c | 30 +++++++++++++++++------------- 3 files changed, 19 insertions(+), 15 deletions(-) commit 8f235d1a3eb7198affe7cadf676a10afb8a46a1a Author: Chen Gang Date: Thu Jan 14 15:18:33 2016 -0800 mm: add PHYS_PFN, use it in __phys_to_pfn() __phys_to_pfn and __pfn_to_phys are symmetric, PHYS_PFN and PFN_PHYS are semmetric: - y = (phys_addr_t)x << PAGE_SHIFT - y >> PAGE_SHIFT = (phys_add_t)x - (unsigned long)(y >> PAGE_SHIFT) = x [akpm@linux-foundation.org: use macro arg name `x'] [arnd@arndb.de: include linux/pfn.h for PHYS_PFN definition] Signed-off-by: Chen Gang Cc: Oleg Nesterov Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/memory_model.h | 4 +++- include/linux/pfn.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 3aa2385111168187f24a6db04697c6fab0fab9b4 Author: yalin wang Date: Thu Jan 14 15:18:30 2016 -0800 mm/vmscan.c: change trace_mm_vmscan_writepage() proto type Move trace_reclaim_flags() into trace function, so that we don't need caculate these flags if the trace is disabled. Signed-off-by: yalin wang Reviewed-by: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/trace/events/vmscan.h | 7 +++---- mm/vmscan.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit 0b57d6ba0bd11a41a791cf6c5bbf3b55630dc70f Author: Chen Gang Date: Thu Jan 14 15:18:27 2016 -0800 mm/mmap.c: remove redundant local variables for may_expand_vm() Simplify may_expand_vm(). [akpm@linux-foundation.org: further simplification, per Naoya Horiguchi] Signed-off-by: Chen Gang Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit ab7a5af7fd9cc38576b432690367bbabc8da99b2 Author: Alexey Klimov Date: Thu Jan 14 15:18:24 2016 -0800 mm/mlock.c: drop unneeded initialization in munlock_vma_pages_range() Before usage page pointer initialized by NULL is reinitialized by follow_page_mask(). Drop useless init of page pointer in the beginning of loop. Signed-off-by: Alexey Klimov Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d097056c9a017a3b720849efb5432f37acabbac Author: Vladimir Davydov Date: Thu Jan 14 15:18:21 2016 -0800 kmemcg: account certain kmem allocations to memcg Mark those kmem allocations that are known to be easily triggered from userspace as __GFP_ACCOUNT/SLAB_ACCOUNT, which makes them accounted to memcg. For the list, see below: - threadinfo - task_struct - task_delay_info - pid - cred - mm_struct - vm_area_struct and vm_region (nommu) - anon_vma and anon_vma_chain - signal_struct - sighand_struct - fs_struct - files_struct - fdtable and fdtable->full_fds_bits - dentry and external_name - inode for all filesystems. This is the most tedious part, because most filesystems overwrite the alloc_inode method. The list is far from complete, so feel free to add more objects. Nevertheless, it should be close to "account everything" approach and keep most workloads within bounds. Malevolent users will be able to breach the limit, but this was possible even with the former "account everything" approach (simply because it did not account everything in fact). [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Cc: Greg Thelen Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/platforms/cell/spufs/inode.c | 2 +- drivers/staging/lustre/lustre/llite/super25.c | 3 ++- fs/9p/v9fs.c | 2 +- fs/adfs/super.c | 2 +- fs/affs/super.c | 2 +- fs/afs/super.c | 2 +- fs/befs/linuxvfs.c | 2 +- fs/bfs/inode.c | 2 +- fs/block_dev.c | 2 +- fs/btrfs/inode.c | 3 ++- fs/ceph/super.c | 4 ++-- fs/cifs/cifsfs.c | 2 +- fs/coda/inode.c | 6 +++--- fs/dcache.c | 5 +++-- fs/ecryptfs/main.c | 6 ++++-- fs/efs/super.c | 6 +++--- fs/exofs/super.c | 4 ++-- fs/ext2/super.c | 2 +- fs/ext4/super.c | 2 +- fs/f2fs/super.c | 5 +++-- fs/fat/inode.c | 2 +- fs/file.c | 7 ++++--- fs/fuse/inode.c | 4 ++-- fs/gfs2/main.c | 3 ++- fs/hfs/super.c | 4 ++-- fs/hfsplus/super.c | 2 +- fs/hostfs/hostfs_kern.c | 2 +- fs/hpfs/super.c | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/inode.c | 2 +- fs/isofs/inode.c | 2 +- fs/jffs2/super.c | 2 +- fs/jfs/super.c | 2 +- fs/logfs/inode.c | 3 ++- fs/minix/inode.c | 2 +- fs/ncpfs/inode.c | 2 +- fs/nfs/inode.c | 2 +- fs/nilfs2/super.c | 3 ++- fs/ntfs/super.c | 4 ++-- fs/ocfs2/dlmfs/dlmfs.c | 2 +- fs/ocfs2/super.c | 2 +- fs/openpromfs/inode.c | 2 +- fs/proc/inode.c | 3 ++- fs/qnx4/inode.c | 2 +- fs/qnx6/inode.c | 2 +- fs/reiserfs/super.c | 3 ++- fs/romfs/super.c | 4 ++-- fs/squashfs/super.c | 3 ++- fs/sysv/inode.c | 2 +- fs/ubifs/super.c | 4 ++-- fs/udf/super.c | 3 ++- fs/ufs/super.c | 2 +- fs/xfs/kmem.h | 1 + fs/xfs/xfs_super.c | 4 ++-- include/linux/thread_info.h | 5 +++-- ipc/mqueue.c | 2 +- kernel/cred.c | 4 ++-- kernel/delayacct.c | 2 +- kernel/fork.c | 22 +++++++++++++--------- kernel/pid.c | 2 +- mm/nommu.c | 2 +- mm/rmap.c | 6 ++++-- mm/shmem.c | 2 +- net/socket.c | 2 +- net/sunrpc/rpc_pipe.c | 2 +- 65 files changed, 114 insertions(+), 92 deletions(-) commit 37f08dda29dac8a595999b8d3eaa9bf0f763dd9d Author: Vladimir Davydov Date: Thu Jan 14 15:18:18 2016 -0800 vmalloc: allow to account vmalloc to memcg Make vmalloc family functions allocate vmalloc area pages with alloc_kmem_pages so that if __GFP_ACCOUNT is set they will be accounted to memcg. This is needed, at least, to account alloc_fdmem allocations. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Cc: Greg Thelen Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 230e9fc2860450fbb1f33bdcf9093d92d7d91f5b Author: Vladimir Davydov Date: Thu Jan 14 15:18:15 2016 -0800 slab: add SLAB_ACCOUNT flag Currently, if we want to account all objects of a particular kmem cache, we have to pass __GFP_ACCOUNT to each kmem_cache_alloc call, which is inconvenient. This patch introduces SLAB_ACCOUNT flag which if passed to kmem_cache_create will force accounting for every allocation from this cache even if __GFP_ACCOUNT is not passed. This patch does not make any of the existing caches use this flag - it will be done later in the series. Note, a cache with SLAB_ACCOUNT cannot be merged with a cache w/o SLAB_ACCOUNT, because merged caches share the same kmem_cache struct and hence cannot have different sets of SLAB_* flags. Thus using this flag will probably reduce the number of merged slabs even if kmem accounting is not used (only compiled in). Signed-off-by: Vladimir Davydov Suggested-by: Tejun Heo Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Greg Thelen Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 15 +++++++-------- include/linux/slab.h | 5 +++++ mm/memcontrol.c | 8 +++++++- mm/slab.h | 5 +++-- mm/slab_common.c | 3 ++- mm/slub.c | 2 ++ 6 files changed, 26 insertions(+), 12 deletions(-) commit a9bb7e620efdfd29b6d1c238041173e411670996 Author: Vladimir Davydov Date: Thu Jan 14 15:18:12 2016 -0800 memcg: only account kmem allocations marked as __GFP_ACCOUNT Black-list kmem accounting policy (aka __GFP_NOACCOUNT) turned out to be fragile and difficult to maintain, because there seem to be many more allocations that should not be accounted than those that should be. Besides, false accounting an allocation might result in much worse consequences than not accounting at all, namely increased memory consumption due to pinned dead kmem caches. So this patch switches kmem accounting to the white-policy: now only those kmem allocations that are marked as __GFP_ACCOUNT are accounted to memcg. Currently, no kmem allocations are marked like this. The following patches will mark several kmem allocations that are known to be easily triggered from userspace and therefore should be accounted to memcg. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Tejun Heo Cc: Greg Thelen Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 9 +++++++++ include/linux/memcontrol.h | 2 ++ mm/page_alloc.c | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) commit 20b5c30398639b458371c228abfda829854b61c5 Author: Vladimir Davydov Date: Thu Jan 14 15:18:08 2016 -0800 Revert "gfp: add __GFP_NOACCOUNT" This reverts commit 8f4fc071b192 ("gfp: add __GFP_NOACCOUNT"). Black-list kmem accounting policy (aka __GFP_NOACCOUNT) turned out to be fragile and difficult to maintain, because there seem to be many more allocations that should not be accounted than those that should be. Besides, false accounting an allocation might result in much worse consequences than not accounting at all, namely increased memory consumption due to pinned dead kmem caches. So it was decided to switch to the white-list policy. This patch reverts bits introducing the black-list policy. The white-list policy will be introduced later in the series. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Cc: Greg Thelen Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 2 -- include/linux/memcontrol.h | 2 -- mm/kmemleak.c | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-) commit b2a209ffa605994cbe3c259c8584ba1576d3310c Author: Vladimir Davydov Date: Thu Jan 14 15:18:05 2016 -0800 Revert "kernfs: do not account ino_ida allocations to memcg" Currently, all kmem allocations (namely every kmem_cache_alloc, kmalloc, alloc_kmem_pages call) are accounted to memory cgroup automatically. Callers have to explicitly opt out if they don't want/need accounting for some reason. Such a design decision leads to several problems: - kmalloc users are highly sensitive to failures, many of them implicitly rely on the fact that kmalloc never fails, while memcg makes failures quite plausible. - A lot of objects are shared among different containers by design. Accounting such objects to one of containers is just unfair. Moreover, it might lead to pinning a dead memcg along with its kmem caches, which aren't tiny, which might result in noticeable increase in memory consumption for no apparent reason in the long run. - There are tons of short-lived objects. Accounting them to memcg will only result in slight noise and won't change the overall picture, but we still have to pay accounting overhead. For more info, see - http://lkml.kernel.org/r/20151105144002.GB15111%40dhcp22.suse.cz - http://lkml.kernel.org/r/20151106090555.GK29259@esperanza Therefore this patchset switches to the white list policy. Now kmalloc users have to explicitly opt in by passing __GFP_ACCOUNT flag. Currently, the list of accounted objects is quite limited and only includes those allocations that (1) are known to be easily triggered from userspace and (2) can fail gracefully (for the full list see patch no. 6) and it still misses many object types. However, accounting only those objects should be a satisfactory approximation of the behavior we used to have for most sane workloads. This patch (of 6): Revert 499611ed451508a42d1d7d ("kernfs: do not account ino_ida allocations to memcg"). Black-list kmem accounting policy (aka __GFP_NOACCOUNT) turned out to be fragile and difficult to maintain, because there seem to be many more allocations that should not be accounted than those that should be. Besides, false accounting an allocation might result in much worse consequences than not accounting at all, namely increased memory consumption due to pinned dead kmem caches. So it was decided to switch to the white-list policy. This patch reverts bits introducing the black-list policy. The white-list policy will be introduced later in the series. Signed-off-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Cc: Greg Thelen Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/kernfs/dir.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 7aa0d22785deea2725a23716823edd96e65c2ff6 Author: Geliang Tang Date: Thu Jan 14 15:18:02 2016 -0800 mm/slab.c: add a helper function get_first_slab Add a new helper function get_first_slab() that get the first slab from a kmem_cache_node. Signed-off-by: Geliang Tang Acked-by: Christoph Lameter Acked-by: David Rientjes Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit 73c0219d8eca4114d81626032055598bc0a17130 Author: Geliang Tang Date: Thu Jan 14 15:17:59 2016 -0800 mm/slab.c: use list_for_each_entry in cache_flusharray Simplify the code with list_for_each_entry(). Signed-off-by: Geliang Tang Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit d8ad47d83f95abe2dfece1338633e376fec3bd31 Author: Geliang Tang Date: Thu Jan 14 15:17:56 2016 -0800 mm/slab.c use list_first_entry_or_null() Simplify the code with list_first_entry_or_null(). Signed-off-by: Geliang Tang Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 2bd03e49d66775da8cebdcc8d5bec7d68512ae87 Author: Andrew Morton Date: Thu Jan 14 15:17:53 2016 -0800 include/linux/dcache.h: remove semicolons from HASH_LEN_DECLARE A little cleanup - the invocation site provdes the semicolon. Cc: Rasmus Villemoes Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/dcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c973b0e71bff472545a2939ede2b567745d0c1c Author: Joseph Qi Date: Thu Jan 14 15:17:50 2016 -0800 ocfs2/dlm: cleanup redunant lksb flags in dlmcommon.h lksb flags are defined both in dlmapi.h and dlmcommon.h. So clean them up from dlmcommon.h. Signed-off-by: Joseph Qi Reviewed-by: Jiufei Xue Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmcommon.h | 11 ----------- 1 file changed, 11 deletions(-) commit 98e141f266040fea0864c23f1f37375cae5ff02a Author: Junxiao Bi Date: Thu Jan 14 15:17:47 2016 -0800 ocfs2: dlm: remove redundant code Found this when do patch review, remove to make it clear and save a little cpu time. Signed-off-by: Junxiao Bi Cc: Mark Fasheh Cc: Joel Becker Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 074a6c655f6da12cb1123c8a84bfd8d781138800 Author: Joseph Qi Date: Thu Jan 14 15:17:44 2016 -0800 ocfs2: access orphan dinode before delete entry in ocfs2_orphan_del In ocfs2_orphan_del, currently it finds and deletes entry first, and then access orphan dir dinode. This will have a problem once ocfs2_journal_access_di fails. In this case, entry will be removed from orphan dir, but in deed the inode hasn't been deleted successfully. In other words, the file is missing but not actually deleted. So we should access orphan dinode first like unlink and rename. Signed-off-by: Joseph Qi Reviewed-by: Jiufei Xue Cc: Mark Fasheh Cc: Joel Becker Reviewed-by: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/namei.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 32e493265b2be96404aaa478fb2913be29b06887 Author: xuejiufei Date: Thu Jan 14 15:17:41 2016 -0800 ocfs2/dlm: do not insert a new mle when another process is already migrating When two processes are migrating the same lockres, dlm_add_migration_mle() return -EEXIST, but insert a new mle in hash list. dlm_migrate_lockres() will detach the old mle and free the new one which is already in hash list, that will destroy the list. Signed-off-by: Jiufei Xue Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Reviewed-by: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bef5502de074b6f6fa647b94b73155d675694420 Author: xuejiufei Date: Thu Jan 14 15:17:38 2016 -0800 ocfs2/dlm: ignore cleaning the migration mle that is inuse We have found that migration source will trigger a BUG that the refcount of mle is already zero before put when the target is down during migration. The situation is as follows: dlm_migrate_lockres dlm_add_migration_mle dlm_mark_lockres_migrating dlm_get_mle_inuse <<<<<< Now the refcount of the mle is 2. dlm_send_one_lockres and wait for the target to become the new master. <<<<<< o2hb detect the target down and clean the migration mle. Now the refcount is 1. dlm_migrate_lockres woken, and put the mle twice when found the target goes down which trigger the BUG with the following message: "ERROR: bad mle: ". Signed-off-by: Jiufei Xue Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 1cce4df04f37d3f7b969e85528fa54f918a06f03 Author: Goldwyn Rodrigues Date: Thu Jan 14 15:17:35 2016 -0800 ocfs2: do not lock/unlock() inode DLM lock DLM does not cache locks. So, blocking lock and unlock will only make the performance worse where contention over the locks is high. Signed-off-by: Goldwyn Rodrigues Cc: Mark Fasheh Cc: Joel Becker Reviewed-by: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlmglue.c | 8 -------- 1 file changed, 8 deletions(-) commit 1247017f43a93eae3d64b7c25f3637dc545f5a47 Author: jiangyiwen Date: Thu Jan 14 15:17:33 2016 -0800 ocfs2: fix slot overwritten if storage link down during mount The following case will lead to slot overwritten. N1 N2 mount ocfs2 volume, find and allocate slot 0, then set osb->slot_num to 0, begin to write slot info to disk mount ocfs2 volume, wait for super lock write block fail because of storage link down, unlock super lock got super lock and also allocate slot 0 then unlock super lock mount fail and then dismount, since osb->slot_num is 0, try to put invalid slot to disk. And it will succeed if storage link restores. N2 slot info is now overwritten Once another node say N3 mount, it will find and allocate slot 0 again, which will lead to mount hung because journal has already been locked by N2. so when write slot info failed, invalidate slot in advance to avoid overwrite slot. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Yiwen Jiang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/slot_map.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c372f2193a2e73d5936bf37259ae63ca388b4cbc Author: Xue jiufei Date: Thu Jan 14 15:17:29 2016 -0800 ocfs2/dlm: return appropriate value when dlm_grab() returns NULL dlm_grab() may return NULL when the node is doing unmount. When doing code review, we found that some dlm handlers may return error to caller when dlm_grab() returns NULL and make caller BUG or other problems. Here is an example: Node 1 Node 2 receives migration message from node 3, and send migrate request to others start unmounting receives migrate request from node 1 and call dlm_migrate_request_handler() unmount thread unregisters domain handlers and removes dlm_context from dlm_domains dlm_migrate_request_handlers() returns -EINVAL to node 1 Exit migration neither clearing the migration state nor sending assert master message to node 3 which cause node 3 hung. Signed-off-by: Jiufei Xue Reviewed-by: Joseph Qi Reviewed-by: Yiwen Jiang Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 2 +- fs/ocfs2/dlm/dlmunlock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 72865d92300a6ad20a8851887aeac4f41fd2c579 Author: Joseph Qi Date: Thu Jan 14 15:17:27 2016 -0800 ocfs2: clean up redundant NULL check before iput Since iput will take care the NULL check itself, NULL check before calling it is redundant. So clean them up. Signed-off-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/alloc.c | 3 +-- fs/ocfs2/ioctl.c | 4 +--- fs/ocfs2/journal.c | 10 +++------- fs/ocfs2/localalloc.c | 10 +++------- fs/ocfs2/namei.c | 3 +-- fs/ocfs2/slot_map.c | 3 +-- fs/ocfs2/super.c | 3 +-- 7 files changed, 11 insertions(+), 25 deletions(-) commit b5560143385e18b4109ad6951c7719705e3dd995 Author: jiangyiwen Date: Thu Jan 14 15:17:23 2016 -0800 ocfs2/dlm: wait until DLM_LOCK_RES_SETREF_INPROG is cleared in dlm_deref_lockres_worker Commit f3f854648de6 ("ocfs2_dlm: Ensure correct ordering of set/clear refmap bit on lockres") still exists a race which can't ensure the ordering is exactly correct. Node1 Node2 Node3 umount, migrate lockres to Node2 migrate finished, send migrate request to Node3 received migrate request, create a migration_mle, respond to Node2. set DLM_LOCK_RES_SETREF_INPROG and send assert master to Node3 delete migration_mle in assert_master_handler, Node3 umount without response dlm_thread purge this lockres, send drop deref message to Node2 found the flag of DLM_LOCK_RES_SETREF_INPROG is set, dispatch dlm_deref_lockres_worker to clear refmap, but in function of dlm_deref_lockres_worker, only if node in refmap it wait DLM_LOCK_RES_SETREF_INPROG to be cleared. So worker is done successfully purge lockres, send assert master response to Node1, and finish umount set Node3 in refmap, and it won't be cleared forever, thus lead to umount hung so wait until DLM_LOCK_RES_SETREF_INPROG is cleared in dlm_deref_lockres_worker. Signed-off-by: Yiwen Jiang Reviewed-by: Joseph Qi Reviewed-by: Junxiao Bi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmmaster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e62dc096ef39ccf45fc47e8612f3c5d361af038 Author: Julia Lawall Date: Thu Jan 14 15:17:21 2016 -0800 ocfs2: constify ocfs2_extent_tree_operations structures The ocfs2_extent_tree_operations structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/alloc.c | 12 ++++++------ fs/ocfs2/alloc.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 30bee898f86506893883ffb8db20d8101a29b5f5 Author: Xue jiufei Date: Thu Jan 14 15:17:18 2016 -0800 ocfs2/dlm: fix a race between purge and migration We found a race between purge and migration when doing code review. Node A put lockres to purgelist before receiving the migrate message from node B which is the master. Node A call dlm_mig_lockres_handler to handle this message. dlm_mig_lockres_handler dlm_lookup_lockres >>>>>> race window, dlm_run_purge_list may run and send deref message to master, waiting the response spin_lock(&res->spinlock); res->state |= DLM_LOCK_RES_MIGRATING; spin_unlock(&res->spinlock); dlm_mig_lockres_handler returns >>>>>> dlm_thread receives the response from master for the deref message and triggers the BUG because the lockres has the state DLM_LOCK_RES_MIGRATING with the following message: dlm_purge_lockres:209 ERROR: 6633EB681FA7474A9C280A4E1A836F0F: res M0000000000000000030c0300000000 in use after deref Signed-off-by: Jiufei Xue Reviewed-by: Joseph Qi Reviewed-by: Yiwen Jiang Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a84ac334dcb44c76f0b051513a6c27a2d747f883 Author: Junxiao Bi Date: Thu Jan 14 15:17:15 2016 -0800 ocfs2: o2hb: increase unsteady iterations When run multiple xattr test of ocfs2-test on a three-nodes cluster, mount failed sometimes with the following message. o2hb: Unable to stabilize heartbeart on region D18B775E758D4D80837E8CF3D086AD4A (xvdb) Stabilize heartbeat depends on the timing order to mount ocfs2 from cluster nodes and how fast the tcp connections are established. So increase unsteady interations to leave more time for it. Signed-off-by: Junxiao Bi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/heartbeat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6364627eff4c9a2035cebb3aec7415705ba117b Author: John Haxby Date: Thu Jan 14 15:17:12 2016 -0800 ocfs2: return non-zero st_blocks for inline data Some versions of tar assume that files with st_blocks == 0 do not contain any data and will skip reading them entirely. See also commit 9206c561554c ("ext4: return non-zero st_blocks for inline data"). Signed-off-by: John Haxby Reviewed-by: Mark Fasheh Cc: Joel Becker Acked-by: Gang He Reviewed-by: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/file.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3eb5bdf0f47726e3ef0a875e0cce3cca462ee70d Author: Norton.Zhu Date: Thu Jan 14 15:17:09 2016 -0800 ocfs2: optimize bad declarations and redundant assignment In ocfs2_parse_options, a) it's better to declare variables(small size) outside of while loop; b) 'option' will be set by match_int, 'option = 0;' makes no sense, if match_int failed, it just goto bail and return. Signed-off-by: Norton.Zhu Reviewed-by: Joseph Qi Cc: Gang He Cc: Mark Fasheh Acked-by: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/super.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 2886357b24662fcf7dc138c9d5e3166e99a55750 Author: Arnd Bergmann Date: Thu Jan 14 15:17:05 2016 -0800 logfs: fix logfs build errors and dependencies Fix build errors that happen when CONFIG_LOGFS=y and CONFIG_MTD=m: fs/built-in.o: In function `logfs_mount': super.c:(.text+0x92a6f): undefined reference to `logfs_get_sb_mtd' fs/built-in.o: In function `logfs_get_sb_bdev': (.text+0x93530): undefined reference to `logfs_get_sb_mtd' This patch avoids the error by changing the dependencies of logfs in a way that we can no longer configure logfs as built-in when the MTD core is a loadable module, while leaving the dependency to require at least one of MTD or BLOCK to be enabled. Signed-off-by: Arnd Bergmann Signed-off-by: Randy Dunlap Cc: Michal Marek Cc: Peter Chen Cc: Randy Dunlap Cc: Joern Engel Cc: Prasad Joshi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/logfs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f632369ab795ebadc1a12a609e5bd4f80f31924 Author: Javier Martinez Canillas Date: Thu Jan 14 15:17:02 2016 -0800 modpost: don't add a trailing wildcard for OF module aliases Commit ac551828993e ("modpost: i2c aliases need no trailing wildcard") removed the wildcard at the end of the I2C module aliases because I2C devices have no IDs so the aliases are just arbitrary device names. This is also true for OF modaliases since a compatible string is used to define a specific IP hardware block. So the modalias should match a specific compatible string and not attempt to match a compatible string whose name matches the beginning of another one. For example, the following driver module: $ modinfo cros_ec_keyb | grep alias alias: platform:cros-ec-keyb alias: of:N*T*Cgoogle,cros-ec-keyb* will be tried to be loaded for an alias of:N*T*Cgoogle,cros-ec-keyb-v2 but there could be a different driver that supports the device for that compatible string so it's better to remove the trailing wildcard for OF. Also, remove the word "always" from the add_wildcard() function comment since that was carried from the time where a wildcard was always added at the end of the module alias for all the devices. Signed-off-by: Javier Martinez Canillas Suggested-by: Brian Norris Reviewed-by: Sjoerd Simons Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/mod/file2alias.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c510eff6bebaa244e577b8f499e86606b5e5d4c7 Author: Jeff Layton Date: Thu Jan 14 15:16:59 2016 -0800 fsnotify: destroy marks with call_srcu instead of dedicated thread At the time that this code was originally written, call_srcu didn't exist, so this thread was required to ensure that we waited for that SRCU grace period to settle before finally freeing the object. It does exist now however and we can much more efficiently use call_srcu to handle this. That also allows us to potentially use srcu_barrier to ensure that they are all of the callbacks have run before proceeding. In order to conserve space, we union the rcu_head with the g_list. This will be necessary for nfsd which will allocate marks from a dedicated slabcache. We have to be able to ensure that all of the objects are destroyed before destroying the cache. That's fairly Signed-off-by: Jeff Layton Cc: Eric Paris Reviewed-by: Jan Kara Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/mark.c | 66 +++++++++------------------------------- include/linux/fsnotify_backend.h | 5 ++- 2 files changed, 18 insertions(+), 53 deletions(-) commit 1deaf9d19776916cd1c83191503bf327319a301a Author: Geliang Tang Date: Thu Jan 14 15:16:56 2016 -0800 fs/notify/inode_mark.c: use list_next_entry in fsnotify_unmount_inodes To make the intention clearer, use list_next_entry instead of list_entry. Signed-off-by: Geliang Tang Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/inode_mark.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 72214a24a7677d4c7501eecc9517ed681b5f2db2 Author: Sergey Senozhatsky Date: Thu Jan 14 15:16:53 2016 -0800 scripts/bloat-o-meter: fix python3 syntax error In Python3+ print is a function so the old syntax is not correct anymore: $ ./scripts/bloat-o-meter vmlinux.o vmlinux.o.old File "./scripts/bloat-o-meter", line 61 print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \ ^ SyntaxError: invalid syntax Fix by calling print as a function. Tested on python 2.7.11, 3.5.1 Signed-off-by: Sergey Senozhatsky Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/bloat-o-meter | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ea535e418c01837d07b6c94e817540f50bfdadb0 Author: Laura Abbott Date: Thu Jan 14 15:16:50 2016 -0800 dma-debug: switch check from _text to _stext In include/asm-generic/sections.h: /* * Usage guidelines: * _text, _data: architecture specific, don't use them in * arch-independent code * [_stext, _etext]: contains .text.* sections, may also contain * .rodata.* * and/or .init.* sections _text is not guaranteed across architectures. Architectures such as ARM may reuse parts which are not actually text and erroneously trigger a bug. Switch to using _stext which is guaranteed to contain text sections. Came out of https://lkml.kernel.org/g/<567B1176.4000106@redhat.com> Signed-off-by: Laura Abbott Reviewed-by: Kees Cook Cc: Russell King Cc: Arnd Bergmann Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/dma-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 601f1db653217f205ffa5fb33514b4e1711e56d1 Author: Sudip Mukherjee Date: Thu Jan 14 15:16:47 2016 -0800 m32r: fix m32104ut_defconfig build fail The build of m32104ut_defconfig for m32r arch was failing for long long time with the error: ERROR: "memory_start" [fs/udf/udf.ko] undefined! ERROR: "memory_end" [fs/udf/udf.ko] undefined! ERROR: "memory_end" [drivers/scsi/sg.ko] undefined! ERROR: "memory_start" [drivers/scsi/sg.ko] undefined! ERROR: "memory_end" [drivers/i2c/i2c-dev.ko] undefined! ERROR: "memory_start" [drivers/i2c/i2c-dev.ko] undefined! As done in other architectures export the symbols to fix the error. Reported-by: Fengguang Wu Signed-off-by: Sudip Mukherjee Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m32r/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) commit e8ecde25f5e08f89b61d86c32bbb56b405e90c32 Author: Al Viro Date: Thu Jan 14 17:52:59 2016 -0500 Make sure that highmem pages are not added to symlink page cache inode_nohighmem() is sufficient to make sure that page_get_link() won't try to allocate a highmem page. Moreover, it is sufficient to make sure that page_symlink/__page_symlink won't do the same thing. However, any filesystem that manually preseeds the symlink's page cache upon symlink(2) needs to make sure that the page it inserts there won't be a highmem one. Fortunately, only nfs and shmem have run afoul of that... Signed-off-by: Al Viro Documentation/filesystems/porting | 6 +++++- fs/nfs/dir.c | 5 ++--- mm/shmem.c | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) commit 6e8b50d16a757d53f8817acecba97c5d4aa1cf65 Author: Jeff Layton Date: Tue Nov 17 06:52:23 2015 -0500 nfsd: add new io class tracepoint Add some new tracepoints in the nfsd read/write codepaths. The idea is that this will give us the ability to measure how long each phase of a read or write operation takes. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfsfh.h | 23 +++++++++++++++++++++++ fs/nfsd/trace.h | 41 +++++++++++++++++++++++++++++++++++++++++ fs/nfsd/vfs.c | 15 +++++++++++++++ 3 files changed, 79 insertions(+) commit 9c4b2867ed7c8c8784dd417ffd16e705e81eb145 Author: Rafael J. Wysocki Date: Thu Jan 14 23:24:22 2016 +0100 cpuidle: menu: Fix menu_select() for CPUIDLE_DRIVER_STATE_START == 0 Commit a9ceb78bc75c (cpuidle,menu: use interactivity_req to disable polling) exposed a bug in menu_select() causing it to return -1 on systems with CPUIDLE_DRIVER_STATE_START equal to zero, although it should have returned 0. As a result, idle states are not entered by CPUs on those systems. Namely, on the systems in question data->last_state_idx is initially equal to -1 and the above commit modified the condition that would have caused it to be changed to 0 to be less likely to trigger which exposed the problem. However, setting data->last_state_idx initially to -1 doesn't make sense at all and on the affected systems it should always be set to CPUIDLE_DRIVER_STATE_START (ie. 0) unconditionally, so make that happen. Fixes: a9ceb78bc75c (cpuidle,menu: use interactivity_req to disable polling) Reported-and-tested-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/menu.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 250dfa05e5be98d7c8f246181da51165f83bbe62 Merge: afd2ff9 7dbded0 Author: Rafael J. Wysocki Date: Thu Jan 14 23:22:56 2016 +0100 Merge branch 'for-rafael' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull devfreq changes for v4.5 from MyungJoo Ham. * 'for-rafael' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: MAINTAINERS: Add devfreq-event entry MAINTAINERS: Add missing git repository and directory for devfreq PM / devfreq: Do not show statistics if it's not ready. PM / devfreq: Modify the indentation of trans_stat sysfs for readability PM / devfreq: Set the freq_table of devfreq device PM / devfreq: Add show_one macro to delete the duplicate code PM / devfreq: event: Fix the error and warning from script/checkpatch.pl PM / devfreq: event: Remove the error log of devfreq_event_get_edev_by_phandle() commit 36beca6571c941b28b0798667608239731f9bc3a Author: Nitin Gupta Date: Tue Jan 5 22:35:35 2016 -0800 sparc64: Fix numa node distance initialization Orabug: 22495713 Currently, NUMA node distance matrix is initialized only when a machine descriptor (MD) exists. However, sun4u machines (e.g. Sun Blade 2500) do not have an MD and thus distance values were left uninitialized. The initialization is now moved such that it happens on both sun4u and sun4v. Signed-off-by: Nitin Gupta Tested-by: Mikael Pettersson Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 01b9b0b28626db4a47d7f48744d70abca9914ef1 Author: Vasily Averin Date: Thu Jan 14 13:41:14 2016 +0300 cifs_dbg() outputs an uninitialized buffer in cifs_readdir() In some cases tmp_bug can be not filled in cifs_filldir and stay uninitialized, therefore its printk with "%s" modifier can leak content of kernelspace memory. If old content of this buffer does not contain '\0' access bejond end of allocated object can crash the host. Signed-off-by: Vasily Averin Signed-off-by: Steve French CC: Stable fs/cifs/readdir.c | 1 + 1 file changed, 1 insertion(+) commit 820962dc700598ffe8cd21b967e30e7520c34748 Author: Rabin Vincent Date: Wed Dec 23 07:32:41 2015 +0100 cifs: fix race between call_async() and reconnect() cifs_call_async() queues the MID to the pending list and calls smb_send_rqst(). If smb_send_rqst() performs a partial send, it sets the tcpStatus to CifsNeedReconnect and returns an error code to cifs_call_async(). In this case, cifs_call_async() removes the MID from the list and returns to the caller. However, cifs_call_async() releases the server mutex _before_ removing the MID. This means that a cifs_reconnect() can race with this function and manage to remove the MID from the list and delete the entry before cifs_call_async() calls cifs_delete_mid(). This leads to various crashes due to the use after free in cifs_delete_mid(). Task1 Task2 cifs_call_async(): - rc = -EAGAIN - mutex_unlock(srv_mutex) cifs_reconnect(): - mutex_lock(srv_mutex) - mutex_unlock(srv_mutex) - list_delete(mid) - mid->callback() cifs_writev_callback(): - mutex_lock(srv_mutex) - delete(mid) - mutex_unlock(srv_mutex) - cifs_delete_mid(mid) <---- use after free Fix this by removing the MID in cifs_call_async() before releasing the srv_mutex. Also hold the srv_mutex in cifs_reconnect() until the MIDs are moved out of the pending list. Signed-off-by: Rabin Vincent Acked-by: Shirish Pargaonkar CC: Stable Signed-off-by: Steve French fs/cifs/connect.c | 2 +- fs/cifs/transport.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 373512ec5c105ed09e3738196dcb257dfab65cba Author: Steve French Date: Fri Dec 18 13:05:30 2015 -0600 Prepare for encryption support (first part). Add decryption and encryption key generation. Thanks to Metze for helping with this. Reviewed-by: Stefan Metzmacher Signed-off-by: Steve French fs/cifs/cifsglob.h | 8 +++- fs/cifs/cifsproto.h | 5 ++- fs/cifs/connect.c | 2 +- fs/cifs/misc.c | 2 +- fs/cifs/smb2misc.c | 36 ++++++++++++++--- fs/cifs/smb2ops.c | 13 ++++-- fs/cifs/smb2pdu.c | 10 ++--- fs/cifs/smb2pdu.h | 8 ++-- fs/cifs/smb2proto.h | 3 +- fs/cifs/smb2transport.c | 102 +++++++++++++++++++++++++++++++++++++++++++++--- 10 files changed, 156 insertions(+), 33 deletions(-) commit 882137c4d64175e2bb38cd842e25d54e6de31da8 Author: Ross Lagerwall Date: Wed Dec 2 14:46:07 2015 +0000 cifs: Allow using O_DIRECT with cache=loose Currently O_DIRECT is supported with cache=none and cache=strict, but not cache=loose. Add support for using O_DIRECT when mounted with cache=loose. Signed-off-by: Ross Lagerwall Signed-off-by: Steve French fs/cifs/cifsfs.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ec3fc58b1e7a32cc9f552b306f8dbb4454e83798 Author: Leo Yan Date: Wed Jan 13 15:21:05 2016 +0800 thermal: add description for integral_cutoff unit Add more explicitly description for unit of integral_cutoff which used by power allocator governor. Signed-off-by: Leo Yan Acked-by: Javi Merino Signed-off-by: Jonathan Corbet Documentation/thermal/sysfs-api.txt | 1 + 1 file changed, 1 insertion(+) commit ceec86ec06177f9eca684a489ddf630432023284 Author: SeongJae Park Date: Wed Jan 13 16:47:56 2016 +0900 Documentation: update libhugetlbfs site url The site for libhugetlbfs has moved from sourceforge to github. This commit updates the old url. Signed-off-by: SeongJae Park Acked-by: Mike Kravetz Signed-off-by: Jonathan Corbet Documentation/filesystems/proc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afd8c08446d6503adc1ccd2726a8e27f35d95b79 Author: Borislav Petkov Date: Wed Jan 13 16:48:51 2016 +0100 Documentation: Explain pci=conf1,conf2 more verbosely People complained that setting the PCI config space access mechanism through "pci=conf1" or "pci=conf2" on the command line is not really documented. Yeah, can you blame them? Look at what we have now. So try to improve the situation a bit by explaining what those "conf1" and "conf2" things actually mean. See http://wiki.osdev.org/PCI for more info. Suggested-by: Eric Morton Signed-off-by: Borislav Petkov [jc: Added the above URL to the document too] Signed-off-by: Jonathan Corbet Documentation/kernel-parameters.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 5d19c619ab3f0551864684f09c2a2f22ee972bef Author: Markus Elfring Date: Thu Jan 14 15:46:28 2016 +0100 fsl/fman: Delete one function call "put_device" in dtsec_config() The Coccinelle semantic patch script "deref_null.cocci" pointed a problem out in the implementation of the function "dtsec_config". A null pointer was assigned to the data structure member "tbiphy" of the variable "dtsec" if a matching device was not found. A call of the function "put_device" was unnecessary then because a previous call of the function "get_device" was not triggered. Thus remove the function call "put_device" after the printing of the desired error message. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_dtsec.c | 1 - 1 file changed, 1 deletion(-) commit bf6f869f8c111ba265cd199c64b25c646987500a Author: Liu Jiang Date: Tue Jan 12 13:18:06 2016 -0700 genirq/MSI: Relax msi_domain_alloc() to support parentless MSI irqdomains Previously msi_domain_alloc() assumed MSI irqdomains always had parent irqdomains, but that's not true for the new Intel VMD devices. Relax msi_domain_alloc() to support parentless MSI irqdomains. Signed-off-by: Jiang Liu Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Acked-by: Thomas Gleixner kernel/irq/msi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 10a0c0f0595b20efa127a1816670c64a3d0e4965 Merge: dcd1bfd 7030a7e Author: Linus Torvalds Date: Thu Jan 14 11:57:22 2016 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc changes: - fix lguest bug - fix /proc/meminfo output on certain configs - fix pvclock bug - fix reboot on certain iMacs by adding new reboot quirk - fix bootup crash - fix FPU boot line option parsing - add more x86 self-tests - small cleanups, documentation improvements, etc" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/amd: Remove an unneeded condition in srat_detect_node() x86/vdso/pvclock: Protect STABLE check with the seqcount x86/mm: Improve switch_mm() barrier comments selftests/x86: Test __kernel_sigreturn and __kernel_rt_sigreturn x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[] lguest: Map switcher text R/O x86/boot: Hide local labels in verify_cpu() x86/fpu: Disable AVX when eagerfpu is off x86/fpu: Disable MPX when eagerfpu is off x86/fpu: Disable XGETBV1 when no XSAVE x86/fpu: Fix early FPU command-line parsing x86/mm: Use PAGE_ALIGNED instead of IS_ALIGNED selftests/x86: Disable the ldt_gdt_64 test for now x86/mm/pat: Make split_page_count() check for empty levels to fix /proc/meminfo output x86/boot: Double BOOT_HEAP_SIZE to 64KB x86/mm: Add barriers and document switch_mm()-vs-flush synchronization commit dcd1bfd50ab6952e8c60fd99d065d5be38b4b8b4 Merge: 747a9b0 1f16f11 Author: Linus Torvalds Date: Thu Jan 14 11:45:56 2016 -0800 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Ingo Molnar: "Three clocksource driver fixes" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/vt8500: Increase the minimum delta clocksource/drivers/fsl_ftm_timer: Fix CLKSRC_MMIO dependency clocksource/drivers: Fix dependencies for !HAS_IOMEM archs commit adfeb3e00e8e1b9fb4ad19eb7367e7c272d16003 Author: Steve French Date: Fri Dec 18 12:31:36 2015 -0600 cifs: Make echo interval tunable Currently the echo interval is set to 60 seconds using a macro. This setting determines the interval at which echo requests are sent to the server on an idling connection. This setting also affects the time required for a connection to an unresponsive server to timeout. Making this setting a tunable allows users to control the echo interval times as well as control the time after which the connecting to an unresponsive server times out. To set echo interval, pass the echo_interval=n mount option. Version four of the patch. v2: Change MIN and MAX timeout values v3: Remove incorrect comment in cifs_get_tcp_session v4: Fix bug in setting echo_intervalw Signed-off-by: Sachin Prabhu Acked-by: Shirish Pargaonkar fs/cifs/cifsfs.c | 2 ++ fs/cifs/cifsglob.h | 8 ++++++-- fs/cifs/connect.c | 35 ++++++++++++++++++++++++++--------- 3 files changed, 34 insertions(+), 11 deletions(-) commit a108471b5730b52017e73b58c9f486319d2ac308 Author: Ross Lagerwall Date: Wed Dec 2 14:46:08 2015 +0000 cifs: Check uniqueid for SMB2+ and return -ESTALE if necessary Commit 7196ac113a4f ("Fix to check Unique id and FileType when client refer file directly.") checks whether the uniqueid of an inode has changed when getting the inode info, but only when using the UNIX extensions. Add a similar check for SMB2+, since this can be done without an extra network roundtrip. Signed-off-by: Ross Lagerwall Signed-off-by: Steve French fs/cifs/inode.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 747a9b0a08ae300b99b8aa7861bd3609f3b3e782 Merge: 32250e4 c366088 Author: Linus Torvalds Date: Thu Jan 14 11:39:09 2016 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Tooling fixes, the biggest patch is one that decouples the kernel's list.h from tooling list.h" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) perf tools: Fallback to srcdir/Documentation/tips.txt perf ui/tui: Print helpline message as is perf tools: Set and pass DOCDIR to builtin-report.c perf tools: Add file_only config option to strlist perf tools: Add more usage tips perf record: Add --buildid-all option tools subcmd: Add missing NORETURN define for parse-options.h tools: Fix formatting of the "make -C tools" help message tools: Make list.h self-sufficient perf tools: Fix mmap2 event allocation in synthesize code perf stat: Fix recort_usage typo perf test: Reset err after using it hold errcode in hist testcases perf test: Fix false TEST_OK result for 'perf test hist' tools build: Add BPF feature check to test-all perf bpf: Fix build breakage due to libbpf tools: Move Makefile.arch from perf/config to tools/scripts perf tools: Fix PowerPC native building perf tools: Fix phony build target for build-test perf tools: Add -lutil in python lib list for broken python-config perf tools: Add missing sources to perf's MANIFEST ... commit 275516cdcfa42c603c79ea42d2a7d4288d950fea Author: Arnd Hannemann Date: Mon Nov 16 17:38:28 2015 +0100 Print IP address of unresponsive server Before this patch, only the hostname of the server is printed when it becomes unresponsive. This might not be helpful, if the IP-Address has changed since initial mount when the name was resolved (e.g. because the IPv6-Prefix changed). This patch adds the cached IP address of the unresponsive server, to the log message. Signed-off-by: Arnd Hannemann Signed-off-by: Steve French fs/cifs/connect.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ec7147a99e33a9e4abad6fc6e1b40d15df045d53 Author: Jamie Bainbridge Date: Sat Nov 7 22:13:49 2015 +1000 cifs: Ratelimit kernel log messages Under some conditions, CIFS can repeatedly call the cifs_dbg() logging wrapper. If done rapidly enough, the console framebuffer can softlockup or "rcu_sched self-detected stall". Apply the built-in log ratelimiters to prevent such hangs. Signed-off-by: Jamie Bainbridge Signed-off-by: Steve French CC: Stable fs/cifs/cifs_debug.c | 2 +- fs/cifs/cifs_debug.h | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) commit 32250e4a5fa0b618044afa59fba01093a4bcb14a Merge: 5339f9d c698d63 Author: Linus Torvalds Date: Thu Jan 14 11:25:37 2016 -0800 Merge branch 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Quite some driver updates: - piix4 can now handle multiplexed adapters - brcmstb, xlr, eg20t, designware drivers support more SoCs - emev2 gained i2c slave support - img-scb and rcar got bigger refactoring to remove issues - lots of common driver updates i2c core changes: - new quirk flag when an adapter does not support clock stretching, so clients can be configured to avoid that if possible - added a helper function to retrieve timing parameters from firmware (with rcar being the first user) - "multi-master" DT binding added so drivers can adapt to this setting (like disabling PM to keep arbitration working) - RuntimePM for the logical adapter device is now always enabled by the core to ensure propagation from childs to the parent (the HW device) - new macro builtin_i2c_driver to reduce boilerplate" * 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (70 commits) i2c: create builtin_i2c_driver to avoid registration boilerplate i2c: imx: fix i2c resource leak with dma transfer dt-bindings: i2c: eeprom: add another EEPROM device dt-bindings: move I2C eeprom descriptions to the proper file i2c: designware: Do not require clock when SSCN and FFCN are provided DT: i2c: trivial-devices: Add Epson RX8010 and MPL3115 i2c: s3c2410: remove superfluous runtime PM calls i2c: always enable RuntimePM for the adapter device i2c: designware: retry transfer on transient failure i2c: ibm_iic: rename i2c_timings struct due to clash with generic version i2c: designware: Add support for AMD Seattle I2C i2c: imx: Remove unneeded comments i2c: st: use to_platform_device() i2c: designware: use to_pci_dev() i2c: brcmstb: Adding support for CM and DSL SoCs i2c: mediatek: fix i2c multi transfer issue in high speed mode i2c: imx: improve code readability i2c: imx: Improve message log when DMA is not used i2c: imx: add runtime pm support to improve the performance i2c: imx: init bus recovery info before adding i2c adapter ... commit 5339f9d4c2ceccab00b28d65bd5c2b2cd6a3de05 Merge: cf8d7e3 1832237 Author: Linus Torvalds Date: Thu Jan 14 11:13:28 2016 -0800 Merge tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - Rework and export the changeset API to make it available to users other than DT overlays - ARM secure devices binding - OCTEON USB binding - Clean-up of various SRAM binding docs - Various other binding doc updates * tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (21 commits) drivers/of: Export OF changeset functions Fix documentation for adp1653 DT ARM: psci: Fix indentation in DT bindings of/platform: export of_default_bus_match_table of/unittest: Show broken behaviour in the platform bus of: fix declaration of of_io_request_and_map of/address: replace printk(KERN_ERR ...) with pr_err(...) of/irq: optimize device node matching loop in of_irq_init() dt-bindings: tda998x: Document the required 'port' node. net/macb: bindings doc: Merge cdns-emac to macb dt-bindings: Misc fix for the ATH79 DDR controllers dt-bindings: Misc fix for the ATH79 MISC interrupt controllers Documentation: dt: Add bindings for Secure-only devices dt-bindings: ARM: add arm,cortex-a72 compatible string ASoC: Atmel: ClassD: add GCK's parent clock in DT binding DT: add Olimex to vendor prefixes Documentation: fsl-quadspi: Add fsl,ls1021-qspi compatible string Documentation/devicetree: document OCTEON USB bindings usb: misc: usb3503: Describe better how to bind clock to the hub dt-bindings: Consolidate SRAM bindings from all vendors ... commit 570540d50710ed192e98e2f7f74578c9486b6b05 Author: Thomas Gleixner Date: Wed Jan 13 14:07:25 2016 +0100 genirq: Validate action before dereferencing it in handle_irq_event_percpu() commit 71f64340fc0e changed the handling of irq_desc->action from CPU 0 CPU 1 free_irq() lock(desc) lock(desc) handle_edge_irq() if (desc->action) { handle_irq_event() action = desc->action unlock(desc) desc->action = NULL handle_irq_event_percpu(desc, action) action->xxx to CPU 0 CPU 1 free_irq() lock(desc) lock(desc) handle_edge_irq() if (desc->action) { handle_irq_event() unlock(desc) desc->action = NULL handle_irq_event_percpu(desc, action) action = desc->action action->xxx So if free_irq manages to set the action to NULL between the unlock and before the readout, we happily dereference a null pointer. We could simply revert 71f64340fc0e, but we want to preserve the better code generation. A simple solution is to change the action loop from a do {} while to a while {} loop. This is safe because we either see a valid desc->action or NULL. If the action is about to be removed it is still valid as free_irq() is blocked on synchronize_irq(). CPU 0 CPU 1 free_irq() lock(desc) lock(desc) handle_edge_irq() handle_irq_event(desc) set(INPROGRESS) unlock(desc) handle_irq_event_percpu(desc) action = desc->action desc->action = NULL while (action) { action->xxx ... action = action->next; sychronize_irq() while(INPROGRESS); lock(desc) clr(INPROGRESS) free(action) That's basically the same mechanism as we have for shared interrupts. action->next can become NULL while handle_irq_event_percpu() runs. Either it sees the action or NULL. It does not matter, because action itself cannot go away before the interrupt in progress flag has been cleared. Fixes: commit 71f64340fc0e "genirq: Remove the second parameter from handle_irq_event_percpu()" Reported-by: zyjzyj2000@gmail.com Signed-off-by: Thomas Gleixner Cc: Huang Shijie Cc: Jiang Liu Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1601131224190.3575@nanos kernel/irq/handle.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cf8d7e3850ee44dc2f0a69405d731af62528a948 Merge: 5c43019 9fb4116 Author: Linus Torvalds Date: Thu Jan 14 10:53:15 2016 -0800 Merge tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support: - Add support for s2mps15; sec-core - Add support for Lewisburg; lpc_ich - Add support for cs47l24 and wm1831; arizona New Functionality: - Allow user to select syscon register width; syscon Fix-ups: - Lots of Checkpatch fixes - Rename -pmic/-regulator; s2mps11 - Build driver components into a single module; wm8994-* - Better handing of IRQ during suspend/resume; as3722 - Constify things; da903x - Remove unused code; ab8500-core - Improve error handing; qcom_rpm - Simplify code: wm831x-otp, sta2x11-mfd - Improve locking; cros_ec_spi - Fix incorrect DT binding filename reference; arizona, palmas, snps-dwapb-gpio, wm8994 Bug Fixes: - Fix broken SYSFS 'show ID' call; wm831x-otp - Protect reads from non-existent registers; qcom-spmi-pmic - Repair build warnings; as3722 - Fix IRQ request ordering; arizona-irq - Ensure return value is boolean; ucb1x00-core, tps65010, tc6393xb, htc-egpio, dm355evm_msp, asic3" * tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (58 commits) mfd: davinci_voicecodec: Remove pointless 'out of memory' error message mfd: da9052-irq: Fix trivial 'space before comma' error mfd: da9052-i2c: Fix tabbing/whitespace issue mfd: da903x: Fix white space and split string issues mfd: cs5535-mfd: Add missing line spacing and make local array static mfd: cros_ec_spi: Repair comparison ordering issue mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue. mfd: asic3: Fix a plethora of Checkpatch errors and warnings mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings mfd: arizona-i2c: Add blank line formatting after declaration mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead mfd: adp5520: Some trivial 'no space before tab' fixes mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting mfd: ab8500-core: Fix many warnings reported by Checkpatch mfd: ab2100-otp: Remove pointless 'out of memory' error message mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch mfd: aat2870-core: Remove unnecessary 'out of memory' message mfd: 88pm860x-core: Fix commenting and declaration spacing ... commit 5c43019f25977fb6119dff471d592321ed0d2333 Merge: c25949d 265b604 Author: Linus Torvalds Date: Thu Jan 14 10:45:11 2016 -0800 Merge tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "I have mostly fixes in the power-supply tree for the 4.5 kernel. I should mention, that the top-most commit has not been in next, but it's a fix changing only a single register offset. Summary: - uncouple CONFIG_POWER_RESET from CONFIG_POWER_SUPPLY - misc fixes" * tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: bq27xxx_battery: Fix bq27541 AveragePower register address power: test_power: correctly handle empty writes power: generic-adc-battery: use to_delayed_work power: isp1704_charger: Fix isp1704_write() definition power: bq27xxx: fix register numbers of bq27500 power: bq27xxx: fix reading for bq27000 and bq27010 power: Fix unmet dependency on POWER_SUPPLY by POWER_RESET by uncoupling them power: bq27xxx_battery: Reorganize I2C into a module power: bq27xxx: don't fill system log by missing battery power: max8903_charger: set IRQF_ONESHOT if no primary handler is specified power/reset: at91-reset: add missing of_node_put power: ds2782_battery: constify ds278x_battery_ops structure power: bq2415x_charger: Delete unnecessary checks before the function call "of_node_put" commit efaea94aaf0decd55b15aa7068d4d516a352e56e Author: Pablo Neira Ayuso Date: Wed Jan 13 17:34:38 2016 +0100 netfilter: nft_ct: keep counters away from CONFIG_NF_CONNTRACK_LABELS This is accidental, they don't depend on the label infrastructure. Fixes: 48f66c905a97 ("netfilter: nft_ct: add byte/packet counter support") Reported-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso Acked-by: Florian Westphal net/netfilter/nft_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c25949d4cc22449414fe73bc930bdf650078e877 Merge: b14bf63 525e1ab Author: Linus Torvalds Date: Thu Jan 14 10:40:16 2016 -0800 Merge tag 'hsi-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: "Misc fixes" * tag 'hsi-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: omap_ssi_port: fix handling of_get_named_gpio result HSI: omap_ssi: fix handling ida_simple_get result HSI: Remove struct hsi_client private fields from kernel-doc commit b14bf630be972aceb0c8981f9794e612cbb141f7 Merge: 7fdec82 60d613d Author: Linus Torvalds Date: Thu Jan 14 10:34:33 2016 -0800 Merge tag 'backlight-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: Fix-ups: - Take heed of GPIO default-on requests; gpio_backlight - Enable DT probing; tps65217_bl Bug Fixes: - Free resources in error path; pwm_bl - Fix uninitialised variable warning; adp8860_bl, adp8870_bl - Protect unconditional DT look-ups from non-DT platforms; pwm_bl - Fix backlight flicker; pwm_bl * tag 'backlight-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: pwm_bl: Free PWM requested by legacy API on error path backlight: adp8860: Fix another uninitialized variable use backlight: gpio-backlight: Use default-on on GPIO request backlight: pwm_bl: Fix broken PWM backlight for non-dt platforms backlight: tps65217_bl: Add MODULE_DEVICE_TABLE backlight: pwm_bl: Avoid backlight flicker when probed from DT backlight: adp88x0: Fix uninitialized variable use commit 525fd5a94e1be0776fa652df5c687697db508c91 Author: Dmitry V. Levin Date: Sun Dec 27 02:13:27 2015 +0300 sparc64: fix incorrect sign extension in sys_sparc64_personality The value returned by sys_personality has type "long int". It is saved to a variable of type "int", which is not a problem yet because the type of task_struct->pesonality is "unsigned int". The problem is the sign extension from "int" to "long int" that happens on return from sys_sparc64_personality. For example, a userspace call personality((unsigned) -EINVAL) will result to any subsequent personality call, including absolutely harmless read-only personality(0xffffffff) call, failing with errno set to EINVAL. Signed-off-by: Dmitry V. Levin Cc: Signed-off-by: David S. Miller arch/sparc/kernel/sys_sparc_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83f1bfd6f57c422da70d1e296df1becc35c868be Merge: 7683355 64bebef 2cf8383 5d9374c 6cf2e31 5f008c9 73e7d63 b71b557 7775fb9 0bbfe28 Author: Jiri Kosina Date: Thu Jan 14 16:11:06 2016 +0100 Merge branches 'for-4.4/upstream-fixes', 'for-4.5/async-suspend', 'for-4.5/container-of-cleanups', 'for-4.5/core', 'for-4.5/i2c-hid', 'for-4.5/logitech', 'for-4.5/multitouch', 'for-4.5/sony', 'for-4.5/upstream' and 'for-4.5/wacom' into for-linus commit b7522056ec1a62a5f3246627e12ef48e6274c21c Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Jan 13 18:39:58 2016 +0300 ftrace: Remove unused nr_trampolines var It's not needed & not used since introducing old_hash: commit fef5aeeee9e371 ("ftrace: Replace tramp_hash with old_*_hash to save space"). Link: http://lkml.kernel.org/r/1452699598-27610-1-git-send-email-0x7f454c46@gmail.com Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Steven Rostedt include/linux/ftrace.h | 1 - 1 file changed, 1 deletion(-) commit 7717c6be699975f6733d278b13b7c4295d73caf6 Author: Steven Rostedt (Red Hat) Date: Wed Jan 13 15:48:54 2016 -0500 tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs() While cleaning the stacktrace code I unintentially changed the skip depth of trace_buffer_unlock_commit_regs() from 0 to 6. kprobes uses this function, and with skipping 6 call backs, it can easily produce no stack. Here's how I tested it: # echo 'p:ext4_sync_fs ext4_sync_fs ' > /sys/kernel/debug/tracing/kprobe_events # echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable # cat /sys/kernel/debug/trace sync-2394 [005] 502.457060: ext4_sync_fs: (ffffffff81317650) sync-2394 [005] 502.457063: kernel_stack: sync-2394 [005] 502.457086: ext4_sync_fs: (ffffffff81317650) sync-2394 [005] 502.457087: kernel_stack: sync-2394 [005] 502.457091: ext4_sync_fs: (ffffffff81317650) After putting back the skip stack to zero, we have: sync-2270 [000] 748.052693: ext4_sync_fs: (ffffffff81317650) sync-2270 [000] 748.052695: kernel_stack: => iterate_supers (ffffffff8126412e) => sys_sync (ffffffff8129c4b6) => entry_SYSCALL_64_fastpath (ffffffff8181f0b2) sync-2270 [000] 748.053017: ext4_sync_fs: (ffffffff81317650) sync-2270 [000] 748.053019: kernel_stack: => iterate_supers (ffffffff8126412e) => sys_sync (ffffffff8129c4b6) => entry_SYSCALL_64_fastpath (ffffffff8181f0b2) sync-2270 [000] 748.053381: ext4_sync_fs: (ffffffff81317650) sync-2270 [000] 748.053383: kernel_stack: => iterate_supers (ffffffff8126412e) => sys_sync (ffffffff8129c4b6) => entry_SYSCALL_64_fastpath (ffffffff8181f0b2) Cc: stable@vger.kernel.org # v4.4+ Fixes: 73dddbb57bb0 "tracing: Only create stacktrace option when STACKTRACE is configured" Reported-by: Brendan Gregg Tested-by: Brendan Gregg Signed-off-by: Steven Rostedt kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af368027a49a751d6ff4ee9e3f9961f35bb4fede Author: Takashi Iwai Date: Wed Jan 13 17:48:01 2016 +0100 ALSA: timer: Fix race among timer ioctls ALSA timer ioctls have an open race and this may lead to a use-after-free of timer instance object. A simplistic fix is to make each ioctl exclusive. We have already tread_sem for controlling the tread, and extend this as a global mutex to be applied to each ioctl. The downside is, of course, the worse concurrency. But these ioctls aren't to be parallel accessible, in anyway, so it should be fine to serialize there. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit 238d1c6041ebcb5ce7c075b696f6cc9962991e94 Author: Mans Rullgard Date: Sat Jan 9 12:45:11 2016 +0000 mmc: atmel: get rid of struct mci_dma_data As struct mci_dma_data is now only used by AVR32, it is nothing but pointless indirection. Replace it with struct dw_dma_slave in the AVR32 platform code and with a void pointer elsewhere. Signed-off-by: Mans Rullgard Acked-by: Hans-Christian Noren Egtvedt Acked-by: Ludovic Desroches Acked-by: Ulf Hansson arch/avr32/mach-at32ap/at32ap700x.c | 21 ++++++++++----------- drivers/mmc/host/atmel-mci.c | 1 - include/linux/atmel-mci.h | 2 +- include/linux/platform_data/mmc-atmel-mci.h | 22 ---------------------- 4 files changed, 11 insertions(+), 35 deletions(-) commit 74843787158e9dff249f0528e7d4806102cc2c26 Author: Mans Rullgard Date: Sat Jan 9 12:45:10 2016 +0000 mmc: atmel-mci: restore dma on AVR32 Commit ecb89f2f5f3e7 ("mmc: atmel-mci: remove compat for non DT board when requesting dma chan") broke dma on AVR32 and any other boards not using DT. This restores a fallback mechanism for such cases. Signed-off-by: Mans Rullgard Acked-by: Hans-Christian Noren Egtvedt Acked-by: Ludovic Desroches Acked-by: Ulf Hansson arch/avr32/mach-at32ap/at32ap700x.c | 16 ++++++++++++++++ drivers/mmc/host/atmel-mci.c | 17 +++++++++++++++++ include/linux/atmel-mci.h | 2 ++ 3 files changed, 35 insertions(+) commit da629cf111a2b9a182d1b43f03f2cb0d3f258af4 Author: Helmut Schaa Date: Tue Jan 5 17:42:13 2016 +0100 mac80211: Don't buffer non-bufferable MMPDUs Non-bufferable MMPDUs are sent out to STAs even while in PS mode (for example probe responses). Applying filtered frame handling for these doesn't seem to make much sense and will only create more air utilization when the STA wakes up. Hence, apply filtered frame handling only for bufferable MMPDUs. Discovered while testing an old VOIP phone that started probing for APs while in PS mode. The mac80211/ath9k AP where the STA is associated would reply with a probe response but the phone sometimes moved to a new channel already and couldn't ack the probe response anymore. In that case mac80211 applied filtered frame handling for the un-acked probe response. Signed-off-by: Helmut Schaa Signed-off-by: Johannes Berg net/mac80211/status.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2bc533bd9dcf48eaf4af6fb89a338734a9e8f76e Author: Eliad Peller Date: Tue Jan 5 16:28:06 2016 +0200 mac80211: handle sched_scan_stopped vs. hw restart race On hw restart, mac80211 might try to reconfigure already stopped sched scan, if ieee80211_sched_scan_stopped_work() wasn't scheduled yet. This in turn will keep the device driver with scheduled scan configured, while both mac80211 and cfg80211 will clear their sched scan state once the work is scheduled. Fix it by ignoring ieee80211_sched_scan_stopped() calls while in hw restart, and flush the work before starting the reconfiguration. Signed-off-by: Eliad Peller Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/main.c | 1 + net/mac80211/scan.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 1a57081add2529fb4d8d11e7385990e7e550d30b Author: Emmanuel Grumbach Date: Sun Dec 20 13:50:00 2015 +0200 mac80211: fix PS-Poll handling My commit below broken PS-Poll handling. In case the driver has no frames buffered, driver_release_tids will be 0, but calling find_highest_prio_tid() with 0 as a parameter is not a good idea: fls(0) - 1 = -1. This bug caused mac80211 to think that frames were buffered in the driver which in turn was confused because mac80211 was asking to release frames that were not reported to exist. On iwlwifi, this led to the WARNING below: WARNING: CPU: 0 PID: 11230 at drivers/net/wireless/intel/iwlwifi/mvm/sta.c:1733 iwl_mvm_sta_modify_sleep_tx_count+0x2af/0x320 [iwlmvm]() ffffffffc0627c60 ffff8800069b7648 ffffffff81888913 0000000000000000 0000000000000000 ffff8800069b7688 ffffffff81089d6a ffff8800069b7678 0000000000000001 ffff88003b35abf0 ffff88000698b128 ffff8800069b76d4 Call Trace: [] dump_stack+0x4c/0x65 [] warn_slowpath_common+0x8a/0xc0 [] warn_slowpath_null+0x1a/0x20 [] iwl_mvm_sta_modify_sleep_tx_count+0x2af/0x320 [iwlmvm] [] iwl_mvm_mac_release_buffered_frames+0x31/0x40 [iwlmvm] [] ieee80211_sta_ps_deliver_response+0x6e6/0xd80 [mac80211] [] ieee80211_sta_ps_deliver_poll_response+0x26/0x30 [mac80211] [] ieee80211_rx_handlers+0xa83/0x2900 [mac80211] [] ieee80211_prepare_and_rx_handle+0x1ed/0xa70 [mac80211] [] ? sta_info_get_bss+0x5/0x4a0 [mac80211] [] ieee80211_rx_napi+0x586/0xcd0 [mac80211] [] iwl_mvm_rx_rx_mpdu+0x59e/0xc60 [iwlmvm] Fixes: 0ead2510f8ce ("mac80211: allow the driver to send EOSP when needed") Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 354210f8046cc801d6001f10c5c32967932b09a2 Author: Bob Copeland Date: Sat Dec 19 09:59:37 2015 -0500 Revert "mac80211_hwsim: support any address in userspace" This reverts commit cd37a90b2a417e5882414e19954eeed174aa4d29. Different userspace programs interpreted HWSIM_ATTR_ADDR_TRANSMITTER and HWSIM_ATTR_ADDR_RECEIVER differently: some expected it to be an unchanging hardware address that is tied to the radio despite which address is configured on the interface, while others expected to be a copy of the address in the frame (the configured address). The intent of the original authors is unclear. The latter interpretation doesn't really work properly with multiple vifs and broadcast frames. Also, as the TA is already in the frame, userspace programs can actually support configured addresses in the former interpretation by mapping between them and the supplied HWSIM_ATTR_ADDR_TRANSMITTER. So, in the interest of API stability, revert to the previous mode of operation and going forward use the former interpretation. Signed-off-by: Bob Copeland Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b9f628fcc673ba582cc7a17c4fd9be01133e61bd Author: Eliad Peller Date: Wed Dec 16 15:45:45 2015 +0200 mac80211: clear local->sched_scan_req properly on reconfig On reconfig, in case of sched_scan_req->n_scan_plans > 1, local->sched_scan_req was never cleared, although cfg80211_sched_scan_stopped_rtnl() was called, resulting in local->sched_scan_req holding a stale and preventing further scheduled scan requests. Clear it explicitly in this case. Fixes: 42a7e82c6792 ("mac80211: Do not restart scheduled scan if multiple scan plans are set") Signed-off-by: Eliad Peller Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 470f4d613b51806e15e055428234a04a99f076fc Author: Eliad Peller Date: Mon Dec 14 16:26:57 2015 +0200 mac80211: avoid ROC during hw restart Defer ROC requests during hw restart, as the driver might not be fully configured in this stage (e.g. channel contexts were not added yet) Signed-off-by: Eliad Peller Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/main.c | 5 +++++ net/mac80211/offchannel.c | 4 ++++ net/mac80211/util.c | 11 +++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) commit c3826807bbb3de693208da4ecb9c9602de16c616 Author: Johannes Berg Date: Fri Dec 11 17:35:50 2015 +0100 regulatory: fix world regulatory domain data The rule definitions here aren't really valid, they would be rejected if it came from userspace due to the bandwidth specified being bigger than the rule's width. This is fairly much inconsequential since the other rules around them do enable the bandwidth, but express that better using the NL80211_RRF_AUTO_BW flag. Signed-off-by: Johannes Berg net/wireless/reg.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 94c4fd641e1bc438092f0214bb5ec77ea73b13cf Author: Dave Young Date: Sun Nov 15 15:31:05 2015 +0800 wireless: change cfg80211 regulatory domain info as debug messages cfg80211 module prints a lot of messages like below. Actually printing once is acceptable but sometimes it will print again and again, it looks very annoying. It is better to change these detail messages to debugging only. cfg80211: World regulatory domain updated: cfg80211: DFS Master region: unset cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A) cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A) cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s) cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s) cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A) cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A) The changes in this patch is to replace pr_info with pr_debug in function print_rd_rules and print_regdomain_info Signed-off-by: Dave Young [change some pr_err() statements to at least keep the alpha2] Signed-off-by: Johannes Berg net/wireless/reg.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit e6a8a3aaaac832f47092df93f46298251b136fc9 Author: Johannes Berg Date: Tue Dec 8 23:46:33 2015 +0100 mac80211: fix remain-on-channel cancellation Ilan's previous commit 1b894521e60c ("mac80211: handle HW ROC expired properly") neglected to take into account that hw_begun was now always set in the software implementation as well as the offloaded case. Fix hw_begun to only apply to the offloaded case to make the check in Ilan's commit safe and correct. Reported-by: Jouni Malinen Signed-off-by: Johannes Berg net/mac80211/offchannel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e9db45578706e216d9bb0fb5f459b137da54be63 Author: Johannes Berg Date: Tue Dec 8 13:16:41 2015 +0100 mac80211: recalculate SW ROC only when needed The current (new) code recalculates the new work timeout for software remain-on-channel whenever any item started. In two of the callers of ieee80211_handle_roc_started(), this is completely pointless since they're for hardware and will skip the recalculation entirely; it's necessary only in the case of having just added a new item to the list, as in the last remaining case the recalculation had just been done. This last case, however, is also problematic - if one of the items on the list actually expires during the recalc the list iteration outside becomes corrupted and crashes. Fix this by moving the recalculation to the only place where it's required. Signed-off-by: Johannes Berg net/mac80211/offchannel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d50f42384dbfcf5143de614710e132dc06cd2439 Author: Arnd Bergmann Date: Wed Jan 13 22:25:41 2016 +0100 mmc: tmio_mmc_dma: don't print invalid DMA cookie The tmio_mmc_start_dma_{rx,tx} function functions contain debug code that prints the dma cookie among other things. However, in case we fall back to PIO mode for some reason, the cookie variable is never initialized, and gcc warns about this: In file included from ../include/linux/printk.h:277:0, from ../include/linux/kernel.h:13, from ../include/linux/list.h:8, from ../include/linux/kobject.h:20, from ../include/linux/device.h:17, from ../drivers/mmc/host/tmio_mmc_dma.c:13: ../drivers/mmc/host/tmio_mmc_dma.c: In function 'tmio_mmc_start_dma': ../include/linux/dynamic_debug.h:86:3: warning: 'cookie' may be used uninitialized in this function [-Wmaybe-uninitialized] __dynamic_dev_dbg(&descriptor, dev, fmt, \ ^ ../drivers/mmc/host/tmio_mmc_dma.c:128:15: note: 'cookie' was declared here dma_cookie_t cookie; This modifies the dev_dbg() statements so we only print the cookie when we are already in the DMA path. Signed-off-by: Arnd Bergmann Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_dma.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit e10c321977091f163eceedec0650e0ef4b3cf4bb Author: Carlo Caione Date: Wed Jan 13 09:36:55 2016 +0100 mmc: core: Enable tuning according to the actual timing While in sdhci_execute_tuning() the choice whether or not to enable the tuning is done on the actual timing, in the mmc_sdio_init_uhs_card() the check is done on the capability of the card. This difference is causing some issues with some SDIO cards in DDR50 mode where the CDM19 is wrongly issued. With this patch we modify the check in both mmc_(sd|sdio)_init_uhs_card() functions to take the proper decision only according to the actual timing specification. Cc: stable@vger.kernel.org Signed-off-by: Carlo Caione Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 8 ++++---- drivers/mmc/core/sdio.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit f5abc767bffb953438074d5cc4723e6da8dbcf71 Author: Linus Walleij Date: Mon Jan 4 02:22:08 2016 +0100 mmc: mmci: support 8bit mode on the Nomadik The Nomadik variant supports 8bit mode for (e)MMC cards. Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/host/mmci.c | 1 + 1 file changed, 1 insertion(+) commit 0bcb7efdff63564e80fe84dd36a9fbdfbf6697a4 Author: Linus Walleij Date: Mon Jan 4 02:21:55 2016 +0100 mmc: mmci: fix an ages old detection error commit 4956e10903fd ("ARM: 6244/1: mmci: add variant data and default MCICLOCK support") added variant data for ARM, U300 and Ux500 variants. The Nomadik NHK8815/8820 variant was erroneously labeled as a U300 variant, and when the proper Nomadik variant was later introduced in commit 34fd421349ff ("ARM: 7378/1: mmci: add support for the Nomadik MMCI variant") this was not fixes. Let's say this fixes the latter commit as there was no proper Nomadik support until then. Cc: stable@vger.kernel.org Fixes: 34fd421349ff ("ARM: 7378/1: mmci: add support for the Nomadik...") Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91815d8aa7e2f45d30e51caa297061ad893628d9 Author: Libin Yang Date: Thu Jan 14 14:09:00 2016 +0800 ALSA: hda - add codec support for Kabylake display audio codec This patch adds codec ID (0x8086280b) for Kabylake display codec and apply the hsw fix-ups to Kabylake. Signed-off-by: Libin Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7030a7e9321166eef44c811fe4af4d460360d424 Author: Dan Carpenter Date: Wed Jan 13 15:39:40 2016 +0300 x86/cpu/amd: Remove an unneeded condition in srat_detect_node() Originally we calculated ht_nodeid as "ht_nodeid = apicid - boot_cpu_id;" so presumably it could be negative. But after commit: 01aaea1afbcd ('x86: introduce initial apicid') we use c->initial_apicid which is an unsigned short and thus always >= 0. It causes a static checker warning to test for impossible conditions so let's remove it. Signed-off-by: Dan Carpenter Cc: Andy Lutomirski Cc: Aravind Gopalakrishnan Cc: Borislav Petkov Cc: Hector Marco-Gisbert Cc: Huang Rui Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yinghai Lu Link: http://lkml.kernel.org/r/20160113123940.GE19993@mwanda Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/amd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9fb41166076b197318807a5f1829911450b43218 Author: Lee Jones Date: Wed Oct 28 16:54:29 2015 +0000 mfd: davinci_voicecodec: Remove pointless 'out of memory' error message WARNING: Possible unnecessary 'out of memory' message + if (!davinci_vc) { + dev_dbg(&pdev->dev, total: 0 errors, 1 warnings, 154 lines checked Signed-off-by: Lee Jones drivers/mfd/davinci_voicecodec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 997eea4691c5475765566dbaeb38bb60700c54bb Author: Lee Jones Date: Wed Oct 28 16:53:04 2015 +0000 mfd: da9052-irq: Fix trivial 'space before comma' error ERROR: space prohibited before that ',' (ctx:WxW) + da9052_free_irq(da9052, DA9052_IRQ_ADC_EOM , da9052); total: 1 errors, 0 warnings, 290 lines checked Cc: Support Opensource Signed-off-by: Lee Jones drivers/mfd/da9052-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b7b2ac1529429c22aacc7cbd6704d6c267e8a9c Author: Lee Jones Date: Wed Oct 28 16:51:11 2015 +0000 mfd: da9052-i2c: Fix tabbing/whitespace issue WARNING: suspect code indent for conditional statements (8, 24) + if (!i2c_safe_reg(reg)) + return regmap_read(da9052->regmap, total: 0 errors, 1 warnings, 226 lines checked Cc: Support Opensource Signed-off-by: Lee Jones drivers/mfd/da9052-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b2775787f2ef0959518206b9df0e6a83ef11496 Author: Lee Jones Date: Wed Oct 28 16:47:00 2015 +0000 mfd: da903x: Fix white space and split string issues While we're at it, let's also match the MODULE_LICENSE with the header. WARNING: please, no space before tabs + * ^IMike Rapoport $ WARNING: please, no space before tabs + * ^IEric Miao $ WARNING: quoted string split across lines +MODULE_AUTHOR("Eric Miao " + "Mike Rapoport "); total: 0 errors, 3 warnings, 574 lines checked Cc: Support Opensource Signed-off-by: Lee Jones drivers/mfd/da903x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 740c19895917d9a25abea65fb20fb13af764ac09 Author: Lee Jones Date: Wed Oct 28 16:44:58 2015 +0000 mfd: cs5535-mfd: Add missing line spacing and make local array static WARNING: Missing a blank line after declarations + struct resource *res; + res = platform_get_resource(pdev, IORESOURCE_IO, 0); WARNING: char * array declaration might be better as static const + const char *acpi_clones[] = { "olpc-xo1-pm-acpi", "olpc-xo1-sci-acpi" }; total: 0 errors, 2 warnings, 192 lines checked Signed-off-by: Lee Jones drivers/mfd/cs5535-mfd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8827a642a4635d5e696037f9213cb1d015d4cec3 Author: Lee Jones Date: Wed Oct 28 16:42:45 2015 +0000 mfd: cros_ec_spi: Repair comparison ordering issue WARNING: Comparisons should place the constant on the right side of the test + BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size); WARNING: Comparisons should place the constant on the right side of the test + BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size); total: 0 errors, 2 warnings, 731 lines checked Signed-off-by: Lee Jones drivers/mfd/cros_ec_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2756db6c63662a179d1a59be2c0fa260dbd1b2fc Author: Lee Jones Date: Wed Oct 28 16:02:48 2015 +0000 mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue. ERROR: code indent should use tabs where possible + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$ WARNING: please, no space before tabs + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$ WARNING: please, no spaces at the start of a line + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$ total: 1 errors, 2 warnings, 366 lines checked Signed-off-by: Lee Jones drivers/mfd/cros_ec_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d43c4290ff5c37e5ba8702301ad51786a37979ed Author: Lee Jones Date: Wed Oct 28 14:11:23 2015 +0000 mfd: asic3: Fix a plethora of Checkpatch errors and warnings ERROR: Macros with complex values should be enclosed in parentheses +#define INIT_CDEX(_name, _rate) \ + [ASIC3_CLOCK_##_name] = { \ + .cdex = CLOCK_CDEX_##_name, \ + .rate = _rate, \ + } WARNING: line over 80 characters + ASIC3_GPIO_INT_STATUS); WARNING: void function return statements are not generally useful + return; +} WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: line over 80 characters + asic->tmio_cnf = ioremap((ASIC3_SD_CONFIG_BASE >> asic->bus_shift) + WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then p r_err(... to printk(KERN_ERR ... + printk(KERN_ERR "kzalloc failed\n"); WARNING: Possible unnecessary 'out of memory' message + if (asic == NULL) { + printk(KERN_ERR "kzalloc failed\n"); WARNING: Missing a blank line after declarations + int retval = 0; + retval = platform_driver_probe(&asic3_device_driver, asic3_probe); total: 1 errors, 13 warnings, 1081 lines checked Signed-off-by: Lee Jones drivers/mfd/asic3.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit ae487ae2ac56ebe02e12fed38047ed41e682ad9e Author: Lee Jones Date: Wed Oct 28 13:57:44 2015 +0000 mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings WARNING: Possible unnecessary 'out of memory' message + if (!pdata) { + dev_err(&client->dev, "Failed to allocate pdata\n"); WARNING: Possible unnecessary 'out of memory' message + if (!as3711) { + dev_err(&client->dev, "Memory allocation failed\n"); WARNING: line over 80 characters + dev_err(&client->dev, "regmap initialization failed: %d\n", ret); WARNING: line over 80 characters + /* We can reuse as3711_subdevs[], it will be copied in mfd_add_devices() */ WARNING: line over 80 characters + as3711_subdevs[AS3711_REGULATOR].platform_data = &pdata->regulator; WARNING: line over 80 characters + as3711_subdevs[AS3711_REGULATOR].pdata_size = sizeof(pdata->regulator); WARNING: line over 80 characters + as3711_subdevs[AS3711_BACKLIGHT].platform_data = &pdata->backlight; WARNING: line over 80 characters + as3711_subdevs[AS3711_BACKLIGHT].pdata_size = sizeof(pdata->backlight); total: 0 errors, 8 warnings, 236 lines checked Signed-off-by: Lee Jones drivers/mfd/as3711.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 9f6e872a7003ea6b7f38bcfd5ee6c1e05b18672b Author: Lee Jones Date: Wed Oct 28 13:54:07 2015 +0000 mfd: arizona-i2c: Add blank line formatting after declaration WARNING: Missing a blank line after declarations + struct arizona *arizona = dev_get_drvdata(&i2c->dev); + arizona_dev_exit(arizona); total: 0 errors, 1 warnings, 120 lines checked Cc: patches@opensource.wolfsonmicro.com Acked-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-i2c.c | 2 ++ 1 file changed, 2 insertions(+) commit b79a980f7161ca09855cc641091d1afe4ef08dd8 Author: Lee Jones Date: Wed Oct 28 12:42:30 2015 +0000 mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(5); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); total: 0 errors, 4 warnings, 1407 lines checked Cc: patches@opensource.wolfsonmicro.com Acked-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3103d44e4509f6da8b667d185b45eb0ae0beaa85 Author: Lee Jones Date: Wed Oct 28 12:21:12 2015 +0000 mfd: adp5520: Some trivial 'no space before tab' fixes WARNING: please, no space before tabs + * ^IMike Rapoport $ WARNING: please, no space before tabs + * ^IEric Miao $ WARNING: please, no space before tabs +^I.id_table ^I= adp5520_id,$ total: 0 errors, 3 warnings, 365 lines checked Cc: Michael Hennerich Signed-off-by: Lee Jones drivers/mfd/adp5520.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 63b4fd7502790b16257396cc0270fa698bdec2b1 Author: Lee Jones Date: Wed Oct 28 11:11:05 2015 +0000 mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues WARNING: char * array declaration might be better as static const + static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"}; WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... + printk(KERN_INFO WARNING: quoted string split across lines + "Charger \"%s\" is connected with known battery." + " Rebooting.\n", WARNING: quoted string split across lines + "unable to set sysClkReq%dRfClkBuf: " + "%d\n", j + 1, ret); total: 0 errors, 4 warnings, 199 lines checked Cc: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ab8500-sysctrl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit df36442cfe2689e1b26c9633c17a28a9fe4e91ec Author: Lee Jones Date: Wed Oct 28 10:32:10 2015 +0000 mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error WARNING: line over 80 characters +#define ADC_CH_IBAT_MIN (-6000) /* mA range measured by ADC for ib t*/ WARNING: line over 80 characters +#define ADC_CH_IBAT_MIN_V (-60) /* mV range measured by ADC for ibat*/ WARNING: suspect code indent for conditional statements (16, 20) + if (!strcmp(name, dev_name(gpadc->dev))) + return gpadc; WARNING: suspect code indent for conditional statements (0, 16) +if (ad_value < 0) { + dev_err(gpadc->dev, "GPADC raw value failed ch: %d\n", WARNING: quoted string split across lines + dev_err(gpadc->dev, "GPADC to voltage conversion failed ch:" + " %d AD: 0x%x\n", channel, ad_value); WARNING: Missing a blank line after declarations + int raw_data; + raw_data = ab8500_gpadc_double_read_raw(gpadc, channel, WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(10); ERROR: else should follow close brace '}' + } + else WARNING: line over 80 characters + delay_max = 10000; /* large range to optimise sleep mode */ WARNING: line over 80 characters + gpadc->cal_data[ADC_INPUT_IBAT].gain = V_gain * V2A_gain; WARNING: line over 80 characters + gpadc = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_gpadc), GFP_KERNEL); WARNING: Possible unnecessary 'out of memory' message + if (!gpadc) { + dev_err(&pdev->dev, "Error: No memory\n"); WARNING: space prohibited before semicolon + return ; WARNING: void function return statements are not generally useful + return ; +} WARNING: quoted string split across lines +MODULE_AUTHOR("Arun R Murthy, Daniel Willerud, Johan Palsson," + "M'boumba Cedric Madianga"); total: 1 errors, 14 warnings, 1089 lines checked Cc: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ab8500-gpadc.c | 145 +++++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 72 deletions(-) commit de6a76933317a4dee9b33e1989623cf31098e2ff Author: Lee Jones Date: Wed Oct 28 09:27:32 2015 +0000 mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting WARNING: Block comments use a trailing */ on a separate line + * not be accessed from here */ WARNING: Block comments use a trailing */ on a separate line + * not be accessed from here */ WARNING: Block comments use a trailing */ on a separate line + * the output is wanted in any case */ WARNING: Consecutive strings are generally better as a single string + " addr=0x%08X, mask=0x%X, shift=%d" "value=0x%X\n", total: 0 errors, 4 warnings, 3331 lines checked Cc: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ab8500-debugfs.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 500e69a1011d66897a08e000d92bcfd39372337e Author: Lee Jones Date: Wed Oct 28 09:15:02 2015 +0000 mfd: ab8500-core: Fix many warnings reported by Checkpatch WARNING: Block comments use a trailing */ on a separate line + * */ WARNING: Block comments use a trailing */ on a separate line + * bank on higher 8 bits and reg in lower */ WARNING: Block comments use a trailing */ on a separate line + * bank on higher 8 bits and reg in lower */ WARNING: suspect code indent for conditional statements (8, 24) + if (unlikely(*offset == 17)) + *offset = 24; WARNING: suspect code indent for conditional statements (8, 24) + if (unlikely(*offset == 16)) + *offset = 25; WARNING: suspect code indent for conditional statements (8, 24) + if ((i == 3) && (*offset >= 24)) + *offset += 2; WARNING: ENOSYS means 'invalid syscall nr' and nothing else + return -ENOSYS; WARNING: static const char * array should probably be static const char * const + static const char *switch_off_status[] = { WARNING: static const char * array should probably be static const char * const + static const char *turn_on_status[] = { total: 0 errors, 9 warnings, 1867 lines checked Cc: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ab8500-core.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 845b76f891999f98b7acb439768c9d50959d29e1 Author: Lee Jones Date: Wed Oct 28 09:08:22 2015 +0000 mfd: ab2100-otp: Remove pointless 'out of memory' error message WARNING: Possible unnecessary 'out of memory' message + if (!otp) { + dev_err(&pdev->dev, "could not allocate AB3100 OTP device\n"); total: 0 errors, 1 warnings, 250 lines checked Cc: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ab3100-otp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 15544cab2880c6990704ff91c0f11c5ccc3aafad Author: Lee Jones Date: Tue Oct 27 16:19:31 2015 +0000 mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch WARNING: Missing a blank line after declarations + struct ab3100 *ab3100 = dev_get_drvdata(dev->parent); + if (!ab3100->startup_events_read) WARNING: Possible unnecessary 'out of memory' message + if (!ab3100) { + dev_err(&client->dev, "could not allocate AB3100 device\n"); WARNING: else is not generally useful after a break or return + break; + } else { total: 0 errors, 3 warnings, 996 lines checked Cc: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ab3100-core.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 4374b20c6c4fa8533e932567be9cd8872286da95 Author: Lee Jones Date: Tue Oct 27 16:14:06 2015 +0000 mfd: aat2870-core: Remove unnecessary 'out of memory' message WARNING: Possible unnecessary 'out of memory' message + if (!aat2870) { + dev_err(&client->dev, total: 0 errors, 1 warnings, 524 lines checked Signed-off-by: Lee Jones drivers/mfd/aat2870-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f90dff44641dedea02b1549a9dd5c00bae9230da Author: Lee Jones Date: Tue Oct 27 16:12:21 2015 +0000 mfd: 88pm860x-core: Fix commenting and declaration spacing Checkpatch output: WARNING: Block comments use a trailing */ on a separate line + * - turn off */ WARNING: Missing a blank line after declarations + int ret; + ret = i2c_add_driver(&pm860x_driver); total: 0 errors, 2 warnings, 1283 lines checked Signed-off-by: Lee Jones drivers/mfd/88pm860x-core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0b81995148f80f4fa0ce19e66d2e66abe82f456a Author: Charles Keepax Date: Fri Jan 8 11:29:42 2016 +0000 mfd: arizona: Add device tree binding documentation for new clock driver Specify the device tree binding for the input clocks to Arizona devices. Signed-off-by: Charles Keepax Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/arizona.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 1b5420e1f587b05de49b36472fefad5949042d00 Author: Geliang Tang Date: Mon Dec 28 23:00:14 2015 +0800 mfd: Use to_i2c_client() instead of open-coding it Signed-off-by: Geliang Tang Signed-off-by: Lee Jones drivers/mfd/88pm80x.c | 4 ++-- drivers/mfd/88pm860x-core.c | 4 ++-- drivers/mfd/max14577.c | 4 ++-- drivers/mfd/max77686.c | 4 ++-- drivers/mfd/max77693.c | 4 ++-- drivers/mfd/max77843.c | 4 ++-- drivers/mfd/max8925-i2c.c | 4 ++-- drivers/mfd/max8997.c | 8 ++++---- drivers/mfd/max8998.c | 8 ++++---- drivers/mfd/sec-core.c | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) commit 5d1d147f040253cbdccc6dbdd14a002403cf8490 Author: Krzysztof Kozlowski Date: Fri Dec 4 10:10:05 2015 +0900 dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings The mfd/s2mpa01.txt duplicates some of the information about bindings with old mfd/s2mps11.txt. Now common part exists entirely in mfd/samsung,sec-core.txt so: - add company prefix to file name (regulator/samsung,s2mpa01.txt), - remove duplicated information, - reorganize the contents to match style of regulator/samsung,s2mps11.txt. Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Brown Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/s2mpa01.txt | 90 ---------------------- .../devicetree/bindings/mfd/samsung,sec-core.txt | 4 +- .../bindings/regulator/samsung,s2mpa01.txt | 79 +++++++++++++++++++ 3 files changed, 82 insertions(+), 91 deletions(-) commit 27383ca93b58dfb552ff51fc55fe48006d3c7d99 Author: Krzysztof Kozlowski Date: Fri Dec 4 10:10:04 2015 +0900 dt-bindings: regulator/mfd: Reorganize S5M8767 bindings The regulator/s5m8767-regulator.txt duplicates some of the information about bindings with old mfd/s2mps11.txt. Now common part exists entirely in mfd/samsung,sec-core.txt so: - add company prefix to file name (regulator/samsung,s5m8767.txt), - remove duplicated information, - reorganize the contents to match style of regulator/samsung,s2mps11.txt. Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Brown Acked-by: Rob Herring Signed-off-by: Lee Jones .../devicetree/bindings/mfd/samsung,sec-core.txt | 4 +- .../bindings/regulator/s5m8767-regulator.txt | 163 --------------------- .../bindings/regulator/samsung,s5m8767.txt | 145 ++++++++++++++++++ MAINTAINERS | 2 +- 4 files changed, 149 insertions(+), 165 deletions(-) commit a13c7c51fd91deb7a8a8535ff14fed283f1a2187 Author: Krzysztof Kozlowski Date: Fri Dec 4 10:10:03 2015 +0900 dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Bindings for Samsung S2M and S5M family PMICs are in mess. They are spread over different files and subdirectories in a non-consistent way. The devices and respective drivers for them share a lot in common so everything could be organized in a more readable way. Reorganize the S2MPS11/13/14/15 Device Tree bindings to match the drivers for this family of devices: - move mfd/s2mps11.txt to mfd/samsung,sec-core.txt for the main MFD driver (common for entire family), - split clock block to clock/samsung,s2mps11.txt, - split regulator block to regulator/samsung,s2mps11.txt. Signed-off-by: Krzysztof Kozlowski Acked-by: Michael Turquette Acked-by: Rob Herring Acked-by: Mark Brown Signed-off-by: Lee Jones .../devicetree/bindings/clock/samsung,s2mps11.txt | 49 +++++++ Documentation/devicetree/bindings/mfd/s2mps11.txt | 153 --------------------- .../devicetree/bindings/mfd/samsung,sec-core.txt | 84 +++++++++++ .../bindings/regulator/samsung,s2mps11.txt | 102 ++++++++++++++ MAINTAINERS | 4 +- 5 files changed, 238 insertions(+), 154 deletions(-) commit f8e3a514bf98a94255bd1534a21aebaf795b7a13 Author: Linus Walleij Date: Tue Dec 22 15:47:05 2015 +0100 mfd: asic3: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Paul Parsons Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/asic3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fe0b486729e1ae837cf0afd1005d3c10a78f9807 Author: Linus Walleij Date: Tue Dec 22 15:47:31 2015 +0100 mfd: dm355evm_mps: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/dm355evm_msp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7d623669648d2a8d7e81671294c26e480ddcc79 Author: Linus Walleij Date: Tue Dec 22 15:47:39 2015 +0100 mfd: htc-egpio: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Philipp Zabel Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/htc-egpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d5f72b85a8876088be77cee3a7bdee4c0259085 Author: Linus Walleij Date: Tue Dec 22 15:47:55 2015 +0100 mfd: tc6393xb: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Dmitry Baryshkov Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/tc6393xb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf3de47f1af3dab8fb8c3a3bd21ada7de614b7de Author: Linus Walleij Date: Tue Dec 22 15:48:13 2015 +0100 mfd: tps65010: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. This also start to propagate the negative error code from the smbus call if there is one, as the last commit of this series will make the gpiolib core deal with that properly. Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/tps65010.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2895b2cad6e7a95104cf396e5330054453382ae1 Author: Mans Rullgard Date: Mon Jan 11 13:04:29 2016 +0000 dmaengine: dw: fix cyclic transfer callbacks Cyclic transfer callbacks rely on block completion interrupts which were disabled in commit ff7b05f29fd4 ("dmaengine/dw_dmac: Don't handle block interrupts"). This re-enables block interrupts so the cyclic callbacks can work. Other transfer types are not affected as they set the INT_EN bit only on the last block. Fixes: ff7b05f29fd4 ("dmaengine/dw_dmac: Don't handle block interrupts") Signed-off-by: Mans Rullgard Reviewed-by: Viresh Kumar Signed-off-by: Vinod Koul Cc: drivers/dma/dw/core.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit df3bb8a0e619d501cd13334c3e0586edcdcbc716 Author: Mans Rullgard Date: Mon Jan 11 13:04:28 2016 +0000 dmaengine: dw: fix cyclic transfer setup Commit 61e183f83069 ("dmaengine/dw_dmac: Reconfigure interrupt and chan_cfg register on resume") moved some channel initialisation to a new function which must be called before starting a transfer. This updates dw_dma_cyclic_start() to use dwc_dostart() like the other modes, thus ensuring dwc_initialize() gets called and removing some code duplication. Fixes: 61e183f83069 ("dmaengine/dw_dmac: Reconfigure interrupt and chan_cfg register on resume") Signed-off-by: Mans Rullgard Reviewed-by: Viresh Kumar Signed-off-by: Vinod Koul Cc: drivers/dma/dw/core.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit 7fdec82af6a9e190e53d07a1463d2a9ac49a8750 Merge: f9a03ae dde7f55 Author: Linus Torvalds Date: Wed Jan 13 21:15:18 2016 -0800 Merge tag 'xfs-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull xfs updates from Dave Chinner: "There's not a lot in this - the main addition is the CRC validation of the entire region of the log that the will be recovered, along with several log recovery fixes. Most of the rest is small bug fixes and cleanups. I have three bug fixes still pending, all that address recently fixed regressions that I will send to next week after they've had some time in for-next. Summary: - extensive CRC validation during log recovery - several log recovery bug fixes - Various DAX support fixes - AGFL size calculation fix - various cleanups in preparation for new functionality - project quota ENOSPC notification via netlink - tracing and debug improvements" * tag 'xfs-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (26 commits) xfs: handle dquot buffer readahead in log recovery correctly xfs: inode recovery readahead can race with inode buffer creation xfs: eliminate committed arg from xfs_bmap_finish xfs: bmapbt checking on debug kernels too expensive xfs: add tracepoints to readpage calls xfs: debug mode log record crc error injection xfs: detect and trim torn writes during log recovery xfs: fix recursive splice read locking with DAX xfs: Don't use reserved blocks for data blocks with DAX XFS: Use a signed return type for suffix_kstrtoint() libxfs: refactor short btree block verification libxfs: pack the agfl header structure so XFS_AGFL_SIZE is correct libxfs: use a convenience variable instead of open-coding the fork xfs: fix log ticket type printing libxfs: make xfs_alloc_fix_freelist non-static xfs: make xfs_buf_ioend_async() static xfs: send warning of project quota to userspace via netlink xfs: get mp from bma->ip in xfs_bmap code xfs: print name of verifier if it fails libxfs: Optimize the loop for xfs_bitmap_empty ... commit f9a03ae123c92c1f45cd2ca88d0f6edd787be78c Merge: 1289ace 447135a Author: Linus Torvalds Date: Wed Jan 13 21:01:44 2016 -0800 Merge tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "This series adds two ioctls to control cached data and fragmented files. Most of the rest fixes missing error cases and bugs that we have not covered so far. Summary: Enhancements: - support an ioctl to execute online file defragmentation - support an ioctl to flush cached data - speed up shrinking of extent_cache entries - handle broken superblock - refector dirty inode management infra - revisit f2fs_map_blocks to handle more cases - reduce global lock coverage - add detecting user's idle time Major bug fixes: - fix data race condition on cached nat entries - fix error cases of volatile and atomic writes" * tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (87 commits) f2fs: should unset atomic flag after successful commit f2fs: fix wrong memory condition check f2fs: monitor the number of background checkpoint f2fs: detect idle time depending on user behavior f2fs: introduce time and interval facility f2fs: skip releasing nodes in chindless extent tree f2fs: use atomic type for node count in extent tree f2fs: recognize encrypted data in f2fs_fiemap f2fs: clean up f2fs_balance_fs f2fs: remove redundant calls f2fs: avoid unnecessary f2fs_balance_fs calls f2fs: check the page status filled from disk f2fs: introduce __get_node_page to reuse common code f2fs: check node id earily when readaheading node page f2fs: read isize while holding i_mutex in fiemap Revert "f2fs: check the node block address of newly allocated nid" f2fs: cover more area with nat_tree_lock f2fs: introduce max_file_blocks in sbi f2fs crypto: check CONFIG_F2FS_FS_XATTR for encrypted symlink f2fs: introduce zombie list for fast shrinking extent trees ... commit b4d7f161feb3015d6306e1d35b565c888ff70c9d Author: Greg Kurz Date: Wed Jan 13 18:28:17 2016 +0100 KVM: PPC: Fix ONE_REG AltiVec support The get and set operations got exchanged by mistake when moving the code from book3s.c to powerpc.c. Fixes: 3840edc8033ad5b86deee309c1c321ca54257452 Cc: stable@vger.kernel.org # 3.18+ Signed-off-by: Greg Kurz Signed-off-by: Paul Mackerras arch/powerpc/kvm/powerpc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 1289ace5b4f70f1e68ce785735b82c7e483de863 Merge: d080827 abaee09 Author: Linus Torvalds Date: Wed Jan 13 19:37:36 2016 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull first round of SCSI updates from James Bottomley: "This includes driver updates from the usual suspects (bfa, arcmsr, scsi_dh_alua, lpfc, storvsc, cxlflash). The major change is the addition of the hisi_sas driver, which is an ARM platform device for SAS. The other change of note is an enormous style transformation to the atp870u driver (which is our worst written SCSI driver)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (169 commits) cxlflash: Enable device id for future IBM CXL adapter cxlflash: Resolve oops in wait_port_offline cxlflash: Fix to resolve cmd leak after host reset cxlflash: Removed driver date print cxlflash: Fix to avoid virtual LUN failover failure cxlflash: Fix to escalate LINK_RESET also on port 1 storvsc: Tighten up the interrupt path storvsc: Refactor the code in storvsc_channel_init() storvsc: Properly support Fibre Channel devices storvsc: Fix a bug in the layout of the hv_fc_wwn_packet mvsas: Add SGPIO support to Marvell 94xx mpt3sas: A correction in unmap_resources hpsa: Add box and bay information for enclosure devices hpsa: Change SAS transport devices to bus 0. hpsa: fix path_info_show cciss: print max outstanding commands as a hex value scsi_debug: Increase the reported optimal transfer length lpfc: Update version to 11.0.0.10 for upstream patch set lpfc: Use kzalloc instead of kmalloc lpfc: Delete unnecessary checks before the function call "mempool_destroy" ... commit d080827f850ba4df5b955d5ca8c8c0fc92fe18c0 Merge: cbd88cd 8b63b6b Author: Linus Torvalds Date: Wed Jan 13 19:15:14 2016 -0800 Merge tag 'libnvdimm-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "The bulk of this has appeared in -next and independently received a build success notification from the kbuild robot. The 'for-4.5/block- dax' topic branch was rebased over the weekend to drop the "block device end-of-life" rework that Al would like to see re-implemented with a notifier, and to address bug reports against the badblocks integration. There is pending feedback against "libnvdimm: Add a poison list and export badblocks" received last week. Linda identified some localized fixups that we will handle incrementally. Summary: - Media error handling: The 'badblocks' implementation that originated in md-raid is up-levelled to a generic capability of a block device. This initial implementation is limited to being consulted in the pmem block-i/o path. Later, 'badblocks' will be consulted when creating dax mappings. - Raw block device dax: For virtualization and other cases that want large contiguous mappings of persistent memory, add the capability to dax-mmap a block device directly. - Increased /dev/mem restrictions: Add an option to treat all io-memory as IORESOURCE_EXCLUSIVE, i.e. disable /dev/mem access while a driver is actively using an address range. This behavior is controlled via the new CONFIG_IO_STRICT_DEVMEM option and can be overridden by the existing "iomem=relaxed" kernel command line option. - Miscellaneous fixes include a 'pfn'-device huge page alignment fix, block device shutdown crash fix, and other small libnvdimm fixes" * tag 'libnvdimm-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (32 commits) block: kill disk_{check|set|clear|alloc}_badblocks libnvdimm, pmem: nvdimm_read_bytes() badblocks support pmem, dax: disable dax in the presence of bad blocks pmem: fail io-requests to known bad blocks libnvdimm: convert to statically allocated badblocks libnvdimm: don't fail init for full badblocks list block, badblocks: introduce devm_init_badblocks block: clarify badblocks lifetime badblocks: rename badblocks_free to badblocks_exit libnvdimm, pmem: move definition of nvdimm_namespace_add_poison to nd.h libnvdimm: Add a poison list and export badblocks nfit_test: Enable DSMs for all test NFITs md: convert to use the generic badblocks code block: Add badblock management for gendisks badblocks: Add core badblock management code block: fix del_gendisk() vs blkdev_ioctl crash block: enable dax for raw block devices block: introduce bdev_file_inode() restrict /dev/mem to idle io memory ranges arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug ... commit 3da834e3e5a4a5d26882955298b55a9ed37a00bc Author: Vladimir Zapolskiy Date: Thu Jan 7 05:07:07 2016 +0200 clk: remove duplicated COMMON_CLK_NXP record from clk/Kconfig Presumably the second COMMON_CLK_NXP config option in drivers/clk/Kconfig appeared after a merge conflict resolution, remove the wrong record of two. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Michael Turquette drivers/clk/Kconfig | 5 ----- 1 file changed, 5 deletions(-) commit acb2cfdb316ddc3fac8183c0f71edd1680713b10 Merge: 607259e b197367 Author: James Morris Date: Thu Jan 14 12:11:58 2016 +1100 Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/selinux into next commit 1501efadc524a0c99494b576923091589a52d2a4 Author: Dan Williams Date: Wed Jan 13 16:00:07 2016 -0800 md/raid: only permit hot-add of compatible integrity profiles It is not safe for an integrity profile to be changed while i/o is in-flight in the queue. Prevent adding new disks or otherwise online spares to an array if the device has an incompatible integrity profile. The original change to the blk_integrity_unregister implementation in md, commmit c7bfced9a671 "md: suspend i/o during runtime blk_integrity_unregister" introduced an immediate hang regression. This policy of disallowing changes the integrity profile once one has been established is shared with DM. Here is an abbreviated log from a test run that: 1/ Creates a degraded raid1 with an integrity-enabled device (pmem0s) [ 59.076127] 2/ Tries to add an integrity-disabled device (pmem1m) [ 90.489209] 3/ Retries with an integrity-enabled device (pmem1s) [ 205.671277] [ 59.076127] md/raid1:md0: active with 1 out of 2 mirrors [ 59.078302] md: data integrity enabled on md0 [..] [ 90.489209] md0: incompatible integrity profile for pmem1m [..] [ 205.671277] md: super_written gets error=-5 [ 205.677386] md/raid1:md0: Disk failure on pmem1m, disabling device. [ 205.677386] md/raid1:md0: Operation continuing on 1 devices. [ 205.683037] RAID1 conf printout: [ 205.684699] --- wd:1 rd:2 [ 205.685972] disk 0, wo:0, o:1, dev:pmem0s [ 205.687562] disk 1, wo:1, o:1, dev:pmem1s [ 205.691717] md: recovery of RAID array md0 Fixes: c7bfced9a671 ("md: suspend i/o during runtime blk_integrity_unregister") Cc: Cc: Mike Snitzer Reported-by: NeilBrown Signed-off-by: Dan Williams Signed-off-by: NeilBrown drivers/md/md.c | 28 ++++++++++++++++------------ drivers/md/md.h | 2 +- drivers/md/multipath.c | 6 +++--- drivers/md/raid1.c | 6 +++--- drivers/md/raid10.c | 6 +++--- 5 files changed, 26 insertions(+), 22 deletions(-) commit 7aafc405ce5b706195e5df26305a0241b01d8d06 Author: NeilBrown Date: Fri Jan 8 14:11:02 2016 +1100 Remove myself as MD Maintainer, and add to Credits. Signed-off-by: NeilBrown CREDITS | 1 + MAINTAINERS | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 16a43f6a65002ba9a5b063764b4ad5d288a1c15e Author: Shaohua Li Date: Wed Jan 6 14:37:15 2016 -0800 raid5-cache: handle journal hotadd in quiesce Handle journal hotadd in quiesce to avoid creating duplicated threads. Signed-off-by: Shaohua Li Signed-off-by: NeilBrown drivers/md/raid5-cache.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 87d4d91616e4db9b8293ba9d9e5a2f3f0d0c8aa6 Author: Shaohua Li Date: Wed Jan 6 14:37:14 2016 -0800 MD: add journal with array suspended Hot add journal disk in recovery thread context brings a lot of trouble as IO could be running. Unlike spare disk hot add, adding journal disk with array suspended makes more sense and implmentation is much easier. Signed-off-by: Shaohua Li Signed-off-by: NeilBrown drivers/md/md.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a62ab49eb502a07814f9942770893118c6281223 Author: Shaohua Li Date: Wed Jan 6 14:37:13 2016 -0800 md: set MD_HAS_JOURNAL in correct places Set MD_HAS_JOURNAL when a array is loaded or journal is initialized. This is to avoid the flags set too early in journal disk hotadd. Signed-off-by: Shaohua Li Signed-off-by: NeilBrown drivers/md/md.c | 9 +++++---- drivers/md/raid5-cache.c | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) commit 60539fa3a1e3caf458a943b1a14154e3fa44d0d1 Merge: abaee09 a290dd5 Author: James Bottomley Date: Wed Jan 13 16:29:30 2016 -0800 Merge remote-tracking branch 'mkp-scsi/4.5/scsi-queue' into misc commit 265b60497a57da56a4be7d5c72983ae89dc0765e Author: Liu Xiang Date: Sat Jan 9 22:10:39 2016 +0800 power: bq27xxx_battery: Fix bq27541 AveragePower register address Currently in bq27541 driver, the average power register address is incorrectly set to 0x76, which would result in an error: bq27xxx-battery 2-0055: error reading average power register 10: -11 According to the bq27541 datasheet, fix this problem by setting the average power register address to 0x24. Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") Signed-off-by: Liu Xiang Acked-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/bq27xxx_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fda3bec12d0979aae3f02ee645913d66fbc8a26e Author: CQ Tang Date: Wed Jan 13 21:15:03 2016 +0000 iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG This is a 32-bit register. Apparently harmless on real hardware, but causing justified warnings in simulation. Signed-off-by: CQ Tang Signed-off-by: David Woodhouse Cc: stable@vger.kernel.org drivers/iommu/dmar.c | 2 +- drivers/iommu/intel_irq_remapping.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit be6bfc29bc759670fb3a2519325c4ab2edf259c9 Merge: a61674b 44451d4 Author: Michael Ellerman Date: Thu Jan 14 09:55:01 2016 +1100 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Freescale updates from Scott: "Highlights include moving QE code out of arch/powerpc (to be shared with arm), device tree updates, and minor fixes." commit 183223770ae8625df8966ed15811d1b3ee8720aa Author: Gavin Shan Date: Thu Nov 5 00:12:49 2015 +1100 drivers/of: Export OF changeset functions The PowerNV PCI hotplug driver is going to use the OF changeset to manage the changed device sub-tree. This exports those OF changeset functions for that. Signed-off-by: Gavin Shan Acked-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Rob Herring drivers/of/dynamic.c | 65 ++++++++++++++++++++++++++++++++++--------------- drivers/of/of_private.h | 2 ++ drivers/of/overlay.c | 8 +++--- drivers/of/unittest.c | 4 --- 4 files changed, 52 insertions(+), 27 deletions(-) commit e93d12ae3be91d18b2a46deebb90a3f516db3d3c Author: Arnd Bergmann Date: Wed Jan 13 23:04:08 2016 +0100 null_blk: use sector_div instead of do_div Dividing a sector_t number should be done using sector_div rather than do_div to optimize the 32-bit sector_t case, and with the latest do_div optimizations, we now get a compile-time warning for this: arch/arm/include/asm/div64.h:32:95: note: expected 'uint64_t * {aka long long unsigned int *}' but argument is of type 'sector_t * {aka long unsigned int *}' drivers/block/null_blk.c:521:81: warning: comparison of distinct pointer types lacks a cast This changes the newly added code to use sector_div. It is a simplified version of the original patch, as Linus Torvalds pointed out that we should not be using an expensive division function in the first place. This version was suggested by Matias Bjorling. Signed-off-by: Arnd Bergmann Cc: Matias Bjorling Fixes: b2b7e00148a2 ("null_blk: register as a LightNVM device") Signed-off-by: Jens Axboe drivers/block/null_blk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e9c5e7402dad6f4f04c2430db6f283512bcd4392 Author: Dave Airlie Date: Thu Jan 14 08:07:55 2016 +1000 drm/amdgpu: add missing irq.h include this fixes the build on arm. Signed-off-by: Dave Airlie drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 + 1 file changed, 1 insertion(+) commit d6f7a18c8adcb77ca9bfff2d7fb152ac685b73fd Merge: 06249e6 c74d8eb Author: Dave Airlie Date: Thu Jan 14 07:59:21 2016 +1000 Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next This 2nd pull request includes the following, - add configurable plane support and relevant cleanups. - fixup kernel panic issue at drm releasing. - remove unnecessary codes. This has been delayed to resolve a critical issue - which incurrs a kernel panic when driver is released - and review it. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: fix kernel panic issue at drm releasing drm/exynos: crtc: do not wait for the scanout completion drm/exynos: mixer: properly update all planes on the same vblank event drm/exynos: crtc: rework atomic_{begin,flush} drm/exynos: mixer: unify a check for video-processor window drm/exynos: mixer: also allow ARGB1555 and ARGB4444 drm/exynos: mixer: refactor layer setup drm/exynos: mixer: remove all static blending setup drm/exynos: mixer: set window priority based on zpos drm/exynos: make zpos property configurable drm/exynos: rename zpos to index commit 06249e69324209b41ba017f476764eba347b1127 Merge: c7753e9 c33246d Author: Dave Airlie Date: Thu Jan 14 07:58:06 2016 +1000 Merge branch 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux into drm-next etnaviv fixes. * 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux: drm/etnaviv: fix workaround for GC500 drm/etnaviv: unlock on error in etnaviv_gem_get_iova() commit c7753e905b510ed07efa2a2ade5a2cec0c394d66 Merge: a50e2bf 84e0540 Author: Dave Airlie Date: Thu Jan 14 07:57:24 2016 +1000 Merge branch 'drm-rockchip-next-2016-01-06' of https://github.com/markyzq/kernel-drm-rockchip into drm-next new rockchip bits. * 'drm-rockchip-next-2016-01-06' of https://github.com/markyzq/kernel-drm-rockchip: drm: rockchip: Support Synopsys DW MIPI DSI Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver drm/rockchip: return a true clock rate to adjusted_mode commit a50e2bf5a0f674d62b69f51f6935a30e82bd015c Author: Thomas Hellstrom Date: Fri Jan 8 20:29:40 2016 +0100 drm/vmwgfx: Fix a width / pitch mismatch on framebuffer updates When the framebuffer is a vmwgfx dma buffer and a proxy surface is created, the vmw_kms_update_proxy() function requires that the proxy surface width and the framebuffer pitch are compatible, otherwise display corruption occurs as seen in gnome-shell/native with software 3D. Since the framebuffer pitch is determined by user-space, allocate a proxy surface the width of which is based on the framebuffer pitch rather than on the framebuffer width. Cc: Reported-by: Raphael Hertzog Tested-by: Mati Aharoni Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Signed-off-by: Dave Airlie drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fb89ac5102ae2875d685c847e6b5dbc141622d43 Author: Thomas Hellstrom Date: Fri Jan 8 20:29:39 2016 +0100 drm/vmwgfx: Fix an incorrect lock check With CONFIG_SMP=n and CONFIG_DEBUG_SPINLOCK=y the vmwgfx kernel module would unconditionally throw a bug when checking for a held spinlock in the command buffer code. Fix this by using a lockdep check. Cc: Reported-and-tested-by: Tetsuo Handa Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Signed-off-by: Dave Airlie drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38b1751913c0244056205e456afc07d01fb2ee58 Author: Arnd Bergmann Date: Wed Jan 13 14:48:13 2016 +0100 drm: nouveau: fix nouveau_debugfs_init prototype The new debugfs initialization code fails to build when CONFIG_DEBUG_FS is disabled: In file included from /git/arm-soc/drivers/gpu/drm/nouveau/nouveau_drm.c:57:0: drivers/gpu/drm/nouveau/nouveau_debugfs.h: In function 'nouveau_debugfs_init': drivers/gpu/drm/nouveau/nouveau_debugfs.h:37:29: error: parameter name omitted nouveau_debugfs_init(struct nouveau_drm *) This fixes the prototypes so we can build it again. Signed-off-by: Arnd Bergmann Fixes: b126a200e9db ("drm/nouveau/debugfs: we need a ctrl object for debugfs") Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nouveau_debugfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 25c80507dd9ed19a5eab9a847120865a17b198da Author: Karol Herbst Date: Tue Jan 12 22:52:14 2016 +0100 drm/nouveau/pci: fix check in nvkm_pcie_set_link v2: remove unneeded pci check Signed-off-by: Karol Herbst Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/subdev/pci/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cfd7775840cad7877b2b43e750105fa0933656b Merge: 8a0d560 d8e0cae Author: Dave Airlie Date: Thu Jan 14 07:56:07 2016 +1000 Merge branch 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-next A few more misc things for radeon and amdgpu for 4.5: - TTM fixes for imported buffers - amdgpu fixes to avoid -ENOMEM in CS ioctl - CZ UVD and VCE clock force options for debugging video issues - A couple of ACP prerequisites - Misc fixes * 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: validate duplicates first drm/amdgpu: move VM page tables to the LRU end on CS v2 drm/ttm: add ttm_bo_move_to_lru_tail function v2 drm/ttm: fix adding foreign BOs to the swap LRU drm/ttm: fix adding foreign BOs to the LRU during init v2 drm/radeon: use kobj_to_dev() drm/amdgpu: use kobj_to_dev() drm/amdgpu/cz: force vce clocks when sclks are forced drm/amdgpu/cz: force uvd clocks when sclks are forced drm/amdgpu/cz: add code to enable forcing VCE clocks drm/amdgpu/cz: add code to enable forcing UVD clocks drm/amdgpu: fix lost sync_to if scheduler is enabled. drm/amd/powerplay: fix static checker warning for return meaningless value. drm/amdgpu: add irq domain support drm/amdgpu/cgs: add an interface to access PCI resources commit cbd88cd4c07f9361914ab7fd7e21c9227986fe68 Merge: 928b3f1 c2ab728 Author: Linus Torvalds Date: Wed Jan 13 13:16:16 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: "Among the traditional bug fixes and cleanups are some improvements: - A tool to generated the facility lists, generating the bit fields by hand has been a source of bugs in the past - The spinlock loop is reordered to avoid bursts of hypervisor calls - Add support for the open-for-business interface to the service element - The get_cpu call is added to the vdso - A set of tracepoints is defined for the common I/O layer - The deprecated sclp_cpi module is removed - Update default configuration" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (56 commits) s390/sclp: fix possible control register corruption s390: fix normalization bug in exception table sorting s390/configs: update default configurations s390/vdso: optimize getcpu system call s390: drop smp_mb in vdso_init s390: rename struct _lowcore to struct lowcore s390/mem_detect: use unsigned longs s390/ptrace: get rid of long longs in psw_bits s390/sysinfo: add missing SYSIB 1.2.2 multithreading fields s390: get rid of CONFIG_SCHED_MC and CONFIG_SCHED_BOOK s390/Kconfig: remove pointless 64 bit dependencies s390/dasd: fix failfast for disconnected devices s390/con3270: testing return kzalloc retval s390/hmcdrv: constify hmcdrv_ftp_ops structs s390/cio: add NULL test s390/cio: Change I/O instructions from inline to normal functions s390/cio: Introduce common I/O layer tracepoints s390/cio: Consolidate inline assemblies and related data definitions s390/cio: Fix incorrect xsch opcode specification s390/cio: Remove unused inline assemblies ... commit e57e58bd390a6843db58560bf7b8341665d2e058 Author: David Woodhouse Date: Tue Jan 12 19:18:06 2016 +0000 iommu/vt-d: Fix mm refcounting to hold mm_count not mm_users Holding mm_users works OK for graphics, which was the first user of SVM with VT-d. However, it works less well for other devices, where we actually do a mmap() from the file descriptor to which the SVM PASID state is tied. In this case on process exit we end up with a recursive reference count: - The MM remains alive until the file is closed and the driver's release() call ends up unbinding the PASID. - The VMA corresponding to the mmap() remains intact until the MM is destroyed. - Thus the file isn't closed, even when exit_files() runs, because the VMA is still holding a reference to it. And the MM remains alive… To address this issue, we *stop* holding mm_users while the PASID is bound. We already hold mm_count by virtue of the MMU notifier, and that can be made to be sufficient. It means that for a period during process exit, the fun part of mmput() has happened and exit_mmap() has been called so the MM is basically defunct. But the PGD still exists and the PASID is still bound to it. During this period, we have to be very careful — exit_mmap() doesn't use mm->mmap_sem because it doesn't expect anyone else to be touching the MM (quite reasonably, since mm_users is zero). So we also need to fix the fault handler to just report failure if mm_users is already zero, and to temporarily bump mm_users while handling any faults. Additionally, exit_mmap() calls mmu_notifier_release() *before* it tears down the page tables, which is too early for us to flush the IOTLB for this PASID. And __mmu_notifier_release() removes every notifier from the list, so when exit_mmap() finally *does* tear down the mappings and clear the page tables, we don't get notified. So we work around this by clearing the PASID table entry in our MMU notifier release() callback. That way, the hardware *can't* get any pages back from the page tables before they get cleared. Hardware designers have confirmed that the resulting 'PASID not present' faults should be handled just as gracefully as 'page not present' faults, the important criterion being that they don't perturb the operation for any *other* PASID in the system. Signed-off-by: David Woodhouse Cc: stable@vger.kernel.org drivers/iommu/intel-svm.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit 928b3f12e5fea9d201bbc029d8d537ba7cc14fe7 Merge: 77a76b0 0f7f2f0 Author: Linus Torvalds Date: Wed Jan 13 12:49:04 2016 -0800 Merge tag 'please-pull-fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 build fixes from Tony Luck: "The ARM guys broke the ia64 build ... but gave me fixes, so it's all good now" * tag 'please-pull-fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: efi: include asm/early_ioremap.h not asm/efi.h to get early_memremap ia64: split off early_ioremap() declarations into asm/early_ioremap.h commit 701a0fd5231866db08cebcd502894699f49cb960 Author: wangweidong Date: Wed Jan 13 11:11:09 2016 +0800 hip04_eth: fix missing error handle for build_skb failed when build_skb failed, we should goto refill the buffer. Signed-off-by: Weidong Wang Acked-by: Ding Tainhong Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ee8413b01045c74340aa13ad5bdf905de32be736 Author: Takashi Iwai Date: Wed Jan 13 21:35:06 2016 +0100 ALSA: timer: Fix double unlink of active_list ALSA timer instance object has a couple of linked lists and they are unlinked unconditionally at snd_timer_stop(). Meanwhile snd_timer_interrupt() unlinks it, but it calls list_del() which leaves the element list itself unchanged. This ends up with unlinking twice, and it was caught by syzkaller fuzzer. The fix is to use list_del_init() variant properly there, too. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7fd9a4f3e8179bab31e4637236ebb0e0b7867c6 Author: Jens Axboe Date: Wed Jan 13 13:04:11 2016 -0700 lightnvm: ensure that nvm_dev_ops can be used without CONFIG_NVM null_blk defines an empty version of this ops structure if CONFIG_NVM isn't set, but it doesn't know the type. Move those bits out of the protection of CONFIG_NVM in the main lightnvm include. Signed-off-by: Jens Axboe include/linux/lightnvm.h | 121 +++++++++++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 57 deletions(-) commit 1adbfc435f0897101443975fdbd20e8817ad5fd9 Merge: e752991 bab7c6c Author: David S. Miller Date: Wed Jan 13 14:57:42 2016 -0500 Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== net: batman-adv 20160114 Included bugfixes: - avoid freeing batadv_hardif_neigh_node when still in use in other contexts - prevent lockdep splat in mcast_free during shutdown ==================== Signed-off-by: David S. Miller commit e752991a2e6a1dc33271a6299d5c1c8688f35f95 Merge: 3b780be 6e14441 Author: David S. Miller Date: Wed Jan 13 14:55:18 2016 -0500 Merge branch '3c59x-dma-fixes' Neil Horman says: ==================== 3c59x: Fix dma map/unmap imbalances recent enhancements to libdma revealed a few minor bugs in 3c59x, in which dma ranges were mapped as singles and unmaped as pages, or vice versa. These patches fix those up. Tested by myself with success ==================== Signed-off-by: David S. Miller commit 6e144419e4da11a9a4977c8d899d7247d94ca338 Author: Neil Horman Date: Wed Jan 13 12:43:54 2016 -0500 3c59x: fix another page map/single unmap imbalance libdma debug found another page map/unmap imbalance in 3c59x. Multi fragment frames are mapped such that the lead fragment was mapped as a single entry, while all other fragments were mapped as pages. However, on unmapping they were all unmapped as pages. Fix is pretty easy, just unmap the lead frag as a single entry, and bump the for loop initalization up by one so that all subsequent frags get unmapped as pages Signed-off-by: Neil Horman CC: "David S. Miller" CC: Steffen Klassert Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c59x.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7356f4e42490d91939521c70b04812d5a07bd0f2 Author: Neil Horman Date: Wed Jan 13 12:43:53 2016 -0500 3c59x: balance page maps and unmaps debug kernel noticed a screw up in 3c59x. skbs being mapped as page were being unmapped as singles. Easy fix. Tested by myself Signed-off-by: Neil Horman CC: Steffen Klassert Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c59x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77a76b04d2be1c45b8fd746b7ef754525029340c Merge: 50ae833 be0270e Author: Linus Torvalds Date: Wed Jan 13 11:46:37 2016 -0800 Merge tag 'media/v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull second batch of media updates from Mauro Carvalho Chehab: "This is the second part of the media patches. It contains the media controller next generation patches, with is the result of one year of discussions and development. It also contains patches to enable media controller support at the DVB subsystem. The goal is to improve the media controller to allow proper support for other types of Video4Linux devices (radio and TV ones) and to extend the media controller functionality to allow it to be used by other subsystems like DVB, ALSA and IIO. In order to use the new functionality, a new ioctl is needed (MEDIA_IOC_G_TOPOLOGY). As we're still discussing how to pack the struct fields of this ioctl in order to avoid compat32 issues, I decided to add a patch at the end of this series commenting out the new ioctl, in order to postpone the addition of the new ioctl to the next Kernel version (4.6). With that, no userspace visible changes should happen at the media controller API, as the existing ioctls are untouched. Yet, it helps DVB, ALSA and IIO developers to develop and test the patches adding media controller support there, as the core will contain all required internal changes to allow adding support for devices that belong to those subsystems" * tag 'media/v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (177 commits) [media] Postpone the addition of MEDIA_IOC_G_TOPOLOGY [media] mxl111sf: Add a tuner entity [media] dvbdev: create links on devices with multiple frontends [media] media-entitiy: add a function to create multiple links [media] dvb-usb-v2: postpone removal of media_device [media] dvbdev: Add RF connector if needed [media] dvbdev: remove two dead functions if !CONFIG_MEDIA_CONTROLLER_DVB [media] call media_device_init() before registering the V4L2 device [media] uapi/media.h: Use u32 for the number of graph objects [media] media-entity: don't sleep at media_device_register_entity() [media] media-entity: increase max number of PADs [media] media-entity.h: document the remaining functions [media] media-device.h: use just one u32 counter for object ID [media] media-entity.h fix documentation for several parameters [media] DocBook: document media_entity_graph_walk_cleanup() [media] move documentation to the header files [media] media: Move MEDIA_ENTITY_MAX_PADS from media-entity.h to media-entity.c [media] media: Remove pre-allocated entity enumeration bitmap [media] staging: v4l: davinci_vpbe: Use the new media graph walk interface [media] staging: v4l: omap4iss: Use the new media graph walk interface ... commit 50ae833e471fe1a1a906a0342bdaa690e69fcc19 Merge: ac53b2e cabeea9 Author: Linus Torvalds Date: Wed Jan 13 11:38:27 2016 -0800 Merge tag 'spi-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "A quiet release for SPI, not even many driver updates: - Add a dummy loopback driver for use in exercising framework features during development. - Move the test utilities to tools/ and add support for transferring data to and from a file instead of stdin and stdout to spidev_test. - Support for Mediatek MT2701 and Renesas AG5 deices" * tag 'spi-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (69 commits) spi: loopback: fix typo in MODULE_PARM_DESC spi: sun4i: Prevent chip-select from being activated twice before a transfer spi: loopback-test: spi_check_rx_ranges can get always done spi: loopback-test: rename method spi_test_fill_tx to spi_test_fill_pattern spi: loopback-test: write rx pattern also when running without tx_buf spi: fsl-espi: expose maximum transfer size limit spi: expose master transfer size limitation. spi: zynq: use to_platform_device() spi: cadence: use to_platform_device() spi: mediatek: Add spi support for mt2701 IC spi: mediatek: merge all identical compat to mtk_common_compat spi: mtk: Add bindings for mediatek MT2701 soc platform spi: mediatek: Prevent overflows in FIFO transfers spi: s3c64xx: Remove unused platform_device_id entries spi: use to_spi_device spi: dw: Use SPI_TMOD_TR rather than magic const 0 to set tmode spi: imx: defer spi initialization, if DMA engine is spi: imx: return error from dma channel request spi: imx: enable loopback only for ECSPI controller family spi: imx: fix loopback mode setup after controller reset ... commit ac53b2e053fffc74372da94e734b92f37e70d32c Merge: cf09112 9146cbd Author: Linus Torvalds Date: Wed Jan 13 11:25:54 2016 -0800 Merge tag 'for-linus-20160112' of git://git.infradead.org/linux-mtd Pull MTD updates from Brian Norris: "Generic MTD: - populate the MTD device 'of_node' field (and get a proper 'of_node' symlink in sysfs) This yielded some new helper functions, and changes across a variety of drivers - partitioning cleanups, to prepare for better device-tree based partitioning in the future Eliminate a lot of boilerplate for drivers that want to use OF-based partition parsing The DT bindings for this didn't settle yet, so most non-cleanup portions are deferred for a future release NAND: - embed a struct mtd_info inside struct nand_chip This is really long overdue; too many drivers have to do the same silly boilerplate to allocate and link up two "independent" structs, when in fact, everyone is assuming there is an exact 1:1 relationship between a NAND chips struct and its underlying MTD. This aids improved helpers and should make certain abstractions easier in the future. Also causes a lot of churn, helped along by some automated code transformations - add more core support for detecting (and "correcting") bitflips in erased pages; requires opt-in by drivers, but at least we kill a few bad implementations and hopefully stave off future ones - pxa3xx_nand: cleanups, a few fixes, and PM improvements - new JZ4780 NAND driver SPI NOR: - provide default erase function, for controllers that just want to send the SECTOR_ERASE command directly - fix some module auto-loading issues with device tree ("jedec,spi-nor") - error handling fixes - new Mediatek QSPI flash driver Other: - cfi: force valid geometry Kconfig (finally!) This one used to trip up randconfigs occasionally, since bots aren't deterred by big scary "advanced configuration" menus More? Probably. See the commit logs" * tag 'for-linus-20160112' of git://git.infradead.org/linux-mtd: (168 commits) mtd: jz4780_nand: replace if/else blocks with switch/case mtd: nand: jz4780: Update ecc correction error codes mtd: nandsim: use nand_get_controller_data() mtd: jz4780_nand: remove useless mtd->priv = chip assignment staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers mtd: nand: make use of nand_set/get_controller_data() helpers ARM: make use of nand_set/get_controller_data() helpers mtd: nand: add helpers to access ->priv mtd: nand: jz4780: driver for NAND devices on JZ4780 SoCs mtd: nand: jz4740: remove custom 'erased check' implementation mtd: nand: diskonchip: remove custom 'erased check' implementation mtd: nand: davinci: remove custom 'erased check' implementation mtd: nand: use nand_check_erased_ecc_chunk in default ECC read functions mtd: nand: return consistent error codes in ecc.correct() implementations doc: dt: mtd: new binding for jz4780-{nand,bch} mtd: cfi_cmdset_0001: fixing memory leak and handling failed kmalloc mtd: spi-nor: wait until lock/unlock operations are ready mtd: tests: consolidate kmalloc/memset 0 call to kzalloc jffs2: use to_delayed_work mtd: nand: assign reasonable default name for NAND drivers ... commit cf09112d160e6db21ff8427ce696f819b957423b Merge: 1c5ff2a bb0dceb Author: Linus Torvalds Date: Wed Jan 13 11:19:24 2016 -0800 Merge tag 'for-linus-4.5' of git://git.code.sf.net/p/openipmi/linux-ipmi Pull ipmi updates from Corey Minyard: "Some minor changes that have been in linux-next for a while" * tag 'for-linus-4.5' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: Remove unnecessary pci_disable_device. char: ipmi: Drop owner assignment from i2c_driver ipmi: constify some struct and char arrays commit 1c5ff2ab7bba6757e7663302c5905e6404de324a Merge: d6a3227 009f773 Author: Linus Torvalds Date: Wed Jan 13 11:14:05 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - new driver for eGalaxTouch serial touchscreen - new driver for TS-4800 touchscreen - an update for Goodix touchscreen driver - PS/2 mouse module was reworked to limit number of protocols we try on pass-through ports to speed up their detection time - wacom_w8001 touchscreen driver now reports pen and touch via separate instances of input devices - other driver changes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (42 commits) Input: elantech - mark protocols v2 and v3 as semi-mt Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE Input: gpio-keys - fix check for disabling unsupported keys Input: omap-keypad - remove dead check Input: ti_am335x_tsc - fix HWPEN interrupt handling Input: omap-keypad - set tasklet data earlier Input: rohm_bu21023 - fix handling of retrying firmware update Input: ALPS - report v3 pinnacle trackstick device only if is present Input: ALPS - detect trackstick presence for v7 protocol Input: pcap_ts - use to_delayed_work Input: bma150 - constify bma150_cfg structure Input: i8042 - add Fujitsu Lifebook U745 to the nomux list Input: egalax_ts_serial - fix potential NULL dereference on error Input: uinput - sanity check on ff_effects_max and EV_FF Input: uinput - rework ABS validation Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl Input: goodix - use "inverted_[xy]" flags instead of "rotated_screen" Input: goodix - add axis swapping and axis inversion support Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send Input: goodix - add power management support ... commit d6a322774cb7096ca683fc46ddc9482e02ee6133 Merge: 4c257ec 8b64843 Author: Linus Torvalds Date: Wed Jan 13 10:59:52 2016 -0800 Merge tag 'dmaengine-4.5-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This round we have few new features, new driver and updates to few drivers. The new features to dmaengine core are: - Synchronized transfer termination API to terminate the dmaengine transfers in synchronized and async fashion as required by users. We have its user now in ALSA dmaengine lib, img, at_xdma, axi_dmac drivers. - Universal API for channel request and start consolidation of request flows. It's user is ompa-dma driver. - Introduce reuse of descriptors and use in pxa_dma driver Add/Remove: - New STM32 DMA driver - Removal of unused R-Car HPB-DMAC driver Updates: - ti-dma-crossbar updates for supporting eDMA - tegra-apb pm updates - idma64 - mv_xor updates - ste_dma updates" * tag 'dmaengine-4.5-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (54 commits) dmaengine: mv_xor: add suspend/resume support dmaengine: mv_xor: de-duplicate mv_chan_set_mode*() dmaengine: mv_xor: remove mv_xor_chan->current_type field dmaengine: omap-dma: Add support for DMA filter mapping to slave devices dmaengine: edma: Add support for DMA filter mapping to slave devices dmaengine: core: Introduce new, universal API to request a channel dmaengine: core: Move and merge the code paths using private_candidate dmaengine: core: Skip mask matching when it is not provided to private_candidate dmaengine: mdc: Correct terminate_all handling dmaengine: edma: Add probe callback to edma_tptc_driver dmaengine: dw: fix potential memory leak in dw_dma_parse_dt() dmaengine: stm32-dma: Fix unchecked deference of chan->desc dmaengine: sh: Remove unused R-Car HPB-DMAC driver dmaengine: usb-dmac: Document SoC specific compatibility strings ste_dma40: Delete an unnecessary variable initialisation in d40_probe() ste_dma40: Delete another unnecessary check in d40_probe() ste_dma40: Delete an unnecessary check before the function call "kmem_cache_destroy" dmaengine: tegra-apb: Free interrupts before killing tasklets dmaengine: tegra-apb: Update driver to use GFP_NOWAIT dmaengine: tegra-apb: Only save channel state for those in use ... commit a9cf8284b45110a4d98aea180a89c857e53bf850 Author: Mike Frysinger Date: Sun Jan 10 20:14:11 2016 -0500 uapi: update install list after nvme.h rename Commit 9d99a8dda154 ("nvme: move hardware structures out of the uapi version of nvme.h") renamed nvme.h to nvme_ioctl.h, but the uapi list still refers to nvme.h. People trying to install the headers hit a failure as the header no longer exists. Cc: stable@vger.kernel.org Signed-off-by: Mike Frysinger Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe include/uapi/linux/Kbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f7f2f0c0fcbe5e2bcba707a628ebaedfe2be4b4 Author: Ard Biesheuvel Date: Tue Jan 12 14:22:46 2016 +0100 efi: include asm/early_ioremap.h not asm/efi.h to get early_memremap The code in efi.c uses early_memremap(), but relies on a transitive include rather than including asm/early_ioremap.h directly, since this header did not exist on ia64. Commit f7d924894265 ("arm64/efi: refactor EFI init and runtime code for reuse by 32-bit ARM") attempted to work around this by including asm/efi.h, which transitively includes asm/early_ioremap.h on most architectures. However, since asm/efi.h does not exist on ia64 either, this is not much of an improvement. Now that we have created an asm/early_ioremap.h for ia64, we can just include it directly. Reported-by: Guenter Roeck Signed-off-by: Ard Biesheuvel Signed-off-by: Tony Luck drivers/firmware/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 809267708557ed5575831282f719ca644698084b Author: Ard Biesheuvel Date: Tue Jan 12 14:22:45 2016 +0100 ia64: split off early_ioremap() declarations into asm/early_ioremap.h Unlike x86, arm64 and ARM, ia64 does not declare its implementations of early_ioremap/early_iounmap/early_memremap/early_memunmap in a header file called This complicates the use of these functions in generic code, since the header cannot be included directly, and we have to rely on transitive includes, which is fragile. So create a for ia64, and move the existing definitions into it. Signed-off-by: Ard Biesheuvel Signed-off-by: Tony Luck arch/ia64/include/asm/early_ioremap.h | 10 ++++++++++ arch/ia64/include/asm/io.h | 5 +---- 2 files changed, 11 insertions(+), 4 deletions(-) commit 4c257ec37bc365614933c7f0a7fe9b0688dfd1e7 Merge: 39272dd ed6dc53 Author: Linus Torvalds Date: Wed Jan 13 10:23:36 2016 -0800 Merge tag 'char-misc-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc updates from Greg KH: "Here's the big set of char/misc patches for 4.5-rc1. Nothing major, lots of different driver subsystem updates, full details in the shortlog. All of these have been in linux-next for a while" * tag 'char-misc-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (71 commits) mei: fix fasync return value on error parport: avoid assignment in if parport: remove unneeded space parport: change style of NULL comparison parport: remove unnecessary out of memory message parport: remove braces parport: quoted strings should not be split parport: code indent should use tabs parport: fix coding style parport: EXPORT_SYMBOL should follow function parport: remove trailing white space parport: fix a trivial typo coresight: Fix a typo in Kconfig coresight: checking for NULL string in coresight_name_match() Drivers: hv: vmbus: Treat Fibre Channel devices as performance critical Drivers: hv: utils: fix hvt_op_poll() return value on transport destroy Drivers: hv: vmbus: fix the building warning with hyperv-keyboard extcon: add Maxim MAX3355 driver Drivers: hv: ring_buffer: eliminate hv_ringbuffer_peek() Drivers: hv: remove code duplication between vmbus_recvpacket()/vmbus_recvpacket_raw() ... commit 39272dde8ffcfd1322209e05f3f8fa4d14f796de Merge: 67ad058 841e3ed Author: Linus Torvalds Date: Wed Jan 13 10:13:36 2016 -0800 Merge tag 'staging-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 4.5-rc1. Lots of cleanups and fixes here, not as many as some releases, but 800+ isn't that bad. Full details in the shortlog. All of these have been in linux-next for a while" * tag 'staging-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (843 commits) Revert "arm64: dts: Add dts files to enable ION on Hi6220 SoC." staging: gdm724x: constify tty_port_operations structs staging: gdm72xx: add userspace data struct staging: gdm72xx: Replace timeval with ktime_t iio: adc: ina2xx: Fix incorrect report of data endianness to userspace. iio: light: us5182d: Refactor read_raw function iio: light: us5182d: Add interrupt support and events iio: light: us5182d: Fix enable status inconcistency iio: Make IIO value formating function globally available. staging: emxx_udc: use list_first_entry_or_null() staging/emxx_udc: fix 64-bit warnings STAGING: COMEDI: Using kernel types in plx9080.h STAGING: COMEDI: Added spaces around binary operators in plx9080.h STAGING: COMEDI: Fixed format of comments in plx9080.h staging: comedi: comedilib.h: Coding style warning fix for block comments staging: comedi: s526: add macros for counter control reg values staging: comedi: s526: replace counter mode bitfield struct staging: comedi: check for more errors for zero-length write staging: comedi: simplify returned errors for comedi_write() staging: comedi: return error on "write" if no command set up ... commit 67ad058d97b8cff441211b791d97e5f776b81210 Merge: 237f38c 041497e Author: Linus Torvalds Date: Wed Jan 13 10:02:05 2016 -0800 Merge tag 'tty-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the big serial/tty driver update for 4.5-rc1. Lots of driver updates and some tty core changes. All of these have been in linux-next and the details are in the shortlog" * tag 'tty-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (127 commits) drivers/tty/serial: delete unused MODULE_DEVICE_TABLE from atmel_serial.c serial: sh-sci: Remove cpufreq notifier to fix crash/deadlock serial: 8250: of: Fix the driver and actually compile the 8250_of tty: amba-pl011: use iotype instead of access_32b to track 32-bit I/O tty: amba-pl011: fix earlycon register offsets serial: sh-sci: Drop the sci_fck clock fallback sh: sh7734: Correct SCIF type for BRG sh: Remove sci_ick clock alias sh: Rename sci_ick and sci_fck clock to fck serial: sh-sci: Add support for optional BRG on (H)SCIF serial: sh-sci: Add support for optional external (H)SCK input serial: sh-sci: Prepare for multiple sampling clock sources serial: sh-sci: Correct SCIF type on R-Car for BRG serial: sh-sci: Correct SCIF type on RZ/A1H serial: sh-sci: Replace struct sci_port_info by type/regtype encoding serial: sh-sci: Add BRG register definitions serial: sh-sci: Take into account sampling rate for max baud rate serial: sh-sci: Merge sci_scbrr_calc() and sci_baud_calc_hscif() serial: sh-sci: Avoid calculating the receive margin for HSCIF serial: sh-sci: Improve bit rate error calculation for HSCIF ... commit 237f38c3b3ab08eadecc89b7c9647b1cdb996bbe Merge: 6799060 60d77b3 Author: Linus Torvalds Date: Wed Jan 13 09:26:40 2016 -0800 Merge tag 'usb-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB updates from Greg KH: "Here is the big USB drivers update for 4.5-rc1. Lots of gadget driver updates and fixes, like usual, and a mix of other USB driver updates as well. Full details in the shortlog. All of these have been in linux-next for a while" * tag 'usb-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (191 commits) MAINTAINERS: change my email address USB: usbmon: remove assignment from IS_ERR argument USB: mxu11x0: drop redundant function name from error messages USB: mxu11x0: fix debug-message typos USB: mxu11x0: rename usb-serial driver USB: mxu11x0: fix modem-control handling on B0-transitions USB: mxu11x0: fix memory leak on firmware download USB: mxu11x0: fix memory leak in port-probe error path USB: serial: add Moxa UPORT 11x0 driver USB: cp210x: add ID for ELV Marble Sound Board 1 usb: chipidea: otg: use usb autosuspend to suspend bus for HNP usb: chipidea: host: set host to be null after hcd is freed usb: chipidea: removing of_find_property usb: chipidea: implement platform shutdown callback usb: chipidea: clean up CONFIG_USB_CHIPIDEA_DEBUG reference usb: chipidea: delete static debug support usb: chipidea: support debugfs without CONFIG_USB_CHIPIDEA_DEBUG usb: chipidea: udc: improve error handling on _hardware_enqueue usb: chipidea: udc: _ep_queue and _hw_queue cleanup usb: dwc3: of-simple: fix build warning on !PM ... commit ed8a9d2c816e0b0a2c5a605505e0f09ae9010dd6 Author: Ilya Dryomov Date: Fri Nov 20 22:18:43 2015 +0100 block: use bd{grab,put}() instead of open-coding - bd_acquire() and bd_forget() open-code bdgrab() and bdput() - raw driver uses igrab() but never checks its return value and always holds another ref from bind_set() while calling it, so it's equivalent to bdgrab() Signed-off-by: Ilya Dryomov Signed-off-by: Jens Axboe drivers/char/raw.c | 2 +- fs/block_dev.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit d8e0cae645504a787b05abfb91afee8cd7fa1701 Author: Christian König Date: Mon Jan 11 15:35:22 2016 +0100 drm/amdgpu: validate duplicates first Most VM BOs end up in the duplicates list, validate it first make -ENOMEM less likely. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eceb8a1562db6fc3e1c21cd54a4be0189aa1d0e3 Author: Christian König Date: Mon Jan 11 15:35:21 2016 +0100 drm/amdgpu: move VM page tables to the LRU end on CS v2 This makes it less likely to run into an ENOMEM because VM page tables are evicted last. v2: move the BOs in the LRU tail after validation Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 27 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) commit ab74961810ba7935b5f9643da10daaa36690f48e Author: Christian König Date: Mon Jan 11 15:35:20 2016 +0100 drm/ttm: add ttm_bo_move_to_lru_tail function v2 This allows the drivers to move a BO to the end of the LRU without removing and adding it again. v2: Make it more robust, handle pinned and swapable BOs as well. Reviewed-by: Thomas Hellstrom Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 21 +++++++++++++++++++++ include/drm/ttm/ttm_bo_api.h | 10 ++++++++++ 2 files changed, 31 insertions(+) commit ed704a43e84cc536081423dcd3491acf2791aaeb Author: Christian König Date: Mon Jan 11 15:35:19 2016 +0100 drm/ttm: fix adding foreign BOs to the swap LRU It doesn't make any sense to try to swap out imported BOs. Reviewed-by: Thomas Hellstrom Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33d48cf8256f2b72e4082a7996c04bf1e78fce81 Author: Christian König Date: Mon Jan 11 15:35:18 2016 +0100 drm/ttm: fix adding foreign BOs to the LRU during init v2 If we import a BO with an external reservation object we don't reserve/unreserve it. So we never add it to the LRU causing a possible denial of service. v2: fix typo in commit message Reviewed-by: Thomas Hellstrom Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e3837b00b6bb2b0344dd28c601edda8eba42de7f Author: Geliang Tang Date: Wed Jan 13 22:48:43 2016 +0800 drm/radeon: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc29ec874b3727e3f5a606bd1875e34f6e3f1593 Author: Geliang Tang Date: Wed Jan 13 22:48:42 2016 +0800 drm/amdgpu: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 403664bbf840e80a45c4b97115ac518b40487f91 Author: Alex Deucher Date: Fri Dec 18 11:33:30 2015 -0500 drm/amdgpu/cz: force vce clocks when sclks are forced Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 5f57642672dd90e3183efcd9e6afbff1305a133a Author: Alex Deucher Date: Fri Dec 18 11:28:49 2015 -0500 drm/amdgpu/cz: force uvd clocks when sclks are forced Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 044c0629b55d73235161557a48870d663d0072f5 Author: Alex Deucher Date: Fri Dec 18 11:25:16 2015 -0500 drm/amdgpu/cz: add code to enable forcing VCE clocks VCE DPM works similarly to SCLK DPM. Add a similar interface for VCE for forcing the VCE clocks. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 98 ++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/cz_dpm.h | 1 + 2 files changed, 98 insertions(+), 1 deletion(-) commit d83b1e8132f91ba9e038b5206dc81d32ecac1f75 Author: Alex Deucher Date: Fri Dec 18 11:06:42 2015 -0500 drm/amdgpu/cz: add code to enable forcing UVD clocks UVD DPM works similarly to SCLK DPM. Add a similar interface for UVD for forcing the UVD clocks. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 129 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/cz_dpm.h | 1 + 2 files changed, 130 insertions(+) commit 3b780bed3138c2a8061c218df7e321beec9a6ec9 Author: David S. Miller Date: Wed Jan 13 11:45:39 2016 -0500 x25_asy: Free x25_asy on x25_asy_open() failure. Based upon a report by Dmitry Vyukov. Signed-off-by: David S. Miller drivers/net/wan/x25_asy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 888c9e33e4c5a503285921046c621f7c73199d2f Author: Chunming Zhou Date: Wed Jan 13 12:55:18 2016 +0800 drm/amdgpu: fix lost sync_to if scheduler is enabled. when scheduler is enabled, the semaphore isn't used at all. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f3b5cb3e68952d4a721cc733e03eeb5151dcaa1e Author: Rex Zhu Date: Mon Jan 11 11:25:18 2016 +0800 drm/amd/powerplay: fix static checker warning for return meaningless value. The return value should be either negative or zero, no positive. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d122cbf1a310d962cef45c2f161b8dc3ec1475a3 Author: Geliang Tang Date: Wed Jan 13 22:48:41 2016 +0800 drm/sysfs: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Link: http://patchwork.freedesktop.org/patch/msgid/3fea991541fbfc4ffece2c174adeb02cb9436c90.1452696179.git.geliangtang@163.com Signed-off-by: Geliang Tang drivers/gpu/drm/drm_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00ae40e71d85ea3fed1b906951ffd80e0321a96d Author: Dan Carpenter Date: Wed Jan 13 15:28:23 2016 +0300 mlxsw: fix SWITCHDEV_OBJ_ID_PORT_MDB There is a missing break statement so we always return -EOPNOTSUPP. Fixes: 3a49b4fde2a1 ('mlxsw: Adding layer 2 multicast support') Signed-off-by: Dan Carpenter Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 1 + 1 file changed, 1 insertion(+) commit b8e429a2feac623a34e21099a4a69de29b6d873e Author: David S. Miller Date: Wed Jan 13 10:28:06 2016 -0500 genetlink: Fix off-by-one in genl_allocate_reserve_groups() The bug fix for adding n_groups to the computation forgot to adjust ">=" to ">" to keep the condition correct. Signed-off-by: David S. Miller net/netlink/genetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 038a75afc54d4b4dc9794213bb16e88c1a31a752 Merge: 9e35fdc c31ecf6 Author: Jens Axboe Date: Wed Jan 13 08:20:36 2016 -0700 Merge branch 'stable/for-jens-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-4.5/drivers Konrad writes: The pull is based on converting the backend driver into an multiqueue driver and exposing more than one queue to the frontend. As such we had to modify the frontend and also fix a bunch of bugs around this. The original work is based on Arianna Avanzini's work as an OPW intern. Bob took over the work and had been massaging it for quite some time. Also included are are features to 64KB page support for ARM and various bug-fixes. commit f5949141a21ee16edf1beaf95cbae7e419171ab5 Author: Daniel Vetter Date: Wed Jan 13 11:55:28 2016 +0100 drm/i915: Init power domains early in driver load Since commit ac9b8236551d1177fd07b56aef9b565d1864420d Author: Ville Syrjälä Date: Fri Nov 27 18:55:26 2015 +0200 drm/i915: Introduce a gmbus power domain gmbus also needs the power domain infrastructure right from the start, since as soon as we register the i2c controllers someone can use them. v2: Adjust cleanup paths too (Chris). v3: Rebase onto -nightly (totally bogus tree I had lying around) and also move dpio init head (Ville). v4: Ville instead suggested to move gmbus setup later in the sequence, since it's only needed by the modeset code. v5: Move even close to the actual user, right next to the comment that states where we really need gmbus (and interrupts!). Cc: Ville Syrjälä Cc: Patrik Jakobsson Cc: Imre Deak Cc: Jani Nikula Cc: Meelis Roos Cc: Chris Wilson Fixes: ac9b8236551d ("drm/i915: Introduce a gmbus power domain") Cc: stable@vger.kernel.org References: http://www.spinics.net/lists/intel-gfx/msg83075.html Signed-off-by: Daniel Vetter Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1452682528-19437-1-git-send-email-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_dma.c | 6 +++--- drivers/gpu/drm/i915/intel_display.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) commit c474e348778bdf5b453a2cdff4b2b1f9e000f343 Author: Arnd Bergmann Date: Sat Jan 9 22:16:42 2016 +0100 gpio: generic: make bgpio_pdata always visible Board files that define their own bgpio_pdata are broken when CONFIG_GPIO_GENERIC is disabled and the bgpio_pdata structure definition is hidden by the #ifdef: arch/arm/mach-clps711x/board-autcpu12.c:148:15: error: variable 'autcpu12_mmgpio_pdata' has initializer but incomplete type static struct bgpio_pdata autcpu12_mmgpio_pdata __initdata = { arch/arm/mach-clps711x/board-autcpu12.c:149:2: error: unknown field 'base' specified in initializer .base = AUTCPU12_MMGPIO_BASE, Since the board files should generally not care what drivers are enabled, this makes the structure definition visible again. Signed-off-by: Arnd Bergmann Fixes: 0f4630f3720e ("gpio: generic: factor into gpio_chip struct") Signed-off-by: Linus Walleij include/linux/gpio/driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb74ed278f8054fddf79ed930495b9e214f7c7b2 Author: Paul Moore Date: Wed Jan 13 09:18:55 2016 -0500 audit: always enable syscall auditing when supported and audit is enabled To the best of our knowledge, everyone who enables audit at compile time also enables syscall auditing; this patch simplifies the Kconfig menus by removing the option to disable syscall auditing when audit is selected and the target arch supports it. Signed-off-by: Paul Moore init/Kconfig | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 96368701e1c89057bbf39222e965161c68a85b4b Author: Paul Moore Date: Wed Jan 13 09:18:55 2016 -0500 audit: force seccomp event logging to honor the audit_enabled flag Previously we were emitting seccomp audit records regardless of the audit_enabled setting, a deparature from the rest of audit. This patch makes seccomp auditing consistent with the rest of the audit record generation code in that when audit_enabled=0 nothing is logged by the audit subsystem. The bulk of this patch is moving the CONFIG_AUDIT block ahead of the CONFIG_AUDITSYSCALL block in include/linux/audit.h; the only real code change was in the audit_seccomp() definition. Signed-off-by: Tony Jones Signed-off-by: Paul Moore include/linux/audit.h | 204 +++++++++++++++++++++++++------------------------- 1 file changed, 104 insertions(+), 100 deletions(-) commit d865e573b8a4f30fbb74fa7666ca81e3132eb547 Author: Markus Elfring Date: Wed Jan 13 09:18:55 2016 -0500 audit: Delete unnecessary checks before two function calls The functions consume_skb() and kfree_skb() test whether their argument is NULL and then return immediately. Thus the tests around their calls are not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [PM: tweak patch prefix] Signed-off-by: Paul Moore kernel/audit.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1194b994bec308433cc84ffdb92fd668713b8f93 Author: Richard Guy Briggs Date: Wed Jan 13 09:18:54 2016 -0500 audit: wake up threads if queue switched from limited to unlimited If the audit_backlog_limit is changed from a limited value to an unlimited value (zero) while the queue was overflowed, wake up the audit_backlog_wait queue to allow those processes to continue. Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f48a942926c58e4b2dfc3f21c58579d5435841ef Author: Richard Guy Briggs Date: Wed Jan 13 09:15:19 2016 -0500 audit: include auditd's threads in audit_log_start() wait exception Should auditd spawn threads, allow all members of its thread group to use the audit_backlog_limit reserves to bypass the queue limits too. Signed-off-by: Richard Guy Briggs [PM: minor upstream merge tweaks] Signed-off-by: Paul Moore kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb8baf6aa3ba1fcb1c1fd2cc57e31195a42689fd Author: Paul Moore Date: Wed Jan 13 09:15:18 2016 -0500 audit: remove audit_backlog_wait_overflow It seems much more obvious and readable to simply use "0". Signed-off-by: Paul Moore kernel/audit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c4b7a7755f91081e430bbd58fec77194b05f834b Author: Richard Guy Briggs Date: Wed Jan 13 09:15:18 2016 -0500 audit: don't needlessly reset valid wait time After auditd has recovered from an overflowed queue, the first process that doesn't use reserves to make it through the queue checks should reset the audit backlog wait time to the configured value. After that, there is no need to keep resetting it. Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d20313b2c407a90fb60eca99d73c47a75bb42e08 Author: Peter Ujfalusi Date: Mon Jan 11 10:38:01 2016 +0200 dmaengine: edma: Fix paRAM slot allocation for entry channel 0 edma_alloc_slot was not checking the channel mapping support existence when slot 0 has been requested (used as entry slot for channel/event 0). Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/edma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f90d2d37fb933773c9945c5939ae87aea2343057 Author: Florian Westphal Date: Tue Jan 12 17:07:05 2016 +0100 netfilter: ipset: allow a 0 netmask with hash_netiface type Jozsef says: The correct behaviour is that if we have ipset create test1 hash:net,iface ipset add test1 0.0.0.0/0,eth0 iptables -A INPUT -m set --match-set test1 src,src then the rule should match for any traffic coming in through eth0. This removes the -EINVAL runtime test to make matching work in case packet arrived via the specified interface. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1297092 Signed-off-by: Florian Westphal Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_hash_netiface.c | 4 ---- 1 file changed, 4 deletions(-) commit 4b8c4eddfc941a38e5bc716a37e8c4292cefaa6d Author: Florian Westphal Date: Mon Jan 11 22:49:32 2016 +0100 netfilter: nft_byteorder: avoid unneeded le/be conversion steps David points out that we to three le/be conversions instead of just one. Doesn't matter on x86_64 w. gcc, but other architectures might be less lucky. Since it also simplifies code just follow his advice. Fixes: c0f3275f5cb ("nftables: byteorder: provide le/be 64 bit conversion helper") Suggested-by: David Laight Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_byteorder.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1ca2cf8c4167c2016d9716998b4f89c4e79d1f89 Author: Axel Lin Date: Tue Jan 12 15:55:17 2016 +0800 ASoC: rt5659: Fix irq leak Use devm_request_threaded_irq to ensure the irq is freed when unload the module. The rt5659->i2c is no longer used after this conversion, thus remove it as well. Signed-off-by: Axel Lin Signed-off-by: Mark Brown sound/soc/codecs/rt5659.c | 16 ++++------------ sound/soc/codecs/rt5659.h | 1 - 2 files changed, 4 insertions(+), 13 deletions(-) commit cde6bcd584b1b910d6ee8d6eb968ea5d20815444 Author: Dan Carpenter Date: Wed Jan 13 15:20:02 2016 +0300 ASoC: AMD: free memory on error Static checkers complain if we don't free "adata" before returning. Fixes: 7c31335a03b6 ('ASoC: AMD: add AMD ASoC ACP 2.x DMA driver') Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 1 + 1 file changed, 1 insertion(+) commit eb47fe8033d6c2013ce47ec44f39fa0092aa8551 Author: Thierry Reding Date: Mon Nov 16 18:19:53 2015 +0100 drm: Do not set connector->encoder in drivers An encoder is associated with a connector by the DRM core as a result of setting up a configuration. Drivers using the atomic or legacy helpers should never set up this link, even if it is a static one. While at it, try to catch this kind of error in the future by adding a WARN_ON() in drm_mode_connector_attach_encoder(). Note that this doesn't cover all the cases, since drivers could set this up after attaching. Drivers that use the atomic helpers will get a warning later on, though, so hopefully the two combined cover enough to help people avoid this in the future. Cc: Russell King Cc: Philipp Zabel Cc: Laurent Pinchart Cc: Liviu Dudau Cc: Mark yao Signed-off-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1447694393-24700-1-git-send-email-thierry.reding@gmail.com drivers/gpu/drm/bridge/dw_hdmi.c | 2 -- drivers/gpu/drm/drm_crtc.c | 14 ++++++++++++++ drivers/gpu/drm/i2c/tda998x_drv.c | 1 - drivers/gpu/drm/imx/parallel-display.c | 2 -- drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 2 -- 5 files changed, 14 insertions(+), 7 deletions(-) commit bab7c6c3deac70966a3000402c0ea6d0c20edd15 Author: Sven Eckelmann Date: Tue Jan 5 12:06:17 2016 +0100 batman-adv: Fix list removal of batadv_hardif_neigh_node The neigh_list with batadv_hardif_neigh_node objects is accessed with only rcu_read_lock in batadv_hardif_neigh_get and batadv_iv_neigh_print. Thus it is not allowed to kfree the object before the rcu grace period ends (which may still protects context accessing this object). Therefore the object has first to be removed from the neigh_list and then it has either wait with synchronize_rcu or call_rcu till the grace period ends before it can be freed. Fixes: cef63419f7db ("batman-adv: add list of unique single hop neighbors per hard-interface") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/originator.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit af63cf51b7f960aa73b32bac683cd4078f08fa0e Author: Simon Wunderlich Date: Mon Nov 30 17:34:01 2015 +0100 batman-adv: fix lockdep splat when doing mcast_free While testing, we got something like this: WARNING: CPU: 0 PID: 238 at net/batman-adv/multicast.c:142 batadv_mcast_mla_tt_retract+0x94/0x205 [batman_adv]() [...] Call Trace: [] dump_stack+0x4b/0x64 [] warn_slowpath_common+0xbc/0x120 [] ? batadv_mcast_mla_tt_retract+0x94/0x205 [batman_adv] [] warn_slowpath_null+0x15/0x20 [] batadv_mcast_mla_tt_retract+0x94/0x205 [batman_adv] [] batadv_mcast_free+0x36/0x39 [batman_adv] [] batadv_mesh_free+0x7d/0x13f [batman_adv] [] batadv_softif_free+0x15/0x25 [batman_adv] [...] Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/multicast.c | 2 ++ 1 file changed, 2 insertions(+) commit 78fd8c7288e0a4bba3ad1d69caf9396a6b69cb00 Author: Andy Lutomirski Date: Mon Jan 4 15:14:28 2016 -0800 x86/vdso/pvclock: Protect STABLE check with the seqcount If the clock becomes unstable while we're reading it, we need to bail. We can do this by simply moving the check into the seqcount loop. Reported-by: Marcelo Tosatti Signed-off-by: Andy Lutomirski Cc: Alexander Graf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Radim Krcmar Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/755dcedb17269e1d7ce12a9a713dea303835137e.1451949191.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/vdso/vclock_gettime.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c698d639f72b55686ec3518d2bc8dc5f2eca9354 Author: Paul Gortmaker Date: Sun Dec 13 15:33:19 2015 -0500 i2c: create builtin_i2c_driver to avoid registration boilerplate In commit f309d4443130bf814e991f836e919dca22df37ae ("platform_device: better support builtin boilerplate avoidance") we introduced the builtin_driver macro. Here we use that support and extend it to I2C driver registration, so where a driver is clearly non-modular and builtin-only, we can register it in a similar fashion. And existing code that is clearly non-modular can be updated with the simple mapping of module_i2c_driver(...) ---> builtin_i2c_driver(...) We've essentially cloned the former to make the latter, and taken out the remove/module_exit parts since those never get used in a non-modular build of the code. A similar thing was done in commit b4eb6cdbbd13698704863f680c643c569909e1c2 ("PCI: Add builtin_pci_driver() to avoid registration boilerplate"). Signed-off-by: Paul Gortmaker Signed-off-by: Wolfram Sang include/linux/i2c.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 96098df125c0a966631ec114081d8f5630a0e4b8 Author: Julien Grossholtz Date: Thu Jan 7 16:46:45 2016 -0500 gpiolib: fix chip order in gpio list In some situations the gpio_list order is not correct. As a consequence gpiochip_find_base returns the same base number twice. This happens when a first ship is added with manual base number, then other ships are added using automatic base number. To prevent this behaviour, this patch add the new chip after the last element of the gpio list. Signed-off-by: Julien Grossholtz Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d9812780a020bcec44565b5950b2a8b31afb5545 Author: Russell King Date: Sat Jan 2 10:06:29 2016 +0000 mmc: sd: limit SD card power limit according to cards capabilities The SD card specification allows cards to error out a SWITCH command where the requested function in a group is not supported. The spec provides for a set of capabilities which indicate which functions are supported. In the case of the power limit, requesting an unsupported power level via the SWITCH command fails, resulting in the power level remaining at the power-on default of 0.72W, even though the host and card may support higher powers levels. This has been seen with SanDisk 8GB cards, which support the default 0.72W and 1.44W (200mA and 400mA) in combination with an iMX6 host, supporting up to 2.88W (800mA). This currently causes us to try to set a power limit function value of '3' (2.88W) which the card errors out on, and thereby causes the power level to remain at 0.72W rather than the desired 1.44W. Arrange to limit the selected current limit by the capabilities reported by the card to avoid the SWITCH command failing. Select the highest current limit that the host and card combination support. Signed-off-by: Russell King Fixes: a39ca6ae0a08 ("mmc: core: Simplify and fix for SD switch processing") Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 4eaffdd5a5fe6ff9f95e1ab4de1ac904d5e0fa8b Author: Andy Lutomirski Date: Tue Jan 12 12:47:40 2016 -0800 x86/mm: Improve switch_mm() barrier comments My previous comments were still a bit confusing and there was a typo. Fix it up. Reported-by: Peter Zijlstra Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Rik van Riel Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: 71b3c126e611 ("x86/mm: Add barriers and document switch_mm()-vs-flush synchronization") Link: http://lkml.kernel.org/r/0a0b43cdcdd241c5faaaecfbcc91a155ddedc9a1.1452631609.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit c36608843adf4674c462e49f63b64b2987d0ba0b Merge: 0bd106d 34b7b0f Author: Ingo Molnar Date: Wed Jan 13 10:36:03 2016 +0100 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New, user visible features: - Add --buildid-all option to 'perf record' to avoid processing samples, just collecting build-ids for _all_ the DSOs that appears in PERF_RECORD_MMAP records (Namhyung Kim) - Add some more usage tips to appear in the hists browser (top & report) (Namhyung Kim, Andi Kleen) - Fix mmap2 event allocation in synthesize code, where we were allocating space just for PERF_RECORD_MMAP, the older variant, which could lead to corner case problems (Wang Nan) Infrastructure fixes: - Make list.h self-sufficient, removing one more reference to kernel headers that lead to recent breakage when some rculist change was made in the kernel sources. (Josh Poimboeuf) Add missing NORETURN define for parse-options.h in tools/lib/subcmd (Josh Poimboeuf) - Fallback to srcdir/Documentation/ when not finding tips.txt elsewhere (Namhyung Kim) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 65cacec1ba908a153cfb19c4de596a108f95970c Author: Andy Lutomirski Date: Tue Jan 12 11:56:15 2016 -0800 selftests/x86: Test __kernel_sigreturn and __kernel_rt_sigreturn The vdso-based sigreturn mechanism is fragile and isn't used by modern glibc so, if we break it, we'll only notice when someone tests an unusual libc. Add an explicit selftest. [ I wrote this while debugging a Bionic breakage -- my first guess was that I had somehow messed up sigreturn. I've caused problems in that code before, and it's really easy to fail to notice it because there's nothing on a modern distro that needs vdso-based sigreturn. ] Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/32946d714156879cd8e5d8eab044cd07557ed558.1452628504.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/Makefile | 3 +- tools/testing/selftests/x86/vdso_restorer.c | 88 +++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) commit 78179989a06636d8362e2eee01b261d02b1500d2 Author: Guenter Roeck Date: Thu Jan 7 08:25:24 2016 -0800 gpio: mpc8xxx: Do not use gpiochip_get_data() in mpc8xxx_gpio_save_regs() Commit 709d71a17c33 ("gpio: mpc8xxx: use gpiochip data pointer") replaces the use of container_of() with gpiochip_get_data(). However, the data pointer is not yet set by the time the save_regs function is called. Fixes: 709d71a17c33 ("gpio: mpc8xxx: use gpiochip data pointer") Cc: Uwe Kleine-König Cc: Alexander Stein Signed-off-by: Guenter Roeck Signed-off-by: Linus Walleij drivers/gpio/gpio-mpc8xxx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 95c761705ef5c2f094c56c4b779e74958246f2aa Author: Guenter Roeck Date: Thu Jan 7 08:24:58 2016 -0800 gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs() Commit 6aa7dbfa2877 ("gpio: mm-lantiq: use gpiochip data pointer") replaces the use of container_of() with gpiochip_get_data(). However, the data pointer is not yet set by the time the save_regs function is called. Fixes: 6aa7dbfa2877 ("gpio: mm-lantiq: use gpiochip data pointer") Cc: Ricardo Ribalda Delgado Cc: John Crispin Signed-off-by: Guenter Roeck Signed-off-by: Linus Walleij drivers/gpio/gpio-mm-lantiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 48ea1e32c39db94c59b63580b965222c7782112f Author: Michel Thierry Date: Mon Jan 11 11:39:27 2016 +0000 drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1 page Kernel and userspace are able to handle 4GB (1<<32) address space range, but "A32 Stateless Model" is not. According to documentation, A32 accesses are based on General State Base Address and bound checking is in place. Because size field (instruction State Base Address) limitation, it is not possible to address full 4GB memory region. A32 Stateless Model is used by some libraries and without this patch, the last page of 4GB address space is not accessible in 32bit processes. Reported-by: Artur Harasimiuk Signed-off-by: Michel Thierry Link: http://patchwork.freedesktop.org/patch/msgid/1452512367-23614-1-git-send-email-michel.thierry@intel.com Cc: drm-intel-fixes@lists.freedesktop.org Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter (cherry picked from commit 1892faa9ec5d51b07d646cbd5597cd30e049aa51) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de0513365cff619335a59417dea1d1ca665c2cfd Author: Maarten Lankhorst Date: Tue Dec 8 15:52:56 2015 +0100 drm/i915: Widen return value for reservation_object_wait_timeout_rcu to long. This fixes a spurious warning from an integer overflow on 64-bits systems. The function may return MAX_SCHEDULE_TIMEOUT which gets truncated to -1. Explicitly handling this by casting to lret fixes it. Signed-off-by: Maarten Lankhorst Reported-and-tested-by: Joseph Yasi Tested-by: Andreas Reis Reviewed-by: Daniel Vetter Cc: drm-intel-fixes@lists.freedesktop.org Fixes: 3c28ff22f6e20c ("i915: wait for fence in prepare_plane_fb") Link: http://patchwork.freedesktop.org/patch/msgid/5666EEC8.2000403@linux.intel.com (cherry picked from commit bcf8be279c79df6a8a17d9c3e1f9bc926444a87c) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 2dc2f761dea65069485110d24eaa5b0d5d808b07 Author: Lyude Date: Thu Jan 7 10:43:28 2016 -0500 drm/i915: intel_hpd_init(): Fix suspend/resume reprobing This fixes reprobing of display connectors on resume. After some talking with danvet on IRC, I learned that calling drm_helper_hpd_irq_event() does actually trigger a full reprobe of each connector's status. It turns out this is the actual reason reprobing on resume hasn't been working (this was observed on a T440s): - We call hpd_init() - We check each connector for a couple of things before marking connector->polled with DRM_CONNECTOR_POLL_HPD, one of which is an active encoder. Of course, a disconnected port won't have an active encoder, so we don't add the flag to any of the connectors. - We call drm_helper_hpd_irq_event() - drm_helper_irq_event() checks each connector for the DRM_CONNECTOR_POLL_HPD flag. The only one that has it is eDP-1, so we skip reprobing each connector except that one. In addition, we also now avoid setting connector->polled to DRM_CONNECTOR_POLL_HPD for MST connectors, since their reprobing is handled by the mst helpers. This is probably what was originally intended to happen here. Changes since V1: * Use the explanation of the issue as the commit message instead * Change the title of the commit, since this does more then just stop a check for an encoder now * Add "Fixes" line for the patch that introduced this regression * Don't enable DRM_CONNECTOR_POLL_HPD for mst connectors Changes since V2: * Put patch changelog above Signed-off-by * Follow Daniel Vetter's suggestion for making the code here a bit more legible Fixes: 0e32b39ceed6 ("drm/i915: add DP 1.2 MST support (v0.7)") Cc: stable@vger.kernel.org Signed-off-by: Lyude Link: http://patchwork.freedesktop.org/patch/msgid/1452181408-14777-1-git-send-email-cpaul@redhat.com Signed-off-by: Daniel Vetter (cherry picked from commit 07c519134417d92c2e1a536e2b66d4ffff4b3be0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_hotplug.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ccda3a728f7098523998079e789b8135746bf8a8 Author: Jani Nikula Date: Thu Jan 7 10:29:10 2016 +0200 drm/i915: shut up gen8+ SDE irq dmesg noise, again We still keep getting [ 4.249930] [drm:gen8_irq_handler [i915]] *ERROR* The master control interrupt lied (SDE)! This reverts commit 820da7ae46332fa709b171eb7ba57cbd023fa6df Author: Jani Nikula Date: Wed Nov 25 16:47:23 2015 +0200 Revert "drm/i915: shut up gen8+ SDE irq dmesg noise" which in itself is a revert, so this is just doing commit 97e5ed1111dcc5300a0f59a55248cd243937a8ab Author: Daniel Vetter Date: Fri Oct 23 10:56:12 2015 +0200 drm/i915: shut up gen8+ SDE irq dmesg noise all over again. I'll stop pretending I understand what's going on like I did when I thought I'd fixed this for good in commit 6a39d7c986be4fd18eb019e9cdbf774ec36c9f77 Author: Jani Nikula Date: Wed Nov 25 16:47:22 2015 +0200 drm/i915: fix the SDE irq dmesg warnings properly Reported-by: Chris Wilson Reference: http://mid.gmane.org/20151213124945.GA5715@nuc-i3427.alporthouse.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92084 Cc: drm-intel-fixes@lists.freedesktop.org Fixes: 820da7ae4633 ("Revert "drm/i915: shut up gen8+ SDE irq dmesg noise"") Acked-by: Chris Wilson Acked-by: Daniel Vetter Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1452155350-14658-1-git-send-email-jani.nikula@intel.com (cherry picked from commit 2dfb0b816d224379efc534764388745c474abeb4) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_irq.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 06ef83a705a98da63797a5a570220b6ca36febd4 Author: Chris Wilson Date: Fri Nov 27 13:28:55 2015 +0000 drm/i915: Restore inhibiting the load of the default context Following a GPU reset, we may leave the context in a poorly defined state, and reloading from that context will leave the GPU flummoxed. For secondary contexts, this will lead to that context being banned - but currently it is also causing the default context to become banned, leading to turmoil in the shared state. This is a regression from commit 6702cf16e0ba8b0129f5aa1b6609d4e9c70bc13b [v4.1] Author: Ben Widawsky Date: Mon Mar 16 16:00:58 2015 +0000 drm/i915: Initialize all contexts which quietly introduced the removal of the MI_RESTORE_INHIBIT on the default context. v2: Mark the global default context as uninitialized on GPU reset so that the context-local workarounds are reloaded upon re-enabling. Signed-off-by: Chris Wilson Cc: Michel Thierry Cc: Mika Kuoppala Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1448630935-27377-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala Cc: stable@vger.kernel.org [danvet: This seems to fix a gpu hand on after the first resume, resulting in any future suspend operation failing with -EIO because the gpu seems to be in a funky state. Somehow this patch fixes that.] Signed-off-by: Daniel Vetter (cherry picked from commit 42f1cae8c079bcceb3cff079fddc3ff8852c788f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5751d0f6c54f32ee19a55d30b1255aa8ab30390e Author: Daniel Vetter Date: Tue Jan 5 17:54:07 2016 +0100 drm/i915: Tune down rpm wakelock debug checks They're causing massive amounts of dmesg noise and hence CI noise all over the place. Enabling them for a bit was good enough to refresh our task list of what's still needed to enable rpm by default. To make sure we're not forgetting to make this noisy again add a FIXME comment. Fixes: da5827c36607 ("drm/i915: add assert_rpm_wakelock_held helper") Cc: Imre Deak Cc: drm-intel-fixes@lists.freedesktop.org Cc: Chris Wilson Acked-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1452012847-4737-1-git-send-email-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter (cherry picked from commit becd9ca2de656ccd8d02c434742388aead336147) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_drv.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5f008c98598b80a64d7d8dc93b6c82af18783ac3 Author: Jiri Kosina Date: Wed Jan 13 09:43:46 2016 +0100 Revert "INPUT: xpad: switch Logitech G920 Wheel into HID mode" This reverts commit 27b9d5a254dcbc6095404c1bab7c335419601eb8. I am reverting this one, while keeping the rest of the G920 support in, so that it immediately starts working once proper HID-mode switching is implemented. Quoting Dmitry Torokhov for rationale: == It is wrong. Aside form the fact that IMO xpad.c is the wrong place for this code to be in, why are we waiting for the input device to be opened by userspace before we do the switch instead of doing it immediately? == Several people (Simon Wood and Michal Maly) expressed the intent to work on proper HID switching in a short term. Signed-off-by: Jiri Kosina drivers/input/joystick/xpad.c | 16 ---------------- 1 file changed, 16 deletions(-) commit a5f0edf63bdff339fab5bb35729e0a41e7fe31c1 Author: Michał Winiarski Date: Tue Dec 29 18:24:52 2015 +0100 drm/i915: Avoid writing relocs with addresses in non-canonical form According to PRM, some parts of HW require the addresses to be in a canonical form, where bits [63:48] == [47]. Let's convert addresses to canonical form prior to relocating and return converted offsets to userspace. We also need to make sure that userspace is using addresses in canonical form in case of softpin. v2: Whitespace fixup, gen8_canonical_addr description (Chris, Ville) v3: Rebase on top of softpin, fix a hole in relocate_entry, s/expect/require (Chris) v4: Handle softpin in validate_exec_list (Chris) v5: Convert back to canonical form at copy_to_user time (Chris) v6: Don't use struct exec_object2 in place of exec_object v7: Use sign_extend64 for converting to canonical form (Joonas), reject non-canonical and non-page-aligned offset for softpin (Chris) v8: Convert back to non-canonical form in a function, split the test for EXEC_OBJECT_PINNED (Chris) v9: s/canonial/canonical, drop accidental double newline (Chris) Cc: Chris Wilson Cc: Michel Thierry Cc: Ville Syrjälä Signed-off-by: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/1451409892-13708-1-git-send-email-michal.winiarski@intel.com Testcase: igt/gem_bad_reloc/negative-reloc-blt Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92699 Cc: drm-intel-fixes@lists.freedesktop.org Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter (cherry picked from commit 934acce3c069a3d8b14085957248444145d9ec1b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_execbuffer.c | 52 +++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) commit 7dbded06efe41367163e903331ef45bd765a62a4 Author: Chanwoo Choi Date: Thu Nov 5 13:30:18 2015 +0900 MAINTAINERS: Add devfreq-event entry This patch adds the devfreq-event[1] entry to review the patches as just supporter. Patches will be picked up by Myungjoo Ham on devfreq git repository. [1] https://lkml.org/lkml/2015/1/25/573 Signed-off-by: Chanwoo Choi Signed-off-by: Myungjoo Ham MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6a3cd7220364ad9e92c926600500f225c02ae3ac Author: Chanwoo Choi Date: Thu Nov 5 13:30:17 2015 +0900 MAINTAINERS: Add missing git repository and directory for devfreq This patch adds the missing git repository infomation and directory for devfreq. When using get_maintainer.pl, the result should include the correct maintainer information. Suggested-by: Joe Perches [cw00.chio: Add missing directory for devfreq] Signed-off-by: Chanwoo Choi Signed-off-by: Myungjoo Ham MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit 34bd322070a41898b032f59a0dfd345627fc1e7e Author: MyungJoo Ham Date: Mon Nov 23 15:45:36 2015 +0900 PM / devfreq: Do not show statistics if it's not ready. Before this patch for a device without statistics support, $ cat trans_stat From : To : time(ms) Total transitions : 0 $ After this patch applied for such a device, $ cat trans_stat Not Supported. $ Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 2 ++ 1 file changed, 2 insertions(+) commit d7df1e464749650056f511e75b3d4e53cfac5d53 Author: Chanwoo Choi Date: Thu Nov 19 16:28:46 2015 +0900 PM / devfreq: Modify the indentation of trans_stat sysfs for readability This patch modifies the indentation of 'trans_stat' sysfs to improve readability. The 1GHz is 1000,000,000. So it needs the least 10 position to show the GHz unit. - Before apply this patch, -sh-3.2# cat trans_stat From : To :50000000100000000133000000200000000400000000 time(ms) *50000000: 0 0 0 0 7 1817635 100000000: 4 0 0 0 4 1590 133000000: 1 4 0 0 7 975 200000000: 2 2 7 0 1 2655 400000000: 0 2 5 12 0 1860 Total transition : 58 - After apply this patch, -sh-3.2# cat trans_stat From : To : 50000000 100000000 133000000 200000000 400000000 time(ms) * 50000000: 0 0 0 0 7 14405 100000000: 4 0 0 0 3 2015 133000000: 2 3 0 0 7 1020 200000000: 1 2 7 0 0 2970 400000000: 0 2 5 10 0 1575 Total transition : 53 Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0ec09ac2cebe9769491a470c33edff0f873ff79d Author: Chanwoo Choi Date: Wed Nov 18 14:49:02 2015 +0900 PM / devfreq: Set the freq_table of devfreq device This patch initialize the freq_table array of each devfreq device by using the devfreq_set_freq_table(). If freq_table is NULL, the devfreq framework is not able to support the frequency transtion information through sysfs. The OPP core uses the integer type for the number of opps in the opp list and uses the 'unsigned long' type for each frequency. So, this patch modifies the type of some variable as following: - the type of freq_table : unsigned int -> unsigned long - the type of max_state : unsigned int -> int - Corrected types, format strings, mutex usages by MyungJoo Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 50 +++++++++++++++++++++++++++++++++++++++++++++-- include/linux/devfreq.h | 2 +- 2 files changed, 49 insertions(+), 3 deletions(-) commit 3104fa3081126c9bda35793af5f335d0ee0d5818 Author: Chanwoo Choi Date: Fri Nov 13 19:25:28 2015 +0900 PM / devfreq: Add show_one macro to delete the duplicate code This patch adds the 'show_one' macro to simplify the duplicate code of both max_freq_show() and min_freq_show(). Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit e54916c6e1d0b939999eb38011202dd9064d5788 Author: Chanwoo Choi Date: Thu Nov 19 17:03:44 2015 +0900 PM / devfreq: event: Fix the error and warning from script/checkpatch.pl This patch just fixes following error and warning by using scripts/checkpatch.pl. - Follwoing issue from checkpatch.pl: ERROR: space prohibited before that close parenthesis ')' + if (count < 0 ) { WARNING: line over 80 characters + ptr = devres_alloc(devm_devfreq_event_release, sizeof(*ptr), GFP_KERNEL); Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq-event.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit df678ff7531990ba11cc0b921609a7e229d1323c Author: Chanwoo Choi Date: Tue Nov 17 14:25:06 2015 +0900 PM / devfreq: event: Remove the error log of devfreq_event_get_edev_by_phandle() This patch just removes the error log when devfreq_event_get_edev_by_phandle() fail to get the instance of devfreq-event device. It is related to sequence of the probe() of each driver. So, this error log might show the always during kernel booting. Each driver using this function can show the appropriate error log. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq-event.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 809d9516da73345cca587743b57e45e9095d851e Author: Laxman Dewangan Date: Wed Jan 13 00:14:19 2016 -0800 Input: gpio-keys - allow disabling individual buttons in DT Add support to disable buttons from DT via status property if given button is not supported on given platforms. This will help re-using existing dtsi files across multiple platforms. Signed-off-by: Laxman Dewangan Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4dc5f8c953f23d45329abc8b8e04f0c1e314a75 Author: Laxman Dewangan Date: Tue Jan 12 22:56:40 2016 -0800 Input: gpio-keys - allow setting input device name in DT Allow specifying name if input device via device tree property. This helps userspace code to get name and perform proper event to key mapping in some cases (for example, on Android). Signed-off-by: Laxman Dewangan Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/gpio-keys.txt | 1 + drivers/input/keyboard/gpio_keys.c | 2 ++ 2 files changed, 3 insertions(+) commit f246c941549c715a66a4477c3053569b2f5b8823 Author: Nicholas Bellinger Date: Thu Jan 7 22:19:21 2016 -0800 ib_srpt: Convert acl lookup to modern get_initiator_node_acl usage This patch does a simple conversion of ib_srpt code to use proper modern core_tpg_get_initiator_node_acl() lookup using se_node_acl->acl_kref, and drops the legacy internal list usage from srpt_lookup_acl(). This involves doing transport_init_session() earlier, and making sure transport_free_session() is called during a se_node_acl lookup failure to drop the last ->acl_kref. Also, it adds a minor backwards-compat hack to avoid the potential for user-space wrt node-acl WWPN formatting by simply stripping off '0x' prefix from ch->sess_name, and retrying once if core_tpg_get_initiator_node_acl() fails. Finally, go ahead and drop port_acl_list port_acl_lock since they are no longer used. Cc: Vu Pham Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/srpt/ib_srpt.c | 103 ++++++++++------------------------ drivers/infiniband/ulp/srpt/ib_srpt.h | 8 --- 2 files changed, 30 insertions(+), 81 deletions(-) commit 7fbef3d0c2f6063ed12e7f3d74ba2a49111154f9 Author: Nicholas Bellinger Date: Thu Jan 7 22:17:16 2016 -0800 tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage This patch does a simple conversion of tcm_fc code to use proper modern core_tpg_get_initiator_node_acl() lookup using se_node_acl->acl_kref, and drops the legacy list walk from ft_acl_get(). Note the original lookup also took node_name into account, but since ft_init_nodeacl() only ever sets port_name for se_node_acl->acl_group within configfs, this is purely a mechanical change. As per HCH, go ahead and fold ft_acl_get() into original caller. Cc: Vasu Dev Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Andy Grover Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tcm_fc.h | 1 - drivers/target/tcm_fc/tfc_conf.c | 25 ------------------------- drivers/target/tcm_fc/tfc_sess.c | 25 ++++++++++++++++--------- 3 files changed, 16 insertions(+), 35 deletions(-) commit c4a359a0049f2e17b012b31e801e96566f6391e5 Author: Takashi Iwai Date: Wed Jan 13 07:20:13 2016 +0100 ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices The commit [da6d276957ea: ALSA: usb-audio: Add resume support for Native Instruments controls] brought a regression where the Native Instrument audio devices don't get the correct value at update due to the missing shift at writing. This patch addresses it. Fixes: da6d276957ea ('ALSA: usb-audio: Add resume support for Native Instruments controls') Reported-and-tested-by: Owen Williams Cc: Signed-off-by: Takashi Iwai sound/usb/mixer_quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a1f90a982e85f4921bed606a6b41a24f4de2ae1 Author: Hui Wang Date: Wed Jan 13 11:51:38 2016 +0800 ALSA: hda - fix the headset mic detection problem for a Dell laptop The machine uses codec alc255, and the pin configuration value for pin 0x14 on this machine is 0x90171130 which is not in the pin quirk table yet. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1533461 Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+) commit f1640c3ddeec12804bc9a21feee85fc15aca95f6 Author: wangweidong Date: Wed Jan 13 11:06:41 2016 +0800 bgmac: fix a missing check for build_skb when build_skb failed, it may occure a NULL pointer. So add a 'NULL check' for it. Signed-off-by: Weidong Wang Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 5 +++++ 1 file changed, 5 insertions(+) commit ddb5388ffd0ad75d07e7b78181a0b579824ba6f0 Merge: ccdf6ce 6799060 Author: David S. Miller Date: Wed Jan 13 00:21:27 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux commit 67990608c8b95d2b8ccc29932376ae73d5818727 Merge: c17488d a889f76 Author: Linus Torvalds Date: Tue Jan 12 20:25:09 2016 -0800 Merge tag 'pm+acpi-4.5-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull oower management and ACPI updates from Rafael Wysocki: "As far as the number of commits goes, ACPICA takes the lead this time, followed by cpufreq and the device properties framework changes. The most significant new feature is the debugfs-based interface to the ACPICA's AML debugger added in the previous cycle and a new user space tool for accessing it. On the cpufreq front, the core is updated to handle governors more efficiently, particularly on systems where a single cpufreq policy object is shared between multiple CPUs, and there are quite a few changes in drivers (intel_pstate, cpufreq-dt etc). The device properties framework is updated to handle built-in (ie included in the kernel itself) device properties better, among other things by adding a fallback mechanism that will allow drivers to provide default properties to be used in case the plaform firmware doesn't provide the properties expected by them. The Operating Performance Points (OPP) framework gets new DT bindings and debugfs support. A new cpufreq driver for ST platforms is added and the ACPI driver for AMD SoCs will now support the APM X-Gene ACPI I2C device. The rest is mostly fixes and cleanups all over. Specifics: - Add a debugfs-based interface for interacting with the ACPICA's AML debugger introduced in the previous cycle and a new user space tool for that, fix some bugs related to the AML debugger and clean up the code in question (Lv Zheng, Dan Carpenter, Colin Ian King, Markus Elfring). - Update ACPICA to upstream revision 20151218 including a number of fixes and cleanups in the ACPICA core (Bob Moore, Lv Zheng, Labbe Corentin, Prarit Bhargava, Colin Ian King, David E Box, Rafael Wysocki). In particular, the previously added erroneous support for the _SUB object is dropped, the concatenate operator will support all ACPI objects now, the Debug Object handling is improved, the SuperName handling of parameters being control methods is fixed, the ObjectType operator handling is updated to follow ACPI 5.0A and the handling of CondRefOf and RefOf is updated accordingly, module- level code will be executed after loading each ACPI table now (instead of being run once after all tables containing AML have been loaded), the Operation Region handlers management is updated to fix some reported problems and a the ACPICA code in the kernel is more in line with the upstream now. - Update the ACPI backlight driver to provide information on whether or not it will generate key-presses for brightness change hotkeys and update some platform drivers (dell-wmi, thinkpad_acpi) to use that information to avoid sending double key-events to users pace for these, add new ACPI backlight quirks (Hans de Goede, Aaron Lu, Adrien Schildknecht). - Improve the ACPI handling of interrupt GPIOs (Christophe Ricard). - Fix the handling of the list of device IDs of device objects found in the ACPI namespace and add a helper for checking if there is a device object for a given device ID (Lukas Wunner). - Change the logic in the ACPI namespace scanning code to create struct acpi_device objects for all ACPI device objects found in the namespace even if _STA fails for them which helps to avoid device enumeration problems on Microsoft Surface 3 (Aaron Lu). - Add support for the APM X-Gene ACPI I2C device to the ACPI driver for AMD SoCs (Loc Ho). - Fix the long-standing issue with the DMA controller on Intel SoCs where ACPI tables have no power management support for the DMA controller itself, but it can be powered off automatically when the last (other) device on the SoC is powered off via ACPI and clean up the ACPI driver for Intel SoCs (acpi-lpss) after previous attempts to fix that problem (Andy Shevchenko). - Assorted ACPI fixes and cleanups (Andy Lutomirski, Colin Ian King, Javier Martinez Canillas, Ken Xue, Mathias Krause, Rafael Wysocki, Sinan Kaya). - Update the device properties framework for better handling of built-in properties, add support for built-in properties to the platform bus type, update the MFD subsystem's handling of device properties and add support for passing default configuration data as device properties to the intel-lpss MFD drivers, convert the designware I2C driver to use the unified device properties API and add a fallback mechanism for using default built-in properties if the platform firmware fails to provide the properties as expected by drivers (Andy Shevchenko, Mika Westerberg, Heikki Krogerus, Andrew Morton). - Add new Device Tree bindings to the Operating Performance Points (OPP) framework and update the exynos4412 DT binding accordingly, introduce debugfs support for the OPP framework (Viresh Kumar, Bartlomiej Zolnierkiewicz). - Migrate the mt8173 cpufreq driver to the new OPP bindings (Pi-Cheng Chen). - Update the cpufreq core to make the handling of governors more efficient, especially on systems where policy objects are shared between multiple CPUs (Viresh Kumar, Rafael Wysocki). - Fix cpufreq governor handling on configurations with CONFIG_HZ_PERIODIC set (Chen Yu). - Clean up the cpufreq core code related to the boost sysfs knob support and update the ACPI cpufreq driver accordingly (Rafael Wysocki). - Add a new cpufreq driver for ST platforms and corresponding Device Tree bindings (Lee Jones). - Update the intel_pstate driver to allow the P-state selection algorithm used by it to depend on the CPU ID of the processor it is running on, make it use a special P-state selection algorithm (with an IO wait time compensation tweak) on Atom CPUs based on the Airmont and Silvermont cores so as to reduce their energy consumption and improve intel_pstate documentation (Philippe Longepe, Srinivas Pandruvada). - Update the cpufreq-dt driver to support registering cooling devices that use the (P * V^2 * f) dynamic power draw formula where V is the voltage, f is the frequency and P is a constant coefficient provided by Device Tree and update the arm_big_little cpufreq driver to use that support (Punit Agrawal). - Assorted cpufreq driver (cpufreq-dt, qoriq, pcc-cpufreq, blackfin-cpufreq) updates (Andrzej Hajda, Hongtao Jia, Jacob Tanenbaum, Markus Elfring). - cpuidle core tweaks related to polling and measured_us calculation (Rik van Riel). - Removal of modularity from a few cpuidle drivers (clps711x, ux500, exynos) that cannot be built as modules in practice (Paul Gortmaker). - PM core update to prevent devices from being probed during system suspend/resume which is generally problematic and may lead to inconsistent behavior (Grygorii Strashko). - Assorted updates of the PM core and related code (Julia Lawall, Manuel Pégourié-Gonnard, Maruthi Bayyavarapu, Rafael Wysocki, Ulf Hansson). - PNP bus type updates (Christophe Le Roy, Heiner Kallweit). - PCI PM code cleanups (Jarkko Nikula, Julia Lawall). - cpupower tool updates (Jacob Tanenbaum, Thomas Renninger)" * tag 'pm+acpi-4.5-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (177 commits) PM / clk: don't leave clocks enabled when driver not bound i2c: dw: Add APM X-Gene ACPI I2C device support ACPI / APD: Add APM X-Gene ACPI I2C device support ACPI / LPSS: change 'does not have' to 'has' in comment Revert "dmaengine: dw: platform: provide platform data for Intel" dmaengine: dw: return immediately from IRQ when DMA isn't in use dmaengine: dw: platform: power on device on shutdown ACPI / LPSS: override power state for LPSS DMA device PM / OPP: Use snprintf() instead of sprintf() Documentation: cpufreq: intel_pstate: enhance documentation ACPI, PCI, irq: remove redundant check for null string pointer ACPI / video: driver must be registered before checking for keypresses cpufreq-dt: fix handling regulator_get_voltage() result cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC PM / sleep: Add support for read-only sysfs attributes ACPI: Fix white space in a structure definition ACPI / SBS: fix inconsistent indenting inside if statement PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching ACPI / PNP: constify device IDs ACPI / PCI: Simplify acpi_penalize_isa_irq() ... commit c17488d06666153a14dd3f21bd10eba58383f6c1 Merge: 34a9304 5156dca Author: Linus Torvalds Date: Tue Jan 12 20:04:15 2016 -0800 Merge tag 'trace-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "Not much new with tracing for this release. Mostly just clean ups and minor fixes. Here's what else is new: - A new TRACE_EVENT_FN_COND macro, combining both _FN and _COND for those that want both. - New selftest to test the instance create and delete - Better debug output when ftrace fails" * tag 'trace-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (24 commits) ftrace: Fix the race between ftrace and insmod ftrace: Add infrastructure for delayed enabling of module functions x86: ftrace: Fix the comments for ftrace_modify_code_direct() tracing: Fix comment to use tracing_on over tracing_enable metag: ftrace: Fix the comments for ftrace_modify_code sh: ftrace: Fix the comments for ftrace_modify_code() ia64: ftrace: Fix the comments for ftrace_modify_code() ftrace: Clean up ftrace_module_init() code ftrace: Join functions ftrace_module_init() and ftrace_init_module() tracing: Introduce TRACE_EVENT_FN_COND macro tracing: Use seq_buf_used() in seq_buf_to_user() instead of len bpf: Constify bpf_verifier_ops structure ftrace: Have ftrace_ops_get_func() handle RCU and PER_CPU flags too ftrace: Remove use of control list and ops ftrace: Fix output of enabled_functions for showing tramp ftrace: Fix a typo in comment ftrace: Show all tramps registered to a record on ftrace_bug() ftrace: Add variable ftrace_expected for archs to show expected code ftrace: Add new type to distinguish what kind of ftrace_bug() tracing: Update cond flag when enabling or disabling a trigger ... commit 34a9304a96d6351c2d35dcdc9293258378fc0bd8 Merge: aee3bfa 6255c46 Author: Linus Torvalds Date: Tue Jan 12 19:20:32 2016 -0800 Merge branch 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - cgroup v2 interface is now official. It's no longer hidden behind a devel flag and can be mounted using the new cgroup2 fs type. Unfortunately, cpu v2 interface hasn't made it yet due to the discussion around in-process hierarchical resource distribution and only memory and io controllers can be used on the v2 interface at the moment. - The existing documentation which has always been a bit of mess is relocated under Documentation/cgroup-v1/. Documentation/cgroup-v2.txt is added as the authoritative documentation for the v2 interface. - Some features are added through for-4.5-ancestor-test branch to enable netfilter xt_cgroup match to use cgroup v2 paths. The actual netfilter changes will be merged through the net tree which pulled in the said branch. - Various cleanups * 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: rename cgroup documentations cgroup: fix a typo. cgroup: Remove resource_counter.txt in Documentation/cgroup-legacy/00-INDEX. cgroup: demote subsystem init messages to KERN_DEBUG cgroup: Fix uninitialized variable warning cgroup: put controller Kconfig options in meaningful order cgroup: clean up the kernel configuration menu nomenclature cgroup_pids: fix a typo. Subject: cgroup: Fix incomplete dd command in blkio documentation cgroup: kill cgrp_ss_priv[CGROUP_CANFORK_COUNT] and friends cpuset: Replace all instances of time_t with time64_t cgroup: replace unified-hierarchy.txt with a proper cgroup v2 documentation cgroup: rename Documentation/cgroups/ to Documentation/cgroup-legacy/ cgroup: replace __DEVEL__sane_behavior with cgroup2 fs type commit aee3bfa3307cd0da2126bdc0ea359dabea5ee8f7 Merge: c597b6b 415b6f1 Author: Linus Torvalds Date: Tue Jan 12 18:57:02 2016 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from Davic Miller: 1) Support busy polling generically, for all NAPI drivers. From Eric Dumazet. 2) Add byte/packet counter support to nft_ct, from Floriani Westphal. 3) Add RSS/XPS support to mvneta driver, from Gregory Clement. 4) Implement IPV6_HDRINCL socket option for raw sockets, from Hannes Frederic Sowa. 5) Add support for T6 adapter to cxgb4 driver, from Hariprasad Shenai. 6) Add support for VLAN device bridging to mlxsw switch driver, from Ido Schimmel. 7) Add driver for Netronome NFP4000/NFP6000, from Jakub Kicinski. 8) Provide hwmon interface to mlxsw switch driver, from Jiri Pirko. 9) Reorganize wireless drivers into per-vendor directories just like we do for ethernet drivers. From Kalle Valo. 10) Provide a way for administrators "destroy" connected sockets via the SOCK_DESTROY socket netlink diag operation. From Lorenzo Colitti. 11) Add support to add/remove multicast routes via netlink, from Nikolay Aleksandrov. 12) Make TCP keepalive settings per-namespace, from Nikolay Borisov. 13) Add forwarding and packet duplication facilities to nf_tables, from Pablo Neira Ayuso. 14) Dead route support in MPLS, from Roopa Prabhu. 15) TSO support for thunderx chips, from Sunil Goutham. 16) Add driver for IBM's System i/p VNIC protocol, from Thomas Falcon. 17) Rationalize, consolidate, and more completely document the checksum offloading facilities in the networking stack. From Tom Herbert. 18) Support aborting an ongoing scan in mac80211/cfg80211, from Vidyullatha Kanchanapally. 19) Use per-bucket spinlock for bpf hash facility, from Tom Leiming. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1375 commits) net: bnxt: always return values from _bnxt_get_max_rings net: bpf: reject invalid shifts phonet: properly unshare skbs in phonet_rcv() dwc_eth_qos: Fix dma address for multi-fragment skbs phy: remove an unneeded condition mdio: remove an unneed condition mdio_bus: NULL dereference on allocation error net: Fix typo in netdev_intersect_features net: freescale: mac-fec: Fix build error from phy_device API change net: freescale: ucc_geth: Fix build error from phy_device API change bonding: Prevent IPv6 link local address on enslaved devices IB/mlx5: Add flow steering support net/mlx5_core: Export flow steering API net/mlx5_core: Make ipv4/ipv6 location more clear net/mlx5_core: Enable flow steering support for the IB driver net/mlx5_core: Initialize namespaces only when supported by device net/mlx5_core: Set priority attributes net/mlx5_core: Connect flow tables net/mlx5_core: Introduce modify flow table command net/mlx5_core: Managing root flow table ... commit c597b6bcd5c624534afc3df65cdc42bb05173bca Merge: 60b7eca 48d62764 Author: Linus Torvalds Date: Tue Jan 12 18:51:14 2016 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto update from Herbert Xu: "Algorithms: - Add RSA padding algorithm Drivers: - Add GCM mode support to atmel - Add atmel support for SAMA5D2 devices - Add cipher modes to talitos - Add rockchip driver for rk3288 - Add qat support for C3XXX and C62X" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (103 commits) crypto: hifn_795x, picoxcell - use ablkcipher_request_cast crypto: qat - fix SKU definiftion for c3xxx dev crypto: qat - Fix random config build issue crypto: ccp - use to_pci_dev and to_platform_device crypto: qat - Rename dh895xcc mmp firmware crypto: 842 - remove WARN inside printk crypto: atmel-aes - add debug facilities to monitor register accesses. crypto: atmel-aes - add support to GCM mode crypto: atmel-aes - change the DMA threshold crypto: atmel-aes - fix the counter overflow in CTR mode crypto: atmel-aes - fix atmel-ctr-aes driver for RFC 3686 crypto: atmel-aes - create sections to regroup functions by usage crypto: atmel-aes - fix typo and indentation crypto: atmel-aes - use SIZE_IN_WORDS() helper macro crypto: atmel-aes - improve performances of data transfer crypto: atmel-aes - fix atmel_aes_remove() crypto: atmel-aes - remove useless AES_FLAGS_DMA flag crypto: atmel-aes - reduce latency of DMA completion crypto: atmel-aes - remove unused 'err' member of struct atmel_aes_dev crypto: atmel-aes - rework crypto request completion ... commit 60b7eca1dc2ec066916b3b7ac6ad89bea13cb9af Merge: 420d12d 4fdd1d5 Author: Linus Torvalds Date: Tue Jan 12 18:20:20 2016 -0800 Merge tag 'upstream-4.5-rc1' of git://git.infradead.org/linux-ubifs Pull UBI/UBIFS updates from Richard Weinberger: "This contains three changes - two cleanups and one UBI wear leveling improvement by Sebastian Siewior" * tag 'upstream-4.5-rc1' of git://git.infradead.org/linux-ubifs: ubifs: Use XATTR_*_PREFIX_LEN UBIFS: add a comment in key.h for unused parameter mtd: ubi: wl: avoid erasing a PEB which is empty commit 420d12d6ade1e9c02b98fb9a381a17d7ccc7d35e Merge: 4d58967 1609bac Author: Linus Torvalds Date: Tue Jan 12 18:15:34 2016 -0800 Merge tag 'configfs-for-linus' of git://git.infradead.org/users/hch/configfs Pull configfs updates from Christoph Hellwig: "I'm assisting Joel as co-maintainer and patch monkey now, and you will see pull reuquests from me for a while. Besides the MAINTAINERS update there is just a single change, which adds support for binary attributes to configfs, which are very similar to the sysfs binary attributes. Thanks to Pantelis Antoniou! You will see another actually bigger set of configfs changes in the SCSI target pull from Nic - those were merged before this new tree even existed" * tag 'configfs-for-linus' of git://git.infradead.org/users/hch/configfs: configfs: add myself as co-maintainer, updated git tree configfs: implement binary attributes commit 4d58967783611c5676820b8d47a9b6b0bb456995 Merge: 33caf82 a93a9983 Author: Linus Torvalds Date: Tue Jan 12 18:09:35 2016 -0800 Merge tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Bob Peterson: "Here is a list of patches we've accumulated for GFS2 for the current upstream merge window. Last window's set was short, but I warned that this one would be bigger, and so it is. We've got 19 patches: - A patch from Abhi Das to propagate the GFS2_DIF_SYSTEM bit so that newly added journals don't get flagged, deleted, and recreated by fsck.gfs2. - Two patches from Andreas Gruenbacher to improve GFS2 performance where extended attributes are involved. - A patch from Andy Price to fix a suspicious rcu dereference error. - Two patches from Ben Marzinski that rework how GFS2's NFS cookies are managed. This fixes readdir problems with nfs-over-gfs2. - A patch from Ben Marzinski that fixes a race in unmounting GFS2. - A set of four patches from me to move the resource group reservations inside the gfs2 inode to improve performance and fix a bug whereby get_write_access improperly prevented some operations like chown. - A patch from me to spinlock-protect the setting of system statfs file data. This was causing small discrepancies between df and du. - A patch from me to reintroduce a timeout while clearing glocks which was accidentally dropped some time ago. - A patch from me to wait for iopen glock dequeues in order to improve deleting of files that were unlinked from a different cluster node. - A patch from me to ensure metadata address spaces get truncated when an inode is evicted. - A patch from me to fix a bug in which a memory leak could occur in some error cases when inodes were trying to be created. - A patch to consistently use iopen glocks to transition from the unlinked state to the deleted state. - A patch to fix a glock reference count error when inode creation fails. - A patch from Junxiao Bi to fix an flock panic. - A patch from Markus Elfring that removes an unnecessary if" * tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: fix flock panic issue GFS2: Don't do glock put on when inode creation fails GFS2: Always use iopen glock for gl_deletes GFS2: Release iopen glock in gfs2_create_inode error cases GFS2: Truncate address space mapping when deleting an inode GFS2: Wait for iopen glock dequeues gfs2: clear journal live bit in gfs2_log_flush gfs2: change gfs2 readdir cookie gfs2: keep offset when splitting dir leaf blocks GFS2: Reintroduce a timeout in function gfs2_gl_hash_clear GFS2: Update master statfs buffer with sd_statfs_spin locked GFS2: Reduce size of incore inode GFS2: Make rgrp reservations part of the gfs2_inode structure GFS2: Extract quota data from reservations structure (revert 5407e24) gfs2: Extended attribute readahead optimization gfs2: Extended attribute readahead GFS2: Use rht_for_each_entry_rcu in glock_hash_walk GFS2: Delete an unnecessary check before the function call "iput" gfs2: Automatically set GFS2_DIF_SYSTEM flag on system files commit a61674bdfc7c2bf909c4010699607b62b69b7bec Author: Ulrich Weigand Date: Tue Jan 12 23:14:23 2016 +1100 powerpc/module: Handle R_PPC64_ENTRY relocations GCC 6 will include changes to generated code with -mcmodel=large, which is used to build kernel modules on powerpc64le. This was necessary because the large model is supposed to allow arbitrary sizes and locations of the code and data sections, but the ELFv2 global entry point prolog still made the unconditional assumption that the TOC associated with any particular function can be found within 2 GB of the function entry point: func: addis r2,r12,(.TOC.-func)@ha addi r2,r2,(.TOC.-func)@l .localentry func, .-func To remove this assumption, GCC will now generate instead this global entry point prolog sequence when using -mcmodel=large: .quad .TOC.-func func: .reloc ., R_PPC64_ENTRY ld r2, -8(r12) add r2, r2, r12 .localentry func, .-func The new .reloc triggers an optimization in the linker that will replace this new prolog with the original code (see above) if the linker determines that the distance between .TOC. and func is in range after all. Since this new relocation is now present in module object files, the kernel module loader is required to handle them too. This patch adds support for the new relocation and implements the same optimization done by the GNU linker. Cc: stable@vger.kernel.org Signed-off-by: Ulrich Weigand Signed-off-by: Michael Ellerman arch/powerpc/include/uapi/asm/elf.h | 2 ++ arch/powerpc/kernel/module_64.c | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 2e50c4bef77511b42cc226865d6bc568fa7f8769 Author: Ulrich Weigand Date: Tue Jan 12 23:14:22 2016 +1100 scripts/recordmcount.pl: support data in text section on powerpc If a text section starts out with a data blob before the first function start label, disassembly parsing doing in recordmcount.pl gets confused on powerpc, leading to creation of corrupted module objects. This was not a problem so far since the compiler would never create such text sections. However, this has changed with a recent change in GCC 6 to support distances of > 2GB between a function and its assoicated TOC in the ELFv2 ABI, exposing this problem. There is already code in recordmcount.pl to handle such data blobs on the sparc64 platform. This patch uses the same method to handle those on powerpc as well. Cc: stable@vger.kernel.org Acked-by: Steven Rostedt Signed-off-by: Ulrich Weigand Signed-off-by: Michael Ellerman scripts/recordmcount.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c88c5d43732a0356f99e5e4d1ad62ab1ea516b81 Author: Russell Currey Date: Wed Jan 13 12:04:32 2016 +1100 powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages The recently added OPAL API call, OPAL_CONSOLE_FLUSH, originally took no parameters and returned nothing. The call was updated to accept the terminal number to flush, and returned various values depending on the state of the output buffer. The prototype has been updated and its usage in the OPAL kmsg dumper has been modified to support its new behaviour as an incremental flush. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal.h | 2 +- arch/powerpc/platforms/powernv/opal-kmsg.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit 33caf82acf4dc420bf0f0136b886f7b27ecf90c5 Merge: ca9706a bbddca8 Author: Linus Torvalds Date: Tue Jan 12 17:11:47 2016 -0800 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "All kinds of stuff. That probably should've been 5 or 6 separate branches, but by the time I'd realized how large and mixed that bag had become it had been too close to -final to play with rebasing. Some fs/namei.c cleanups there, memdup_user_nul() introduction and switching open-coded instances, burying long-dead code, whack-a-mole of various kinds, several new helpers for ->llseek(), assorted cleanups and fixes from various people, etc. One piece probably deserves special mention - Neil's lookup_one_len_unlocked(). Similar to lookup_one_len(), but gets called without ->i_mutex and tries to avoid ever taking it. That, of course, means that it's not useful for any directory modifications, but things like getting inode attributes in nfds readdirplus are fine with that. I really should've asked for moratorium on lookup-related changes this cycle, but since I hadn't done that early enough... I *am* asking for that for the coming cycle, though - I'm going to try and get conversion of i_mutex to rwsem with ->lookup() done under lock taken shared. There will be a patch closer to the end of the window, along the lines of the one Linus had posted last May - mechanical conversion of ->i_mutex accesses to inode_lock()/inode_unlock()/inode_trylock()/ inode_is_locked()/inode_lock_nested(). To quote Linus back then: ----- | This is an automated patch using | | sed 's/mutex_lock(&\(.*\)->i_mutex)/inode_lock(\1)/' | sed 's/mutex_unlock(&\(.*\)->i_mutex)/inode_unlock(\1)/' | sed 's/mutex_lock_nested(&\(.*\)->i_mutex,[ ]*I_MUTEX_\([A-Z0-9_]*\))/inode_lock_nested(\1, I_MUTEX_\2)/' | sed 's/mutex_is_locked(&\(.*\)->i_mutex)/inode_is_locked(\1)/' | sed 's/mutex_trylock(&\(.*\)->i_mutex)/inode_trylock(\1)/' | | with a very few manual fixups ----- I'm going to send that once the ->i_mutex-affecting stuff in -next gets mostly merged (or when Linus says he's about to stop taking merges)" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits) nfsd: don't hold i_mutex over userspace upcalls fs:affs:Replace time_t with time64_t fs/9p: use fscache mutex rather than spinlock proc: add a reschedule point in proc_readfd_common() logfs: constify logfs_block_ops structures fcntl: allow to set O_DIRECT flag on pipe fs: __generic_file_splice_read retry lookup on AOP_TRUNCATED_PAGE fs: xattr: Use kvfree() [s390] page_to_phys() always returns a multiple of PAGE_SIZE nbd: use ->compat_ioctl() fs: use block_device name vsprintf helper lib/vsprintf: add %*pg format specifier fs: use gendisk->disk_name where possible poll: plug an unused argument to do_poll amdkfd: don't open-code memdup_user() cdrom: don't open-code memdup_user() rsxx: don't open-code memdup_user() mtip32xx: don't open-code memdup_user() [um] mconsole: don't open-code memdup_user_nul() [um] hostaudio: don't open-code memdup_user() ... commit ca9706a282943899981e83604f2ed13e88ce4239 Merge: fce205e e126758 Author: Linus Torvalds Date: Tue Jan 12 16:49:58 2016 -0800 Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov_iter infrastructure updates from Al Viro: "A couple of iov_iter updates" * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: iov_iter: export import_single_range() iov_iter: constify {csum_and_,}copy_to_iter() commit fce205e9da8e063aa1cf3d6583c1a9ed2b82f3f0 Merge: 065019a 2b3909f Author: Linus Torvalds Date: Tue Jan 12 16:30:34 2016 -0800 Merge branch 'work.copy_file_range' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs copy_file_range updates from Al Viro: "Several series around copy_file_range/CLONE" * 'work.copy_file_range' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: btrfs: use new dedupe data function pointer vfs: hoist the btrfs deduplication ioctl to the vfs vfs: wire up compat ioctl for CLONE/CLONE_RANGE cifs: avoid unused variable and label nfsd: implement the NFSv4.2 CLONE operation nfsd: Pass filehandle to nfs4_preprocess_stateid_op() vfs: pull btrfs clone API to vfs layer locks: new locks_mandatory_area calling convention vfs: Add vfs_copy_file_range() support for pagecache copies btrfs: add .copy_file_range file operation x86: add sys_copy_file_range to syscall tables vfs: add copy_file_range syscall and vfs helper commit 85c017f2f1a6ae213b08c9d694202df8c912c614 Merge: 1c0276d 95162dc Author: Dmitry Torokhov Date: Tue Jan 12 16:29:13 2016 -0800 Merge branch 'xpad' into next Bring in update to xpad driver improves support of Xbox One and wireless controllers and fixes handling of concurrent requests to force feedback and LEDs. commit 95162dc8493ed92e5f7dcc8874e58c2ba3836b43 Author: Pavel Rojtberg Date: Tue Jan 12 14:35:51 2016 -0800 Input: xpad - correct xbox one pad device name Apparently the Covert Forces ID is not Covert Forces pad exclusive, but rather denotes a new firmware version that can be found on all new controllers and can be also updated on old hardware using Windows 10. see: https://github.com/paroj/xpad/issues/19 Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 065019a38feab5f2659cbd44080d528f8dff0b00 Merge: 4f31d77 b4d629a Author: Linus Torvalds Date: Tue Jan 12 15:46:17 2016 -0800 Merge tag 'locks-v4.5-1' of git://git.samba.org/jlayton/linux Pull file locking updates from Jeff Layton: "File locking related changes for v4.5 (pile #1) Highlights: - new Kconfig option to allow disabling mandatory locking (which is racy anyway) - new tracepoints for setlk and close codepaths - fix for a long-standing bug in code that handles races between setting a POSIX lock and close()" * tag 'locks-v4.5-1' of git://git.samba.org/jlayton/linux: locks: rename __posix_lock_file to posix_lock_inode locks: prink more detail when there are leaked locks locks: pass inode pointer to locks_free_lock_context locks: sprinkle some tracepoints around the file locking code locks: don't check for race with close when setting OFD lock locks: fix unlock when fcntl_setlk races with a close fs: make locks.c explicitly non-modular locks: use list_first_entry_or_null() locks: Don't allow mounts in user namespaces to enable mandatory locking locks: Allow disabling mandatory locking at compile time commit 779ff75617099f4defe14e20443b95019a4c5ae8 Author: Keith Busch Date: Tue Jan 12 15:09:31 2016 -0700 NVMe: Export NVMe attributes to sysfs group Adds all controller information to attribute list exposed to sysfs, and appends the reset_controller attribute to it. The nvme device is created with this attribute list, so driver no long manages its attributes. Reported-by: Sujith Pandel Cc: Sujith Pandel Cc: David Milburn Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) commit e36f6204288088fda50d1c84830340ccb70f85ff Author: Keith Busch Date: Tue Jan 12 15:08:39 2016 -0700 block: split bios to max possible length This splits bio in the middle of a vector to form the largest possible bio at the h/w's desired alignment, and guarantees the bio being split will have some data. The criteria for splitting is changed from the max sectors to the h/w's optimal sector alignment if it is provided. For h/w that advertise their block storage's underlying chunk size, it's a big performance win to not submit commands that cross them. If sector alignment is not provided, this patch uses the max sectors as before. This addresses the performance issue commit d380561113 attempted to fix, but was reverted due to splitting logic error. Signed-off-by: Keith Busch Cc: Jens Axboe Cc: Ming Lei Cc: Kent Overstreet Cc: # 4.4.x- Signed-off-by: Jens Axboe block/blk-merge.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 415b6f19e87e350b13585591859d4fdf50772229 Author: Arnd Bergmann Date: Tue Jan 12 16:05:08 2016 +0100 net: bnxt: always return values from _bnxt_get_max_rings Newly added code in the bnxt driver uses a couple of variables that are never initialized when CONFIG_BNXT_SRIOV is not set, and gcc correctly warns about that: In file included from include/linux/list.h:8:0, from include/linux/module.h:9, from drivers/net/ethernet/broadcom/bnxt/bnxt.c:10: drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_get_max_rings': include/linux/kernel.h:794:26: warning: 'cp' may be used uninitialized in this function [-Wmaybe-uninitialized] include/linux/kernel.h:794:26: warning: 'tx' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/net/ethernet/broadcom/bnxt/bnxt.c:5730:11: warning: 'rx' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/net/ethernet/broadcom/bnxt/bnxt.c:5736:6: note: 'rx' was declared here This changes the condition so that we fall back to using the PF data if VF is not available, and always initialize the variables to something useful. Signed-off-by: Arnd Bergmann Fixes: 6e6c5a57fbe1 ("bnxt_en: Modify bnxt_get_max_rings() to support shared or non shared rings.") Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 229394e8e62a4191d592842cf67e80c62a492937 Author: Rabin Vincent Date: Tue Jan 12 20:17:08 2016 +0100 net: bpf: reject invalid shifts On ARM64, a BUG() is triggered in the eBPF JIT if a filter with a constant shift that can't be encoded in the immediate field of the UBFM/SBFM instructions is passed to the JIT. Since these shifts amounts, which are negative or >= regsize, are invalid, reject them in the eBPF verifier and the classic BPF filter checker, for all architectures. Signed-off-by: Rabin Vincent Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 10 ++++++++++ net/core/filter.c | 5 +++++ 2 files changed, 15 insertions(+) commit a5cdb68c2c10f0865122656833cd07636a4143ee Author: Keith Busch Date: Tue Jan 12 14:41:18 2016 -0700 NVMe: Shutdown controller only for power-off We don't need to shutdown a controller for a reset. A controller in a shutdown state may take longer to become ready than one that was simply disabled. This patch has the driver shut down a controller only if the device is about to be powered off or being removed. When taking the controller down for a reset reason, the controller will be disabled instead. Function names have been updated in this patch to reflect their changed semantics. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit db3cbfff5bcc0b9a82d8c71f00b9d60fad215871 Author: Keith Busch Date: Tue Jan 12 14:41:17 2016 -0700 NVMe: IO queue deletion re-write The nvme driver deletes IO queues asynchronously since this operation may potentially take an undesirable amount of time with a large number of queues if done serially. The driver used to manage coordinating asynchronous deletions. This patch simplifies that by leveraging the block layer rather than using kthread workers and chaining more complicated callbacks. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 251 ++++++++++++++++-------------------------------- 1 file changed, 81 insertions(+), 170 deletions(-) commit ccdf6ce6a8dba374668ae9b4d763e19903611c38 Author: Matti Vaittinen Date: Mon Jan 11 14:26:19 2016 +0200 net: netlink: Fix multicast group storage allocation for families with more than one groups Multicast groups are stored in global buffer. Check for needed buffer size incorrectly compares buffer size to first id for family. This means that for families with more than one mcast id one may allocate too small buffer and end up writing rest of the groups to some unallocated memory. Fix the buffer size check to compare allocated space to last mcast id for the family. Tested on ARM using kernel 3.14 Signed-off-by: Matti Vaittinen Signed-off-by: David S. Miller net/netlink/genetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f31d774dd5239e563f22ffe1403292414e6f779 Merge: 1baa5ef 3e46b25 Author: Linus Torvalds Date: Tue Jan 12 13:27:18 2016 -0800 Merge branch 'for-linus-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: "This contains beside of random fixes/cleanups two bigger changes: - seccomp support by Mickaël Salaün - IRQ rework by Anton Ivanov" * 'for-linus-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Use race-free temporary file creation um: Do not set unsecure permission for temporary file um: Fix build error and kconfig for i386 um: Add seccomp support um: Add full asm/syscall.h support selftests/seccomp: Remove the need for HAVE_ARCH_TRACEHOOK um: Fix ptrace GETREGS/SETREGS bugs um: link with -lpthread um: Update UBD to use pread/pwrite family of functions um: Do not change hard IRQ flags in soft IRQ processing um: Prevent IRQ handler reentrancy uml: flush stdout before forking uml: fix hostfs mknod() commit 1baa5efbeb6eb75de697f7b5931094be33f12005 Merge: c9bed1c 45bdbcf Author: Linus Torvalds Date: Tue Jan 12 13:22:12 2016 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "PPC changes will come next week. - s390: Support for runtime instrumentation within guests, support of 248 VCPUs. - ARM: rewrite of the arm64 world switch in C, support for 16-bit VM identifiers. Performance counter virtualization missed the boat. - x86: Support for more Hyper-V features (synthetic interrupt controller), MMU cleanups" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (115 commits) kvm: x86: Fix vmwrite to SECONDARY_VM_EXEC_CONTROL kvm/x86: Hyper-V SynIC timers tracepoints kvm/x86: Hyper-V SynIC tracepoints kvm/x86: Update SynIC timers on guest entry only kvm/x86: Skip SynIC vector check for QEMU side kvm/x86: Hyper-V fix SynIC timer disabling condition kvm/x86: Reorg stimer_expiration() to better control timer restart kvm/x86: Hyper-V unify stimer_start() and stimer_restart() kvm/x86: Drop stimer_stop() function kvm/x86: Hyper-V timers fix incorrect logical operation KVM: move architecture-dependent requests to arch/ KVM: renumber vcpu->request bits KVM: document which architecture uses each request bit KVM: Remove unused KVM_REQ_KICK to save a bit in vcpu->requests kvm: x86: Check kvm_write_guest return value in kvm_write_wall_clock KVM: s390: implement the RI support of guest kvm/s390: drop unpaired smp_mb kvm: x86: fix comment about {mmu,nested_mmu}.gva_to_gpa KVM: x86: MMU: Use clear_page() instead of init_shadow_page_table() arm/arm64: KVM: Detect vGIC presence at runtime ... commit 2c2277dc8e18eac8a59cdd0c62ca15106ab6f857 Author: Helge Deller Date: Wed Nov 25 22:43:45 2015 +0100 parisc: Imporove debug info about space registers and TLB configuration Signed-off-by: Helge Deller arch/parisc/include/asm/pdc.h | 2 +- arch/parisc/kernel/cache.c | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) commit bb0dcebef99fd024c0fb2703179bc7d1fd5ee995 Author: Dave Jones Date: Thu Nov 19 19:24:33 2015 -0500 ipmi: Remove unnecessary pci_disable_device. We call cleanup_one_si from ipmi_pci_remove, which calls ->addr_source_cleanup, which gets set to point to ipmi_pci_cleanup, which does a pci_disable_device. On return from this, we do a second pci_disable_device, which results in the trace below. ipmi_si 0000:00:16.0: disabling already-disabled device Call Trace: [] dump_stack+0x45/0x57 [] warn_slowpath_common+0x97/0xe0 [] warn_slowpath_fmt+0x46/0x50 [] pci_disable_device+0xb1/0xc0 [] ipmi_pci_remove+0x25/0x30 [ipmi_si] [] pci_device_remove+0x46/0xc0 [] __device_release_driver+0x7f/0xf0 [] driver_detach+0xb8/0xc0 [] bus_remove_driver+0x50/0xa0 [] driver_unregister+0x2e/0x60 [] pci_unregister_driver+0x25/0x90 [] cleanup_ipmi_si+0xd4/0xf0 [ipmi_si] [] SyS_delete_module+0x12a/0x200 [] system_call_fastpath+0x12/0x17 Signed-off-by: Dave Jones drivers/char/ipmi/ipmi_si_intf.c | 1 - 1 file changed, 1 deletion(-) commit aad756f869c445488f814a2bff9211d81c46535e Author: Krzysztof Kozlowski Date: Thu Nov 19 12:56:39 2015 +0900 char: ipmi: Drop owner assignment from i2c_driver i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski drivers/char/ipmi/ipmi_ssif.c | 1 - 1 file changed, 1 deletion(-) commit 99ee67351bedf23fe6b969dd94cc2847b397cd20 Author: LABBE Corentin Date: Fri Nov 13 13:31:51 2015 +0100 ipmi: constify some struct and char arrays Lots of char arrays could be set as const since they contain only literal char arrays. We could in the same time make const some struct members who are pointer to those const char arrays. Signed-off-by: LABBE Corentin Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 7 ++++--- drivers/char/ipmi/ipmi_si_intf.c | 27 ++++++++++++++++----------- 2 files changed, 20 insertions(+), 14 deletions(-) commit fbdd9501a1123ae6d8d828d97df89bf122d951ca Author: Helge Deller Date: Sun Jan 10 09:36:24 2016 +0100 parisc: Drop parisc-specific NSIGTRAP define NIGTRAP is already defined in asm-generic/siginfo.h, so no need to define it ourselves. Signed-off-by: Helge Deller arch/parisc/include/uapi/asm/siginfo.h | 3 --- 1 file changed, 3 deletions(-) commit c9bed1cf51011c815d88288b774865d013ca78a8 Merge: 75777c1 a4cdb55 Author: Linus Torvalds Date: Tue Jan 12 13:05:36 2016 -0800 Merge tag 'for-linus-4.5-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from David Vrabel: "Xen features and fixes for 4.5-rc0: - Stolen ticks and PV wallclock support for arm/arm64 - Add grant copy ioctl to gntdev device" * tag 'for-linus-4.5-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/gntdev: add ioctl for grant copy x86/xen: don't reset vcpu_info on a cancelled suspend xen/gntdev: constify mmu_notifier_ops structures xen/grant-table: constify gnttab_ops structure xen/time: use READ_ONCE xen/x86: convert remaining timespec to timespec64 in xen_pvclock_gtod_notify xen/x86: support XENPF_settime64 xen/arm: set the system time in Xen via the XENPF_settime64 hypercall xen/arm: introduce xen_read_wallclock arm: extend pvclock_wall_clock with sec_hi xen: introduce XENPF_settime64 xen/arm: introduce HYPERVISOR_platform_op on arm and arm64 xen: rename dom0_op to platform_op xen/arm: account for stolen ticks arm64: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops arm: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops missing include asm/paravirt.h in cputime.c xen: move xen_setup_runstate_info and get_runstate_snapshot to drivers/xen/time.c commit e60fc5aa608eb38b47ba4ee058f306f739eb70a0 Author: Helge Deller Date: Sun Jan 10 09:30:42 2016 +0100 parisc: Fix __ARCH_SI_PREAMBLE_SIZE On a 64bit kernel build the compiler aligns the _sifields union in the struct siginfo_t on a 64bit address. The __ARCH_SI_PREAMBLE_SIZE define compensates for this alignment and thus fixes the wait testcase of the strace package. The symptoms of a wrong __ARCH_SI_PREAMBLE_SIZE value is that _sigchld.si_stime variable is missed to be copied and thus after a copy_siginfo() will have uninitialized values. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org arch/parisc/include/uapi/asm/siginfo.h | 4 ++++ 1 file changed, 4 insertions(+) commit fc6325750348272d10a8e39adb9fc0e89a667774 Author: Helge Deller Date: Sat Dec 12 18:22:03 2015 +0100 parisc: Reduce overhead of parisc_requires_coherency() Signed-off-by: Helge Deller arch/parisc/include/asm/processor.h | 17 ++++++++--------- arch/parisc/kernel/processor.c | 10 +++++++++- 2 files changed, 17 insertions(+), 10 deletions(-) commit 602c9c9a01a4f0ef091295ac75c74c7fe94d69a4 Author: Helge Deller Date: Mon Dec 21 10:00:49 2015 +0100 parisc: Initialize PCI bridge cache line and default latency PCI controllers and pci-pci bridges may have not been fully initialized regarding cache line and defaul latency. This partly reverts commit 5f0e9b4 ("parisc: Remove unused pcibios_init_bus()") Signed-off-by: Helge Deller arch/parisc/include/asm/pci.h | 1 + arch/parisc/kernel/pci.c | 26 ++++++++++++++++++++++++++ drivers/parisc/dino.c | 4 +++- drivers/parisc/lba_pci.c | 4 +++- 4 files changed, 33 insertions(+), 2 deletions(-) commit 75777c1855e10c010c9c3a21611d95dd9be01ab1 Merge: c3ce79d ca3060d Author: Linus Torvalds Date: Tue Jan 12 13:00:16 2016 -0800 Merge branch 'for-linux-next' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming Pull tiny c6x update from Mark Salter. * 'for-linux-next' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming: c6x: Use generic clkdev.h header commit 06928b3870d213cb42b00e2949419f2d44b9d45f Author: Rabin Vincent Date: Tue Jan 12 20:17:08 2016 +0100 net: bpf: reject invalid shifts On ARM64, a BUG() is triggered in the eBPF JIT if a filter with a constant shift that can't be encoded in the immediate field of the UBFM/SBFM instructions is passed to the JIT. Since these shifts amounts, which are negative or >= regsize, are invalid, reject them in the eBPF verifier and the classic BPF filter checker, for all architectures. Signed-off-by: Rabin Vincent Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 10 ++++++++++ net/core/filter.c | 5 +++++ 2 files changed, 15 insertions(+) commit c3ce79d6a89e25fe0db1851b1b72e6d0dffc8a66 Merge: 01e9d22 ce657b1 Author: Linus Torvalds Date: Tue Jan 12 12:47:23 2016 -0800 Merge branch 'component' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull component updates from Russell King: "Updates for the component helper merged last year. This update removes the old add_components method of detecting and looking up the components associated with a master device. Last time I checked during the 4.4-rc cycle, there were no users of the old interfaces, as has been the case for some time now. Breakage due to conflicting development is possible, in which case this pull will have to be reverted - however, these changes have been in linux-next since Dec 7th without any problems reported. Removal of that then allows us to change the way we track components internally, allowing us to release data that has been used for matching at the appropriate time, thereby allowing any resource leaks caused by that missing functionality to be resolved" * 'component' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: component: add support for releasing match data component: track components via array rather than list component: move check for unbound master into try_to_bring_up_masters() component: remove old add_components method commit 01e9d22638f387b5413163d1030169b6478c09c5 Merge: 541d284 6660800 Author: Linus Torvalds Date: Tue Jan 12 12:39:07 2016 -0800 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - UEFI boot and runtime services support for ARM from Ard Biesheuvel and Roy Franz. - DT compatibility with old atags booting protocol for Nokia N900 devices from Ivaylo Dimitrov. - PSCI firmware interface using new arm-smc calling convention from Jens Wiklander. - Runtime patching for udiv/sdiv instructions for ARMv7 CPUs that support these instructions from Nicolas Pitre. - L2x0 cache updates from Dirk B and Linus Walleij. - Randconfig fixes from Arnd Bergmann. - ARMv7M (nommu) updates from Ezequiel Garcia * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (34 commits) ARM: 8481/2: drivers: psci: replace psci firmware calls ARM: 8480/2: arm64: add implementation for arm-smccc ARM: 8479/2: add implementation for arm-smccc ARM: 8478/2: arm/arm64: add arm-smccc ARM: 8494/1: mm: Enable PXN when running non-LPAE kernel on LPAE processor ARM: 8496/1: OMAP: RX51: save ATAGS data in the early boot stage ARM: 8495/1: ATAGS: move save_atags() to arch/arm/include/asm/setup.h ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode ARM: 8482/1: l2x0: make it possible to disable outer sync from DT ARM: 8488/1: Make IPI_CPU_BACKTRACE a "non-secure" SGI ARM: 8487/1: Remove IPI_CALL_FUNC_SINGLE ARM: 8485/1: cpuidle: remove cpu parameter from the cpuidle_ops suspend hook ARM: 8484/1: Documentation: l2c2x0: Mention separate controllers explicitly ARM: 8483/1: Documentation: l2c: Rename l2cc to l2c2x0 ARM: 8477/1: runtime patch udiv/sdiv instructions into __aeabi_{u}idiv() ARM: 8476/1: VDSO: use PTR_ERR_OR_ZERO for vma check ARM: 8453/2: proc-v7.S: don't locate temporary stack space in .text section ARM: add UEFI stub support ARM: wire up UEFI init and runtime support ARM: only consider memblocks with NOMAP cleared for linear mapping ... commit 25646264e15af96c5c630fc742708b1eb3339222 Author: Keith Busch Date: Mon Jan 4 09:10:57 2016 -0700 NVMe: Remove queue freezing on resets NVMe submits all commands through the block layer now. This means we can let requests queue at the blk-mq hardware context since there is no path that bypasses this anymore so we don't need to freeze the queues anymore. The driver can simply stop the h/w queues from running during a reset instead. This also fixes a WARN in percpu_ref_reinit when the queue was unfrozen with requeued requests. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 7 ++----- drivers/nvme/host/nvme.h | 4 ++-- drivers/nvme/host/pci.c | 8 ++++---- 3 files changed, 8 insertions(+), 11 deletions(-) commit 1d49c38c4865c596b01b31a52540275c1bb383e7 Author: Keith Busch Date: Mon Jan 4 09:10:56 2016 -0700 NVMe: Use a retryable error code on reset A negative status has the "do not retry" bit set, which makes it not retryable. Use a fake status that can potentially be retried on reset. An aborted command's status is overridden by the timeout handler so that it won't be retried, which is necessary to keep initialization from getting into a reset loop. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3e9d50cd6ed392bb716e35c134d1e82707c51b4 Author: Keith Busch Date: Mon Jan 4 09:10:55 2016 -0700 NVMe: Fix admin queue ring wrap The tag set queue depth needs to be one less than the h/w queue depth so we don't wrap the circular buffer. This conforms to the specification defined "Full Queue" condition. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4490733250b8b272a6d3e66352dd7b8025409549 Author: Christoph Hellwig Date: Thu Dec 24 15:27:02 2015 +0100 nvme: make SG_IO support optional Translation SCSI commands to NVMe commands is rather pointless in general as applications must not expext to be able to use SCSI commands on a generic block device. Make the huge translation layer optional and hope no one will ever enable it in the future. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/Kconfig | 11 +++++++++++ drivers/nvme/host/Makefile | 3 ++- drivers/nvme/host/core.c | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) commit bfd8947194b2e2a53db82bbc7eb7c15d028c46db Author: Christoph Hellwig Date: Thu Dec 24 15:27:01 2015 +0100 nvme: fixes for NVME_IOCTL_IO_CMD on the char device Make sure we synchronize access to the namespaces list and grab a reference to the namespace before doing I/O. Make sure to reject the ioctl if multiple namespaces are present as it's entirely unsafe, and warn when using it even with a single namespace. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Acked-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit 69d3b8ac15a5eb938e6a01909f6cc8ae4b5d3a17 Author: Christoph Hellwig Date: Thu Dec 24 15:27:00 2015 +0100 nvme: synchronize access to ctrl->namespaces Currently traversal and modification of ctrl->namespaces happens completely unsynchronized, which can be fixed by the addition of a simple mutex. Note: nvme_dev_ioctl will be handled in the next patch. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Acked-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 17 +++++++++++++++++ drivers/nvme/host/nvme.h | 1 + 2 files changed, 18 insertions(+) commit 363c9aacb6c59bb63148dd115632880a4aed4d88 Author: Sagi Grimberg Date: Thu Dec 24 15:26:59 2015 +0100 nvme: Move nvme_freeze/unfreeze_queues to nvme core Nothing pci specific about them and We'll need them exported in other transports too. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Acked-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 28 ++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 3 +++ drivers/nvme/host/pci.c | 32 ++------------------------------ 3 files changed, 33 insertions(+), 30 deletions(-) commit 541d284be0fcca3d3990e6dd89b091aec66849c6 Merge: fa5fd7c 5d7ee87 Author: Linus Torvalds Date: Tue Jan 12 12:29:25 2016 -0800 Merge tag 'arm64-perf' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm[64] perf updates from Will Deacon: "In the past, I have funnelled perf updates through the respective architecture trees, but now that the arm/arm64 perf driver has been largely consolidated under drivers/perf/, it makes more sense to send a separate pull, particularly as I'm listed as maintainer for all the files involved. I offered the branch to arm-soc, but Arnd suggested that I just send it to you directly. So, here is the arm/arm64 perf queue for 4.5. The main features are described below, but the most useful change is from Drew, which advertises our architected event mapping in sysfs so that the perf tool is a lot more user friendly and no longer requires the use of magic hex constants for profiling common events. - Support for the CPU PMU in Cortex-A72 - Add sysfs entries to describe the architected events and their mappings for PMUv{1-3}" * tag 'arm64-perf' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: perf: add support for Cortex-A72 arm64: perf: add format entry to describe event -> config mapping ARM: perf: add format entry to describe event -> config mapping arm64: kernel: enforce pmuserenr_el0 initialization and restore arm64: perf: Correct Cortex-A53/A57 compatible values arm64: perf: Add event descriptions arm64: perf: Convert event enums to #defines arm: perf: Add event descriptions arm: perf: Convert event enums to #defines drivers/perf: kill armpmu_register commit fa5fd7c628412ee09ccf5e1d6eebe1dba916b8ee Merge: 19e2fc4 2a803c4 Author: Linus Torvalds Date: Tue Jan 12 12:23:33 2016 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "Here is the core arm64 queue for 4.5. As you might expect, the Christmas break resulted in a number of patches not making the final cut, so 4.6 is likely to be larger than usual. There's still some useful stuff here, however, and it's detailed below. The EFI changes have been Reviewed-by Matt and the memblock change got an "OK" from akpm. Summary: - Support for a separate IRQ stack, although we haven't reduced the size of our thread stack just yet since we don't have enough data to determine a safe value - Refactoring of our EFI initialisation and runtime code into drivers/firmware/efi/ so that it can be reused by arch/arm/. - Ftrace improvements when unwinding in the function graph tracer - Document our silicon errata handling process - Cache flushing optimisation when mapping executable pages - Support for hugetlb mappings using the contiguous hint in the pte" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (45 commits) arm64: head.S: use memset to clear BSS efi: stub: define DISABLE_BRANCH_PROFILING for all architectures arm64: entry: remove pointless SPSR mode check arm64: mm: move pgd_cache initialisation to pgtable_cache_init arm64: module: avoid undefined shift behavior in reloc_data() arm64: module: fix relocation of movz instruction with negative immediate arm64: traps: address fallout from printk -> pr_* conversion arm64: ftrace: fix a stack tracer's output under function graph tracer arm64: pass a task parameter to unwind_frame() arm64: ftrace: modify a stack frame in a safe way arm64: remove irq_count and do_softirq_own_stack() arm64: hugetlb: add support for PTE contiguous bit arm64: Use PoU cache instr for I/D coherency arm64: Defer dcache flush in __cpu_copy_user_page arm64: reduce stack use in irq_handler arm64: mm: ensure that the zero page is visible to the page table walker arm64: Documentation: add list of software workarounds for errata arm64: mm: place __cpu_setup in .text arm64: cmpxchg: Don't incldue linux/mmdebug.h arm64: mm: fold alternatives into .init ... commit 98070576c4f77509459c83cd2358617ef0769a38 Author: Takashi Iwai Date: Tue Jan 12 21:06:39 2016 +0100 ALSA: hda - Fix white noise on Dell Latitude E5550 Dell Latitude E5550 (1028:062c) has a white noise problem like other Latitude E models, and it gets fixed by the very same quirk as well. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110591 Cc: # v4.1+ Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit de65360be0239a63268de589c4189f8ee52dad6c Author: Heiner Kallweit Date: Tue Dec 22 19:09:05 2015 +0100 ALSA: hda_intel: add card number to irq description Currently the info in /proc/interrupts doesn't allow to figure out which interrupt belongs to which card (HDMI, PCH, ..). Therefore add card details to the interrupt description. With the patch the info in /proc/interrupts looks like this: PCI-MSI 442368-edge snd_hda_intel:card1 PCI-MSI 49152-edge snd_hda_intel:card0 NOTE: this patch adds the new irq_descr field snd_card struct that is filled automatically at a card object creation. This can be used generically for other drivers as well. The changes for others will follow later -- tiwai Signed-off-by: Heiner Kallweit Signed-off-by: Takashi Iwai include/sound/core.h | 1 + sound/core/init.c | 3 +++ sound/pci/hda/hda_intel.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) commit 43e361f23c49dbddf74f56ddf6cdd85c5dbff6da Author: Michael S. Tsirkin Date: Mon Jan 4 10:00:10 2016 +0200 checkpatch: add virt barriers Add virt_ barriers to list of barriers to check for presence of a comment. Signed-off-by: Michael S. Tsirkin Acked-by: Julian Calaby Acked-by: Joe Perches Acked-by: Peter Zijlstra (Intel) scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f4073b0f6e11a5436d1162c623401c8f2f7cf783 Author: Michael S. Tsirkin Date: Mon Jan 4 09:54:51 2016 +0200 checkpatch: check for __smp outside barrier.h Introduction of __smp barriers cleans up a bunch of duplicate code, but it gives people an additional handle onto a "new" set of barriers - just because they're prefixed with __* unfortunately doesn't stop anyone from using it (as happened with other arch stuff before.) Add a checkpatch test so it will trigger a warning. Reported-by: Russell King Signed-off-by: Michael S. Tsirkin Acked-by: Julian Calaby Acked-by: Joe Perches Acked-by: Peter Zijlstra (Intel) scripts/checkpatch.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 402c2553a24729688ba32453a9f6889e12754147 Author: Michael S. Tsirkin Date: Mon Jan 4 09:39:01 2016 +0200 checkpatch.pl: add missing memory barriers SMP-only barriers were missing in checkpatch.pl Refactor code slightly to make adding more variants easier. Signed-off-by: Michael S. Tsirkin Acked-by: Julian Calaby Acked-by: Joe Perches Acked-by: Peter Zijlstra (Intel) scripts/checkpatch.pl | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit f7ad26ff952b3ca2702d7da03aad0ab1f6c01d7c Author: Stefan Hajnoczi Date: Thu Dec 17 16:53:43 2015 +0800 virtio: make find_vqs() checkpatch.pl-friendly checkpatch.pl wants arrays of strings declared as follows: static const char * const names[] = { "vq-1", "vq-2", "vq-3" }; Currently the find_vqs() function takes a const char *names[] argument so passing checkpatch.pl's const char * const names[] results in a compiler error due to losing the second const. This patch adjusts the find_vqs() prototype and updates all virtio transports. This makes it possible for virtio_balloon.c, virtio_input.c, virtgpu_kms.c, and virtio_rpmsg_bus.c to use the checkpatch.pl-friendly type. Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin Acked-by: Bjorn Andersson drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +- drivers/misc/mic/card/mic_virtio.c | 2 +- drivers/remoteproc/remoteproc_virtio.c | 2 +- drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- drivers/s390/virtio/kvm_virtio.c | 2 +- drivers/s390/virtio/virtio_ccw.c | 2 +- drivers/virtio/virtio_balloon.c | 2 +- drivers/virtio/virtio_input.c | 2 +- drivers/virtio/virtio_mmio.c | 2 +- drivers/virtio/virtio_pci_common.c | 4 ++-- drivers/virtio/virtio_pci_common.h | 2 +- drivers/virtio/virtio_pci_modern.c | 2 +- include/linux/virtio_config.h | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) commit 21ea9fb69e7c4b1b1559c3e410943d3ff248ffcb Author: Minchan Kim Date: Mon Dec 28 08:35:13 2015 +0900 virtio_balloon: fix race between migration and ballooning In balloon_page_dequeue, pages_lock should cover the loop (ie, list_for_each_entry_safe). Otherwise, the cursor page could be isolated by compaction and then list_del by isolation could poison the page->lru.{prev,next} so the loop finally could access wrong address like this. This patch fixes the bug. general protection fault: 0000 [#1] SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 2 PID: 82 Comm: vballoon Not tainted 4.4.0-rc5-mm1-access_bit+ #1906 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 task: ffff8800a7ff0000 ti: ffff8800a7fec000 task.ti: ffff8800a7fec000 RIP: 0010:[] [] balloon_page_dequeue+0x54/0x130 RSP: 0018:ffff8800a7fefdc0 EFLAGS: 00010246 RAX: ffff88013fff9a70 RBX: ffffea000056fe00 RCX: 0000000000002b7d RDX: ffff88013fff9a70 RSI: ffffea000056fe00 RDI: ffff88013fff9a68 RBP: ffff8800a7fefde8 R08: ffffea000056fda0 R09: 0000000000000000 R10: ffff8800a7fefd90 R11: 0000000000000001 R12: dead0000000000e0 R13: ffffea000056fe20 R14: ffff880138809070 R15: ffff880138809060 FS: 0000000000000000(0000) GS:ffff88013fc40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f229c10e000 CR3: 00000000b8b53000 CR4: 00000000000006a0 Stack: 0000000000000100 ffff880138809088 ffff880138809000 ffff880138809060 0000000000000046 ffff8800a7fefe28 ffffffff812c86d3 ffff880138809020 ffff880138809000 fffffffffff91900 0000000000000100 ffff880138809060 Call Trace: [] leak_balloon+0x93/0x1a0 [] balloon+0x217/0x2a0 [] ? __schedule+0x31e/0x8b0 [] ? abort_exclusive_wait+0xb0/0xb0 [] ? update_balloon_stats+0xf0/0xf0 [] kthread+0xc9/0xe0 [] ? kthread_park+0x60/0x60 [] ret_from_fork+0x3f/0x70 [] ? kthread_park+0x60/0x60 Code: 8d 60 e0 0f 84 af 00 00 00 48 8b 43 20 a8 01 75 3b 48 89 d8 f0 0f ba 28 00 72 10 48 8b 03 f6 c4 08 75 2f 48 89 df e8 8c 83 f9 ff <49> 8b 44 24 20 4d 8d 6c 24 20 48 83 e8 20 4d 39 f5 74 7a 4c 89 RIP [] balloon_page_dequeue+0x54/0x130 RSP ---[ end trace 43cf28060d708d5f ]--- Kernel panic - not syncing: Fatal exception Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Cc: Signed-off-by: Minchan Kim Signed-off-by: Michael S. Tsirkin Acked-by: Rafael Aquini mm/balloon_compaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f68b992bbb474641881932c61c92dcfa6f5b3689 Author: Minchan Kim Date: Mon Dec 28 08:35:12 2015 +0900 virtio_balloon: fix race by fill and leak During my compaction-related stuff, I encountered a bug with ballooning. With repeated inflating and deflating cycle, guest memory( ie, cat /proc/meminfo | grep MemTotal) is decreased and couldn't be recovered. The reason is balloon_lock doesn't cover release_pages_balloon so struct virtio_balloon fields could be overwritten by race of fill_balloon(e,g, vb->*pfns could be critical). This patch fixes it in my test. Cc: Signed-off-by: Minchan Kim Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 779a6a36961b50cd154da5705d9e6508f819cc4e Author: Michael S. Tsirkin Date: Sun Jan 10 13:19:38 2016 +0200 s390: more efficient smp barriers As per: lkml.kernel.org/r/20150921112252.3c2937e1@mschwide atomics imply a barrier on s390, so s390 should change smp_mb__before_atomic and smp_mb__after_atomic to barrier() instead of smp_mb() and hence should not use the generic versions. Suggested-by: Peter Zijlstra Suggested-by: Martin Schwidefsky Signed-off-by: Michael S. Tsirkin Acked-by: Martin Schwidefsky Acked-by: Peter Zijlstra (Intel) arch/s390/include/asm/barrier.h | 3 +++ 1 file changed, 3 insertions(+) commit a677f4869576eb177570ffee68598d2202de030f Author: Michael S. Tsirkin Date: Wed Jan 6 09:13:14 2016 +0200 s390: use generic memory barriers The s390 kernel is SMP to 99.99%, we just didn't bother with a non-smp variant for the memory-barriers. If the generic header is used we'd get the non-smp version for free. It will save a small amount of text space for CONFIG_SMP=n. Suggested-by: Martin Schwidefsky Signed-off-by: Michael S. Tsirkin Acked-by: Peter Zijlstra (Intel) arch/s390/include/asm/barrier.h | 3 --- 1 file changed, 3 deletions(-) commit 234927540e6ac82f5f083a11c3e860e346ed09bc Author: Michael S. Tsirkin Date: Sun Dec 27 18:02:16 2015 +0200 xen/events: use virt_xxx barriers drivers/xen/events/events_fifo.c uses rmb() to communicate with the other side. For guests compiled with CONFIG_SMP, smp_rmb would be sufficient, so rmb() here is only needed if a non-SMP guest runs on an SMP host. Switch to the virt_rmb barrier which serves this exact purpose. Pull in asm/barrier.h here to make sure the file is self-contained. Suggested-by: David Vrabel Signed-off-by: Michael S. Tsirkin Acked-by: David Vrabel Acked-by: Peter Zijlstra (Intel) drivers/xen/events/events_fifo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 506b02eb1cf79838b76c6e3e43171cf960f01fc8 Author: Michael S. Tsirkin Date: Sun Dec 27 18:02:16 2015 +0200 xen/io: use virt_xxx barriers include/xen/interface/io/ring.h uses full memory barriers to communicate with the other side. For guests compiled with CONFIG_SMP, smp_wmb and smp_mb would be sufficient, so mb() and wmb() here are only needed if a non-SMP guest runs on an SMP host. Switch to virt_xxx barriers which serve this exact purpose. Signed-off-by: Michael S. Tsirkin Acked-by: David Vrabel Acked-by: Peter Zijlstra (Intel) include/xen/interface/io/ring.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5bb0c9be2ac9a98513d43969e2b5c3d02cb271c8 Author: Michael S. Tsirkin Date: Sun Dec 27 18:02:16 2015 +0200 xenbus: use virt_xxx barriers drivers/xen/xenbus/xenbus_comms.c uses full memory barriers to communicate with the other side. For guests compiled with CONFIG_SMP, smp_wmb and smp_mb would be sufficient, so mb() and wmb() here are only needed if a non-SMP guest runs on an SMP host. Switch to virt_xxx barriers which serve this exact purpose. Signed-off-by: Michael S. Tsirkin Acked-by: David Vrabel Acked-by: Peter Zijlstra (Intel) drivers/xen/xenbus/xenbus_comms.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 788e5b3a5da24cc8d93ce2f7c6508181cd7d7fb6 Author: Michael S. Tsirkin Date: Thu Dec 17 12:20:39 2015 +0200 virtio_ring: use virt_store_mb We need a full barrier after writing out event index, using virt_store_mb there seems better than open-coding. As usual, we need a wrapper to account for strong barriers. It's tempting to use this in vhost as well, for that, we'll need a variant of smp_store_mb that works on __user pointers. Signed-off-by: Michael S. Tsirkin Acked-by: Peter Zijlstra (Intel) drivers/virtio/virtio_ring.c | 15 +++++++++------ include/linux/virtio_ring.h | 11 +++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) commit 9e3f84ce416663c84a191cb3ead300fc1a4adadc Author: Michael S. Tsirkin Date: Fri Jan 8 09:23:58 2016 +0200 sh: move xchg_cmpxchg to a header by itself Looks like future sh variants will support a 4-byte cas which will be used to implement 1 and 2 byte xchg. This is exactly what we do for llsc now, move the portable part of the code into a separate header so it's easy to reuse. Suggested-by: Rich Felker Signed-off-by: Michael S. Tsirkin Acked-by: Peter Zijlstra (Intel) arch/sh/include/asm/cmpxchg-llsc.h | 35 +------------------------- arch/sh/include/asm/cmpxchg-xchg.h | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 34 deletions(-) commit 3226aad81aa670015a59e51458a0deb2d3bcb600 Author: Michael S. Tsirkin Date: Thu Jan 7 17:54:54 2016 +0200 sh: support 1 and 2 byte xchg This completes the xchg implementation for sh architecture. Note: The llsc variant is tricky since this only supports 4 byte atomics, the existing implementation of 1 byte xchg is wrong: we need to do a 4 byte cmpxchg and retry if any bytes changed meanwhile. Write this in C for clarity. Suggested-by: Rich Felker Signed-off-by: Michael S. Tsirkin Acked-by: Peter Zijlstra (Intel) arch/sh/include/asm/cmpxchg-grb.h | 22 +++++++++++++++ arch/sh/include/asm/cmpxchg-irq.h | 11 ++++++++ arch/sh/include/asm/cmpxchg-llsc.h | 58 +++++++++++++++++++++++--------------- arch/sh/include/asm/cmpxchg.h | 3 ++ 4 files changed, 72 insertions(+), 22 deletions(-) commit a65961272e1ebdb60804bbe2bb440481fcbd1c76 Author: Michael S. Tsirkin Date: Sun Dec 27 17:55:35 2015 +0200 virtio_ring: update weak barriers to use virt_xxx virtio ring uses smp_wmb on SMP and wmb on !SMP, the reason for the later being that it might be talking to another kernel on the same SMP machine. This is exactly what virt_xxx barriers do, so switch to these instead of homegrown ifdef hacks. Cc: Peter Zijlstra Cc: Alexander Duyck Signed-off-by: Michael S. Tsirkin Acked-by: Peter Zijlstra (Intel) include/linux/virtio_ring.h | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) commit d307fb16f788823b29aab9aa7e4821ac8a124b19 Author: Michael S. Tsirkin Date: Sun Dec 20 13:52:10 2015 +0200 Revert "virtio_ring: Update weak barriers to use dma_wmb/rmb" This reverts commit 9e1a27ea42691429e31f158cce6fc61bc79bb2e9. While that commit optimizes !CONFIG_SMP, it mixes up DMA and SMP concepts, making the code hard to figure out. A better way to optimize this is with the new __smp_XXX barriers. As a first step, go back to full rmb/wmb barriers for !SMP. We switch to __smp_XXX barriers in the next patch. Cc: Peter Zijlstra Cc: Alexander Duyck Signed-off-by: Michael S. Tsirkin Acked-by: Peter Zijlstra (Intel) include/linux/virtio_ring.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 6a65d26385bf487926a0616650927303058551e3 Author: Michael S. Tsirkin Date: Sun Dec 27 18:23:01 2015 +0200 asm-generic: implement virt_xxx memory barriers Guests running within virtual machines might be affected by SMP effects even if the guest itself is compiled without SMP support. This is an artifact of interfacing with an SMP host while running an UP kernel. Using mandatory barriers for this use-case would be possible but is often suboptimal. In particular, virtio uses a bunch of confusing ifdefs to work around this, while xen just uses the mandatory barriers. To better handle this case, low-level virt_mb() etc macros are made available. These are implemented trivially using the low-level __smp_xxx macros, the purpose of these wrappers is to annotate those specific cases. These have the same effect as smp_mb() etc when SMP is enabled, but generate identical code for SMP and non-SMP systems. For example, virtual machine guests should use virt_mb() rather than smp_mb() when synchronizing against a (possibly SMP) host. Suggested-by: David Miller Signed-off-by: Michael S. Tsirkin Acked-by: Peter Zijlstra (Intel) Documentation/memory-barriers.txt | 28 +++++++++++++++++++++++----- include/asm-generic/barrier.h | 11 +++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) commit 1638fb72070f8faf2ac0787fafbb839d0c859d5b Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 x86: define __smp_xxx This defines __smp_xxx barriers for x86, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner arch/x86/include/asm/barrier.h | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit 1ce790913b6ce67cd85235083aeb67898bad1a1f Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 xtensa: define __smp_xxx This defines __smp_xxx barriers for xtensa, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/xtensa/include/asm/barrier.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d39886a7d31e0182f8b7e3b0e953e636b0af96fd Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 tile: define __smp_xxx This defines __smp_xxx barriers for tile, for use by virtualization. Some smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Note: for 32 bit, keep smp_mb__after_atomic around since it's faster than the generic implementation. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/tile/include/asm/barrier.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 45d9b859411cb6d4dccc4e488336160acf9a6df5 Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 sparc: define __smp_xxx This defines __smp_xxx barriers for sparc, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: David S. Miller Acked-by: Peter Zijlstra (Intel) arch/sparc/include/asm/barrier_64.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 90a3ccb0be538a914e6a5c51ae919762261563ad Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 sh: define __smp_xxx, fix smp_store_mb for !SMP sh variant of smp_store_mb() calls xchg() on !SMP which is stronger than implied by both the name and the documentation. define __smp_store_mb instead: code in asm-generic/barrier.h will then define smp_store_mb correctly depending on CONFIG_SMP. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/sh/include/asm/barrier.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 82b44496abd91781ed4120c3b0c1a3d111c3e28e Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 s390: define __smp_xxx This defines __smp_xxx barriers for s390, for use by virtualization. Some smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Note: smp_mb, smp_rmb and smp_wmb are defined as full barriers unconditionally on this architecture. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Martin Schwidefsky Acked-by: Peter Zijlstra (Intel) arch/s390/include/asm/barrier.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit a60514bae72ee41b506b8702dfdd6eeeffe58556 Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 mips: define __smp_xxx This defines __smp_xxx barriers for mips, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Note: the only exception is smp_mb__before_llsc which is mips-specific. We define both the __smp_mb__before_llsc variant (for use in asm/barriers.h) and smp_mb__before_llsc (for use elsewhere on this architecture). Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/mips/include/asm/barrier.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit afc22de0c0ca8b4697a8aec2bbb35d4cc385e7e0 Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 metag: define __smp_xxx This defines __smp_xxx barriers for metag, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Note: as __smp_XX macros should not depend on CONFIG_SMP, they can not use the existing fence() macro since that is defined differently between SMP and !SMP. For this reason, this patch introduces a wrapper metag_fence() that doesn't depend on CONFIG_SMP. fence() is then defined using that, depending on CONFIG_SMP. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: James Hogan Acked-by: Peter Zijlstra (Intel) arch/metag/include/asm/barrier.h | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit eebd1b927822f13429ec09d0a48fe92716b22840 Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 ia64: define __smp_xxx This defines __smp_xxx barriers for ia64, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h This reduces the amount of arch-specific boiler-plate code. Signed-off-by: Michael S. Tsirkin Acked-by: Tony Luck Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/ia64/include/asm/barrier.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 27f6cabc0ebf9e452c3251bf0511c41cf2c75dde Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 blackfin: define __smp_xxx This defines __smp_xxx barriers for blackfin, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/blackfin/include/asm/barrier.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b1f3de10267dd1034d24f9e77dd5e8f07793925 Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 arm: define __smp_xxx This defines __smp_xxx barriers for arm, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h This reduces the amount of arch-specific boiler-plate code. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Russell King Acked-by: Peter Zijlstra (Intel) arch/arm/include/asm/barrier.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit fd072df850e536bf46e9981be4be95961ce5eef3 Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 arm64: define __smp_xxx This defines __smp_xxx barriers for arm64, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Note: arm64 does not support !SMP config, so smp_xxx and __smp_xxx are always equivalent. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/arm64/include/asm/barrier.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 003472a93ad019bfd054a5cbb30c6eec7d0395a3 Author: Michael S. Tsirkin Date: Sun Dec 27 15:04:42 2015 +0200 powerpc: define __smp_xxx This defines __smp_xxx barriers for powerpc for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h This reduces the amount of arch-specific boiler-plate code. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Boqun Feng Acked-by: Peter Zijlstra (Intel) arch/powerpc/include/asm/barrier.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit a9e4252a9b147043142282ebb65da94dcb951e2a Author: Michael S. Tsirkin Date: Sun Dec 27 13:50:07 2015 +0200 asm-generic: add __smp_xxx wrappers On !SMP, most architectures define their barriers as compiler barriers. On SMP, most need an actual barrier. Make it possible to remove the code duplication for !SMP by defining low-level __smp_xxx barriers which do not depend on the value of SMP, then use them from asm-generic conditionally. Besides reducing code duplication, these low level APIs will also be useful for virtualization, where a barrier is sometimes needed even if !SMP since we might be talking to another kernel on the same SMP system. Both virtio and Xen drivers will benefit. The smp_xxx variants should use __smp_XXX ones or barrier() depending on SMP, identically for all architectures. We keep ifndef guards around them for now - once/if all architectures are converted to use the generic code, we'll be able to remove these. Suggested-by: Peter Zijlstra Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) include/asm-generic/barrier.h | 91 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 82 insertions(+), 9 deletions(-) commit 300b06d4555305dc227748674f75970f2f84c224 Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 x86: reuse asm-generic/barrier.h As on most architectures, on x86 read_barrier_depends and smp_read_barrier_depends are empty. Drop the local definitions and pull the generic ones from asm-generic/barrier.h instead: they are identical. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner arch/x86/include/asm/barrier.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 577f183acc88645eae116326cc2203dc88ea730c Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 x86/um: reuse asm-generic/barrier.h On x86/um CONFIG_SMP is never defined. As a result, several macros match the asm-generic variant exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Richard Weinberger Acked-by: Peter Zijlstra (Intel) arch/x86/um/asm/barrier.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit fa083e28f89a78b95ba8b7da86db40c13c60e95d Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 mips: reuse asm-generic/barrier.h On mips dma_rmb, dma_wmb, smp_store_mb, read_barrier_depends, smp_read_barrier_depends, smp_store_release and smp_load_acquire match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/mips/include/asm/barrier.h | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) commit abe114d9f0a80f27bc5040cd2287dca80423d13e Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 metag: reuse asm-generic/barrier.h On metag dma_rmb, dma_wmb, smp_store_mb, read_barrier_depends, smp_read_barrier_depends, smp_store_release and smp_load_acquire match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: James Hogan Acked-by: Peter Zijlstra (Intel) arch/metag/include/asm/barrier.h | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) commit 90ff6a17d0e07d689886cba4244674bfd41e7a2d Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 arm64: reuse asm-generic/barrier.h On arm64 nop, read_barrier_depends, smp_read_barrier_depends smp_store_mb(), smp_mb__before_atomic and smp_mb__after_atomic match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/arm64/include/asm/barrier.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 335390d6096f647311980f50312b304b377e616f Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 arm: reuse asm-generic/barrier.h On arm smp_store_mb, read_barrier_depends, smp_read_barrier_depends, smp_store_release, smp_load_acquire, smp_mb__before_atomic and smp_mb__after_atomic match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Russell King Acked-by: Peter Zijlstra (Intel) arch/arm/include/asm/barrier.h | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit 519be0438e6963b8efd2430e9d0595f5aeee915e Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 sparc: reuse asm-generic/barrier.h On sparc 64 bit dma_rmb, dma_wmb, smp_store_mb, smp_mb, smp_rmb, smp_wmb, read_barrier_depends and smp_read_barrier_depends match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. nop uses __asm__ __volatile but is otherwise identical to the generic version, drop that as well. This is in preparation to refactoring this code area. Note: nop() was in processor.h and not in barrier.h as on other architectures. Nothing seems to depend on it being there though. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: David S. Miller Acked-by: Peter Zijlstra (Intel) arch/sparc/include/asm/barrier_32.h | 1 - arch/sparc/include/asm/barrier_64.h | 21 ++------------------- arch/sparc/include/asm/processor.h | 3 --- 3 files changed, 2 insertions(+), 23 deletions(-) commit 21535aaed9e33b4cc485ab2245dd2958816ee916 Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 s390: reuse asm-generic/barrier.h On s390 read_barrier_depends, smp_read_barrier_depends smp_store_mb(), smp_mb__before_atomic and smp_mb__after_atomic match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/s390/include/asm/barrier.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit fbd7ec02363cee4264aca2cc46692c9322fd6b42 Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 powerpc: reuse asm-generic/barrier.h On powerpc read_barrier_depends, smp_read_barrier_depends smp_store_mb(), smp_mb__before_atomic and smp_mb__after_atomic match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) Reviewed-by: Paul E. McKenney arch/powerpc/include/asm/barrier.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 53a05ac15ee04b56ce02f0f831556e2fcdcce93f Author: Michael S. Tsirkin Date: Mon Dec 21 09:22:18 2015 +0200 ia64: reuse asm-generic/barrier.h On ia64 smp_rmb, smp_wmb, read_barrier_depends, smp_read_barrier_depends and smp_store_mb() match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin Acked-by: Tony Luck Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/ia64/include/asm/barrier.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 9505ec0825a09ea97426d026f2524d1cefa83a84 Author: Michael S. Tsirkin Date: Mon Dec 28 13:58:06 2015 +0200 ia64: rename nop->iosapic_nop asm-generic/barrier.h defines a nop() macro. To be able to use this header on ia64, we shouldn't call local functions/variables nop(). There's one instance where this breaks on ia64: rename the function to iosapic_nop to avoid the conflict. Signed-off-by: Michael S. Tsirkin Acked-by: Tony Luck Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) arch/ia64/kernel/iosapic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57f7c0370f386d5e0960e25d2c3ceb0b8e8c489d Author: Michael S. Tsirkin Date: Sun Dec 27 14:10:52 2015 +0200 asm-generic: guard smp_store_release/load_acquire Allow architectures to override smp_store_release and smp_load_acquire by guarding the defines in asm-generic/barrier.h with ifndef directives. This is in preparation to reusing asm-generic/barrier.h on architectures which have their own definition of these macros. Signed-off-by: Michael S. Tsirkin Acked-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) include/asm-generic/barrier.h | 4 ++++ 1 file changed, 4 insertions(+) commit 5a1b26d7c629915446222ebe77d16567c98426ff Author: Davidlohr Bueso Date: Thu Dec 31 12:09:13 2015 +0200 lcoking/barriers, arch: Use smp barriers in smp_store_release() With commit b92b8b35a2e ("locking/arch: Rename set_mb() to smp_store_mb()") it was made clear that the context of this call (and thus set_mb) is strictly for CPU ordering, as opposed to IO. As such all archs should use the smp variant of mb(), respecting the semantics and saving a mandatory barrier on UP. Signed-off-by: Davidlohr Bueso Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Heiko Carstens Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: dave@stgolabs.net Link: http://lkml.kernel.org/r/1445975631-17047-3-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar Reviewed-by: Paul E. McKenney arch/ia64/include/asm/barrier.h | 2 +- arch/powerpc/include/asm/barrier.h | 2 +- arch/s390/include/asm/barrier.h | 2 +- include/asm-generic/barrier.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 19e2fc4066d7e63e47adb6a70c77ba7d291b1972 Merge: 2945e9f 4693c24 Author: Linus Torvalds Date: Tue Jan 12 10:34:43 2016 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu update from Greg Ungerer: "Only a single change, limiting the return values for coldfire gpio get function" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: coldfire/gpio: Be sure to clamp return value commit 2945e9f111e2f5f7d7b0f4af0a56b9f768db9fc8 Merge: c5c80bd eb37bc3 Author: Linus Torvalds Date: Tue Jan 12 10:33:51 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Provide __phys_to_pfn() and __pfn_to_phys() m68k/atari, m68k/sun3: Fix SCSI platform device registration when driver is modular m68k/defconfig: Update defconfigs for v4.4-rc1 m68k/mac: Kill psc_present commit 2f6b99ef1322e49aa05b16f4a7413f32631fb8fa Author: Marc Zyngier Date: Thu Jan 7 17:47:00 2016 +0000 ARM: Add CONFIG_DEPRECATED_PARAM_STRUCT to netwinder_defconfig Fed up with all that fancy new 64bit HW? Look no further! Get your NetWinder out of the closet (or in my case, the tip) and run -next on it! All it takes is a small defconfig change to be able to take the parameters from the bootloader... Signed-off-by: Marc Zyngier Signed-off-by: Olof Johansson arch/arm/configs/netwinder_defconfig | 1 + 1 file changed, 1 insertion(+) commit d3bd4e0a5fd40ae61fe0dc19f2cfa88c88bb761c Merge: 78ae902 92a513b Author: Mark Brown Date: Tue Jan 12 18:26:12 2016 +0000 Merge remote-tracking branch 'regulator/topic/wm831x' into regulator-next commit 78ae90255276d2cb9e4410df74b378cb9f8a8bbb Merge: 3fbd90b d761c90 ee01d0c fad2ba6 7f9354f c0ea88b Author: Mark Brown Date: Tue Jan 12 18:26:10 2016 +0000 Merge remote-tracking branches 'regulator/topic/pv88090', 'regulator/topic/qcom-smd', 'regulator/topic/tps6105x', 'regulator/topic/tps65086' and 'regulator/topic/tps65218' into regulator-next commit 3fbd90bf6b21453d235f533c5c5d335ecc1052eb Merge: 8bd31df 95dfead 47769cb 3ff3f51 b554e14 3c0a2f6 Author: Mark Brown Date: Tue Jan 12 18:26:07 2016 +0000 Merge remote-tracking branches 'regulator/topic/lp8788', 'regulator/topic/mt6311', 'regulator/topic/optional', 'regulator/topic/palmas' and 'regulator/topic/pv88060' into regulator-next commit 8bd31df8de3351465c5d202d1a6f0da5834726b9 Merge: 9fa2957 b0d6dd3 faa5cf3 70a7fb8 8a99cc6 Author: Mark Brown Date: Tue Jan 12 18:26:05 2016 +0000 Merge remote-tracking branches 'regulator/topic/const', 'regulator/topic/lm363x', 'regulator/topic/lockdep' and 'regulator/topic/lp872x' into regulator-next commit 9fa295742d4f3064b1faf8fbbbcba21969ec9df6 Merge: 353915f 70dc6da Author: Mark Brown Date: Tue Jan 12 18:26:05 2016 +0000 Merge remote-tracking branch 'regulator/topic/core' into regulator-next commit c5c80bd923d34f7dc70e7b23eb427cd284989a1b Merge: 03891f9 8083013 Author: Linus Torvalds Date: Tue Jan 12 10:26:03 2016 -0800 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "This is the final pull request for MIPS for 4.4. It fixes: - scripts/ld-version.sh parsing of ld version numbers that contain large numbers as components. - fix parsing of version numbers as used by Fedora's ld. Currently scripts/ld-version.sh is only being used by MIPS" [ This obviously missed 4.4, so getting merged now in the merge window for 4.5 instead ] * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: ld-version: Fix it on Fedora Fix ld-version.sh to handle large 3rd version part commit 353915f0b43fb156c3bf02d54d9f3dbdcbe66afe Merge: 3ad4b05 3cb99e2 aab3c3f Author: Mark Brown Date: Tue Jan 12 18:26:03 2016 +0000 Merge remote-tracking branches 'regulator/fix/axp20x' and 'regulator/fix/mt6311' into regulator-linus commit 3ad4b0517b6510a53d791f9ead531a08bda3bcdd Merge: 1683098 fa731ac Author: Mark Brown Date: Tue Jan 12 18:26:02 2016 +0000 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus commit 5f4900bd8e2528ff783e329b193bfe8ce5638a98 Merge: d0ac611 336f79c Author: Olof Johansson Date: Tue Jan 12 10:15:01 2016 -0800 Merge tag 'tegra-for-4.5-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into late/tegra ARM: tegra: Devicetree changes for v4.5-rc1 This adds support for the Tegra132 Norrin and various Tegra210-based reference designs. There is also an initial device tree for the Jetson TX1 development kit. * tag 'tegra-for-4.5-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Add NVIDIA Jetson TX1 Developer Kit support arm64: tegra: Add NVIDIA P2597 I/O board support arm64: tegra: Add NVIDIA Jetson TX1 support arm64: tegra: Add NVIDIA P2571 board support arm64: tegra: Add NVIDIA P2371 board support arm64: tegra: Add NVIDIA P2595 I/O board support arm64: tegra: Add NVIDIA P2530 main board support arm64: tegra: Add Tegra210 support arm64: tegra: Add NVIDIA Tegra132 Norrin support arm64: tegra: Add Tegra132 support clk: tegra: Add Tegra210 device tree binding Signed-off-by: Olof Johansson commit d0ac6119aaae419baf824b996d1690fbe926971e Merge: 3e91219 a262e87 Author: Olof Johansson Date: Tue Jan 12 10:14:52 2016 -0800 Merge tag 'tegra-for-4.5-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into late/tegra ARM: tegra: Core SoC changes for v4.5-rc1 The big thing here is Tegra210 support, which is really only the Kconfig symbol. Other than that there's a few miscellaneous fixes. * tag 'tegra-for-4.5-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: select USB_ULPI from EHCI rather than platform ARM: tegra: Ensure entire dcache is flushed on entering LP0/1 amba: Hide TEGRA_AHB symbol soc/tegra: Add Tegra210 support soc/tegra: Provide per-SoC Kconfig symbols Signed-off-by: Olof Johansson commit 3e9121950c92a65e33e0163d2ba111b4d9293d4c Merge: 31ade3b e324654 Author: Olof Johansson Date: Tue Jan 12 10:14:07 2016 -0800 Merge branch 'treewide/cleanup' into late/tegra * treewide/cleanup: ARM: use "depends on" for SoC configs instead of "if" after prompt ARM/clocksource: use automatic DT probing for ux500 PRCMU ARM: use const and __initconst for smp_operations ARM: hisi: do not export smp_operations structures Signed-off-by: Olof Johansson commit 7aaed57c5c2890634cfadf725173c7c68ea4cb4f Author: Eric Dumazet Date: Tue Jan 12 08:58:00 2016 -0800 phonet: properly unshare skbs in phonet_rcv() Ivaylo Dimitrov reported a regression caused by commit 7866a621043f ("dev: add per net_device packet type chains"). skb->dev becomes NULL and we crash in __netif_receive_skb_core(). Before above commit, different kind of bugs or corruptions could happen without major crash. But the root cause is that phonet_rcv() can queue skb without checking if skb is shared or not. Many thanks to Ivaylo Dimitrov for his help, diagnosis and tests. Reported-by: Ivaylo Dimitrov Tested-by: Ivaylo Dimitrov Signed-off-by: Eric Dumazet Cc: Remi Denis-Courmont Signed-off-by: David S. Miller net/phonet/af_phonet.c | 4 ++++ 1 file changed, 4 insertions(+) commit d461873272169a3fc3a8d155d7b1c92e9d97b419 Author: Lars Persson Date: Tue Jan 12 15:28:13 2016 +0100 dwc_eth_qos: Fix dma address for multi-fragment skbs The offset inside the fragment was not used for the dma address and silent data corruption resulted because TSO makes the checksum match. Fixes: 077742dac2c7 ("dwc_eth_qos: Add support for Synopsys DWC Ethernet QoS") Signed-off-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47b356e499f26d330ab6ae4019e8c05f994be62d Author: Dan Carpenter Date: Tue Jan 12 12:36:21 2016 +0300 phy: remove an unneeded condition It used to be that bus->irq was a pointer but after e7f4dc3536a4 ('mdio: Move allocation of interrupts into core') it's an array inside the mdio struct, so it can never be NULL. Let's remove the check. Reviewed-by: Andrew Lunn Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bc16addc0e92222958010537557b18e25a278c0 Author: Dan Carpenter Date: Tue Jan 12 12:35:34 2016 +0300 mdio: remove an unneed condition It used to be that mdio->irq was a pointer but after e7f4dc3536a4 ('mdio: Move allocation of interrupts into core') it's an array inside the mdio struct so it can never be NULL. Reviewed-by: Andrew Lunn Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/of/of_mdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3567eb6af614dac436c4b16a8d426f9faed639b3 Author: Takashi Iwai Date: Tue Jan 12 15:36:27 2016 +0100 ALSA: seq: Fix race at timer setup and close ALSA sequencer code has an open race between the timer setup ioctl and the close of the client. This was triggered by syzkaller fuzzer, and a use-after-free was caught there as a result. This patch papers over it by adding a proper queue->timer_mutex lock around the timer-related calls in the relevant code path. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_queue.c | 2 ++ 1 file changed, 2 insertions(+) commit db9107b4972bbcb81ee6bc12f365dbe8684b137c Author: Dan Carpenter Date: Tue Jan 12 12:34:36 2016 +0300 mdio_bus: NULL dereference on allocation error If bus = kzalloc() fails then we end up dereferencing bus when we do "bus->irq[i] = PHY_POLL;". The code is a little simpler if we reverse the NULL check and return directly on failure. Fixes: e7f4dc3536a4 ('mdio: Move allocation of interrupts into core') Signed-off-by: Dan Carpenter Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 3f984cb39907f87515d83657ecd471ae396a6c4a Author: Andrzej Hajda Date: Thu Jan 7 10:36:51 2016 +0100 coccinelle: tests: unsigned value cannot be lesser than zero Unsigned expressions cannot be lesser than zero. Presence of comparisons 'unsigned (<|<=|>|>=) 0' often indicates a bug, usually wrong type of variable. The patch beside finding such comparisons tries to eliminate false positives, mainly by bypassing range checks. gcc can detect such comparisons also using -Wtype-limits switch, but it warns also in correct cases, making too much noise. Signed-off-by: Andrzej Hajda Acked-by: Julia Lawall Signed-off-by: Michal Marek .../tests/unsigned_lesser_than_zero.cocci | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 030e2c78d3a91dd0d27fef37e91950dde333eba1 Author: Takashi Iwai Date: Tue Jan 12 12:38:02 2016 +0100 ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34b7b0f95d41d2351a080e774d71085171db90e6 Author: Namhyung Kim Date: Sat Jan 9 19:16:29 2016 +0900 perf tools: Fallback to srcdir/Documentation/tips.txt Some people don't install perf, but just use compiled version in the source. Fallback to lookup the source directory for those poor guys. :) Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1452334589-8782-4-git-send-email-namhyung@kernel.org [ Make perf_tip() return NULL for ENOENT, making the fallback to really take place ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 10 +++++++++- tools/perf/util/util.c | 11 ++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) commit 090cff3eae8f02395009972d01b5dfdb95bcc327 Author: Namhyung Kim Date: Mon Jan 11 19:53:14 2016 +0900 perf ui/tui: Print helpline message as is When a tip message contains a percent sign, it was treated printf format specifier so broken string was printed like below. Tip: Limit to show entries above 577nly: perf report --percent-limit 5 ^^^ As ui_browser__show receives format string, pass additional "%s" so that the help (tip) message can be printed as is. Tip: Limit to show entries above 5% only: perf report --percent-limit 5 Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1452509594-13616-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84cfac7f05e110e803a45d99cff0ba0949cc8d58 Author: Namhyung Kim Date: Sat Jan 9 19:16:28 2016 +0900 perf tools: Set and pass DOCDIR to builtin-report.c It'll be used to locate perf document directory to find tips.txt in case it's not installed on the system. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1452334589-8782-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Build | 1 + tools/perf/config/Makefile | 3 +++ 2 files changed, 4 insertions(+) commit dd8232bc9d13b729d92590b55befd14e49f81eca Author: Namhyung Kim Date: Sat Jan 9 19:16:27 2016 +0900 perf tools: Add file_only config option to strlist If strlist_config.dirname is present, the strlist__new() tries to load stirngs from dirname/list file first but if it failes it falls back to add 'list' as string. But sometimes it's not desired so adds new file_only field to prevent it. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1452334589-8782-2-git-send-email-namhyung@kernel.org [ Add documentation for strlist_config::file_only, in the struct definition */ Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/strlist.c | 8 ++++++++ tools/perf/util/strlist.h | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit 09f1985404aa99b9d1ad435fcb0dabd20d4ed498 Author: Namhyung Kim Date: Mon Jan 11 19:35:10 2016 +0900 perf tools: Add more usage tips Thanks to Andi Kleen for providing useful tips. Suggested-by: Andi Kleen Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Brendan Gregg Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1452508510-28316-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/tips.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 6156681b73f2fffe56493e9a50518c0cbfcd8ba3 Author: Namhyung Kim Date: Mon Jan 11 22:37:09 2016 +0900 perf record: Add --buildid-all option The --buildid-all option is to record build-id of all DSOs in the file. It might be very costly to postprocess samples to find which DSO hits. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1452519429-31779-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 3 +++ tools/perf/builtin-record.c | 26 ++++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) commit 24b1e5d7f552eb6da430d5264d671ba45d634804 Author: Josh Poimboeuf Date: Fri Dec 18 06:39:17 2015 -0600 tools subcmd: Add missing NORETURN define for parse-options.h parse-options.h uses the NORETURN macro without defining it. perf doesn't see a build error because it defines the macro in util.h before including parse-options.h. But any other tool including it will see an error. Define the macro in parse-options.h (if not already defined) so that other tools can include it. Signed-off-by: Josh Poimboeuf Cc: "H. Peter Anvin" Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Lutomirski Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Cc: x86@kernel.org Link: http://lkml.kernel.org/r/6c16294ac6dbe5e2ca28fd935fe4389996588564.1450442274.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/parse-options.h | 4 ++++ 1 file changed, 4 insertions(+) commit 20a7add8ca2165de909d430b9874eacc26a2166c Author: Josh Poimboeuf Date: Fri Dec 18 06:39:15 2015 -0600 tools: Fix formatting of the "make -C tools" help message Align the x86_energy_perf_policy line with the others and restore the original alphabetical sorting. Signed-off-by: Josh Poimboeuf Cc: "H. Peter Anvin" Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Lutomirski Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Cc: x86@kernel.org Link: http://lkml.kernel.org/r/572931227adbf1fc9ca96e1dae3ef2e89387feca.1450442274.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/Makefile | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit d1b39d41ebec2afc761ba6539b77a7fe1669ddae Author: Josh Poimboeuf Date: Fri Dec 18 06:39:16 2015 -0600 tools: Make list.h self-sufficient Commit 7f5f873c6a07 ("rculist: Use WRITE_ONCE() when deleting from reader-visible list") added the use of the WRITE_ONCE macro to the kernel version of list.h, which broke the stacktool build because the tools list.h includes the kernel list.h. Avoid this type of situation in the future and make list.h self-sufficient by copying the kernel list.h routines directly into tools list.h. This is a straight copy except for adjustments to the include statements and copying of the tools-specific list routines (list_del_range and list_for_each_from). Signed-off-by: Josh Poimboeuf Cc: "H. Peter Anvin" Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Lutomirski Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Cc: x86@kernel.org Link: http://lkml.kernel.org/r/59cdc19c6589d1b5ef43d83b0e2d5a4a40301374.1450442274.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/list.h | 753 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 747 insertions(+), 6 deletions(-) commit 8b4970c41f88ad772771f87b1c82c395248a84d8 Author: Matias Bjørling Date: Tue Jan 12 07:49:39 2016 +0100 lightnvm: introduce factory reset Now that a device can be managed using the system blocks, a method to reset the device is necessary as well. This patch introduces logic to reset the device easily to factory state and exposes it through an ioctl. The ioctl takes the following flags: NVM_FACTORY_ERASE_ONLY_USER By default all blocks, except host-reserved blocks are erased upon factory reset. Instead of this, only erase host-reserved blocks. NVM_FACTORY_RESET_HOST_BLKS Mark host-reserved blocks to be erased and set their type to free. NVM_FACTORY_RESET_GRWN_BBLKS Mark "grown bad blocks" to be erased and set their type to free. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 34 ++++++++ drivers/lightnvm/sysblk.c | 179 ++++++++++++++++++++++++++++++++++++++++++ include/linux/lightnvm.h | 2 + include/uapi/linux/lightnvm.h | 19 +++++ 4 files changed, 234 insertions(+) commit b769207678176d590ea61ce7a64c9100925668b7 Author: Matias Bjørling Date: Tue Jan 12 07:49:38 2016 +0100 lightnvm: use system block for mm initialization Use system block information to register the appropriate media manager. This enables the LightNVM subsystem to instantiate a media manager selected by the user, instead of relying on automatic detection by each media manager loaded in the kernel. A device must now be initialized before it can proceed to initialize its media manager. Upon initialization, the configured media manager is automatically initialized as well. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 25 +++++++++++++++++++++++-- include/linux/lightnvm.h | 3 +++ 2 files changed, 26 insertions(+), 2 deletions(-) commit 5569615424613aa006005f18b03a3a12738a47d7 Author: Matias Bjørling Date: Tue Jan 12 07:49:37 2016 +0100 lightnvm: introduce ioctl to initialize device Based on the previous patch, we now introduce an ioctl to initialize the device using nvm_init_sysblock and create the necessary system blocks. The user may specify the media manager that they wish to instantiate on top. Default from user-space will be "gennvm". Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 50 +++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/lightnvm.h | 11 ++++++++++ 2 files changed, 61 insertions(+) commit e3eb3799f7e0d0924ceeba672ab271865de2802d Author: Matias Bjørling Date: Tue Jan 12 07:49:36 2016 +0100 lightnvm: core on-disk initialization An Open-Channel SSD shall be initialized before use. To initialize, we define an on-disk format, that keeps a small set of metadata to bring up the media manager on top of the device. The initial step is introduced to allow a user to format the disks for a given media manager. During format, a system block is stored on one to three separate luns on the device. Each lun has the system block duplicated. During initialization, the system block can be retrieved and the appropriate media manager can initialized. The on-disk format currently covers (struct nvm_system_block): - Magic value "NVMS". - Monotonic increasing sequence number. - The physical block erase count. - Version of the system block format. - Media manager type. - Media manager superblock physical address. The interface provides three functions to manage the system block: int nvm_init_sysblock(struct nvm_dev *, struct nvm_sb_info *) int nvm_get_sysblock(struct nvm *dev, struct nvm_sb_info *) int nvm_update_sysblock(struct nvm *dev, struct nvm_sb_info *) Each implement a part of the logic to manage the system block. The initialization creates the first system blocks and mark them on the device. Get retrieves the latest system block by scanning all pages in the associated system blocks. The update sysblock writes new metadata and allocates new block if necessary. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/Makefile | 2 +- drivers/lightnvm/core.c | 1 + drivers/lightnvm/sysblk.c | 562 ++++++++++++++++++++++++++++++++++++++++++ include/linux/lightnvm.h | 35 +++ include/uapi/linux/lightnvm.h | 1 + 5 files changed, 600 insertions(+), 1 deletion(-) commit ca5927e7ab5307965104ca58bbb29d110b1d4545 Author: Matias Bjørling Date: Tue Jan 12 07:49:35 2016 +0100 lightnvm: introduce mlc lower page table mappings NAND MLC memories have both lower and upper pages. When programming, both of these must be written, before data can be read. However, these lower and upper pages might not placed at even and odd flash pages, but can be skipped. Therefore each flash memory has its lower pages defined, which can then be used when programming and to know when padding are necessary. This patch implements the lower page definition in the specification, and exposes it through a simple lookup table at dev->lptbl. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 61 +++++++++++++++++++++++++++++++++++++++++++- drivers/nvme/host/lightnvm.c | 22 +++++++++++++++- include/linux/lightnvm.h | 20 +++++++++++++++ 3 files changed, 101 insertions(+), 2 deletions(-) commit f9a9995072904f2d67d649545f17f81e00f4985e Author: Matias Bjørling Date: Tue Jan 12 07:49:34 2016 +0100 lightnvm: add mccap support Some flash media has extended capabilities, such as programming SLC pages on MLC/TLC flash, erase/program suspend, scramble and encryption. MCCAP is introduced to detect support for these capabilities in the command set. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 1 + include/linux/lightnvm.h | 7 +++++++ 2 files changed, 8 insertions(+) commit ff0e498bfa185fad5e86c4c7a2db4f9648d2344f Author: Javier González Date: Tue Jan 12 07:49:33 2016 +0100 lightnvm: manage open and closed blocks separately LightNVM targets need to know the state of the flash block when doing flash optimizations. An example is implementing a write buffer to respect the flash page size. Currently, block state is not accounted for; the media manager only differentiates among free, bad and in-use blocks. This patch adds the logic in the generic media manager to enable targets manage blocks into open and close separately, and it implements such management in rrpc. It also adds a set of flags to describe the state of the block (open, closed, free, bad). In order to avoid taking two locks (nvm_lun and rrpc_lun) consecutively, we introduce lockless get_/put_block primitives so that the open and close list locks and future common logic is handled within the nvm_lun lock. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 14 +++++++ drivers/lightnvm/gennvm.c | 99 +++++++++++++++++++++++++++++------------------ drivers/lightnvm/rrpc.c | 38 +++++++++++++++--- drivers/lightnvm/rrpc.h | 12 +++++- include/linux/lightnvm.h | 25 ++++++++++-- 5 files changed, 142 insertions(+), 46 deletions(-) commit b5d4acd4cbf5029a2616084d9e9f392046d53a37 Author: Matias Bjørling Date: Tue Jan 12 07:49:32 2016 +0100 lightnvm: fix missing grown bad block type The get/set bad block interface defines good block, factory bad block, grown bad block, device reserved block, and host reserved block. Unfortunately the grown bad block was missing, leaving the offsets wrong for device and host side reserved blocks. This patch adds the missing type and corrects the offsets. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe include/linux/lightnvm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d7a64d275b39e19c010cdfd8728cc64f14b59bda Author: Javier González Date: Tue Jan 12 07:49:31 2016 +0100 lightnvm: reference rrpc lun in rrpc block Currently, a rrpc block only points to its nvm_lun. If a user wants to find the associated rrpc lun, it will have to calculate the index and look it up manually. By referencing the rrpc lun directly, this step can be omitted, at the cost of a larger memory footprint. This is important for upcoming patches that implement write buffering in rrpc. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 1 + drivers/lightnvm/rrpc.h | 1 + 2 files changed, 2 insertions(+) commit 09719b62fdab031e39b39a6470364a372abdf3f4 Author: Matias Bjørling Date: Tue Jan 12 07:49:30 2016 +0100 lightnvm: introduce nvm_submit_ppa Internal logic for both core and media managers, does not have a backing bio for issuing I/Os. Introduce nvm_submit_ppa to allow raw I/Os to be submitted to the underlying device driver. The function request the device, ppa, data buffer and its length and will submit the I/O synchronously to the device. The return value may therefore be used to detect any errors regarding the issued I/O. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- include/linux/lightnvm.h | 2 ++ 2 files changed, 46 insertions(+), 1 deletion(-) commit 72d256ecc5d0c8cbcc0bd5c6d983b434df556cb4 Author: Matias Bjørling Date: Tue Jan 12 07:49:29 2016 +0100 lightnvm: move rq->error to nvm_rq->error Instead of passing request error into the LightNVM modules, incorporate it into the nvm_rq. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 3 ++- drivers/lightnvm/gennvm.c | 6 +++--- drivers/lightnvm/rrpc.c | 2 +- include/linux/lightnvm.h | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) commit 81e681d3f7424fc2f03b6269e15c63131473c98f Author: Matias Bjørling Date: Tue Jan 12 07:49:28 2016 +0100 lightnvm: support multiple ppas in nvm_erase_ppa Sometimes a user want to erase multiple PPAs at the same time. Extend nvm_erase_ppa to take multiple ppas and number of ppas to be erased. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 4 ++-- drivers/lightnvm/gennvm.c | 2 +- include/linux/lightnvm.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 4b79beb4c36d697e940e9f70d72399c71230a418 Author: Wenwei Tao Date: Tue Jan 12 07:49:27 2016 +0100 lightnvm: move the pages per block check out of the loop There is no need to check whether dev's pages per block is beyond rrpc support every time we init a lun, we only need to check it once before enter the lun init loop. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 556755e941837ebc4b4859dd7f74f2ed2dd00fc7 Author: Matias Bjørling Date: Tue Jan 12 07:49:26 2016 +0100 lightnvm: sectors first in ppa list The Westlake controller requires that the PPA list has sectors defined sequentially. Currently, the PPA list is created with planes first, then sectors. Change this to sectors first, then planes. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b262924be03d5d2ae735bc9a4b37eb2c613f61f8 Author: Wenwei Tao Date: Tue Jan 12 07:49:25 2016 +0100 lightnvm: fix locking and mempool in rrpc_lun_gc This patch fix two issues in rrpc_lun_gc 1. prio_list is protected by rrpc_lun's lock not nvm_lun's, so acquire rlun's lock instead of lun's before operate on the list. 2. we delete block from prio_list before allocating gcb, but gcb allocation may fail, we end without putting it back to the list, this makes the block won't get reclaimed in the future. To solve this issue, delete block after gcb allocation. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d0ca798f960ad7d86f5186fe312c131d00563eb7 Author: Wenwei Tao Date: Tue Jan 12 07:49:24 2016 +0100 lightnvm: put block back to gc list on its reclaim fail We delete a block from the gc list before reclaim it, so put it back to the list on its reclaim fail, otherwise this block will not get reclaimed and be programmable in the future. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 2b11c1b24e50a26d435f1d59955f1268053623b7 Author: Wenwei Tao Date: Tue Jan 12 07:49:23 2016 +0100 lightnvm: check bi_error in gc We should check last io completion status before starting another one. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 22513215b83d62a7f5e3494209b69d4d8c266ab8 Author: Matias Bjørling Date: Tue Jan 12 07:49:22 2016 +0100 lightnvm: return the get_bb_tbl return value During get_bb_tbl, a callback is used to allow an user-specific scan function to be called. The callback may return an error, and in that case, the return value is overridden. However, the callback error is needed when the fault is a user error and not a kernel error. For example, when a user tries to initialize the same device twice. The get_bb_tbl callback should be able to communicate this. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 5 ----- 1 file changed, 5 deletions(-) commit 91276162de9476b8ff32d9452e849210e5dd09e9 Author: Matias Bjørling Date: Tue Jan 12 07:49:21 2016 +0100 lightnvm: refactor end_io functions for sync To implement sync I/O support within the LightNVM core, the end_io functions are refactored to take an end_io function pointer instead of testing for initialized media manager, followed by calling its end_io function. Sync I/O can then be implemented using a callback that signal I/O completion. This is similar to the logic found in blk_to_execute_io(). By implementing it this way, the underlying device I/Os submission logic is abstracted away from core, targets, and media managers. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/block/null_blk.c | 3 +-- drivers/lightnvm/core.c | 16 ++++++++++++++++ drivers/lightnvm/gennvm.c | 34 ++++++++++++++-------------------- drivers/lightnvm/rrpc.c | 6 ++---- drivers/nvme/host/lightnvm.c | 5 +---- include/linux/lightnvm.h | 12 ++++++++---- 6 files changed, 42 insertions(+), 34 deletions(-) commit abd805ec9f51f37db9da63dda44c3f4b4ae8ad57 Author: Matias Bjørling Date: Tue Jan 12 07:49:20 2016 +0100 lightnvm: refactor rqd ppa list into set/free A device may be driven in single, double or quad plane mode. In that case, the rqd must have either one, two, or four PPAs set for a single PPA sent to the device. Refactor this logic into their own functions to be shared by program/erase/read in the core. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 71 ++++++++++++++++++++++++++++++++++-------------- include/linux/lightnvm.h | 3 ++ 2 files changed, 53 insertions(+), 21 deletions(-) commit 069368e91879a3a640cfae4bdc1f9f8cc99c93a0 Author: Matias Bjørling Date: Tue Jan 12 07:49:19 2016 +0100 lightnvm: move ppa erase logic to core A device may function in single, dual or quad plane mode. The gennvm media manager manages this with explicit helpers. They convert a single ppa to 1, 2 or 4 separate ppas in a ppa list. To aid implementation of recovery and system blocks, this functionality can be moved directly into the core. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/lightnvm/gennvm.c | 68 +++-------------------------------------------- include/linux/lightnvm.h | 3 +++ 3 files changed, 74 insertions(+), 64 deletions(-) commit c27278bddd75a3ee755c8e83c6bcc3fdd7271ef6 Author: Wenwei Tao Date: Tue Jan 12 07:49:18 2016 +0100 lightnvm: unlock rq and free ppa_list on submission fail When rrpc_write_ppalist_rq and rrpc_read_ppalist_rq succeed, we setup rq correctly, but nvm_submit_io may afterward fail since it cannot allocate request or nvme_nvm_command, we return error but forget to cleanup the previous work. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3bfbc6adbc5031e8a5907baa5beb27b41637742a Author: Javier Gonzalez Date: Tue Jan 12 07:49:17 2016 +0100 lightnvm: add check after mempool allocation The mempool allocation might fail. Make sure to return error when it does, instead of causing a kernel panic. Signed-off-by: Javier Gonzalez Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 2 ++ 1 file changed, 2 insertions(+) commit bdded1552085b12d23c9be76147d2e96647a098f Author: Chao Yu Date: Tue Jan 12 07:49:16 2016 +0100 lightnvm: fix incorrect nr_free_blocks stat When initing bad block list in gennvm_block_bb, once we move bad block from free_list to bb_list, we should maintain both stat info nr_free_blocks and nr_bad_blocks. So this patch fixes to add missing operation related to nr_free_blocks. Signed-off-by: Chao Yu Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/gennvm.c | 1 + 1 file changed, 1 insertion(+) commit 3cd485b1f8e25a6534eb4c542e7eba1b944fbaaf Author: Wenwei Tao Date: Tue Jan 12 07:49:15 2016 +0100 lightnvm: fix bio submission issue Put bio when submission fails, since we get it before submission. And return error when backend device driver doesn't provide a submit_io method, thus we can end IO properly. Signed-off-by: Wenwei Tao Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/gennvm.c | 2 +- drivers/lightnvm/rrpc.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit c74d8eb5649386c2cfcd65cc960fd283ba876877 Author: Inki Dae Date: Tue Jan 5 19:50:31 2016 +0900 drm/exynos: fix kernel panic issue at drm releasing This patch fixes a kernel panic issue which happened when drm driver is closed while modetest. This issue could be reproduced easily by launching modetest with page flip repeatedly. The reason is that invalid drm_file object could be accessed by send_vblank_event function when finishing page flip if the drm_file object was removed by drm_release and there was a pended page flip event which was already committed to hardware. So this patch makes the pended page flip event to be cancelled by preclose callback which is called at front of drm_release function. Changelog v2: - free vblank event objects belonging to the request process, increment event space and decrease pending_update when cancelling the event Signed-off-by: Inki Dae Reviewed-by: Daniel Stone Acked-by: Daniel Vetter drivers/gpu/drm/exynos/exynos_drm_crtc.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_crtc.h | 4 ++++ drivers/gpu/drm/exynos/exynos_drm_drv.c | 5 +++++ 3 files changed, 35 insertions(+) commit d619894cf5c6a74a2e53a4701938dd4dd6736c60 Author: Inki Dae Date: Thu Dec 24 17:24:35 2015 +0900 drm/exynos: crtc: do not wait for the scanout completion This patch removes exynos_drm_crtc_complete_scanout function call which makes sure for overlay data to be updated to real hardware when drm driver is released. With atomic modeset support, it doesn't need the funtion anymore because atomic modeset interface makes sure that. Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_crtc.c | 23 ----------------------- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 1 - drivers/gpu/drm/exynos/exynos_drm_fb.c | 3 --- 3 files changed, 27 deletions(-) commit 3dbaab16c4cddbbb03ad7ed1a0285605a9cc4016 Author: Marek Szyprowski Date: Tue Jan 5 13:52:52 2016 +0100 drm/exynos: mixer: properly update all planes on the same vblank event This patch also moves mixer_vsync_set_update() to newly introduced mixer_atomic_begin/flush callbacks. This ensures that all mixer planes will be updated on the same vsync event. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit d29c2c140787a1645306a11799e33adddf72e64f Author: Marek Szyprowski Date: Tue Jan 5 13:52:51 2016 +0100 drm/exynos: crtc: rework atomic_{begin,flush} Some CRTC drivers (like Exynos DRM Mixer) can handle blocking register updates only on per-device level, not per-plane level. This patch changes exynos_crts atomic_begin/atomic_flush callbacks to handle the entire crtc, instead of given planes, so driver can handle both cases on their own. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 14 ++++++++------ drivers/gpu/drm/exynos/exynos7_drm_decon.c | 14 ++++++++------ drivers/gpu/drm/exynos/exynos_drm_crtc.c | 20 ++++---------------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 10 ++++------ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 14 ++++++++------ 5 files changed, 32 insertions(+), 40 deletions(-) commit 5e68fef24fab07f4decc78d421838eb73b7e3931 Author: Marek Szyprowski Date: Wed Dec 16 13:21:48 2015 +0100 drm/exynos: mixer: unify a check for video-processor window Always use macro instead of hard-coded '2' value in conditions related to video processor window. Additional checks are not needed, because video layer is registered only when video processor is available. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26a7af3ed8a59c27ce125e7619272ca45630d000 Author: Tobias Jakobi Date: Wed Dec 16 13:21:47 2015 +0100 drm/exynos: mixer: also allow ARGB1555 and ARGB4444 Allow the remaining alpha formats now that blending is properly setup. Signed-off-by: Tobias Jakobi Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f657a9962070ae2502fcedf2c6568c393039d4c2 Author: Marek Szyprowski Date: Wed Dec 16 13:21:46 2015 +0100 drm/exynos: mixer: refactor layer setup Properly configure blending properties of given hardware layer based on the selected pixel format. Currently only per-pixel-based alpha is possible when respective pixel format has been selected. Configuration of global, per-plane alpha value, color key and background color will be added later. This patch is heavily inspired by earlier work done by Tobias Jakobi . Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 43 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/exynos/regs-mixer.h | 1 + 2 files changed, 44 insertions(+) commit 5bec01934a23bccfeaa22bf049af134ea80bd3b4 Author: Tobias Jakobi Date: Wed Dec 16 13:21:45 2015 +0100 drm/exynos: mixer: remove all static blending setup Previously blending setup was static and most of it was done in mixer_win_reset(). Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit a2cb911eb663b5820dab89f21ce698d68e7cc568 Author: Marek Szyprowski Date: Wed Dec 16 13:21:44 2015 +0100 drm/exynos: mixer: set window priority based on zpos 'zpos' plane property is configurable, so adjust hardware layers priority based on the zpos value. 'zpos' value shifted by one can be used directly as hw priority value and stored to the registers, because mixer accepts priority values from 1 to 15 (0 means that layer is disabled). This patch also changes the default layer priority to match already exposed initial zpos values. The initial configuration is now: [top] video > gfx layer1 > gfx layer0 [bottom]. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 39 +++++++++++++++++++---------------- drivers/gpu/drm/exynos/regs-mixer.h | 3 +++ 2 files changed, 24 insertions(+), 18 deletions(-) commit 0ea724056262c2e29ac88c73bdf663412fed1ec3 Author: Marek Szyprowski Date: Wed Dec 16 13:21:43 2015 +0100 drm/exynos: make zpos property configurable This patch adds all infrastructure to make zpos plane property configurable from userspace. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.h | 4 ++- drivers/gpu/drm/exynos/exynos_drm_plane.c | 51 ++++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 6 deletions(-) commit 40bdfb0a4c4cd3f3af19171d31a6a7e8ab0cc1e7 Author: Marek Szyprowski Date: Wed Dec 16 13:21:42 2015 +0100 drm/exynos: rename zpos to index This patch renames zpos entry to index, because in most places it is used as index for selecting hardware layer/window instead of configurable layer position. This will later enable to make the zpos property configurable. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 10 +++++----- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 10 +++++----- drivers/gpu/drm/exynos/exynos_drm_drv.h | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 10 +++++----- drivers/gpu/drm/exynos/exynos_drm_plane.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_plane.h | 2 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 +- drivers/gpu/drm/exynos/exynos_mixer.c | 14 +++++++------- 8 files changed, 28 insertions(+), 28 deletions(-) commit 7599ea8b4e25fd8dea26cb64f100cf265d1e6bf3 Author: Lee Jones Date: Tue Jan 12 14:24:18 2016 +0000 kbuild: Demote 'sign-compare' warning to W=2 Ideally, a kernel compile with W=1 enabled should complete cleanly; however, when we run one currently we are presented with ~25k warnings. 'sign-compare' accounts for ~22k of those ~25k. In this patch we're demoting 'sign-compare' warnings to W=2, with a view to fixing the remaining 3k W=1 warnings required for a clean build. Arnd adds: "As per our discussion, I'd add that this was inadvertedly introduced by Behan when he moved the clang specific warnings into an ifdef block and did not notice that -Wsign-compare was interpreted by both gcc and clang. Earlier, it was introduced in just the same way by Jan-Simon as part of 3d3d6b847420 ("kbuild: LLVMLinux: Adapt warnings for compilation with clang")." Acked-by: Arnd Bergmann Fixes: 26ea6bb1fef0 ("kbuild, LLVMLinux: Supress warnings unless W=1-3") Signed-off-by: Lee Jones Signed-off-by: Michal Marek scripts/Makefile.extrawarn | 2 ++ 1 file changed, 2 insertions(+) commit b0fb978e97f58ca930f7cafc4ddc264218710765 Author: Wang Nan Date: Tue Jan 12 10:12:04 2016 +0000 perf tools: Fix mmap2 event allocation in synthesize code perf_event__synthesize_mmap_events() issues mmap2 events, but the memory of that event is allocated using: mmap_event = malloc(sizeof(mmap_event->mmap) + machine->id_hdr_size); If path of mmap source file is long (near PATH_MAX), random crash would happen. Should use sizeof(mmap_event->mmap2). Fix two memory allocations. Signed-off-by: Wang Nan Reviewed-by: Masami Hiramatsu Acked-by: Jiri Olsa Cc: He Kuang Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452593524-138970-1-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8a59f3ccbc11fcb222b046a64929dd473f7dff54 Author: Jiri Olsa Date: Tue Jan 12 10:35:29 2016 +0100 perf stat: Fix recort_usage typo Markus reported gcc 6 complains when compiling perf stat command: builtin-stat.c:1591:27: error: ‘recort_usage’ defined but not used [-Werror=unused-const-variable] static const char * const recort_usage[] = { ^~~~~~~~~~~~ I fixed the typo and realized we already export record_usage, so I also prefixed it with stat (and included report_usage). Reported-by: Markus Trippelsdorf Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452591329-27620-1-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6660800fb7fd0f66faecb3c550fe59709220ade5 Merge: 598bcc6 06312f4 Author: Russell King Date: Tue Jan 12 13:41:03 2016 +0000 Merge branch 'devel-stable' into for-linus commit 5c06d68bc2a174a6b82dce9f100f55173b9a5189 Author: Takashi Iwai Date: Tue Jan 12 14:03:33 2016 +0100 ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnect ALSA PCM may still have a leftover instance after disconnection and it delays its release. The problem is that the PCM close code path of USB-audio driver has a call of snd_usb_autosuspend(). This involves with the call of usb_autopm_put_interface() and it may lead to a kernel Oops due to the NULL object like: BUG: unable to handle kernel NULL pointer dereference at 0000000000000190 IP: [] usb_autopm_put_interface+0xf/0x30 PGD 0 Call Trace: [] snd_usb_autosuspend+0x14/0x20 [] snd_usb_pcm_close.isra.14+0x5c/0x90 [] snd_usb_playback_close+0xf/0x20 [] snd_pcm_release_substream.part.36+0x3a/0x90 [] snd_pcm_release+0xa3/0xb0 [] snd_disconnect_release+0xd0/0xe0 [] __fput+0x97/0x1d0 [] ____fput+0x9/0x10 [] task_work_run+0x72/0x90 [] do_exit+0x280/0xa80 [] do_group_exit+0x3a/0xa0 [] get_signal+0x1df/0x540 [] do_signal+0x23/0x620 [] ? do_readv_writev+0x128/0x200 [] prepare_exit_to_usermode+0x91/0xd0 [] syscall_return_slowpath+0x9a/0x120 [] ? __sys_recvmsg+0x5d/0x70 [] ? ktime_get_ts64+0x45/0xe0 [] ? SyS_poll+0x60/0xf0 [] int_ret_from_sys_call+0x25/0x8f We have already a check of disconnection in snd_usb_autoresume(), but the check is missing its counterpart. The fix is just to put the same check in snd_usb_autosuspend(), too. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109431 Cc: Signed-off-by: Takashi Iwai sound/usb/card.c | 2 ++ 1 file changed, 2 insertions(+) commit 2f0c0b2d96b1205efb14347009748d786c2d9ba5 Author: Mario Kleiner Date: Fri Dec 18 20:24:06 2015 +0100 x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[] Without the reboot=pci method, the iMac 10,1 simply hangs after printing "Restarting system" at the point when it should reboot. This fixes it. Signed-off-by: Mario Kleiner Cc: Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Jones Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1450466646-26663-1-git-send-email-mario.kleiner.de@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/reboot.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e27d90e8be08d96b5e047cd01daf7e62c4fcab78 Author: Rusty Russell Date: Tue Dec 22 10:39:54 2015 +1030 lguest: Map switcher text R/O Pavel noted that lguest maps the switcher code executable and read-write. This is a bad idea for any kernel text, but particularly for text mapped at a fixed address. Create two vmas, one for the text (PAGE_KERNEL_RX) and another for the stacks (PAGE_KERNEL). Use VM_NO_GUARD to map them adjacent (as expected by the rest of the code). Reported-by: Pavel Machek Tested-by: Pavel Machek Signed-off-by: Rusty Russell Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/lguest.h | 4 ++- drivers/lguest/core.c | 74 +++++++++++++++++++++++++++++-------------- 2 files changed, 54 insertions(+), 24 deletions(-) commit aa0421410fc540832f0fd267ff0f2657c3276053 Author: Borislav Petkov Date: Sun Jan 3 23:38:53 2016 +0100 x86/boot: Hide local labels in verify_cpu() ... from the final ELF image's symbol table as they're not really needed there. Before: $ readelf -a vmlinux | grep verify_cpu 43: ffffffff810001a9 0 NOTYPE LOCAL DEFAULT 1 verify_cpu 45: ffffffff8100028f 0 NOTYPE LOCAL DEFAULT 1 verify_cpu_no_longmode 46: ffffffff810001de 0 NOTYPE LOCAL DEFAULT 1 verify_cpu_noamd 47: ffffffff8100022b 0 NOTYPE LOCAL DEFAULT 1 verify_cpu_check 48: ffffffff8100021c 0 NOTYPE LOCAL DEFAULT 1 verify_cpu_clear_xd 49: ffffffff81000263 0 NOTYPE LOCAL DEFAULT 1 verify_cpu_sse_test 50: ffffffff81000296 0 NOTYPE LOCAL DEFAULT 1 verify_cpu_sse_ok After: $ readelf -a vmlinux | grep verify_cpu 43: ffffffff810001a9 0 NOTYPE LOCAL DEFAULT 1 verify_cpu No functionality change. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1451860733-21163-1-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/verify_cpu.S | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 394db20ca240741a08d472173db13d6f6a6e5a28 Author: yu-cheng yu Date: Wed Jan 6 14:24:54 2016 -0800 x86/fpu: Disable AVX when eagerfpu is off When "eagerfpu=off" is given as a command-line input, the kernel should disable AVX support. The Task Switched bit used for lazy context switching does not support AVX. If AVX is enabled without eagerfpu context switching, one task's AVX state could become corrupted or leak to other tasks. This is a bug and has bad security implications. This only affects systems that have AVX/AVX2/AVX512 and this issue will be found only when one actually uses AVX/AVX2/AVX512 _AND_ does eagerfpu=off. Reference: Intel Software Developer's Manual Vol. 3A Sec. 2.5 Control Registers: TS Task Switched bit (bit 3 of CR0) -- Allows the saving of the x87 FPU/ MMX/SSE/SSE2/SSE3/SSSE3/SSE4 context on a task switch to be delayed until an x87 FPU/MMX/SSE/SSE2/SSE3/SSSE3/SSE4 instruction is actually executed by the new task. Sec. 13.4.1 Using the TS Flag to Control the Saving of the X87 FPU and SSE State When the TS flag is set, the processor monitors the instruction stream for x87 FPU, MMX, SSE instructions. When the processor detects one of these instructions, it raises a device-not-available exeception (#NM) prior to executing the instruction. Signed-off-by: Yu-cheng Yu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Ravi V. Shankar Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Cc: yu-cheng yu Link: http://lkml.kernel.org/r/1452119094-7252-5-git-send-email-yu-cheng.yu@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/xstate.h | 11 ++++++----- arch/x86/kernel/fpu/init.c | 6 ++++++ 2 files changed, 12 insertions(+), 5 deletions(-) commit a5fe93a549c54838063d2952dd9643b0b18aa67f Author: yu-cheng yu Date: Wed Jan 6 14:24:53 2016 -0800 x86/fpu: Disable MPX when eagerfpu is off This issue is a fallout from the command-line parsing move. When "eagerfpu=off" is given as a command-line input, the kernel should disable MPX support. The decision for turning off MPX was made in fpu__init_system_ctx_switch(), which is after the selection of the XSAVE format. This patch fixes it by getting that decision done earlier in fpu__init_system_xstate(). Signed-off-by: Yu-cheng Yu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Ravi V. Shankar Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Cc: yu-cheng yu Link: http://lkml.kernel.org/r/1452119094-7252-4-git-send-email-yu-cheng.yu@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/fpu/internal.h | 1 + arch/x86/kernel/fpu/init.c | 56 +++++++++++++++++++++++++++++-------- arch/x86/kernel/fpu/xstate.c | 3 +- 3 files changed, 46 insertions(+), 14 deletions(-) commit eb7c5f872e697b0aebd846cf3a3328d71e9decb2 Author: yu-cheng yu Date: Wed Jan 6 14:24:52 2016 -0800 x86/fpu: Disable XGETBV1 when no XSAVE When "noxsave" is given as a command-line input, the kernel should disable XGETBV1. This issue currently does not cause any actual problems. XGETBV1 is only useful if we have something using the 'init optimization' (i.e. xsaveopt, xsaves). We already clear both of those in fpu__xstate_clear_all_cpu_caps(). But this is good for completeness. Signed-off-by: Yu-cheng Yu Reviewed-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Ravi V. Shankar Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Cc: yu-cheng yu Link: http://lkml.kernel.org/r/1452119094-7252-3-git-send-email-yu-cheng.yu@intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 1 + 1 file changed, 1 insertion(+) commit 4f81cbafcce2c603db7865e9d0e461f7947d77d4 Author: yu-cheng yu Date: Wed Jan 6 14:24:51 2016 -0800 x86/fpu: Fix early FPU command-line parsing The function fpu__init_system() is executed before parse_early_param(). This causes wrong FPU configuration. This patch fixes this issue by parsing boot_command_line in the beginning of fpu__init_system(). With all four patches in this series, each parameter disables features as the following: eagerfpu=off: eagerfpu, avx, avx2, avx512, mpx no387: fpu nofxsr: fxsr, fxsropt, xmm noxsave: xsave, xsaveopt, xsaves, xsavec, avx, avx2, avx512, mpx, xgetbv1 noxsaveopt: xsaveopt noxsaves: xsaves Signed-off-by: Yu-cheng Yu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Ravi V. Shankar Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Cc: yu-cheng yu Link: http://lkml.kernel.org/r/1452119094-7252-2-git-send-email-yu-cheng.yu@intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/init.c | 109 ++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 71 deletions(-) commit 45bdbcfdf241149642fb6c25ab0c209d59c371b7 Author: Huaitong Han Date: Tue Jan 12 16:04:20 2016 +0800 kvm: x86: Fix vmwrite to SECONDARY_VM_EXEC_CONTROL vmx_cpuid_tries to update SECONDARY_VM_EXEC_CONTROL in the VMCS, but it will cause a vmwrite error on older CPUs because the code does not check for the presence of CPU_BASED_ACTIVATE_SECONDARY_CONTROLS. This will get rid of the following trace on e.g. Core2 6600: vmwrite error: reg 401e value 10 (err 12) Call Trace: [] dump_stack+0x40/0x57 [] vmx_cpuid_update+0x5d/0x150 [kvm_intel] [] kvm_vcpu_ioctl_set_cpuid2+0x4c/0x70 [kvm] [] kvm_arch_vcpu_ioctl+0x903/0xfa0 [kvm] Fixes: feda805fe7c4ed9cf78158e73b1218752e3b4314 Cc: stable@vger.kernel.org Reported-by: Zdenek Kaspar Signed-off-by: Huaitong Han Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b500f77baea576b74c3961613b67eaffcdf65c57 Author: Kefeng Wang Date: Tue Jan 12 10:19:30 2016 +0800 x86/mm: Use PAGE_ALIGNED instead of IS_ALIGNED Use PAGE_ALIGEND macro in to simplify code. Signed-off-by: Kefeng Wang Cc: Cc: Alexander Kuleshov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1452565170-11083-1-git-send-email-wangkefeng.wang@huawei.com Signed-off-by: Ingo Molnar arch/x86/mm/init_64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0f672809f91abd0aee01624ccad9199a62e3da7a Author: Andy Lutomirski Date: Mon Jan 11 17:23:32 2016 -0800 selftests/x86: Disable the ldt_gdt_64 test for now ldt_gdt.c relies on cross-cpu invalidation of SS to do one of its tests. On 32-bit builds, this works fine, but on 64-bit builds, it only works if the kernel has proper SS sigcontext handling for 64-bit user programs. Since the SS fixes are currently reverted, restrict the test case to 32 bits for now. In principle, I could change the test to use a different segment register, but it would be messy: CS can't point to the LDT for 64-bit code, and the other registers don't result in immediate faults because they aren't reloaded on kernel -> user transitions. When we fix sigcontext (in 4.6?), we can revert this. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/231591d9122d282402d8f53175134f8db5b3bc73.1452561752.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c9e0d39126af9e338495b719e9d565ca9ebcd4c5 Author: Dave Jones Date: Mon Jan 11 12:04:28 2016 -0500 x86/mm/pat: Make split_page_count() check for empty levels to fix /proc/meminfo output In CONFIG_PAGEALLOC_DEBUG=y builds, we disable 2M pages. Unfortunatly when we split up mappings during boot, split_page_count() doesn't take this into account, and starts decrementing an empty direct_pages_count[] level. This results in /proc/meminfo showing crazy things like: DirectMap2M: 18446744073709543424 kB Signed-off-by: Dave Jones Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Signed-off-by: Ingo Molnar arch/x86/mm/pageattr.c | 3 +++ 1 file changed, 3 insertions(+) commit c0c57019a65341f08858541d2740b74dee821cf1 Merge: 8c31902 ae8a521 Author: Ingo Molnar Date: Tue Jan 12 11:08:13 2016 +0100 Merge commit 'linus' into x86/urgent, to pick up recent x86 changes Signed-off-by: Ingo Molnar commit 0bd106d26dbe444160104b3153ca1652d2ab913b Merge: 5cb52b5 b0500c1 Author: Ingo Molnar Date: Tue Jan 12 11:01:16 2016 +0100 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf tooling fixes from Arnaldo Carvalho de Melo: " - Fix a few clean targets in tools/ (Jiri Olsa) - Add missing sources to perf's MANIFEST, fixing the out of tree build with 'make perf-tar*-src-pkg' tarballs (Jiri Olsa) - Fix bpf related build problems in PowerPC (Naveen N. Rao, Wang Nan) - 'make -C tools/perf build-test' fixes (Wang Nan) - Fix 'perf test hist' entry (Wang Nan) - Add BPF feature check to test-all, as in an environment with all other features enabled, BPF would be considered enabled without doing real feature check. (Wang Nan)" Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 1f16f116b01c110db20ab808562c8b8bc3ee3d6e Merge: 03724ac f9eccf2 Author: Thomas Gleixner Date: Tue Jan 12 11:01:12 2016 +0100 Merge branches 'clockevents/4.4-fixes' and 'clockevents/4.5-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent Pull in fixes from Daniel Lezcano: - Fix the vt8500 timer leading to a system lock up when dealing with too small delta (Roman Volkov) - Select the CLKSRC_MMIO when the fsl_ftm_timer is enabled with COMPILE_TEST (Daniel Lezcano) - Prevent to compile timers using the 'iomem' API when the architecture has not HAS_IOMEM set (Richard Weinberger) commit 03891f9c853d5c4473224478a1e03ea00d70ff8d Merge: 47c62e4 385277b Author: Linus Torvalds Date: Mon Jan 11 22:25:00 2016 -0800 Merge tag 'dm-4.5-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - The most significant set of changes this cycle is the Forward Error Correction (FEC) support that has been added to the DM verity target. Google uses DM verity on all Android devices and it is believed that this FEC support will enable DM verity to recover from storage failures seen since DM verity was first deployed as part of Android. - A stable fix for a race in the destruction of DM thin pool's workqueue - A stable fix for hung IO if a DM snapshot copy hit an error - A few small cleanups in DM core and DM persistent data. - A couple DM thinp range discard improvements (address atomicity of finding a range and the efficiency of discarding a partially mapped thin device) - Add ability to debug DM bufio leaks by recording stack trace when a buffer is allocated. Upon detected leak the recorded stack is dumped. * tag 'dm-4.5-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm snapshot: fix hung bios when copy error occurs dm thin: bump thin and thin-pool target versions dm thin: fix race condition when destroying thin pool workqueue dm space map metadata: remove unused variable in brb_pop() dm verity: add ignore_zero_blocks feature dm verity: add support for forward error correction dm verity: factor out verity_for_bv_block() dm verity: factor out structures and functions useful to separate object dm verity: move dm-verity.c to dm-verity-target.c dm verity: separate function for parsing opt args dm verity: clean up duplicate hashing code dm btree: factor out need_insert() helper dm bufio: use BUG_ON instead of conditional call to BUG dm bufio: store stacktrace in buffers to help find buffer leaks dm bufio: return NULL to improve code clarity dm block manager: cleanup code that prints stacktrace dm: don't save and restore bi_private dm thin metadata: make dm_thin_find_mapped_range() atomic dm thin metadata: speed up discard of partially mapped volumes commit 47c62e4be78303ef52ffa8134026919d0890c5a9 Merge: 2c48712 c315259 Author: Linus Torvalds Date: Mon Jan 11 22:17:44 2016 -0800 Merge tag 'media/v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "The part of patches for Kernel 4.5. There's nothing really big here: - driver-specific headers for media devices were moved to separate directories, in order to make clear what headers belong to the core kABI and require documentation - Platform data for media drivers were moved from include/media to include/linux/platform_data/media - add a driver for cs3308 8-channel volume control, used on some high-end capture boards - lirc.h kAPI header were added at include/uapi/linux - Driver cleanups, new board additions and improvements" * tag 'media/v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (204 commits) [media] rc: sunxi-cir: Initialize the spinlock properly [media] rtl2832: do not filter out slave TS null packets [media] rtl2832: print reg number on error case [media] rtl28xxu: return demod reg page from driver cache [media] coda: enable MPEG-2 ES decoding [media] coda: don't start streaming without queued buffers [media] coda: hook up vidioc_prepare_buf [media] coda: relax coda_jpeg_check_buffer for trailing bytes [media] coda: make to_coda_video_device static [media] s5p-mfc: remove volatile attribute from MFC register addresses [media] s5p-mfc: merge together s5p_mfc_hw_call and s5p_mfc_hw_call_void [media] s5p-mfc: use spinlock to protect MFC context [media] s5p-mfc: remove unnecessary callbacks [media] s5p-mfc: make queue cleanup code common [media] s5p-mfc: use one implementation of s5p_mfc_get_new_ctx [media] s5p-mfc: constify s5p_mfc_codec_ops structures [media] au8522: Avoid memory leak for device config data [media] ir-lirc-codec.c: don't leak lirc->drv-rbuf [media] uvcvideo: small cleanup in uvc_video_clock_update() [media] uvcvideo: Fix reading the current exposure value of UVC ... commit 9d367eddf363553c7668ba92c3b9d187ec4f71f7 Merge: b6a0e72 03d84a5 Author: David S. Miller Date: Mon Jan 11 23:55:43 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts: drivers/net/bonding/bond_main.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c The bond_main.c and mellanox switch conflicts were cases of overlapping changes. Signed-off-by: David S. Miller commit 2c487121e3c4f87e82cff493872675bde52e47fc Merge: d870a9d 522f17e Author: Linus Torvalds Date: Mon Jan 11 20:40:48 2016 -0800 Merge tag 'leds-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED subsystem updates from Jacek Anaszewski: "Besides regular driver updates, we introduce a portion of LED core improvements, that allow to avoid the need for using work queues in the LED class drivers, that set brightness in a blocking way. Affected LED class drivers are being optimized accordingly. - LED core improvements: - use EXPORT_SYMBOL_GPL consistently, - add two new LED_BLINK_ flags, - rename brightness_set_sync op to brightness_set_blocking, - add led_set_brightness_nosleep{nopm} functions, - use set_brightness_work for the blocking op, - drivers shouldn't enforce SYNC/ASYNC brightness setting, - turn off the LED and wait for completion on unregistering LED class device, - add managed version of led_trigger_register, - add description of brightness setting API to the LED class doc. - Remove work queues from drivers: leds-tlc591xx, leds-88pm860x, leds-adp5520, leds-bd2802, leds-blinkm, leds-lm3533, leds-lm3642, leds-pca9532, leds-lp3944, leds-lp55xx, leds-lp8788, leds-lp8860, leds-pca955x, leds-pca963x, leds-wm831x, leds-da903x, leds-da9052, leds-dac124d085, leds-lt3593, leds-max8997, leds-mc13783, leds-regulator, leds-wm8350, leds-max77693, leds-aat1290, leds-ktd2692, leds-gpio, leds-pwm, leds-lm355x, leds-ns2. - Replace brightness_set op with a new brightness_set_blocking op to make the drivers compatible with led triggers: leds-ipaq-micro, leds-powernv. - Add missing of_node_put: leds-ktd2692, leds-aat1290, leds-max77693. - Make the driver explicitly non-modular: ledtrig-cpu, ledtrig-ide-disk, leds-syscon. - Improvements to leds-bcm6328: - reuse bcm6328_led_set() instead of copying its functionality, - swap LED ON and OFF definitions, - improve blink support, - simplify duplicated unlock in bcm6328_blink_set, - add little endian support, - remove unneded lock when checking initial LED status, - add HAS_IOMEM dependency, - code cleaning. - Improvements to leds-bcm6358: - use bcm6358_led_set() in order to get rid of the lock, - merge bcm6358_led_mode and bcm6358_led_set, - add little endian support, - remove unneded lock when checking initial LED status, - add HAS_IOMEM dependency, - remove unneeded busy status check. - Call led_pwm_set() in leds-pwm to enforce default LED_OFF. - Fix duration to be msec instead of jiffies: ledtrig-transient. - Removing NULL check: leds-powernv. - Use platform_register/unregister_drivers(): leds-sunfire. - Fix module license specification: ledtrig-oneshot. - Fix driver description and make license match the header: leds-pwm. - Remove checking for state < 1 in flash_strobe_store(): led-class-flash. - Use led_set_brightness_sync for torch brightness: v4l2-flash-led-class" * tag 'leds-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: (68 commits) leds: add HAS_IOMEM dependency to LEDS_BCM6328/LEDS_BCM6358 leds: core: add managed version of led_trigger_register leds: bcm6358: remove unneeded busy status check leds: bcm6328: improve blink support leds: bcm6358: merge bcm6358_led_mode and bcm6358_led_set leds: bcm6328: simplify duplicated unlock in bcm6328_blink_set leds: bcm6358: add little endian support leds: bcm6328: add little endian support leds: bcm6358: remove unneded lock when checking initial LED status leds: bcm6358: Use bcm6358_led_set() in order to get rid of the lock leds: bcm6328: remove unneded lock when checking initial LED leds: bcm6328: code cleaning leds: syscon: Make the driver explicitly non-modular leds: ledtrig-ide-disk: Make the driver explicitly non-modular leds: ledtrig-cpu: Make the driver explicitly non-modular leds: sunfire: Use platform_register/unregister_drivers() leds: max77693: Add missing of_node_put leds: aat1290: Add missing of_node_put leds: powernv: Implement brightness_set_blocking op leds: ipaq-micro: Implement brightness_set_blocking op ... commit d870a9d5e31ea69a1ceb7555d0d79364c442c5c0 Merge: 2634bf2 1cac550 Author: Linus Torvalds Date: Mon Jan 11 20:36:20 2016 -0800 Merge tag 'edac_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: - hide EDAC workqueue from users (Borislav Petkov) - edac_subsys init/teardown cleanup (Borislav Petkov) - make mpc85xx-pci-edac a platform device (Scott Wood) - sb_edac KNL gen2 support (Jim Snow) - other small cleanups all over the place * tag 'edac_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, i5100: Use to_delayed_work() MAINTAINERS: Fix EDAC repo URLs format EDAC, sb_edac: Set fixed DIMM width on Xeon Knights Landing EDAC: Rework workqueue handling EDAC: Make edac_device workqueue setup/teardown functions static EDAC: Remove edac_get_sysfs_subsys() error handling EDAC: Unexport and make edac_subsys static EDAC: Rip out the edac_subsys reference counting EDAC: Robustify workqueues destruction EDAC, mc_sysfs: Fix freeing bus' name EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device EDAC, sb_edac: Add Knights Landing (Xeon Phi gen 2) support EDAC, sb_edac: Add support for duplicate device IDs EDAC, sb_edac: Virtualize several hard-coded functions EDAC, mv64x60: Use platform_register/unregister_drivers() EDAC, mpc85xx: Use platform_register/unregister_drivers() EDAC: Add DDR4 flag EDAC: Remove references to bluesmoke.sourceforge.net EDAC, pci: Remove old disabled code commit b6a0e72ad3cffabaf30b856deb58fbe64a0f36a8 Author: Tom Herbert Date: Mon Jan 11 10:19:10 2016 -0800 net: Fix typo in netdev_intersect_features Obviously need to 'or in NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM. Fixes: c8cd0989bd151f ("net: Eliminate NETIF_F_GEN_CSUM and NETIF_F_V[46]_CSUM") Reported-by: Jack Morgenstein Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2634bf2550f4dd7d2d4373725dbe4c4d2a6499fd Merge: e795e5f 91918d1 Author: Linus Torvalds Date: Mon Jan 11 20:28:38 2016 -0800 Merge tag 'hwmon-for-linus-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "Notable hwmon changes: - Add basic support for NCT6683 on Mitac boards - Add support for AMD new 15h processors to fam15h_power driver - Add pmbus client driver for LTC3815 - Remove htu21 driver (now supported by iio subsystem)" * tag 'hwmon-for-linus-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (nct6683) Add basic support for NCT6683 on Mitac boards hwmon: (ibmaem) constify aem_rw_sensor_template and aem_ro_sensor_template structures hwmon: (nct6683,nct6775) constify sensor_template_group structures MAINTAINERS: change the maintainer of fam15h_power driver hwmon: (fam15h_power) Add support for AMD new 15h processors hwmon: (pmbus) Add client driver for LTC3815 hwmon: (htu21) Remove driver commit 6bd6d5fa71138ef624e11ee97503435f2961d4ea Merge: 7937963 e47ad65 Author: David S. Miller Date: Mon Jan 11 23:27:26 2016 -0500 Merge branch 'mdio-build-failures' Andrew Lunn says: ==================== More mdio device build failure fixes These patches fix two build errors reported by Guenter Roeck ==================== Signed-off-by: David S. Miller commit e47ad65b1bcc5ede7fa2ae01619047585348563e Author: Andrew Lunn Date: Tue Jan 12 03:24:31 2016 +0100 net: freescale: mac-fec: Fix build error from phy_device API change dev has moved inside the new mdio structure. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e431650f06a9d857fe1d61d92236fad678f7880 Author: Andrew Lunn Date: Tue Jan 12 03:24:30 2016 +0100 net: freescale: ucc_geth: Fix build error from phy_device API change dev has moved inside the new mdio structure. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/freescale/ucc_geth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6255c46fa03798cbd8addd98929aff7eef86ae02 Author: Tejun Heo Date: Mon Jan 11 23:10:44 2016 -0500 cgroup: rename cgroup documentations cgroup-legacy may be too loaded. Rename the docs so that they're postfixed with v1 and v2. * s/cgroup-legacy/cgroup-v1/ * s/cgroup.txt/cgroup-v2.txt/ Signed-off-by: Tejun Heo Documentation/cgroup-legacy/00-INDEX | 28 - Documentation/cgroup-legacy/blkio-controller.txt | 375 ------ Documentation/cgroup-legacy/cgroups.txt | 682 ----------- Documentation/cgroup-legacy/cpuacct.txt | 49 - Documentation/cgroup-legacy/cpusets.txt | 839 ------------- Documentation/cgroup-legacy/devices.txt | 116 -- Documentation/cgroup-legacy/freezer-subsystem.txt | 123 -- Documentation/cgroup-legacy/hugetlb.txt | 45 - Documentation/cgroup-legacy/memcg_test.txt | 280 ----- Documentation/cgroup-legacy/memory.txt | 876 -------------- Documentation/cgroup-legacy/net_cls.txt | 39 - Documentation/cgroup-legacy/net_prio.txt | 55 - Documentation/cgroup-legacy/pids.txt | 85 -- Documentation/cgroup-v1/00-INDEX | 28 + Documentation/cgroup-v1/blkio-controller.txt | 375 ++++++ Documentation/cgroup-v1/cgroups.txt | 682 +++++++++++ Documentation/cgroup-v1/cpuacct.txt | 49 + Documentation/cgroup-v1/cpusets.txt | 839 +++++++++++++ Documentation/cgroup-v1/devices.txt | 116 ++ Documentation/cgroup-v1/freezer-subsystem.txt | 123 ++ Documentation/cgroup-v1/hugetlb.txt | 45 + Documentation/cgroup-v1/memcg_test.txt | 280 +++++ Documentation/cgroup-v1/memory.txt | 876 ++++++++++++++ Documentation/cgroup-v1/net_cls.txt | 39 + Documentation/cgroup-v1/net_prio.txt | 55 + Documentation/cgroup-v1/pids.txt | 85 ++ Documentation/cgroup-v2.txt | 1293 +++++++++++++++++++++ Documentation/cgroup.txt | 1293 --------------------- 28 files changed, 4885 insertions(+), 4885 deletions(-) commit e795e5f4e01de550bd8947a7db910daaf7773198 Merge: 581dbc8 6cb07ab Author: Linus Torvalds Date: Mon Jan 11 20:14:34 2016 -0800 Merge tag 'regmap-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "There's no real overall theme to the regmap changes for this release, it's a collection of individual features. The main bits are: - Support for 64 bit registers, mainly for MMIO use, from Xiubo Li. - Support for trigger type configuration for regmap-irq from Laxman Dewangan. - Use native physical I/O for MMIO register maps to avoid confusion with the conversions that readl() and writel() do to little endian on big endian systems (with some DT updates to fix some workarounds people were doing), code from Simon Arlott. - Use a binary search rather than iteraton to improve the runtime performance of the rbtree code from Nikesh Oswal" * tag 'regmap-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: debugfs: Use seq_file for the access map regmap: irq: add support for configuration of trigger type regmap: use IS_ALIGNED instead of % to improve the performance regmap: cache: Move the num_reg_defaults check as early as possible regmap: cache: Add warning info for the cache check regmap: missing case statement regmap: shift wrapping bugs in 64 bit code regmap: cache: Add 64-bit mode support regmap: cache: To suppress the noise of checkpatch regmap: fix the warning about unused variable regmap: add 64-bit mode support regmap: mmio: Add regmap_mmio_get_min_stride regmap: mmio: remove the useless code regmap: Fix leftover from struct reg_default to struct reg_sequence change regmap: replace kmalloc with kmalloc_array regmap: replace kzalloc with kcalloc regmap: rbtree: When adding a reg do a bsearch for target node regmap-mmio: Use native endianness for read/write commit 581dbc8bfc47ab16c69a67cc20dafea378ddbc60 Merge: fb591fb 14da0a9 Author: Linus Torvalds Date: Mon Jan 11 20:05:39 2016 -0800 Merge tag 'pinctrl-v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control patches for the v4.5 series. Notably I have a patch to driver core from Stephen Boyd in the pull request, this has been ACKed by Greg so it should be OK. The internal API needed some tweaking to allow modular Qualcomm pin controllers. There is a bit of development history in here but it should all add up nicely and has boiled in linux-next. For example I merged in v4.4-rc5 to get rid of some nasty merge conflicts. Summary: - New drivers: - PXA2xx pin controller support - Broadcom NSP pin controller support - New subdrivers: - Samsung EXYNOS5410 support - Qualcomm MSM8996 support - Qualcomm PM8994 support - Qualcomm PM8994 MPP support - Allwinner sunxi H3 support - Allwinner sunxi A80 support - Rockchip RK3228 support - Rename the Cygnus pinctrl driver to "iproc" as it is more generic than was originally thought. - A bunch of Lantiq/Xway updates especially from the OpenWRT people. - Several refactorings for the Super-H SH PFC pin controllers. Adding SCIF_CLK support. - Several fixes to the Atlas 7 driver. - Various fixes all over the place" * tag 'pinctrl-v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (91 commits) pinctrl: mediatek: Modify pinctrl bindings for mt2701 Revert "pinctrl: qcom: make PMIC drivers bool" pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() driver-core: platform: Add platform_irq_count() pinctrl: lantiq: 2 pins have the wrong mux list pinctrl: qcom: make PMIC drivers bool pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength() pinctrl: mediatek: convert to arch_initcall pinctrl: bcm2835: Fix memory leak in error path pinctrl: mediatek: add missing of_node_put pinctrl: rockchip: add missing of_node_put pinctrl: sh-pfc: add missing of_node_put pinctrl: sirf: add missing of_node_put pinctrl-tegra: add missing of_node_put pinctrl: sunxi: Add A80 special pin controller pinctrl: bcm/cygnys/iproc: fixup rebase issue pinctrl: fixup problematic flag MAINTAINERS: Add co-maintainer for Renesas Pin Controllers pinctrl: sh-pfc: r8a7791: add EtherAVB pin groups pinctrl: sh-pfc: r8a7795: Add SATA support ... commit fb591fbd0aee437faada42b0473835bcbaf0eb38 Merge: 8c93020 01a999e Author: Linus Torvalds Date: Mon Jan 11 19:39:09 2016 -0800 Merge tag 'mmc-v4.5' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Optimize boot time by detecting cards simultaneously - Make runtime resume default behavior for MMC/SD - Enable MMC/SD/SDIO devices to suspend/resume asynchronously - Allow more than 8 partitions per card - Introduce MMC_CAP2_NO_SDIO to prevent unsupported SDIO commands - Support the standard DT wakeup-source property - Fix driver strength switching for HS200 and HS400 - Fix switch command timeout - Fix invalid vdd in voltage switch power cycle for SDIO MMC host: - sdhci: Restore behavior when setting VDD via external regulator - sdhci: A couple of changes/fixes related to the dma support - sdhci-tegra: Add Tegra210 support - sdhci-tegra: Support for UHS-I cards including tuning support - sdhci-of-at91: Add PM support - sh_mmcif: Rework dma channel handling - mvsdio: Delete platform data code path" * tag 'mmc-v4.5' of git://git.linaro.org/people/ulf.hansson/mmc: (52 commits) mmc: dw_mmc: remove the unused quirks mmc: sdhci-pci: use to_pci_dev() mmc: cb710: use to_platform_device() mmc: tegra: use correct accessor for misc ctrl register mmc: tegra: enable UHS-I modes mmc: tegra: implement UHS tuning mmc: tegra: disable SPI_MODE_CLKEN mmc: tegra: implement module external clock change mmc: sdhci: restore behavior when setting VDD via external regulator mmc: It is not an error for the card to be removed while suspended mmc: block: Allow more than 8 partitions per card mmc: core: Optimize boot time by detecting cards simultaneously mmc: dw_mmc: use resource_size_t to store physical address mmc: core: fix __mmc_switch timeout caused by preempt mmc: usdhi6rol0: handle NULL data in timeout mmc: of_mmc_spi: Add IRQF_ONESHOT to interrupt flags mmc: mediatek: change some dev_err to dev_dbg mmc: enable MMC/SD/SDIO device to suspend/resume asynchronously mmc: sdhci: Fix sdhci_runtime_pm_bus_on/off() mmc: sdhci: 64-bit DMA actually has 4-byte alignment ... commit 8c930204ce76eddeb2e1af66a75f0ab2506c76e2 Merge: 367262c e39b2bb Author: Linus Torvalds Date: Mon Jan 11 19:33:59 2016 -0800 Merge branch 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: "Mostly low level driver specific changes. Two changes are somewhat noteworthy. First, Dan's patchset to support per-port msix interrupt handling for ahci, which was tried last cycle but had to be backed out due to a couple issues, is back and seems to be working fine. Second, libata exception handling now uses usleep_range() instead of msleep() for sleeps < 20ms which can make things snappier in some corner cases" * 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: skip debounce delay on link resume ata: ahci_brcmstb: disable DIPM support ata: ahci_brcmstb: enable support for ALPM drivers: libata-core: Use usleep_range() instead of msleep() for short sleeps (<20 ms) sata_sx4: correctly handling failed allocation ata: ahci_brcmstb: add support for MIPS-based platforms ahci: qoriq: Adjust the default register values on ls1021a ahci: qoriq: Update the default Rx watermark value ahci: qoriq: Adjust the default register values on ls1043a ahci: compile out msi/msix infrastructure ata: core: fix irq description on AHCI single irq systems ata: ahci_brcmstb: remove unused definitions ata: ahci_brcmstb: add a quirk for MIPS-based platforms ata: ahci_brcmstb: disable NCQ for MIPS-based platforms ata: sata_rcar: Remove obsolete platform_device_id entries sata_rcar: Add compatible string for r8a7795 ahci: kill 'intr_status' ahci: switch from 'threaded' to 'hardirq' interrupt handling ahci: per-port msix support commit 367262c1be4bbf23938175a93eb573b289a00027 Merge: 0f8c790 18fc93f Author: Linus Torvalds Date: Mon Jan 11 19:13:56 2016 -0800 Merge branch 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu updates from Tejun Heo: "Two trivial percpu patches for v4.5-rc1" * 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: remove PERCPU_ENOUGH_ROOM which is stale definition percpu: Remove unneeded return from void function commit 0f8c7901039f8b1366ae364462743c8f4125822e Merge: 3d116a6 6201171 Author: Linus Torvalds Date: Mon Jan 11 18:53:13 2016 -0800 Merge branch 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue update from Tejun Heo: "Workqueue changes for v4.5. One cleanup patch and three to improve the debuggability. Workqueue now has a stall detector which dumps workqueue state if any worker pool hasn't made forward progress over a certain amount of time (30s by default) and also triggers a warning if a workqueue which can be used in memory reclaim path tries to wait on something which can't be. These should make workqueue hangs a lot easier to debug." * 'for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: simplify the apply_workqueue_attrs_locked() workqueue: implement lockup detector watchdog: introduce touch_softlockup_watchdog_sched() workqueue: warn if memory reclaim tries to flush !WQ_MEM_RECLAIM workqueue commit 3d116a66ed9df0271b8d267093b3bfde2be19b3a Merge: b4cee21 d3b421c Author: Linus Torvalds Date: Mon Jan 11 18:28:06 2016 -0800 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The irq department provides: - Support for MSI to wire bridges and a first user of it - More ACPI support for ARM/GIC - A new TS-4800 interrupt controller driver - RCU based free of interrupt descriptors to support the upcoming Intel VMD technology without introducing a locking nightmare - The usual pile of fixes and updates to drivers and core code" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits) irqchip/omap-intc: Add support for spurious irq handling irqchip/zevio: Use irq_data_get_chip_type() helper irqchip/omap-intc: Remove duplicate setup for IRQ chip type handler irqchip/ts4800: Add TS-4800 interrupt controller irqchip/ts4800: Add documentation for TS-4800 interrupt controller irq/platform-MSI: Increase the maximum MSIs the MSI framework can support irqchip/gicv2m: Miscellaneous fixes for v2m resources and SPI ranges irqchip/bcm2836: Make code more readable irqchip/bcm2836: Tolerate IRQs while no flag is set in ISR irqchip/bcm2836: Add SMP support for the 2836 irqchip/bcm2836: Fix initialization of the LOCAL_IRQ_CNT timers irqchip/gic-v2m: acpi: Introducing GICv2m ACPI support irqchip/gic-v2m: Refactor to prepare for ACPI support irqdomain: Introduce is_fwnode_irqchip helper acpi: pci: Setup MSI domain for ACPI based pci devices genirq/msi: Export functions to allow MSI domains in modules irqchip/mbigen: Implement the mbigen irq chip operation functions irqchip/mbigen: Create irq domain for each mbigen device irqchip/mgigen: Add platform device driver for mbigen device dt-bindings: Documents the mbigen bindings ... commit b4cee21ee057ff3e5c9014fb6a175bd932c5ce62 Merge: ae8a521 0141488 1b9f237 Author: Linus Torvalds Date: Mon Jan 11 18:06:43 2016 -0800 Merge branches 'timers-core-for-linus' and 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates - and a leftover fix - from Thomas Gleixner: "A rather large (commit wise) update from the timer side: - A bulk update to make compile tests work in the clocksource drivers - An overhaul of the h8300 timers - Some more Y2038 work - A few overflow prevention checks in the timekeeping/ntp code - The usual pile of fixes and improvements to the various clocksource/clockevent drivers and core code" Also: "A single fix for the posix-clock poll code which did not make it into 4.4" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (84 commits) clocksource/drivers/acpi_pm: Convert to pr_* macros clocksource: Make clocksource validation work for all clocksources timekeeping: Cap adjustments so they don't exceed the maxadj value ntp: Fix second_overflow's input parameter type to be 64bits ntp: Change time_reftime to time64_t and utilize 64bit __ktime_get_real_seconds timekeeping: Provide internal function __ktime_get_real_seconds clocksource/drivers/h8300: Use ioread / iowrite clocksource/drivers/h8300: Initializer cleanup. clocksource/drivers/h8300: Simplify delta handling clocksource/drivers/h8300: Fix timer not overflow case clocksource/drivers/h8300: Change to overflow interrupt clocksource/drivers/lpc32: Correct pr_err() output format clocksource/drivers/arm_global_timer: Fix suspend resume clocksource/drivers/pistachio: Fix wrong calculated clocksource read value clockevents/drivers/arm_global_timer: Use writel_relaxed in gt_compare_set clocksource/drivers/dw_apb_timer: Inline apbt_readl and apbt_writel clocksource/drivers/dw_apb_timer: Use {readl|writel}_relaxed in critical path clocksource/drivers/dw_apb_timer: Fix apbt_readl return types clocksource/drivers/tango-xtal: Replace code by clocksource_mmio_init clocksource/drivers/h8300: Increase the compilation test coverage ... * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix-clock: Fix return code on the poll method's error path commit 1c0276d56737bd29b6d960611b625710c5cda080 Author: Nick Dyer Date: Sun Jan 10 18:29:34 2016 -0800 Input: atmel_mxt_ts - improve touchscreen size/orientation handling Both T100 and T9 handle range and orientation in a similar fashion. Reduce duplication between the two implementations. Signed-off-by: Nick Dyer Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 68 ++++++++++++-------------------- 1 file changed, 26 insertions(+), 42 deletions(-) commit 009f773836513960d3982e80c86e266d25528563 Merge: dd0d0d4 6544a1d Author: Dmitry Torokhov Date: Mon Jan 11 17:47:25 2016 -0800 Merge branch 'next' into for-linus Prepare first round of input updates for 4.5 merge window. commit ae8a52185e5c070cf4510b323dbc1b9e46b897d6 Merge: 0ffedcd d6b56b0 Author: Linus Torvalds Date: Mon Jan 11 17:45:32 2016 -0800 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "Two changes: - one to quirk-save/restore certain system MSRs across suspend/resume, to make certain Intel systems work better (Chen Yu) - and also to constify a read only structure (Julia Lawall)" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/calgary: Constify cal_chipset_ops structures x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume commit 6544a1df11c48c8413071aac3316792e4678fbfb Author: Benjamin Tissoires Date: Mon Jan 11 17:35:38 2016 -0800 Input: elantech - mark protocols v2 and v3 as semi-mt When using a protocol v2 or v3 hardware, elantech uses the function elantech_report_semi_mt_data() to report data. This devices are rather creepy because if num_finger is 3, (x2,y2) is (0,0). Yes, only one valid touch is reported. Anyway, userspace (libinput) is now confused by these (0,0) touches, and detect them as palm, and rejects them. Commit 3c0213d17a09 ("Input: elantech - fix semi-mt protocol for v3 HW") was sufficient enough for xf86-input-synaptics and libinput before it has palm rejection. Now we need to actually tell libinput that this device is a semi-mt one and it should not rely on the actual values of the 2 touches. Cc: stable@vger.kernel.org Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 000afe892ed6ff127745e7ab4fba4bc52248d6f4 Author: Masahiro Yamada Date: Mon Jan 4 19:34:14 2016 +0900 DMA-API: fix confusing sentence in Documentation/DMA-API.txt Change the phrase "handed off to the driver" to "handed off to the device" as in the paragraph below. Signed-off-by: Masahiro Yamada Signed-off-by: Jonathan Corbet Documentation/DMA-API.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit feb4d8887ed9b4d7997247a6f17759234564d553 Author: SeongJae Park Date: Fri Jan 1 12:54:37 2016 +0900 Documentation: translations: update linux cross reference link The old link to source code cross reference does not work now. Though the link has updated by commit 1d12554f0abbc7d17dce8d1b7b25f4e27555e6d7 ("Documentation: HOWTO: update code cross reference link"), there are few obsolete links yet. This commit update them. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Documentation/ja_JP/HOWTO | 2 +- Documentation/kernel-docs.txt | 2 +- Documentation/ko_KR/HOWTO | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9a2885e662bcbdcbc473f207b481c65b8620537b Author: Manuel Pégourié-Gonnard Date: Mon Dec 28 11:06:55 2015 +0100 Documentation: fix typo in CodingStyle Simple typo: "it" for "is". Signed-off-by: Manuel Pégourié-Gonnard Cc: Trivial Patch Monkey Signed-off-by: Jonathan Corbet Documentation/CodingStyle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ffedcda63f56eaca99a77392b9f057dfb738817 Merge: 6896d9f 1f1a89a Author: Linus Torvalds Date: Mon Jan 11 17:16:01 2016 -0800 Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Ingo Molnar: "The main changes in this cycle were: - make the debugfs 'kernel_page_tables' file read-only, as it only has read ops. (Borislav Petkov) - micro-optimize clflush_cache_range() (Chris Wilson) - swiotlb enhancements, which fixes certain KVM emulated devices (Igor Mammedov) - fix an LDT related debug message (Jan Beulich) - modularize CONFIG_X86_PTDUMP (Kees Cook) - tone down an overly alarming warning (Laura Abbott) - Mark variable __initdata (Rasmus Villemoes) - PAT additions (Toshi Kani)" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Micro-optimise clflush_cache_range() x86/mm/pat: Change free_memtype() to support shrinking case x86/mm/pat: Add untrack_pfn_moved for mremap x86/mm: Drop WARN from multi-BAR check x86/LDT: Print the real LDT base address x86/mm/64: Enable SWIOTLB if system has SRAT memory regions above MAX_DMA32_PFN x86/mm: Introduce max_possible_pfn x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only x86/mm/mtrr: Mark the 'range_new' static variable in mtrr_calc_range_state() as __initdata x86/mm: Turn CONFIG_X86_PTDUMP into a module commit 6896d9f7e7ee98d772224a539b7581a1e6dd6b2c Merge: 671d553 e49a449 Author: Linus Torvalds Date: Mon Jan 11 16:56:38 2016 -0800 Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Ingo Molnar: "This cleans up the FPU fault handling methods to be more robust, and moves eligible variables to .init.data" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Put a few variables in .init.data x86/fpu: Get rid of xstate_fault() x86/fpu: Add an XSTATE_OP() macro commit 3ded91041a762423bd49bb932ae2e36b65c6ae4b Author: Rafael J. Wysocki Date: Tue Jan 12 01:51:44 2016 +0100 driver core: Avoid NULL pointer dereferences in device_is_bound() If device_is_bound() is called on a device that's not been registered yet, it will attepmt to dereference dev->p which is NULL, so avoid that by checking dev->p in there against NULL. Fixes: 6b9cb42752da "device core: add device_is_bound()" Reported-and-tested-by: Guenter Roeck Tested-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki drivers/base/dd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 671d5532aaad777782b66eff71bc4dfad25f942d Merge: 67c707e 0007bcc Author: Linus Torvalds Date: Mon Jan 11 16:46:20 2016 -0800 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Ingo Molnar: "The main changes in this cycle were: - Improved CPU ID handling code and related enhancements (Borislav Petkov) - RDRAND fix (Len Brown)" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Replace RDRAND forced-reseed with simple sanity check x86/MSR: Chop off lower 32-bit value x86/cpu: Fix MSR value truncation issue x86/cpu/amd, kvm: Satisfy guest kernel reads of IC_CFG MSR kvm: Add accessors for guest CPU's family, model, stepping x86/cpu: Unify CPU family, model, stepping calculation commit 67c707e451e12f59e57bca6cf33b5803cb74b022 Merge: 463eb8a 0105c8d Author: Linus Torvalds Date: Mon Jan 11 16:26:03 2016 -0800 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "The main changes in this cycle were: - code patching and cpu_has cleanups (Borislav Petkov) - paravirt cleanups (Juergen Gross) - TSC cleanup (Thomas Gleixner) - ptrace cleanup (Chen Gang)" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arch/x86/kernel/ptrace.c: Remove unused arg_offs_table x86/mm: Align macro defines x86/cpu: Provide a config option to disable static_cpu_has x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros x86/cpufeature: Cleanup get_cpu_cap() x86/cpufeature: Move some of the scattered feature bits to x86_capability x86/paravirt: Remove paravirt ops pmd_update[_defer] and pte_update_defer x86/paravirt: Remove unused pv_apic_ops structure x86/tsc: Remove unused tsc_pre_init() hook x86: Remove unused function cpu_has_ht_siblings() x86/paravirt: Kill some unused patching functions commit 463eb8ac337bad30ace10835108a56df5817cc76 Merge: 88cbfd0 74b18e1 Author: Linus Torvalds Date: Mon Jan 11 16:25:41 2016 -0800 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull small x86 boot update from Ingo Molnar: "A single update to the MAINTAINERS file" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tboot: Update maintainer list for Intel TXT commit a889f766dbb7d016b858e4dd157b06587fdb570f Merge: 8f053a5 600c395 Author: Rafael J. Wysocki Date: Tue Jan 12 01:12:40 2016 +0100 Merge branch 'powercap' * powercap: powercap: constify powercap_zone_ops and powercap_zone_constraint_ops structures commit 8f053a56dfa4be0cfcce49c7647adaa33196aae5 Merge: 9326806 a1e9ca6 e98f033 Author: Rafael J. Wysocki Date: Tue Jan 12 01:12:03 2016 +0100 Merge branches 'pm-sleep' and 'pm-tools' * pm-sleep: PM / sleep: Add support for read-only sysfs attributes * pm-tools: cpupower: fix how "cpupower frequency-info" interprets latency cpupower: rework the "cpupower frequency-info" command cpupower: Do not analyse offlined cpus cpupower: Provide STATIC variable in Makefile for debug builds cpupower: Fix precedence issue commit 932680692aeb115f84396ae7e44bf132c03635a1 Merge: b366f97 e219aaf Author: Rafael J. Wysocki Date: Tue Jan 12 01:11:35 2016 +0100 Merge branch 'pm-domains' * pm-domains: PM / Domains: export symbols to add/remove devices from genpd commit b366f976323d5d9ccb612e20afaaddf1fb84418d Merge: 7f4a370 a032d2d Author: Rafael J. Wysocki Date: Tue Jan 12 01:11:25 2016 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: (30 commits) Documentation: cpufreq: intel_pstate: enhance documentation cpufreq-dt: fix handling regulator_get_voltage() result cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC cpufreq: mt8173: migrate to use operating-points-v2 bindings cpufreq: Simplify core code related to boost support cpufreq: acpi-cpufreq: Simplify boost-related code cpufreq: Make cpufreq_boost_supported() static blackfin-cpufreq: Mark cpu_set_cclk() as static blackfin-cpufreq: Change return type of cpu_set_cclk() to that of clk_set_rate() dt: cpufreq: st: Provide bindings for ST's CPUFreq implementation cpufreq: st: Provide runtime initialised driver for ST's platforms cpufreq: mt8173: Move resources allocation into ->probe() cpufreq: intel_pstate: Account for IO wait time cpufreq: intel_pstate: Account for non C0 time cpufreq: intel_pstate: Configurable algorithm to get target pstate cpufreq: mt8173: check return value of regulator_get_voltage() call cpufreq: mt8173: remove redundant regulator_get_voltage() call cpufreq: mt8173: add CPUFREQ_HAVE_GOVERNOR_PER_POLICY flag cpufreq: qoriq: Register cooling device based on device tree cpufreq: pcc-cpufreq: update default value of cpuinfo_transition_latency ... commit 7f4a3702bda0f9f5d34f0241cc81467a55162d7a Merge: a7da481 5ff24d6 Author: Rafael J. Wysocki Date: Tue Jan 12 01:11:14 2016 +0100 Merge branch 'pm-opp' * pm-opp: PM / OPP: Use snprintf() instead of sprintf() PM / OPP: Set cpu_dev->id in cpumask first PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties PM / OPP: Parse 'opp--' bindings PM / OPP: Parse 'opp-supported-hw' binding PM / OPP: Add missing doc comments ARM: dts: exynos4412: Rename OPP nodes as opp@ PM / OPP: Rename OPP nodes as opp@ PM / OPP: Remove 'operating-points-names' binding PM / OPP: Add {opp-microvolt|opp-microamp}- binding PM / OPP: Add "opp-supported-hw" binding PM / OPP: Add debugfs support commit a7da4813429cf36abd042e6da72cc6641767d52f Merge: 92266e1 8459923 Author: Rafael J. Wysocki Date: Tue Jan 12 01:11:03 2016 +0100 Merge branch 'pm-cpuidle' * pm-cpuidle: drivers/cpuidle: make cpuidle-exynos.c explicitly non-modular drivers/cpuidle: make cpuidle-ux500.c explicitly non-modular drivers/cpuidle: make cpuidle-clps711x.c explicitly non-modular cpuidle,menu: smooth out measured_us calculation cpuidle,menu: use interactivity_req to disable polling cpuidle,x86: increase forced cut-off for polling to 20us commit 92266e1de4324a23359fe71678cb521987fea0c5 Merge: 4c170ed 76fc35d 4295733 Author: Rafael J. Wysocki Date: Tue Jan 12 01:10:52 2016 +0100 Merge branches 'pm-pci' and 'pm-core' * pm-pci: PCI / PM: Fix small typo in documentation PCI / PM: constify pci_platform_pm_ops structure * pm-core: PM / core: fix typo in documentation PM / runtime: Add new helper for conditional usage count incrementation MAINTAINERS: Add an entry for the PM core PM / runtime: Re-init runtime PM states at probe error and driver unbind PM / sleep: prohibit devices probing during suspend/hibernation commit 4c170ed1d9d66464361cb47853ffb9fa64ca5048 Merge: 476cc43 38a234b e0f03e8 Author: Rafael J. Wysocki Date: Tue Jan 12 01:10:36 2016 +0100 Merge branches 'acpi-pnp' and 'pnp' * acpi-pnp: ACPI / PNP: constify device IDs * pnp: PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching PNP: Add Broadwell to Intel MCH size workaround commit 476cc4333afb7cf3232c066d278c024b186e6d17 Merge: 42d287d 4528897 33ada67 a84bc8c Author: Rafael J. Wysocki Date: Tue Jan 12 01:10:19 2016 +0100 Merge branches 'acpi-pci', 'acpi-irq' and 'acpi-assorted' * acpi-pci: ACPI, PCI, irq: remove redundant check for null string pointer ACPI / PCI: Simplify acpi_penalize_isa_irq() ACPI, PCI, irq: remove interrupt number restriction ACPI, PCI, irq: remove interrupt count restriction * acpi-irq: ACPI / spi: attach GPIO IRQ from ACPI description to SPI device ACPI / gpio: Add irq_type when a GPIO is used as an interrupt ACPI: Rename acpi_gsi_get_irq_type to acpi_dev_get_irq_type and export symbol * acpi-assorted: ACPI / SBS: fix inconsistent indenting inside if statement ACPI: Fix build errors due objects compiled unconditionally commit 42d287d1a1e805ec98b5bdc4cca2660a56720ebd Merge: b12745c edc345d 76c599b 9d128ed cd7f84c Author: Rafael J. Wysocki Date: Tue Jan 12 01:10:03 2016 +0100 Merge branches 'acpi-scan', 'acpi-bus', 'acpi-osl' and 'acpi-pm' * acpi-scan: ACPI: Fix white space in a structure definition ACPI / utils: Add acpi_dev_present() ACPI / scan: Fix acpi_bus_id_list bookkeeping ACPI / scan: set status to 0 if _STA failed * acpi-bus: ACPI / bus: Show _OSC UUID when _OSC fails ACPI / bus: Tidy up _OSC error spacing * acpi-osl: ACPI / OSL: Add kerneldoc comments to memory mapping functions * acpi-pm: ACPI / PM: Support D3 COLD device in old BIOS for ZPODD commit b12745cce2c903ff8e84ebbd1f8632063156d194 Merge: f3a1bca aecbd9b Author: Rafael J. Wysocki Date: Tue Jan 12 01:09:27 2016 +0100 Merge branch 'acpi-video' * acpi-video: ACPI / video: driver must be registered before checking for keypresses ACPI / video: Add a quirk to force acpi-video backlight on SAMSUNG 530U4E/540U4E ACPI / video: Add quirks for the Dell Vostro V131 ACPI / video: Add a module option to disable the reporting of keypresses thinkpad_acpi: Use acpi_video_handles_brightness_key_presses() dell-wmi: Use acpi_video_handles_brightness_key_presses() ACPI / video: Add a acpi_video_handles_brightness_key_presses() helper commit f3a1bca09a1f4ac445434b97ed2a43e5c6449cf4 Merge: 51834d6 e3e9b57 Author: Rafael J. Wysocki Date: Tue Jan 12 01:09:14 2016 +0100 Merge branch 'acpica' * acpica: (43 commits) ACPICA: Drop Linux-specific waking vector functions ACPICA: Update version to 20151218 ACPICA: Add per-table execution of module-level code ACPICA: Add "root node" case to the ACPI name repair code ACPICA: Events: Introduce ACPI_REG_DISCONNECT invocation to acpi_ev_execute_reg_methods() ACPICA: Events: Enhance acpi_ev_execute_reg_method() to ensure no _REG evaluations can happen during OS early boot stages ACPICA: Events: Split acpi_ev_associate_reg_method() from region initialization code ACPICA: Events: Fix an issue that region object is re-attached to another scope when it is already attached ACPICA: Utilities: Reorder initialization code ACPICA: Events: Uses common_notify for address space handlers ACPICA: Events: Deploys acpi_ev_find_region_handler() ACPICA: Cleanup code related to the per-table module level improvement ACPICA: Update for CondRefOf and RefOf operators ACPICA: Update internal #defines for ObjectType operator. No functional change ACPICA: Update parameter type for ObjectType operator ACPICA: Parser: Fix for SuperName method invocation ACPICA: Parser: Add constants for internal namepath function ACPICA: iasl/Disassembler: Support ASL ElseIf operator ACPICA: Add new exception code, AE_IO_ERROR ACPICA: Tools: Add spacing and missing options in acpibin tool ... commit 51834d6ae9ae290482bff1389c304f244c7109ee Merge: 1e3f28a 59adb39 Author: Rafael J. Wysocki Date: Tue Jan 12 01:09:06 2016 +0100 Merge branch 'acpi-debug' * acpi-debug: ACPI / debugger: Fix a redundant mutex unlock issue in acpi_aml_open() ACPI / debugger: copy_to_user doesn't return errors ACPI / debugger: remove some unneeded conditions ACPI / debugger: Fix an issue a flag is modified without locking ACPI / debugger: Add module support for ACPI debugger tools/power/acpi: Add userspace AML interface support ACPI / debugger: Add IO interface to access debugger functionalities ACPICA: Debugger: Fix runtime stub issues of ACPI_DEBUGGER_EXEC using different stub mechanism ACPICA: Debugger: Convert some mechanisms to OSPM specific ACPICA: Debugger: Remove unnecessary status check commit 1e3f28a552c7acf6dd8acfe505beb4990e8cbd55 Merge: 9896528 d35818a Author: Rafael J. Wysocki Date: Tue Jan 12 01:08:47 2016 +0100 Merge branch 'acpi-soc' * acpi-soc: PM / clk: don't leave clocks enabled when driver not bound i2c: dw: Add APM X-Gene ACPI I2C device support ACPI / APD: Add APM X-Gene ACPI I2C device support ACPI / LPSS: change 'does not have' to 'has' in comment Revert "dmaengine: dw: platform: provide platform data for Intel" dmaengine: dw: return immediately from IRQ when DMA isn't in use dmaengine: dw: platform: power on device on shutdown ACPI / LPSS: override power state for LPSS DMA device ACPI / LPSS: power on when probe() and otherwise when remove() ACPI / LPSS: do delay for all LPSS devices when D3->D0 ACPI / LPSS: allow to use specific PM domain during ->probe() Revert "ACPI / LPSS: allow to use specific PM domain during ->probe()" device core: add BUS_NOTIFY_DRIVER_NOT_BOUND notification x86/platform/iosf_mbi: Remove duplicate definitions Conflicts: drivers/i2c/busses/i2c-designware-platdrv.c commit 989652871b06f1fb173bc5e8e2ea03bec8f8eeeb Merge: afd2ff9 f6740c1 Author: Rafael J. Wysocki Date: Tue Jan 12 01:07:46 2016 +0100 Merge branch 'device-properties' * device-properties: device property: avoid allocations of 0 length device property: the secondary fwnode needs to depend on the primary device property: add spaces to PROPERTY_ENTRY_STRING macro include/linux/property.h: fix build issues with gcc-4.4.4 i2c: designware: Convert to use unified device property API mfd: intel-lpss: Pass HSUART configuration via properties mfd: intel-lpss: Pass SDA hold time to I2C host controller driver mfd: intel-lpss: Add support for passing device properties mfd: core: propagate device properties to sub devices drivers driver core: Do not overwrite secondary fwnode with NULL if it is set driver core: platform: Add support for built-in device properties device property: Take a copy of the property set device property: Fallback to secondary fwnode if primary misses the property device property: return -EINVAL when property isn't found in ACPI device property: improve readability of macros device property: helper macros for property entry creation device property: keep single value inplace device property: refactor built-in properties support device property: rename helper functions device property: always check for fwnode type commit 2f10f1a7884e97a68e52c4b6f7866e29cf3fe7e6 Author: Hugh Dickins Date: Sat Jan 9 16:54:59 2016 -0800 powerpc/mm: fix _PAGE_SWP_SOFT_DIRTY breaking swapoff Swapoff after swapping hangs on the G5, when CONFIG_CHECKPOINT_RESTORE=y but CONFIG_MEM_SOFT_DIRTY is not set. That's because the non-zero _PAGE_SWP_SOFT_DIRTY bit, added by CONFIG_HAVE_ARCH_SOFT_DIRTY=y, is not discounted when CONFIG_MEM_SOFT_DIRTY is not set: so swap ptes cannot be recognized. (I suspect that the peculiar dependence of HAVE_ARCH_SOFT_DIRTY on CHECKPOINT_RESTORE in arch/powerpc/Kconfig comes from an incomplete attempt to solve this problem.) It's true that the relationship between CONFIG_HAVE_ARCH_SOFT_DIRTY and and CONFIG_MEM_SOFT_DIRTY is too confusing, and it's true that swapoff should be made more robust; but nevertheless, fix up the powerpc ifdefs as x86_64 and s390 (which met the same problem) have them, defining the bits as 0 if CONFIG_MEM_SOFT_DIRTY is not set. Fixes: 7207f43665b8 ("powerpc/mm: Add page soft dirty tracking") Signed-off-by: Hugh Dickins Reviewed-by: Cyrill Gorcunov Acked-by: Laurent Dufour Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash.h | 5 +++++ arch/powerpc/include/asm/book3s/64/pgtable.h | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) commit 44734f23de2465c3c0d39e4a16df7735b23fd142 Author: Aneesh Kumar K.V Date: Mon Jan 11 21:19:34 2016 +0530 powerpc/mm: Fix _PAGE_PTE breaking swapoff Core kernel expects swp_entry_t to consist of only swap type and swap offset. We should not leak pte bits into swp_entry_t. This breaks swapoff which use the swap type and offset to build a swp_entry_t and later compare that to the swp_entry_t obtained from linux page table pte. Leaking pte bits into swp_entry_t breaks that comparison and results in us looping in try_to_unuse. The stack trace can be anywhere below try_to_unuse() in mm/swapfile.c, since swapoff is circling around and around that function, reading from each used swap block into a page, then trying to find where that page belongs, looking at every non-file pte of every mm that ever swapped. Fixes: 6a119eae942c ("powerpc/mm: Add a _PAGE_PTE bit") Reported-by: Hugh Dickins Suggested-by: Hugh Dickins Signed-off-by: Aneesh Kumar K.V Acked-by: Hugh Dickins Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 88cbfd07119e394b9cbb1a4a764056c4b37e8378 Merge: 4f19b88 8705d60 Author: Linus Torvalds Date: Mon Jan 11 15:58:16 2016 -0800 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "The main changes in this cycle were: - vDSO and asm entry improvements (Andy Lutomirski) - Xen paravirt entry enhancements (Boris Ostrovsky) - asm entry labels enhancement (Borislav Petkov) - and other misc changes (Thomas Gleixner, me)" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vsdo: Fix build on PARAVIRT_CLOCK=y, KVM_GUEST=n Revert "x86/kvm: On KVM re-enable (e.g. after suspend), update clocks" x86/entry/64_compat: Make labels local x86/platform/uv: Include clocksource.h for clocksource_touch_watchdog() x86/vdso: Enable vdso pvclock access on all vdso variants x86/vdso: Remove pvclock fixmap machinery x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader x86/kvm: On KVM re-enable (e.g. after suspend), update clocks x86/entry/64: Bypass enter_from_user_mode on non-context-tracking boots x86/asm: Add asm macros for static keys/jump labels x86/asm: Error out if asm/jump_label.h is included inappropriately context_tracking: Switch to new static_branch API x86/entry, x86/paravirt: Remove the unused usergs_sysret32 PV op x86/paravirt: Remove the unused irq_enable_sysexit pv op x86/xen: Avoid fast syscall path for Xen PV guests commit 447135a86659c646017b8e707c1243c186bf2dff Author: Jaegeuk Kim Date: Sat Jan 9 17:08:38 2016 -0800 f2fs: should unset atomic flag after successful commit If there is an error during commit, we should keep the flag in order to abort it. Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1663cae48ce3ce991c0e3f1a6fbdbd57f3dce9af Author: Jaegeuk Kim Date: Sat Jan 9 16:14:08 2016 -0800 f2fs: fix wrong memory condition check This patch fixes wrong decision for avaliable_free_memory. The return valus is already set as false, so we should consider true condition below only. Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42190d2a8663f3e181894dc4e37a1af06aab2cbb Author: Jaegeuk Kim Date: Sat Jan 9 13:45:17 2016 -0800 f2fs: monitor the number of background checkpoint This patch adds to show the number of background checkpoint. Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 3 ++- fs/f2fs/f2fs.h | 4 +++- fs/f2fs/segment.c | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) commit d0239e1bf5204d602281f93c01d46bcf3531098d Author: Jaegeuk Kim Date: Fri Jan 8 16:57:48 2016 -0800 f2fs: detect idle time depending on user behavior This patch adds last time that user requested filesystem operations. This information is used to detect whether system is idle or not later. Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++++++ fs/f2fs/data.c | 1 + fs/f2fs/dir.c | 4 ++++ fs/f2fs/f2fs.h | 15 +++++++++++++++ fs/f2fs/file.c | 12 ++++++++++++ fs/f2fs/gc.c | 1 - fs/f2fs/gc.h | 8 -------- fs/f2fs/segment.c | 2 +- fs/f2fs/super.c | 4 ++++ fs/f2fs/xattr.c | 1 + 10 files changed, 44 insertions(+), 10 deletions(-) commit af756bbccff85504ce05c63a50f80b9d7823c500 Author: Tony Lindgren Date: Mon Jan 11 14:35:24 2016 -0800 ARM: dts: Fix omap5 PMIC control lines for RTC writes The palmas PMIC has two control lines that need to be muxed properly for things to work. The sys_nirq pin is used for interrupts, and msecure pin is used for enabling writes to some PMIC registers. Without these pins configured properly things can fail in mysterious ways. For example, we can't update the RTC registers on palmas PMIC unless the msecure pin is configured. And this is probably the reason why we had RTC missing from the omap5 dts file. According to "OMAP5430 ES2.0 Data Manual [Public] VErsion A (Rev. F)" swps052f.pdf, mux mode 1 is for sys_drm_msecure so in theory there's should be no need to configure it as a GPIO pin. However, it seems there are some reliability issues using the msecure mux mode. And the TI trees configure the msecure pin as GPIO out high instead. As the PMIC only cares that the msecure line is high to allow access to the RTC registers, let's use a GPIO hog as suggested by Nishanth Menon . Also the use of the internal pull was considered but supposedly that may not be capable of keeping the line high in a noisy environment. If we ever see high security omap5 products in the mainline tree, those need to skip the msecure pin muxing and ignore setting the GPIO hog. Chances are the related pin mux registers are locked in that case and the msecure pin is managed by whatever software may be running in the ARM TrustZone. Who knows what the original intention of the msecure pin was. Maybe it was supposed to prevent the system time to be set back for some game demo modes to time out? Anyways, it seems that later PMICs like tps659037 have recycled this pin for "powerhold" and devices like beagle-x15 do not need changes to the msecure pin configuration. To avoid further confusion with TWL variant PMICs, beagle-x15 does not have a back-up battery for RTC palmas. Instead the mcp79410 RTC is used with rtc-ds1307 driver. There is a "powerhold" jumper j5 holes near the palmas PMIC, and shorting it seems to power up beagle-x15 automatically. It is unknown if it also has other side effects to the beagle-x15 power up sequence. Cc: stable@vger.kernel.org # v4.4 Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 4f19b8803bddbecbd8c3ac44a2cfadd9d2b85b8f Merge: af34520 c8f3e51 Author: Linus Torvalds Date: Mon Jan 11 15:37:06 2016 -0800 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic updates from Ingo Molnar: "The main changes in this cycle were: - introduce optimized single IPI sending methods on modern APICs (Linus Torvalds, Thomas Gleixner) - kexec/crash APIC handling fixes and enhancements (Hidehiro Kawai) - extend lapic vector saving/restoring to the CMCI (MCE) vector as well (Juergen Gross) - various fixes and enhancements (Jake Oshins, Len Brown)" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) x86/irq: Export functions to allow MSI domains in modules Documentation: Document kernel.panic_on_io_nmi sysctl x86/nmi: Save regs in crash dump on external NMI x86/apic: Introduce apic_extnmi command line parameter kexec: Fix race between panic() and crash_kexec() panic, x86: Allow CPUs to save registers even if looping in NMI context panic, x86: Fix re-entrance problem due to panic on NMI x86/apic: Fix the saving and restoring of lapic vectors during suspend/resume x86/smpboot: Re-enable init_udelay=0 by default on modern CPUs x86/smp: Remove single IPI wrapper x86/apic: Use default send single IPI wrapper x86/apic: Provide default send single IPI wrapper x86/apic: Implement single IPI for apic_noop x86/apic: Wire up single IPI for apic_numachip x86/apic: Wire up single IPI for x2apic_uv x86/apic: Implement single IPI for x2apic_phys x86/apic: Wire up single IPI for bigsmp_apic x86/apic: Remove pointless indirections from bigsmp_apic x86/apic: Wire up single IPI for apic_physflat x86/apic: Remove pointless indirections from apic_physflat ... commit 6beceb5427aa8731f958d2484e0fd8ff21d604dc Author: Jaegeuk Kim Date: Fri Jan 8 15:51:50 2016 -0800 f2fs: introduce time and interval facility This patch adds time and interval arrays to store some timing variables. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 21 ++++++++++++++++++++- fs/f2fs/segment.c | 2 +- fs/f2fs/super.c | 7 +++---- 4 files changed, 25 insertions(+), 7 deletions(-) commit 8a0d560f3e651808ae0a3d9ab9fe476e59de132b Author: Stephen Rothwell Date: Thu Dec 31 21:20:20 2015 +1100 drm/amdgpu/powerplay: include asm/div64.h for do_div() Fixes: 1e4854e96c35 ("drm/amdgpu/powerplay: implement thermal control for tonga.") Signed-off-by: Stephen Rothwell Signed-off-by: Dave Airlie drivers/gpu/drm/amd/powerplay/hwmgr/fiji_thermal.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_thermal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit af345201ea948d0976d775958d8aa22fe5e5ba58 Merge: 4bd20db 0905f04 Author: Linus Torvalds Date: Mon Jan 11 15:13:38 2016 -0800 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The main changes in this cycle were: - tickless load average calculation enhancements (Byungchul Park) - vtime handling enhancements (Frederic Weisbecker) - scalability improvement via properly aligning a key structure field (Jiri Olsa) - various stop_machine() fixes (Oleg Nesterov) - sched/numa enhancement (Rik van Riel) - various fixes and improvements (Andi Kleen, Dietmar Eggemann, Geliang Tang, Hiroshi Shimamoto, Joonwoo Park, Peter Zijlstra, Waiman Long, Wanpeng Li, Yuyang Du)" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits) sched/fair: Fix new task's load avg removed from source CPU in wake_up_new_task() sched/core: Move sched_entity::avg into separate cache line x86/fpu: Properly align size in CHECK_MEMBER_AT_END_OF() macro sched/deadline: Fix the earliest_dl.next logic sched/fair: Disable the task group load_avg update for the root_task_group sched/fair: Move the cache-hot 'load_avg' variable into its own cacheline sched/fair: Avoid redundant idle_cpu() call in update_sg_lb_stats() sched/core: Move the sched_to_prio[] arrays out of line sched/cputime: Convert vtime_seqlock to seqcount sched/cputime: Introduce vtime accounting check for readers sched/cputime: Rename vtime_accounting_enabled() to vtime_accounting_cpu_enabled() sched/cputime: Correctly handle task guest time on housekeepers sched/cputime: Clarify vtime symbols and document them sched/cputime: Remove extra cost in task_cputime() sched/fair: Make it possible to account fair load avg consistently sched/fair: Modify the comment about lock assumptions in migrate_task_rq_fair() stop_machine: Clean up the usage of the preemption counter in cpu_stopper_thread() stop_machine: Shift the 'done != NULL' check from cpu_stop_signal_done() to callers stop_machine: Kill cpu_stop_done->executed stop_machine: Change __stop_cpus() to rely on cpu_stop_queue_work() ... commit 2d30bb0b3889adf09b342722b2ce596c0763bc93 Author: Rafael J. Wysocki Date: Tue Jan 12 00:12:19 2016 +0100 platform: Do not detach from PM domains on shutdown Shutdown is carried out when the driver is still bound to the device, so it is incorrect to detach it from a PM domain (if any) at this point. Signed-off-by: Rafael J. Wysocki Reported-and-tested-by: Fabio Estevam Acked-by: Ulf Hansson drivers/base/platform.c | 1 - 1 file changed, 1 deletion(-) commit 4bd20db2c027eab7490e3c0466734738bef2dd24 Merge: 5cb52b5 feab21f Author: Linus Torvalds Date: Mon Jan 11 15:07:19 2016 -0800 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Ingo Molnar: "Various x86 MCE fixes and small enhancements" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Make usable address checks Intel-only x86/mce: Add the missing memory error check on AMD x86/RAS: Remove mce.usable_addr x86/mce: Do not enter deferred errors into the generic pool twice commit 03d84a5f83a67e692af00a3d3901e7820e3e84d5 Author: Karl Heiss Date: Mon Jan 11 08:28:43 2016 -0500 bonding: Prevent IPv6 link local address on enslaved devices Commit 1f718f0f4f97 ("bonding: populate neighbour's private on enslave") undoes the fix provided by commit c2edacf80e15 ("bonding / ipv6: no addrconf for slaves separately from master") by effectively setting the slave flag after the slave has been opened. If the slave comes up quickly enough, it will go through the IPv6 addrconf before the slave flag has been set and will get a link local IPv6 address. In order to ensure that addrconf knows to ignore the slave devices on state change, set IFF_SLAVE before dev_open() during bonding enslavement. Fixes: 1f718f0f4f97 ("bonding: populate neighbour's private on enslave") Signed-off-by: Karl Heiss Signed-off-by: Jay Vosburgh Reviewed-by: Jarod Wilson Signed-off-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7937963a02972281fd20c920db1a0344d947bb25 Merge: 23c09c2 038d2ef Author: David S. Miller Date: Mon Jan 11 17:48:54 2016 -0500 Merge branch 'mlx5-enhanced-flow-steering' Or Gerlitz says: ==================== net/mlx5_core: Enhance flow steering support v0 --> v1 changes: - fixed improperly formatted comments. - compare value of ib_spec->eth.mask.ether_type in network byte order in ('IB/mlx5: Add flow steering utilities'). v1 --> v2 changes: - made sure that service functions added in the IB driver are only static-fied on the last commit, to make sure bisection with -Werror works fine. v2 --> v3 changes: - squashed patches 11 and 12 into one patch, s.t Dave's comment on unused static functions gcc complaints during bisection is correctly addressed. v3 has been generated against net-next commit c9c9931 "Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge" The series is signed by Matan who was revently assigned to a maintainer for the mlx5_core and IB drivers (this is a 4.5-rc1 change to the maintainers file coming from the rdma tree) -- as such I didn't see a neeed to add my signature (Or). This series adds three new functionalists to the driver flow-steering infrastructure: auto-grouped flow tables, chaining of flow tables and updates for the root flow table. 1. Auto-grouped flow tables - Flow table with auto grouping management. When a flow table is created, hints regarding the number of rule types and the number of rules are given in advance. Thus, a flow table is divided into #NUM_TYPES+1 groups each contains (#NUM_RULES)/(#NUM_TYPES+1) rules. The first #NUM_TYPES parts are groups which are filled if the added rule matches the group specification or the group is empty. The last part is filled by rules that can't fit any of the former groups. 2. Chaining flow tables - Flow tables from different priorities are chained together, if there is no match in flow table of priority i we continue searching for a match in priority i+1. This is both true if priorities i and i+1 belongs to the same namespace or not. 3. Updating the root flow table - the root flow table is the flow table with the lowest level. The hardware start searching for a match in the root flow table and continue according to the matches it find along the way. The first usage for the new functionality is flow steering for user-space ConnectX-4 offloaded HW Eth RX queues done through the mlx5 IB driver. When the mlx5 core driver is loaded, it opens three flow namespaces: 1. By-pass namespace (used by mlx5 IB driver). 2. Kernel namespace (used in order to get packets to the networking stack through mlx5 EN driver). 3. Leftovers namespace (used by mlx5 IB and future sniffer) The series is built as follows: Patch #1 introduces auto-grouped flow tables support. Patch #2 add utility functions for finding the next and the previous flow tables in different priorities. This is used in order to chain the flow tables in a downstream patch. Patch #3 introduces a firmware command for updating the root flow table. Patch #4 introduces modify flow table firmware command, this command is used when we want to change the next flow table of an existing flow table. This is used for chaining flow tables as well. Patch #5 connect/disconnect flow tables. This is actually the chaining process when we want to link flow tables. This means that if we couldn't find a match in the first flow table, we'll continue in the chained flow table. Patch #6 updates priority's attributes that is required for flow table level allocation. We update both the max_fts (the number of allowed FTs in the sub-tree of this priority) and the start_level (which is the first level we'll assign to the flow-tables created inside the priority). Patch #7 adds checking of required device capabilities. Some namespaces could be only created if the hardware supports certain attributes. This is especially true for the Bypass and leftovers namespaces. This adds a generic mechanism to check these required attributes. Patch #8 creates two additional namespaces: a. Bypass flow rules(has nine priorities) b. Leftovers packets(have one priority) - for unmatched packets. Patch #9 re-factors ipv4/ipv6 match fields in the mlx5 firmware interface header to be more clear. Patch #10 exports the flow steering API for mlx5_ib usage Patch #11 implements the required support in mlx5_ib in order to support the RDMA flow steering verbs. ==================== Signed-off-by: David S. Miller commit 038d2ef87572757861a177b19f9d489def2c48b8 Author: Maor Gottlieb Date: Mon Jan 11 10:26:07 2016 +0200 IB/mlx5: Add flow steering support Adding flow steering support by creating a flow-table per priority (if rules exist in the priority). mlx5_ib uses autogrouping and thus only creates the required destinations. Also includes adding of these flow steering utilities 1. Parsing verbs flow attributes hardware steering specs. 2. Check if flow is multicast - this is required in order to decide to which flow table will we add the steering rule. 3. Set outer headers in flow match criteria to zeros. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/main.c | 463 +++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 45 +++- include/linux/mlx5/fs.h | 10 + 3 files changed, 517 insertions(+), 1 deletion(-) commit b217ea25afd8910e7ec0abb556bcb312d397c8a6 Author: Maor Gottlieb Date: Mon Jan 11 10:26:06 2016 +0200 net/mlx5_core: Export flow steering API Add exports to flow steering API for mlx5_ib usage. The following functions are exported: 1. mlx5_create_auto_grouped_flow_table - used to create flow table with auto flow grouping management (create and destroy flow groups). In auto-grouped flow tables, we create groups automatically if needed (if we don't find an existing flow group with same match criteria when we add new rule). 2. mlx5_destroy_flow_table - used to destroy a flow table. 3. mlx5_add_flow_rule - used to add flow rule into a flow table. 4. mlx5_del_flow_rule - used to delete flow rule from its flow table. 5. mlx5_get_flow_namespace - used to get a handle to the required namespace sub-tree. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit b4d1f032d75b2efb73304e8c12faa7149ad700c7 Author: Maor Gottlieb Date: Mon Jan 11 10:26:05 2016 +0200 net/mlx5_core: Make ipv4/ipv6 location more clear Change the mlx5 firmware interface header to make it more clear which bytes should be used by IPv4 or IPv6 addresses. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller include/linux/mlx5/mlx5_ifc.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 4cbdd30ed5c8bc5cf40813b025b4fb57b376a592 Author: Maor Gottlieb Date: Mon Jan 11 10:26:04 2016 +0200 net/mlx5_core: Enable flow steering support for the IB driver When the driver is loaded, we create flow steering namespace for kernel bypass with nine priorities and another namespace for leftovers(in order to catch packets that weren't matched). Verbs applications will use these priorities. we found nine as a number that balances the requirements from the user and retains performance. The bypass namespace is used by verbs applications that want to bypass the kernel networking stack. The leftovers namespace is used by verbs applications and the sniffer in order to catch packets that weren't handled by any preceding rules. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 55 +++++++++++++++++++---- include/linux/mlx5/device.h | 2 + include/linux/mlx5/fs.h | 2 + 3 files changed, 51 insertions(+), 8 deletions(-) commit 8d40d162c014dc3be316c5950b382d608aa2c8de Author: Maor Gottlieb Date: Mon Jan 11 10:26:03 2016 +0200 net/mlx5_core: Initialize namespaces only when supported by device Before we create the sub tree of a steering namespaces(kernel, bypass, leftovers) we check that the device has the required capabilities in order to create this subtree. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 70 ++++++++++++++++------- 1 file changed, 49 insertions(+), 21 deletions(-) commit 655227edae4ca42e702db3b7ca490d098090e8fb Author: Maor Gottlieb Date: Mon Jan 11 10:26:02 2016 +0200 net/mlx5_core: Set priority attributes Each priority has two attributes: 1. max_ft - maximum allowed flow tables under this priority. 2. start_level - start level range of the flow tables in the priority. These attributes are set by traversing the tree nodes by DFS and set start level and max flow tables to each priority. Start level depends on the max flow tables of the prior priorities in the tree. The leaves of the trees have max_ft set in them. Each node accumulates the max_ft of its children and set it accordingly. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 71 +++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 3 + 2 files changed, 55 insertions(+), 19 deletions(-) commit f90edfd279f35a5c62003eeee107f03f3b1544bc Author: Maor Gottlieb Date: Mon Jan 11 10:26:01 2016 +0200 net/mlx5_core: Connect flow tables Flow tables from different priorities should be chained together. When a packet arrives we search for a match in the by-pass flow tables (first we search for a match in priority 0 and if we don't find a match we move to the next priority). If we can't find a match in any of the bypass flow-tables, we continue searching in the flow-tables of the next priority, which are the kernel's flow tables. Setting the miss flow table in a new flow table to be the next one in the list is performed via create flow table API. If we want to change an existing flow table, for example in order to point from an existing flow table to the new next-in-list flow table, we use the modify flow table API. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 7 +- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 3 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 104 ++++++++++++++++++++-- 3 files changed, 104 insertions(+), 10 deletions(-) commit 34a40e689393a6b13673ab395a9a4d063d249fe9 Author: Maor Gottlieb Date: Mon Jan 11 10:26:00 2016 +0200 net/mlx5_core: Introduce modify flow table command Introduce the modify flow table command. This command is used when we want to change the next flow table of an existing flow table. The next flow table is defined as the table we search (in order to find a match), if we couldn't find a match in any of the flow table entries in the current flow table. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 27 ++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 4 ++ include/linux/mlx5/mlx5_ifc.h | 56 ++++++++++++++++++++++-- 3 files changed, 83 insertions(+), 4 deletions(-) commit 2cc43b494a6c30ec0e554ea91ce763c97069e8cc Author: Maor Gottlieb Date: Mon Jan 11 10:25:59 2016 +0200 net/mlx5_core: Managing root flow table The root Flow Table for each Flow Table Type is defined, by default, as the Flow Table with level 0. In order not to use an empty flow tables and introduce new hops, but still preserve space for flow-tables that have a priority greater(lower number) than the current flow table, we introduce this new set root flow table command. This command tells the HW to start matching packets from the assigned root flow table. This command is used when we create new flow table with level lower than the current lowest flow table or it is the first flow table. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 18 +++++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 97 ++++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 6 ++ include/linux/mlx5/mlx5_ifc.h | 31 +++++++- 5 files changed, 144 insertions(+), 10 deletions(-) commit fdb6896fd97eb9d3efbd9f2e6ec1c0c5854bf542 Author: Maor Gottlieb Date: Mon Jan 11 10:25:58 2016 +0200 net/mlx5_core: Add utilities to find next and prev flow-tables Add two utility functions for find next and prev flow table. Find next flow table function gets priority and return the first flow table of the next priority in the tree. Find prev flow table return the last flow table of the previous priority in the tree. These utility functions are used for chaining flow table from different priorities. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 67 +++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit f0d22d1874730530a2ac304fd0888cb8a6864527 Author: Maor Gottlieb Date: Mon Jan 11 10:25:57 2016 +0200 net/mlx5_core: Introduce flow steering autogrouped flow table When user add rule to autogrouped flow table, we search for flow group with the same match criteria, if we don't find such group then we create new flow group with the required match criteria and insert the rule to this group. We divide the flow table into required_groups + 1, in order to reserve a part of the flow table for rules which don't match any existing group. Signed-off-by: Maor Gottlieb Signed-off-by: Moni Shoua Signed-off-by: Matan Barak Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 166 +++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 5 + include/linux/mlx5/fs.h | 6 + 3 files changed, 158 insertions(+), 19 deletions(-) commit 40ba330227ad00b8c0cdf2f425736ff9549cc423 Author: Michal Kubeček Date: Mon Jan 11 07:50:30 2016 +0100 udp: disallow UFO for sockets with SO_NO_CHECK option Commit acf8dd0a9d0b ("udp: only allow UFO for packets from SOCK_DGRAM sockets") disallows UFO for packets sent from raw sockets. We need to do the same also for SOCK_DGRAM sockets with SO_NO_CHECK options, even if for a bit different reason: while such socket would override the CHECKSUM_PARTIAL set by ip_ufo_append_data(), gso_size is still set and bad offloading flags warning is triggered in __skb_gso_segment(). In the IPv6 case, SO_NO_CHECK option is ignored but we need to disallow UFO for packets sent by sockets with UDP_NO_CHECK6_TX option. Signed-off-by: Michal Kubecek Tested-by: Shannon Nelson Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv4/ip_output.c | 2 +- net/ipv6/ip6_output.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3de03596dfeee48bc803c1d1a6daf60a459929f3 Author: John Fastabend Date: Sun Jan 10 21:38:44 2016 -0800 net: pktgen: fix null ptr deref in skb allocation Fix possible null pointer dereference that may occur when calling skb_reserve() on a null skb. Fixes: 879c7220e82 ("net: pktgen: Observe needed_headroom of the device") Signed-off-by: John Fastabend Signed-off-by: David S. Miller net/core/pktgen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5cb52b5e1654f3f1ed9c32e34456d98559c85aa0 Merge: 24af98c 3eb9ede Author: Linus Torvalds Date: Mon Jan 11 14:39:17 2016 -0800 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "Kernel side changes: - Intel Knights Landing support. (Harish Chegondi) - Intel Broadwell-EP uncore PMU support. (Kan Liang) - Core code improvements. (Peter Zijlstra.) - Event filter, LBR and PEBS fixes. (Stephane Eranian) - Enable cycles:pp on Intel Atom. (Stephane Eranian) - Add cycles:ppp support for Skylake. (Andi Kleen) - Various x86 NMI overhead optimizations. (Andi Kleen) - Intel PT enhancements. (Takao Indoh) - AMD cache events fix. (Vince Weaver) Tons of tooling changes: - Show random perf tool tips in the 'perf report' bottom line (Namhyung Kim) - perf report now defaults to --group if the perf.data file has grouped events, try it with: # perf record -e '{cycles,instructions}' -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.093 MB perf.data (1247 samples) ] # perf report # Samples: 1K of event 'anon group { cycles, instructions }' # Event count (approx.): 1955219195 # # Overhead Command Shared Object Symbol 2.86% 0.22% swapper [kernel.kallsyms] [k] intel_idle 1.05% 0.33% firefox libxul.so [.] js::SetObjectElement 1.05% 0.00% kworker/0:3 [kernel.kallsyms] [k] gen6_ring_get_seqno 0.88% 0.17% chrome chrome [.] 0x0000000000ee27ab 0.65% 0.86% firefox libxul.so [.] js::ValueToId<(js::AllowGC)1> 0.64% 0.23% JS Helper libxul.so [.] js::SplayTree::splay 0.62% 1.27% firefox libxul.so [.] js::GetIterator 0.61% 1.74% firefox libxul.so [.] js::NativeSetProperty 0.61% 0.31% firefox libxul.so [.] js::SetPropertyByDefining - Introduce the 'perf stat record/report' workflow: Generate perf.data files from 'perf stat', to tap into the scripting capabilities perf has instead of defining a 'perf stat' specific scripting support to calculate event ratios, etc. Simple example: $ perf stat record -e cycles usleep 1 Performance counter stats for 'usleep 1': 1,134,996 cycles 0.000670644 seconds time elapsed $ perf stat report Performance counter stats for '/home/acme/bin/perf stat record -e cycles usleep 1': 1,134,996 cycles 0.000670644 seconds time elapsed $ It generates PERF_RECORD_ userspace records to store the details: $ perf report -D | grep PERF_RECORD 0xf0 [0x28]: PERF_RECORD_THREAD_MAP nr: 1 thread: 27637 0x118 [0x12]: PERF_RECORD_CPU_MAP nr: 1 cpu: 65535 0x12a [0x40]: PERF_RECORD_STAT_CONFIG 0x16a [0x30]: PERF_RECORD_STAT -1 -1 0x19a [0x40]: PERF_RECORD_MMAP -1/0: [0xffffffff81000000(0x1f000000) @ 0xffffffff81000000]: x [kernel.kallsyms]_text 0x1da [0x18]: PERF_RECORD_STAT_ROUND [acme@ssdandy linux]$ An effort was made to make perf.data files generated like this to not generate cryptic messages when processed by older tools. The 'perf script' bits need rebasing, will go up later. - Make command line options always available, even when they depend on some feature being enabled, warning the user about use of such options (Wang Nan) - Support hw breakpoint events (mem:0xAddress) in the default output mode in 'perf script' (Wang Nan) - Fixes and improvements for supporting annotating ARM binaries, support ARM call and jump instructions, more work needed to have arch specific stuff separated into tools/perf/arch/*/annotate/ (Russell King) - Add initial 'perf config' command, for now just with a --list command to the contents of the configuration file in use and a basic man page describing its format, commands for doing edits and detailed documentation are being reviewed and proof-read. (Taeung Song) - Allows BPF scriptlets specify arguments to be fetched using DWARF info, using a prologue generated at compile/build time (He Kuang, Wang Nan) - Allow attaching BPF scriptlets to module symbols (Wang Nan) - Allow attaching BPF scriptlets to userspace code using uprobe (Wang Nan) - BPF programs now can specify 'perf probe' tunables via its section name, separating key=val values using semicolons (Wang Nan) Testing some of these new BPF features: Use case: get callchains when receiving SSL packets, filter then in the kernel, at arbitrary place. # cat ssl.bpf.c #define SEC(NAME) __attribute__((section(NAME), used)) struct pt_regs; SEC("func=__inet_lookup_established hnum") int func(struct pt_regs *ctx, int err, unsigned short port) { return err == 0 && port == 443; } char _license[] SEC("license") = "GPL"; int _version SEC("version") = LINUX_VERSION_CODE; # # perf record -a -g -e ssl.bpf.c ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.787 MB perf.data (3 samples) ] # perf script | head -30 swapper 0 [000] 58783.268118: perf_bpf_probe:func: (ffffffff816a0f60) hnum=0x1bb 8a0f61 __inet_lookup_established (/lib/modules/4.3.0+/build/vmlinux) 896def ip_rcv_finish (/lib/modules/4.3.0+/build/vmlinux) 8976c2 ip_rcv (/lib/modules/4.3.0+/build/vmlinux) 855eba __netif_receive_skb_core (/lib/modules/4.3.0+/build/vmlinux) 8565d8 __netif_receive_skb (/lib/modules/4.3.0+/build/vmlinux) 8572a8 process_backlog (/lib/modules/4.3.0+/build/vmlinux) 856b11 net_rx_action (/lib/modules/4.3.0+/build/vmlinux) 2a284b __do_softirq (/lib/modules/4.3.0+/build/vmlinux) 2a2ba3 irq_exit (/lib/modules/4.3.0+/build/vmlinux) 96b7a4 do_IRQ (/lib/modules/4.3.0+/build/vmlinux) 969807 ret_from_intr (/lib/modules/4.3.0+/build/vmlinux) 2dede5 cpu_startup_entry (/lib/modules/4.3.0+/build/vmlinux) 95d5bc rest_init (/lib/modules/4.3.0+/build/vmlinux) 1163ffa start_kernel ([kernel.vmlinux].init.text) 11634d7 x86_64_start_reservations ([kernel.vmlinux].init.text) 1163623 x86_64_start_kernel ([kernel.vmlinux].init.text) qemu-system-x86 9178 [003] 58785.792417: perf_bpf_probe:func: (ffffffff816a0f60) hnum=0x1bb 8a0f61 __inet_lookup_established (/lib/modules/4.3.0+/build/vmlinux) 896def ip_rcv_finish (/lib/modules/4.3.0+/build/vmlinux) 8976c2 ip_rcv (/lib/modules/4.3.0+/build/vmlinux) 855eba __netif_receive_skb_core (/lib/modules/4.3.0+/build/vmlinux) 8565d8 __netif_receive_skb (/lib/modules/4.3.0+/build/vmlinux) 856660 netif_receive_skb_internal (/lib/modules/4.3.0+/build/vmlinux) 8566ec netif_receive_skb_sk (/lib/modules/4.3.0+/build/vmlinux) 430a br_handle_frame_finish ([bridge]) 48bc br_handle_frame ([bridge]) 855f44 __netif_receive_skb_core (/lib/modules/4.3.0+/build/vmlinux) 8565d8 __netif_receive_skb (/lib/modules/4.3.0+/build/vmlinux) # - Use 'perf probe' various options to list functions, see what variables can be collected at any given point, experiment first collecting without a filter, then filter, use it together with 'perf trace', 'perf top', with or without callchains, if it explodes, please tell us! - Introduce a new callchain mode: "folded", that will list per line representations of all callchains for a give histogram entry, facilitating 'perf report' output processing by other tools, such as Brendan Gregg's flamegraph tools (Namhyung Kim) E.g: # perf report | grep -v ^# | head 18.37% 0.00% swapper [kernel.kallsyms] [k] cpu_startup_entry | ---cpu_startup_entry | |--12.07%--start_secondary | --6.30%--rest_init start_kernel x86_64_start_reservations x86_64_start_kernel # Becomes, in "folded" mode: # perf report -g folded | grep -v ^# | head -5 18.37% 0.00% swapper [kernel.kallsyms] [k] cpu_startup_entry 12.07% cpu_startup_entry;start_secondary 6.30% cpu_startup_entry;rest_init;start_kernel;x86_64_start_reservations;x86_64_start_kernel 16.90% 0.00% swapper [kernel.kallsyms] [k] call_cpuidle 11.23% call_cpuidle;cpu_startup_entry;start_secondary 5.67% call_cpuidle;cpu_startup_entry;rest_init;start_kernel;x86_64_start_reservations;x86_64_start_kernel 16.90% 0.00% swapper [kernel.kallsyms] [k] cpuidle_enter 11.23% cpuidle_enter;call_cpuidle;cpu_startup_entry;start_secondary 5.67% cpuidle_enter;call_cpuidle;cpu_startup_entry;rest_init;start_kernel;x86_64_start_reservations;x86_64_start_kernel 15.12% 0.00% swapper [kernel.kallsyms] [k] cpuidle_enter_state # The user can also select one of "count", "period" or "percent" as the first column. ... and lots of infrastructure enhancements, plus fixes and other changes, features I failed to list - see the shortlog and the git log for details" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (271 commits) perf evlist: Add --trace-fields option to show trace fields perf record: Store data mmaps for dwarf unwind perf libdw: Check for mmaps also in MAP__VARIABLE tree perf unwind: Check for mmaps also in MAP__VARIABLE tree perf unwind: Use find_map function in access_dso_mem perf evlist: Remove perf_evlist__(enable|disable)_event functions perf evlist: Make perf_evlist__open() open evsels with their cpus and threads (like perf record does) perf report: Show random usage tip on the help line perf hists: Export a couple of hist functions perf diff: Use perf_hpp__register_sort_field interface perf tools: Add overhead/overhead_children keys defaults via string perf tools: Remove list entry from struct sort_entry perf tools: Include all tools/lib directory for tags/cscope/TAGS targets perf script: Align event name properly perf tools: Add missing headers in perf's MANIFEST perf tools: Do not show trace command if it's not compiled in perf report: Change default to use event group view perf top: Decay periods in callchains tools lib: Move bitmap.[ch] from tools/perf/ to tools/{lib,include}/ tools lib: Sync tools/lib/find_bit.c with the kernel ... commit 23c09c2640c1cb9cba919cf4f181ae99a46d53bc Merge: c8086f6 c6c3345 Author: David S. Miller Date: Mon Jan 11 17:32:56 2016 -0500 Merge branch 'bpf-next' Daniel Borkmann says: ==================== BPF update This set adds IPv6 support for bpf_skb_{set,get}_tunnel_key() helper. It also exports flags to user space that are being used in helpers and weren't exported thus far. For more details, please see the individual patches. ==================== Signed-off-by: David S. Miller commit c6c33454072fc9fe961e2b25f22a619e4fa98838 Author: Daniel Borkmann Date: Mon Jan 11 01:16:39 2016 +0100 bpf: support ipv6 for bpf_skb_{set,get}_tunnel_key After IPv6 support has recently been added to metadata dst and related encaps, add support for populating/reading it from an eBPF program. Commit d3aa45ce6b ("bpf: add helpers to access tunnel metadata") started with initial IPv4-only support back then (due to IPv6 metadata support not being available yet). To stay compatible with older programs, we need to test for the passed structure size. Also TOS and TTL support from the ip_tunnel_info key has been added. Tested with vxlan devs in collect meta data mode with IPv4, IPv6 and in compat mode over different network namespaces. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 10 ++++++- net/core/filter.c | 69 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 71 insertions(+), 8 deletions(-) commit 781c53bc5d5628065a46c70f02f5a0450f5842f4 Author: Daniel Borkmann Date: Mon Jan 11 01:16:38 2016 +0100 bpf: export helper function flags and reject invalid ones Export flags used by eBPF helper functions through UAPI, so they can be used by programs (instead of them redefining all flags each time or just using the hard-coded values). It also gives a better overview what flags are used where and we can further get rid of the extra macros defined in filter.c. Moreover, reject invalid flags. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 16 ++++++++++++++++ net/core/filter.c | 37 +++++++++++++++++++++++-------------- 2 files changed, 39 insertions(+), 14 deletions(-) commit 366f29311137ec9dc0cdd4ec675cc6fcaac104d6 Merge: 66530bd bffa731 Author: David S. Miller Date: Mon Jan 11 17:31:10 2016 -0500 Merge branch 'renesas-eth-fixes' Sergei Shtylyov says: ==================== Fix some dubious code in the Renesas Ethernet drivers Here's a set of 2 patches against DaveM's 'net.git' repo. While initializing EMAC the code tries to respect the duplex mode both programmed into ECMR and stored in its own private data -- this just can't be right. [1/2] ravb: stop reading ECMR in ravb_emac_init() [2/2] sh_eth: stop reading ECMR in sh_eth_dev_init() ==================== Signed-off-by: David S. Miller commit bffa731f8f44e0444afc56875a10fd07e9a08c6c Author: Sergei Shtylyov Date: Mon Jan 11 00:28:14 2016 +0300 sh_eth: stop reading ECMR in sh_eth_dev_init() The code in sh_eth_dev_init() twiddling the ECMR bits always looked a bit strange to me: if one intends to respect 'mdp->duplex', why save old value of the ECMR.DM bit? As all the other bits are zeroed anyway, we don't really need to read ECMR before writing to it. Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1c1fa821199c707a193efd3bc93c4ac9357bafa0 Author: Sergei Shtylyov Date: Mon Jan 11 00:27:38 2016 +0300 ravb: stop reading ECMR in ravb_emac_init() The code in ravb_emac_init() twiddling the ECMR bits always looked a bit strange to me: if one intends to respect 'priv->duplex', why save old value of the ECMR.DM bit? As all the other bits are zeroed anyway, we don't really need to read ECMR before writing to it. Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 66530bdf85eb1d72a0c399665e09a2c2298501c6 Author: Jamal Hadi Salim Date: Sun Jan 10 11:47:01 2016 -0500 sched,cls_flower: set key address type when present only when user space passes the addresses should we consider their presence Signed-off-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 83d15e70c4d8909d722c0d64747d8fb42e38a48f Author: Neal Cardwell Date: Mon Jan 11 13:42:43 2016 -0500 tcp_yeah: don't set ssthresh below 2 For tcp_yeah, use an ssthresh floor of 2, the same floor used by Reno and CUBIC, per RFC 5681 (equation 4). tcp_yeah_ssthresh() was sometimes returning a 0 or negative ssthresh value if the intended reduction is as big or bigger than the current cwnd. Congestion control modules should never return a zero or negative ssthresh. A zero ssthresh generally results in a zero cwnd, causing the connection to stall. A negative ssthresh value will be interpreted as a u32 and will set a target cwnd for PRR near 4 billion. Oleksandr Natalenko reported that a system using tcp_yeah with ECN could see a warning about a prior_cwnd of 0 in tcp_cwnd_reduction(). Testing verified that this was due to tcp_yeah_ssthresh() misbehaving in this way. Reported-by: Oleksandr Natalenko Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_yeah.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0500c169b4069e40f03391c7280cd6eaf849e49 Author: Wang Nan Date: Mon Jan 11 13:48:03 2016 +0000 perf test: Reset err after using it hold errcode in hist testcases All hists test cases forget to reset err after using it to hold an error code. If error occure in setup_fake_machine() it incorrectly return TEST_OK. This patch fixes it. Suggested-and-Acked-by: Namhyung Kim Signed-off-by: Wang Nan Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-13-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_link.c | 1 + tools/perf/tests/hists_output.c | 1 + 4 files changed, 4 insertions(+) commit 71b3ee7e65ffb48135d875d9c36e3183b9ecffeb Author: Wang Nan Date: Mon Jan 11 13:48:02 2016 +0000 perf test: Fix false TEST_OK result for 'perf test hist' Commit 71d6de64fedd ("perf test: Fix hist testcases when kptr_restrict is on") solves a double free problem when 'perf test hist' calling setup_fake_machine(). However, the result is still incorrect. For example: $ ./perf test -v 'filtering hist entries' 25: Test filtering hist entries : --- start --- test child forked, pid 4186 Cannot create kernel maps test child finished with 0 ---- end ---- Test filtering hist entries: Ok In this case the body of this test is not get executed at all, but the result is 'Ok'. Actually, in setup_fake_machine() there's no need to create real kernel maps. What we want are the fake maps. This patch removes the machine__create_kernel_maps() in setup_fake_machine(), so it won't be affected by kptr_restrict setting. Test result: $ cat /proc/sys/kernel/kptr_restrict 1 $ ~/perf test -v hist 15: Test matching and linking multiple hists : --- start --- test child forked, pid 24031 test child finished with 0 ---- end ---- Test matching and linking multiple hists: Ok [SNIP] Suggested-and-Acked-by: Namhyung Kim Signed-off-by: Wang Nan Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-12-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/hists_common.c | 5 ----- 1 file changed, 5 deletions(-) commit 0c4d40d580752dd7d639208782f71e317b16be67 Author: Wang Nan Date: Mon Jan 11 13:48:01 2016 +0000 tools build: Add BPF feature check to test-all The test-all.c file doesn't check BPF related features. For an environment with all other features enabled, BPF would be considered enabled without doing real feature check. This patch adds test-bpf.c into test-all.c. Signed-off-by: Wang Nan Acked-by: Jiri Olsa Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-11-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/test-all.c | 5 +++++ 1 file changed, 5 insertions(+) commit d5ef3140351450d240f864208317f5665e7bbd1c Author: Naveen N. Rao Date: Mon Jan 11 13:48:00 2016 +0000 perf bpf: Fix build breakage due to libbpf perf build is currently (v4.4-rc5) broken on powerpc: bpf.c:28:4: error: #error __NR_bpf not defined. libbpf does not support your arch. # error __NR_bpf not defined. libbpf does not support your arch. ^ Fix this by including tools/scripts/Makefile.arch for the proper $ARCH macro. While at it, remove redundant LP64 macro definition. Also, since libbpf require $(srctree) now, detect the path of srctree like perf. Signed-off-by: Naveen N. Rao Acked-by: Jiri Olsa Cc: Sukadev Bhattiprolu Cc: Wang Nan Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-10-git-send-email-wangnan0@huawei.com [Use tools/scripts/Makefile.arch] Signed-off-by: Wang Nan Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 935e6bd310f20d3371ae6bd6f01dd3430a4123b6 Author: Wang Nan Date: Mon Jan 11 13:47:58 2016 +0000 tools: Move Makefile.arch from perf/config to tools/scripts After this patch other directories can use this architecture detector without directly including it from perf's directory. Libbpf would utilize it to get proper $(ARCH) so it can receive correct uapi include directory. Tested-by: Naveen N. Rao Acked-by: Jiri Olsa Cc: Sukadev Bhattiprolu Cc: Zefan Li Cc: pi3orama@163.com Signed-off-by: Wang Nan Link: http://lkml.kernel.org/r/1452520124-2073-8-git-send-email-wangnan0@huawei.com [ Add missing srctree definition in tests/make ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/config/Makefile | 2 +- tools/perf/config/Makefile.arch | 18 ------------------ tools/perf/tests/make | 16 +++++++++++++++- tools/scripts/Makefile.arch | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+), 20 deletions(-) commit 8f9e05fb298f16c0cda2e7e78b603331a79f9c10 Author: Wang Nan Date: Mon Jan 11 13:47:57 2016 +0000 perf tools: Fix PowerPC native building Checks BPF syscall number, turn off libbpf building on platform doesn't correctly support sys_bpf instead of blocking compiling. Reported-and-Tested-by: Naveen N. Rao Signed-off-by: Wang Nan Acked-by: Jiri Olsa Cc: Sukadev Bhattiprolu Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-7-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/test-bpf.c | 20 +++++++++++++++++++- tools/lib/bpf/bpf.c | 4 ++-- 2 files changed, 21 insertions(+), 3 deletions(-) commit 24af98c4cf5f5e69266e270c7f3fb34b82ff6656 Merge: 9061cbe 337f130 Author: Linus Torvalds Date: Mon Jan 11 14:18:38 2016 -0800 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "So we have a laundry list of locking subsystem changes: - continuing barrier API and code improvements - futex enhancements - atomics API improvements - pvqspinlock enhancements: in particular lock stealing and adaptive spinning - qspinlock micro-enhancements" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op futex: Cleanup the goto confusion in requeue_pi() futex: Remove pointless put_pi_state calls in requeue() futex: Document pi_state refcounting in requeue code futex: Rename free_pi_state() to put_pi_state() futex: Drop refcount if requeue_pi() acquired the rtmutex locking/barriers, arch: Remove ambiguous statement in the smp_store_mb() documentation lcoking/barriers, arch: Use smp barriers in smp_store_release() locking/cmpxchg, arch: Remove tas() definitions locking/pvqspinlock: Queue node adaptive spinning locking/pvqspinlock: Allow limited lock stealing locking/pvqspinlock: Collect slowpath lock statistics sched/core, locking: Document Program-Order guarantees locking, sched: Introduce smp_cond_acquire() and use it locking/pvqspinlock, x86: Optimize the PV unlock code path locking/qspinlock: Avoid redundant read of next pointer locking/qspinlock: Prefetch the next node cacheline locking/qspinlock: Use _acquire/_release() versions of cmpxchg() & xchg() atomics: Add test for atomic operations with _relaxed variants commit c8086f6d88f02aa8c87a71dca75fe5392d7679f7 Author: Jarod Wilson Date: Fri Jan 8 20:35:36 2016 -0500 bonding: make mii_status sysfs node consistent The spew in /proc/net/bonding/bond0 uses netif_carrier_ok() to determine mii_status, while /sys/class/net/bond0/bonding/mii_status looks at curr_active_slave, which doesn't actually seem to be set sometimes when the bond actually is up. A mode 4 bond configured via ifcfg-foo files on a Red Hat Enterprise Linux system, after boot, comes up clean and functional, but the sysfs node shows mii_status of down, while proc shows up. A simple enough fix here seems to be to use the same method for determining up or down in both places, and I'd opt for the one that seems to match reality. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 649621e3d54439ae232d726d7beef295d3887a68 Author: Marcelo Ricardo Leitner Date: Fri Jan 8 11:00:54 2016 -0200 sctp: fix use-after-free in pr_debug statement Dmitry Vyukov reported a use-after-free in the code expanded by the macro debug_post_sfx, which is caused by the use of the asoc pointer after it was freed within sctp_side_effect() scope. This patch fixes it by allowing sctp_side_effect to clear that asoc pointer when the TCB is freed. As Vlad explained, we also have to cover the SCTP_DISPOSITION_ABORT case because it will trigger DELETE_TCB too on that same loop. Also, there were places issuing SCTP_CMD_INIT_FAILED and ASSOC_FAILED but returning SCTP_DISPOSITION_CONSUME, which would fool the scheme above. Fix it by returning SCTP_DISPOSITION_ABORT instead. The macro is already prepared to handle such NULL pointer. Reported-by: Dmitry Vyukov Signed-off-by: Marcelo Ricardo Leitner Acked-by: Vlad Yasevich Signed-off-by: David S. Miller net/sctp/sm_sideeffect.c | 11 ++++++----- net/sctp/sm_statefuns.c | 17 ++++------------- 2 files changed, 10 insertions(+), 18 deletions(-) commit 3167eea27b27b29d375ee6b34dd83035c04d5da8 Author: Wang Nan Date: Mon Jan 11 13:47:53 2016 +0000 perf tools: Fix phony build target for build-test make_kernelsrc and make_kernelsrc_tools are skiped if a previous build-test is done, because 'make build-test' creates two files with same names. To avoid this, they should be included in .PHONY list. Signed-off-by: Wang Nan Acked-by: Jiri Olsa Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11dc0c57ba8a935dec5a3240370941a4380721c4 Author: Wang Nan Date: Mon Jan 11 13:47:52 2016 +0000 perf tools: Add -lutil in python lib list for broken python-config On some system the perf-config is broken, causes link failure like this: /usr/lib64/python2.7/config/libpython2.7.a(posixmodule.o): In function `posix_forkpty': /opt/wangnan/yocto-build/tmp-eglibc/work/x86_64-oe-linux/python/2.7.3-r0.3.1/Python-2.7.3/./Modules/posixmodule.c:3816: undefined reference to `forkpty' /usr/lib64/python2.7/config/libpython2.7.a(posixmodule.o): In function `posix_openpty': /opt/wangnan/yocto-build/tmp-eglibc/work/x86_64-oe-linux/python/2.7.3-r0.3.1/Python-2.7.3/./Modules/posixmodule.c:3756: undefined reference to `openpty' collect2: error: ld returned 1 exit status make[1]: *** [/home/wangnan/kernel-hydrogen/tools/perf/out/perf] Error 1 make: *** [all] Error 2 $ python-config --libs -lpthread -ldl -lpthread -lutil -lm -lpython2.7 In this case a '-lutil' should be appended to -lpython2.7. (I know we have --start-group and --end-group. I can see them in command line of collect2 by strace. However it doesn't work. Seems I have a broken environment?) Signed-off-by: Wang Nan Cc: Jiri Olsa Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/config/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9eccf24615672896dc13251410c3f2f33a14f95 Author: Roman Volkov Date: Fri Jan 1 16:24:41 2016 +0300 clocksource/drivers/vt8500: Increase the minimum delta The vt8500 clocksource driver declares itself as capable to handle the minimum delay of 4 cycles by passing the value into clockevents_config_and_register(). The vt8500_timer_set_next_event() requires the passed cycles value to be at least 16. The impact is that userspace hangs in nanosleep() calls with small delay intervals. This problem is reproducible in Linux 4.2 starting from: c6eb3f70d448 ('hrtimer: Get rid of hrtimer softirq') From Russell King, more detailed explanation: "It's a speciality of the StrongARM/PXA hardware. It takes a certain number of OSCR cycles for the value written to hit the compare registers. So, if a very small delta is written (eg, the compare register is written with a value of OSCR + 1), the OSCR will have incremented past this value before it hits the underlying hardware. The result is, that you end up waiting a very long time for the OSCR to wrap before the event fires. So, we introduce a check in set_next_event() to detect this and return -ETIME if the calculated delta is too small, which causes the generic clockevents code to retry after adding the min_delta specified in clockevents_config_and_register() to the current time value. min_delta must be sufficient that we don't re-trip the -ETIME check - if we do, we will return -ETIME, forward the next event time, try to set it, return -ETIME again, and basically lock the system up. So, min_delta must be larger than the check inside set_next_event(). A factor of two was chosen to ensure that this situation would never occur. The PXA code worked on PXA systems for years, and I'd suggest no one changes this mechanism without access to a wide range of PXA systems, otherwise they're risking breakage." Cc: stable@vger.kernel.org Cc: Russell King Acked-by: Alexey Charkov Signed-off-by: Roman Volkov Signed-off-by: Daniel Lezcano drivers/clocksource/vt8500_timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ac36856fe4321454b6789c019c96c3ec854094ed Author: Arnd Bergmann Date: Fri Jan 8 11:59:34 2016 +0100 watchdog: asm9260: remove __init and __exit annotations The probe and release functions in this driver are marked as __init and __exit, but this is wrong as indicated by this Kbuild error message: WARNING: vmlinux.o(.data+0x1d2308): Section mismatch in reference from the variable asm9260_wdt_driver to the function .init.text:asm9260_wdt_probe() This removes the annotations, to make the sysfs unbind attribute and deferred probing work. Signed-off-by: Arnd Bergmann Fixes: aae03dc98177 ("watchdog: add Alphascale asm9260-wdt driver") Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/asm9260_wdt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9061cbe62adeccf8c986883bcd40f4aeee59ea75 Merge: ddf1d62 3104fb3 Author: Linus Torvalds Date: Mon Jan 11 13:46:11 2016 -0800 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The changes in this cycle were: - Adding transitivity uniformly to rcu_node structure ->lock acquisitions. (This is implemented by the first two commits on top of v4.4-rc2 due to the pervasive nature of this change.) - Documentation updates, including RCU requirements. - Expedited grace-period changes. - Miscellaneous fixes. - Linked-list fixes, courtesy of KTSAN. - Torture-test updates. - Late-breaking fix to sysrq-generated crash. One thing I should note is that these pieces of documentation are fairly large files: .../RCU/Design/Requirements/Requirements.html | 2897 ++++++++++++++++++++ .../RCU/Design/Requirements/Requirements.htmlx | 2741 ++++++++++++++++++ and are written in HTML, not the usual .txt style. I hope they are fine" Paul McKenney explains the html docs: "For whatever it is worth, the reason for this unconventional choice was that attempts to do the diagrams in ASCII art failed miserably. And attempts to do ASCII art for the upcoming documentation of the data structures failed even more miserably" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (49 commits) sysrq: Fix warning in sysrq generated crash. list: Add lockless list traversal primitives rcu: Make rcu_gp_init() be bool rather than int rcu: Move wakeup out from under rnp->lock rcu: Fix comment for rcu_dereference_raw_notrace rcu: Don't redundantly disable irqs in rcu_irq_{enter,exit}() rcu: Make cpu_needs_another_gp() be bool rcu: Eliminate unused rcu_init_one() argument rcu: Remove TINY_RCU bloat from pointless boot parameters torture: Place console.log files correctly from the get-go torture: Abbreviate console error dump rcutorture: Print symbolic name for ->gp_state rcutorture: Print symbolic name for rcu_torture_writer_state rcutorture: Remove CONFIG_RCU_USER_QS from rcutorture selftest doc rcutorture: Default grace period to three minutes, allow override rcutorture: Dump stack when GP kthread stalls rcutorture: Flag nonexistent RCU GP kthread rcutorture: Add batch number to script printout Documentation/memory-barriers.txt: Fix ACCESS_ONCE thinko documentation: Update RCU requirements based on expedited changes ... commit ddf1d6238dd13a3bd948e8fcb1109798ef0af49b Merge: 32fb378 764a5c6 Author: Linus Torvalds Date: Mon Jan 11 13:32:10 2016 -0800 Merge branch 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs xattr updates from Al Viro: "Andreas' xattr cleanup series. It's a followup to his xattr work that went in last cycle; -0.5KLoC" * 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: xattr handlers: Simplify list operation ocfs2: Replace list xattr handler operations nfs: Move call to security_inode_listsecurity into nfs_listxattr xfs: Change how listxattr generates synthetic attributes tmpfs: listxattr should include POSIX ACL xattrs tmpfs: Use xattr handler infrastructure btrfs: Use xattr handler infrastructure vfs: Distinguish between full xattr names and proper prefixes posix acls: Remove duplicate xattr name definitions gfs2: Remove gfs2_xattr_acl_chmod vfs: Remove vfs_xattr_cmp commit 32fb378437a1d716e72a442237d7ead1f435ecf0 Merge: 19ccb28 fceef39 Author: Linus Torvalds Date: Mon Jan 11 13:13:23 2016 -0800 Merge branch 'work.symlinks' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs RCU symlink updates from Al Viro: "Replacement of ->follow_link/->put_link, allowing to stay in RCU mode even if the symlink is not an embedded one. No changes since the mailbomb on Jan 1" * 'work.symlinks' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: switch ->get_link() to delayed_call, kill ->put_link() kill free_page_put_link() teach nfs_get_link() to work in RCU mode teach proc_self_get_link()/proc_thread_self_get_link() to work in RCU mode teach shmem_get_link() to work in RCU mode teach page_get_link() to work in RCU mode replace ->follow_link() with new method that could stay in RCU mode don't put symlink bodies in pagecache into highmem namei: page_getlink() and page_follow_link_light() are the same thing ufs: get rid of ->setattr() for symlinks udf: don't duplicate page_symlink_inode_operations logfs: don't duplicate page_symlink_inode_operations switch befs long symlinks to page_symlink_operations commit 19ccb28e296d5afa299db1003d37e5d37994d46e Merge: afd2ff9 a7f61e89 Author: Linus Torvalds Date: Mon Jan 11 12:54:03 2016 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs compat_ioctl fixes from Al Viro: "This is basically Jann's patches from last week. I have _not_ included the stuff like switching i2c to ->compat_ioctl() into this one - those need more testing. Ideally I would like fs/compat_ioctl.c shrunk a lot, but that's a separate story" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: compat_ioctl: don't call do_ioctl under set_fs(KERNEL_DS) compat_ioctl: don't pass fd around when not needed compat_ioctl: don't look up the fd twice commit 0254e953537c92df3e7d0176f401a211e944fd61 Author: Guenter Roeck Date: Sun Jan 3 15:11:58 2016 -0800 watchdog: Drop pointer to watchdog device from struct watchdog_device The lifetime of the watchdog device pointer is different from the lifetime of its character device. Remove it entirely to avoid race conditions. Signed-off-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 2 -- drivers/watchdog/watchdog_core.c | 8 ++++---- drivers/watchdog/watchdog_dev.c | 9 ++++----- include/linux/watchdog.h | 2 -- 4 files changed, 8 insertions(+), 13 deletions(-) commit 2c2f3080de7341f58a5d0e8ea31cc66dd369b8f4 Author: Guenter Roeck Date: Sun Jan 3 15:11:57 2016 -0800 watchdog: ziirave: Use watchdog infrastructure to create sysfs attributes The watchdog core now supports creating driver specific sysfs attributes when creating the watchdog device. Signed-off-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ziirave_wdt.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit faa584757b63aad42d19f1c6a6eac2c848618f83 Author: Guenter Roeck Date: Sun Jan 3 15:11:56 2016 -0800 watchdog: Add support for creating driver specific sysfs attributes The Zodiac watchdog driver attaches additional sysfs attributes to the watchdog device. This has a number of problems: The watchdog device lifetime differs from the driver lifetime, and the device structure should therefore not be accessed from drivers. Also, creating sysfs attributes after driver registration results in a potential race condition if user space expects the attributes to exist but they don't exist yet. Add support for creating driver specific sysfs attributes to the watchdog core to solve the problems. Signed-off-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-kernel-api.txt | 3 +++ drivers/watchdog/watchdog_dev.c | 5 +++-- include/linux/watchdog.h | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) commit 62cd1c40ce1c7c16835b599751c7a002eb5bbdf5 Author: Tomas Winkler Date: Sun Jan 3 13:32:37 2016 +0200 watchdog: kill unref/ref ops ref/unref ops are not called at all so even marked them as deprecated is misleading, we need to just drop the API. Signed-off-by: Tomas Winkler Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck include/linux/watchdog.h | 2 -- 1 file changed, 2 deletions(-) commit 9ca128a99fa56f006fe6c5801896aea5e00f8479 Author: Fabio Estevam Date: Mon Jan 4 10:30:47 2016 -0200 watchdog: stmp3xxx: Remove unused variables Commit 8d2fa17151ea3 ("watchdog: stmp3xxx: Stop the watchdog on system halt") introduced the following build warning: drivers/watchdog/stmp3xxx_rtc_wdt.c: In function 'wdt_notify_sys': drivers/watchdog/stmp3xxx_rtc_wdt.c:78:29: warning: unused variable 'pdata' [-Wunused-variable] Remove the unused 'pdata' and 'dev' variables. Signed-off-by: Fabio Estevam Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/stmp3xxx_rtc_wdt.c | 3 --- 1 file changed, 3 deletions(-) commit dde7f55bd000696acc38296c21241971e1840142 Merge: 4922be5 7d6a13f Author: Dave Chinner Date: Tue Jan 12 07:04:30 2016 +1100 Merge branch 'xfs-misc-fixes-for-4.5-2' into for-next commit 7d6a13f023567d573ac362502bb702eda716e654 Author: Dave Chinner Date: Tue Jan 12 07:04:01 2016 +1100 xfs: handle dquot buffer readahead in log recovery correctly When we do dquot readahead in log recovery, we do not use a verifier as the underlying buffer may not have dquots in it. e.g. the allocation operation hasn't yet been replayed. Hence we do not want to fail recovery because we detect an operation to be replayed has not been run yet. This problem was addressed for inodes in commit d891400 ("xfs: inode buffers may not be valid during recovery readahead") but the problem was not recognised to exist for dquots and their buffers as the dquot readahead did not have a verifier. The result of not using a verifier is that when the buffer is then next read to replay a dquot modification, the dquot buffer verifier will only be attached to the buffer if *readahead is not complete*. Hence we can read the buffer, replay the dquot changes and then add it to the delwri submission list without it having a verifier attached to it. This then generates warnings in xfs_buf_ioapply(), which catches and warns about this case. Fix this and make it handle the same readahead verifier error cases as for inode buffers by adding a new readahead verifier that has a write operation as well as a read operation that marks the buffer as not done if any corruption is detected. Also make sure we don't run readahead if the dquot buffer has been marked as cancelled by recovery. This will result in readahead either succeeding and the buffer having a valid write verifier, or readahead failing and the buffer state requiring the subsequent read to resubmit the IO with the new verifier. In either case, this will result in the buffer always ending up with a valid write verifier on it. Note: we also need to fix the inode buffer readahead error handling to mark the buffer with EIO. Brian noticed the code I copied from there wrong during review, so fix it at the same time. Add comments linking the two functions that handle readahead verifier errors together so we don't forget this behavioural link in future. cc: # 3.12 - current Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_dquot_buf.c | 36 ++++++++++++++++++++++++++++++------ fs/xfs/libxfs/xfs_inode_buf.c | 2 ++ fs/xfs/libxfs/xfs_quota_defs.h | 2 +- fs/xfs/libxfs/xfs_shared.h | 1 + fs/xfs/xfs_log_recover.c | 9 +++++++-- 5 files changed, 41 insertions(+), 9 deletions(-) commit b79f4a1c68bb99152d0785ee4ea3ab4396cdacc6 Author: Dave Chinner Date: Tue Jan 12 07:03:44 2016 +1100 xfs: inode recovery readahead can race with inode buffer creation When we do inode readahead in log recovery, we do can do the readahead before we've replayed the icreate transaction that stamps the buffer with inode cores. The inode readahead verifier catches this and marks the buffer as !done to indicate that it doesn't yet contain valid inodes. In adding buffer error notification (i.e. setting b_error = -EIO at the same time as as we clear the done flag) to such a readahead verifier failure, we can then get subsequent inode recovery failing with this error: XFS (dm-0): metadata I/O error: block 0xa00060 ("xlog_recover_do..(read#2)") error 5 numblks 32 This occurs when readahead completion races with icreate item replay such as: inode readahead find buffer lock buffer submit RA io .... icreate recovery xfs_trans_get_buffer find buffer lock buffer ..... fails verifier clear XBF_DONE set bp->b_error = -EIO release and unlock buffer icreate initialises buffer marks buffer as done adds buffer to delayed write queue releases buffer At this point, we have an initialised inode buffer that is up to date but has an -EIO state registered against it. When we finally get to recovering an inode in that buffer: inode item recovery xfs_trans_read_buffer find buffer lock buffer sees XBF_DONE is set, returns buffer sees bp->b_error is set fail log recovery! Essentially, we need xfs_trans_get_buf_map() to clear the error status of the buffer when doing a lookup. This function returns uninitialised buffers, so the buffer returned can not be in an error state and none of the code that uses this function expects b_error to be set on return. Indeed, there is an ASSERT(!bp->b_error); in the transaction case in xfs_trans_get_buf_map() that would have caught this if log recovery used transactions.... This patch firstly changes the inode readahead failure to set -EIO on the buffer, and secondly changes xfs_buf_get_map() to never return a buffer with an error state set so this first change doesn't cause unexpected log recovery failures. cc: # 3.12 - current Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_inode_buf.c | 12 +++++++----- fs/xfs/xfs_buf.c | 7 +++++++ 2 files changed, 14 insertions(+), 5 deletions(-) commit 079062b28fb4c58e30d024fdf974e00de53158fd Author: Andy Shevchenko Date: Wed Dec 23 19:37:19 2015 +0200 rtc: cmos: prevent kernel warning on IRQ flags mismatch The Microsoft Surface 3 tablet shares interrupt line between RTC and one of SPI controllers. However, the rtc_cmos driver doesn't allow shared interrupts and user sees the following warning genirq: Flags mismatch irq 8. 00000080 (8086228E:02) vs. 00000000 (rtc0) ... [] pxa2xx_spi_probe+0x151/0x600 [spi_pxa2xx_platform] Allow RTC driver to use shared interrupts. Seems we are on the safe side to do just this simple change since cmos_interrupt() handler checks for the actual hardware status anyway. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4c23f58a96dcce177c996511363b85bf114ae8f Author: Julia Lawall Date: Wed Dec 30 21:59:34 2015 +0100 rtc: rtc-ds2404: constify ds2404_chip_ops structures The ds2404_chip_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds2404.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ae83b6f76fc74eb6535b9d331a3310a59c32f84 Author: Krzysztof Kozlowski Date: Wed Dec 30 13:47:27 2015 +0900 rtc: s5m: Make register configuration per S2MPS device to remove exceptions Before updating time and alarm the driver must set appropriate mask in UDR register. For that purpose the driver uses common register configuration and a lot of exceptions per device in the code. The exceptions are not obvious, for example except the change in the logic sometimes the fields are swapped (WUDR and AUDR between S2MPS14 and S2MPS15). This leads to quite complicated code. Try to make it more obvious by: 1. Documenting the UDR masks for devices and operations. 2. Adding fields in register configuration structure for each operation (read time, write time and alarm). 3. Splitting the configuration per S2MPS13, S2MPS14 and S2MPS15 thus removing exceptions for them. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar Acked-by: Lee Jones Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s5m.c | 110 +++++++++++++++++++++++++++------------- include/linux/mfd/samsung/rtc.h | 2 + 2 files changed, 77 insertions(+), 35 deletions(-) commit 67a6025a77be7c6bcb4baeb9424509fcb4ca1e32 Author: Krzysztof Kozlowski Date: Wed Dec 30 13:47:26 2015 +0900 rtc: s5m: Add separate field for storing auto-cleared mask in register config Some devices from S2M/S5M family use different register update masks for different operations (alarm and register update). Now the driver uses common register configuration and a lot of exceptions per device in code. Before eliminating the exceptions and using specific register configuration for given device, make the auto-cleared mask a separate field. This is merely a refactoring. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s5m.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a83a793ad433d24f67aba4d88169235379004235 Author: Krzysztof Kozlowski Date: Wed Dec 30 13:47:25 2015 +0900 rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields Remove the 'rtc' prefix from some of the fields in struct s5m_rtc_reg_config because it is obvious - this is a RTC driver. No functional changes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s5m.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit f571287bda5390751ab4e4d5e3f54fa2d1788667 Author: LABBE Corentin Date: Thu Dec 17 14:11:04 2015 +0100 rtc: Replace simple_strtoul by kstrtoul The simple_strtoul function is obsolete. This patch replace it by kstrtoul. Since kstrtoul is more strict, it permits to filter some invalid input that simple_strtoul accept. For example: echo '1022xxx' > /sys/devices/pnp0/00:03/rtc/rtc0/max_user_freq cat /sys/devices/pnp0/00:03/rtc/rtc0/max_user_freq 1022 Signed-off-by: LABBE Corentin Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sysfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 718a820a303ca60645ab703451ecfebf045c896b Author: Alexandre Belloni Date: Thu Dec 17 00:36:22 2015 +0100 rtc: abx80x: add alarm support Add alarm support to the abx80x driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 145 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 141 insertions(+), 4 deletions(-) commit fca733a14ea549dbc4f759578704c48f5fb0ab45 Author: Alexandre Belloni Date: Thu Dec 17 00:36:21 2015 +0100 rtc: abx80x: Add Microcrystal rv1805 support Microcrystal RV-1805 is compatible with Abracon 1805. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 1 + 1 file changed, 1 insertion(+) commit 7432a850b5139b24b9288416a2ae796e4da295d6 Author: Julia Lawall Date: Fri Dec 11 18:50:50 2015 +0100 rtc: v3020: constify v3020_chip_ops structures The v3020_chip_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Alexandre Belloni drivers/rtc/rtc-v3020.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 78ef5f2d2d8c9234d80b4e01e8b736e7241cd5ce Author: Gregory CLEMENT Date: Fri Dec 11 12:43:05 2015 +0100 rtc: rv8803: Extend compatibility with the rx8900 The Seiko Epson's RTC RX8900 layout register is compatible with the RV8803. So let's add its ID in order to reuse the same driver. Signed-off-by: Gregory CLEMENT Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 1 + 1 file changed, 1 insertion(+) commit 68c85f2916222b15556ca44e2da0ee94f61f02da Author: Andrzej Hajda Date: Thu Dec 10 08:55:33 2015 +0100 rtc: rv8803: fix handling return value of i2c_smbus_read_byte_data The function can return negative values, so its result should be assigned to signed variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed13d89b08e392cd347aaa54ddc17f7d3e26b175 Author: Akshay Bhat Date: Thu Dec 3 14:41:21 2015 -0500 rtc: Add Epson RX8010SJ RTC driver This driver supports the following functions: - reading and setting time - alarms when connected to an IRQ - reading and clearing the voltage low flags Datasheet: http://www.epsondevice.com/docs/qd/en/DownloadServlet?id=ID000956 Signed-off-by: Akshay Bhat Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-rx8010.c | 523 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 534 insertions(+) commit 529af7d1982562eafdc01760d44d990c7e3dcd82 Author: Vladimir Zapolskiy Date: Wed Dec 2 08:10:28 2015 +0200 rtc: lpc32xx: remove irq > NR_IRQS check from probe() If the driver is used on an ARM platform with SPARSE_IRQ defined, semantics of NR_IRQS is different (minimal value of virtual irqs) and by default it is set to 16, see arch/arm/include/asm/irq.h. This value may be less than the actual number of virtual irqs, which may break the driver initialization. The check removal allows to use the driver on such a platform, and, if irq controller driver works correctly, the check is not needed on legacy platforms. Fixes a runtime problem: rtc-lpc32xx 40024000.rtc: Can't get interrupt resource Signed-off-by: Vladimir Zapolskiy Signed-off-by: Alexandre Belloni drivers/rtc/rtc-lpc32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5878a869fe8c272d3a843a47ef0716c91ba3e25 Author: Colin Ian King Date: Sat Nov 28 16:38:40 2015 +0000 rtc: imxdi: fix spelling mistake in warning message Minor issue, fix spelling mistake, happend -> happened Signed-off-by: Colin Ian King Signed-off-by: Alexandre Belloni drivers/rtc/rtc-imxdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c25a106c0dfc1656a147663c353e3805e6165da Author: Rasmus Villemoes Date: Tue Nov 24 14:51:24 2015 +0100 rtc: ds1685: don't try to micromanage sysfs output size ...and don't do it wrong. "not ok or N/A" has length 13. Add the trailing newline, and the snprintf return value will be 14. However, we lied to snprintf and told it that only 13 bytes were available. Hence snprintf has only written "not ok or N/" and a trailing '\0' to the buffer. Next we continue lying, this time to the upper sysfs layer, claiming that we wrote 14 meaningful bytes to the buffer. That'll make the upper layer copy "not ok or N/" plus two nul bytes to user space (one nul byte from snprintf, the other since sysfs takes care to clear the buffer before giving it to the ->show method). In the other cases, the claimed buffer size is closer to sufficient, but we'll still get a nul byte instead of a newline written to user space. There's absolutely no reason to try to predict the output size, and there's plenty of room in the buffer, so just use sprintf. Signed-off-by: Rasmus Villemoes Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1685.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit ff67abd236ca7b65ea632f476f0f0cfc83aea711 Author: Rasmus Villemoes Date: Tue Nov 24 14:51:23 2015 +0100 rtc: use %ph for short hex dumps This makes the generated code slightly smaller. Signed-off-by: Rasmus Villemoes Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1305.c | 8 ++------ drivers/rtc/rtc-ds1307.c | 17 ++++------------- drivers/rtc/rtc-ds1685.c | 12 +++++------- 3 files changed, 11 insertions(+), 26 deletions(-) commit 2ad2c17480b6208a35a4ffb937effe0ba1ed39de Author: Enrico Scholz Date: Fri Nov 27 13:02:55 2015 +0100 rtc: da9063: avoid writing undefined data to rtc driver did | static void da9063_tm_to_data(struct rtc_time *tm, u8 *data, | { | const struct da9063_compatible_rtc_regmap *config = rtc->config; | | data[RTC_SEC] &= ~config->rtc_count_sec_mask; | data[RTC_SEC] |= tm->tm_sec & config->rtc_count_sec_mask; | ... | } | ... | static int da9063_rtc_set_time(struct device *dev, struct rtc_time *tm) | { | ... | u8 data[RTC_DATA_LEN]; | int ret; | | da9063_tm_to_data(tm, data, rtc); which means that some bits of stack content (in 'data[]') was masked out and written to the RTC. Because da9063_tm_to_data() is used only by da9063_rtc_set_time() and da9063_rtc_set_alarm(), we can write fields directly. Signed-off-by: Enrico Scholz Acked-by: Steve Twiss Tested-by: Steve Twiss Signed-off-by: Alexandre Belloni drivers/rtc/rtc-da9063.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 4d833d601332b00a1ef5f0249e97481d02f3ad02 Author: LABBE Corentin Date: Thu Nov 19 11:50:10 2015 +0100 rtc: sunxi: use of_device_get_match_data The usage of of_device_get_match_data reduce the code size a bit. Signed-off-by: LABBE Corentin Acked-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sunxi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6ddab92faa2d7d7b38cb2b228f7fdfd1eecba5e2 Author: LABBE Corentin Date: Thu Nov 19 11:50:09 2015 +0100 rtc: sunxi: constify the data_year_param structure The data_year_param struct is never modified, so lets constify it. This permit to remove cast since of_device_id is const also. Signed-off-by: LABBE Corentin Acked-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sunxi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f8947feb2c0196dafa7683f557eb8dddfb1ae167 Author: LABBE Corentin Date: Thu Nov 19 11:50:08 2015 +0100 rtc: sunxi: fix signedness issues The variable year must be set as unsigned since it is used with sunxi_rtc_data_year{.min|.max} and as parameter of is_leap_year() which wait for unsigned int. Only tm_year is not unsigned, but it is long. This patch fix also the format of printing of min/max. (must use %u since they are unsigned) The parameter to of sunxi_rtc_setaie() must be set to uint since callers give always uint data. Signed-off-by: LABBE Corentin Acked-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sunxi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3fc2c14acaf925768db37cf439c628bfa71dff09 Author: Nizam Haider Date: Sat Nov 14 01:51:29 2015 +0530 rtc: gemini: Remove unnecessary platform_set_drvdata() The driver core clears the driver data to NULL after device_release or on probe failure Signed-off-by: Nizam Haider Acked-by: Hans Ulli Kroll Signed-off-by: Alexandre Belloni drivers/rtc/rtc-gemini.c | 1 - 1 file changed, 1 deletion(-) commit 501385f2a783c0a6cc52c8b984892c57175857f9 Author: Geliang Tang Date: Sat Nov 7 12:00:22 2015 +0800 rtc: efi: add efi_procfs in efi_rtc_ops Add efi_procfs in efi_rtc_ops to show rtc-efi info in /proc/driver/rtc. Most of the code comes from efi_rtc_proc_show() in efirtc. Signed-off-by: Geliang Tang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-efi.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 4 deletions(-) commit b01079be449b895913ce17a47933820af708d5dd Author: Geliang Tang Date: Sat Nov 7 12:00:21 2015 +0800 rtc: fix module reference count in rtc-proc rtc-proc.c is not built as a module. Thus, rather than dealing with THIS_MODULE's reference count, we should deal with rtc->owner's reference count. Signed-off-by: Geliang Tang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-proc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fbbf53f70225c82ba877de780486be5bc81b29e2 Author: Uwe Kleine-König Date: Fri Nov 6 17:37:56 2015 +0100 rtc: pcf8523: refuse to write dates later than 2099 When the chip increments the YEAR register and it already holds bin2bcd(99) it reads as 0 afterwards. With this behaviour the last valid day (without trickery) that has a representation is 2099-12-31 23:59:59. So refuse to write later dates. Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8523.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c60faa3afad0e926e63a39894489b64e9a8165df Merge: afd2ff9 a65e5ef Author: Alexandre Belloni Date: Mon Jan 11 20:19:40 2016 +0100 Merge tag 'ib-mfd-regulator-rtc-v4.5' into rtc-next Immutable branch between MFD, Regulator and RTC for the v4.5 merge window commit 03724ac3d48f8f0e3caf1d30fa134f8fd96c94e2 Author: Daniel Lezcano Date: Fri Jan 8 14:21:31 2016 +0100 clocksource/drivers/fsl_ftm_timer: Fix CLKSRC_MMIO dependency Select CLKSRC_MMIO when FSL_FTM_TIMER is enabled. Otherwise it fails to compile on i386 with COMPILE_TEST=y. " on i386: when CLKSRC_MMIO is not enabled: drivers/built-in.o: In function `ftm_timer_init': fsl_ftm_timer.c:(.init.text+0x6842): undefined reference to `clocksource_mmio_readl_up' fsl_ftm_timer.c:(.init.text+0x6855): undefined reference to `clocksource_mmio_init' " Reported-by: Randy Dunlap Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 863ee050726b67db82869e8e4221a7385a28b067 Author: Richard Weinberger Date: Sat Jan 2 23:06:36 2016 +0100 clocksource/drivers: Fix dependencies for !HAS_IOMEM archs Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 815ad8623695c7f2aafc216b923b131f1ee12df6 Merge: 56f2701 d0021d3 Author: Takashi Iwai Date: Mon Jan 11 16:24:58 2016 +0100 Merge tag 'asoc-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Last updates for v4.5 A bunch more updates for v4.5, mainly driver work: - More topology API enhancements from Mengdong Lin working towards making everything more component based and being able to specify PCM links via topology. - Large sets driver updates from Cirrus, Intel (mainly more Skylake support) and Renesas. - New driver for AMD ACP - Rename PCM1792a driver to be generic pcm179x commit cabeea980879c2c701b0bd03f145c9f7dae17a63 Merge: 4f95307 47284e3 f05ca85 9d0c1c3 Author: Mark Brown Date: Mon Jan 11 16:48:38 2016 +0000 Merge remote-tracking branches 'spi/topic/sun4i', 'spi/topic/topcliff-pch' and 'spi/topic/zynq' into spi-next commit 4f9530705b7b9c977044accb035682d9f7df1cdd Merge: 41d5a70 bd6c164 d599af6 cc023478 ec7f9eb edd3899 Author: Mark Brown Date: Mon Jan 11 16:48:35 2016 +0000 Merge remote-tracking branches 'spi/topic/overlay', 'spi/topic/pxa2xx', 'spi/topic/s3c64xx', 'spi/topic/sh-msiof' and 'spi/topic/spidev' into spi-next commit 41d5a700514f133991db0d9d135e597b88b09775 Merge: 635b9b2 22de54a 8caad1d 15bcdefd 2f538c0 Author: Mark Brown Date: Mon Jan 11 16:48:33 2016 +0000 Merge remote-tracking branches 'spi/topic/lm70llp', 'spi/topic/loopback', 'spi/topic/mtk' and 'spi/topic/omap2-mcspi' into spi-next commit 635b9b2e6e177ff582afc9a629a3ea105158b98a Merge: 3c27892 6096828 4fe338c b541eef bf9af08 Author: Mark Brown Date: Mon Jan 11 16:48:31 2016 +0000 Merge remote-tracking branches 'spi/topic/dw', 'spi/topic/dw-mid', 'spi/topic/fsl-espi' and 'spi/topic/imx' into spi-next commit 3c2789239aaa9f999ea7319abe2dcf0042546e9b Merge: 9b17e80 4dde99b 1d3029c 9033a5f 21c015b Author: Mark Brown Date: Mon Jan 11 16:48:30 2016 +0000 Merge remote-tracking branches 'spi/topic/bcm63xx', 'spi/topic/butterfly', 'spi/topic/cadence' and 'spi/topic/davinci' into spi-next commit 9b17e80150f8c6300b49e5f073a9a28dae2299fb Merge: 174c211 218e0b5 Author: Mark Brown Date: Mon Jan 11 16:48:29 2016 +0000 Merge remote-tracking branch 'spi/topic/sunxi' into spi-next commit 174c21163d83f730f7e0194d4682d5149946a7f8 Merge: f30f072 d1eba93 Author: Mark Brown Date: Mon Jan 11 16:48:29 2016 +0000 Merge remote-tracking branch 'spi/topic/core' into spi-next commit f30f072a5f3c0b2b5aa0ab8a6ed6482fdf581d17 Merge: 1683098 de327e4 Author: Mark Brown Date: Mon Jan 11 16:48:27 2016 +0000 Merge remote-tracking branch 'spi/fix/mtk' into spi-linus commit 988f1f576d4f7531cb2175ee1b7cb7afd6d95d22 Merge: b28cf57 8cdc7c5 Author: Chris Mason Date: Mon Jan 11 08:39:28 2016 -0800 Merge branch 'for-chris-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.5 Signed-off-by: Chris Mason commit f5f76ea75dce553631ffb08abc44dcecb68e74d4 Author: Srinivas Kandagatla Date: Mon Jan 11 15:17:23 2016 +0000 ASoC: qcom: use correct device pointer in dma allocation dev pointer in struct snd_soc_pcm_runtime does not have dma_ops set. In v4.4 kernel dma_ops would end up pointing to dummy_dma_ops in such cases. So attempting to use such device in allocating coherent memory on aarch64 would fail. According to commit 1dccb598df549d892b6450c261da54cdd7af44b4 ("arm64: simplify dma_get_ops") The current behavior of dma_get_ops is to fall back to the global dma_ops when a device has not set its own dma_ops, but only for DT based systems. So, this patch fixes the driver to use correct device pointer while allocating coherent memory, and also deletes un-necessary dma_mask setup on soc_runtime->dev. Without this patch lpass driver would fail with below log: ... [ 6.541542] ADV7533: lpass_platform_alloc_buffer: Could not allocate DMA buffer [ 6.541914] apq8016-lpass-cpu 7708000.lpass-cpu: ASoC: pcm constructor failed: -12 [ 6.548216] qcom-apq8016-sbc 7702000.sound: ASoC: can't create pcm ADV7533 :-12 [ 6.555581] qcom-apq8016-sbc 7702000.sound: ASoC: failed to instantiate card -12 [ 6.566072] qcom-apq8016-sbc: probe of 7702000.sound failed with error -12 ... Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/qcom/lpass-platform.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit a193f07d1e3cda30513914b1e88967419a9dbd8c Author: Hans-Christian Egtvedt Date: Wed Jan 6 09:10:47 2016 +0100 avr32: wire up missing syscalls This patch adds three missing syscalls to AVR32: __NR_userfaultfd __NR_membarrier __NR_mlock2 Signed-off-by: Hans-Christian Egtvedt arch/avr32/include/uapi/asm/unistd.h | 3 +++ arch/avr32/kernel/syscall_table.S | 3 +++ 2 files changed, 6 insertions(+) commit 6067a0037ccad272e9697098ba9a5c9c3e109b70 Author: Mans Rullgard Date: Tue Jan 5 21:21:45 2016 +0000 avr32: wire up accept4 syscall The accept4 syscall is missing on AVR32. Fix this. Signed-off-by: Mans Rullgard Acked-by: Hans-Christian Noren Egtvedt arch/avr32/include/uapi/asm/unistd.h | 1 + arch/avr32/kernel/syscall_table.S | 1 + 2 files changed, 2 insertions(+) commit 3238ba01c235e3e9e12fc7bc6ac3f7d513e26a31 Author: Jiri Olsa Date: Mon Jan 11 11:54:51 2016 +0100 perf tools: Add missing sources to perf's MANIFEST Adding missing bitmap.[ch] sources to the MANIFEST file. Fixes building 'make perf-*-src-pkg' generated tarballs. Reported-by: Wang Nan Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: 915b0882c310 ("tools lib: Move bitmap.[ch] from tools/perf/ to tools/{lib,include}/") Link: http://lkml.kernel.org/r/1452509693-13452-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/MANIFEST | 2 ++ 1 file changed, 2 insertions(+) commit 24ee9b57b95fd4d6d0b89a47c3a8f1b145569d18 Author: Jiri Olsa Date: Mon Jan 11 11:54:50 2016 +0100 tools lockdep: Add *.cmd files clean up Add *.cmd files to be removed within clean target. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1452509693-13452-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/lockdep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22992a320807f8eb04b48407715aacbdedb00941 Author: Jiri Olsa Date: Mon Jan 11 11:54:49 2016 +0100 tools bpf: Add *.cmd files clean up Add *.cmd files to be removed within clean target. Reported-and-Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1452509693-13452-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f5a7f1d13df94b753794b69cc4c920f8bfb2128 Author: Jiri Olsa Date: Mon Jan 11 11:54:48 2016 +0100 tools: Add clean targets for tools directory Adding missing clean targets for following tools directories: lib/bpf lib/subcmd build This are now cleaned via 'make -C tools clean' command. Reported-and-Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1452509693-13452-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 8c874cc140d667f84ae4642bb5b5e0d6396d2ca4 Author: Dave Jiang Date: Fri Jan 8 09:51:05 2016 -0700 NTB: Address out of DMA descriptor issue with NTB The transport right now does not handle the case where we run out of DMA descriptors. We just fail when we do not succeed. Adding code to retry for a bit attempting to use the DMA engine instead of instantly fail to CPU copy. Signed-off-by: Dave Jiang Reviewed-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 48 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) commit 3d7b75fdae9c81dd71c7573dbc285af90e0924fa Author: Lukas Wunner Date: Mon Jan 11 00:08:35 2016 +0100 apple-gmux: Add initial documentation Document what I've learned so far about the gmux so that we can collaboratively reverse-engineer its remaining unknown bits without everyone having to start from scratch. The DOC sections are bound together in the gpu.tmpl DocBook under a new vga_switcheroo "Handlers" chapter. Eventually this should be amended with documentation about the four other handlers that exist so far (nouveau v1 DSM, nouveau Optimus DSM, radeon ATPX, amdgpu ATPX). Requires kernel-doc with asciidoc support. The EFI variable was reverse-engineered by Bruno Bierbaumer and Andreas Heider . Some of the remaining open questions: * How are vblank intervals synchronized on retinas to achieve seamless switching? Is the DP mux capable of this? It's not mentioned in the data sheets. Or is it done at the OS level, i.e. do we have to synchronize vblank intervals between DRM drivers? There's a signal coming from the panel connector and going into gmux, could this be the vblank signal as received by the panel to properly time the switch? * On retinas there's an I2C bus between gmux and the connector of the right I/O board, apparently leading to the Parade PS8401A HDMI repeater. What is this for, is it controlled via gmux registers? Data sheet: http://www.paradetech.com/products/jitter-cleaning-repeaters/ps8401/ * On retinas there's an I2C bus between gmux and the LED driver. Pre-retinas connected the LED driver to SMBUS. Are there additional gmux registers on retinas to control it? * The MacPro6,1 2013 also has a gmux, the same Renesas R4F2113 as the retina MacBook Pro. The Mac Pro doesn't have a built-in display, so what is its purpose? Power control of the dual FirePro GPUs? Switching of the external DP/Thunderbolt ports? The iFixit teardown clearly shows one TI HD3SS212 DisplayPort mux on the logic board next to one of the three Thunderbolt controllers. However six muxes would be necessary to switch all six ports between GPUs. The mux is probably necessary for one of the display configurations allowed by Apple, but which one? https://www.ifixit.com/Teardown/Mac+Pro+Late+2013+Teardown/20778 https://d3nevzfk7ii3be.cloudfront.net/igi/fELBTnt31QhnDsqq.huge https://support.apple.com/en-us/HT202801 * Registers we haven't decoded yet: 0x700 32 Bit configmap? 0x708 32 Bit power sequence? 0x712 8 Bit status of clock from panel on retinas? 0x713 8 Bit dito? 0x724 16 Bit backlight, raw value? 0x760 32 Bit backlight 0x764 32 Bit backlight 0x768 8 Bit backlight 0x76a 16 Bit backlight 0x76c 16 Bit backlight 0x76e 16 Bit backlight 0x77f edp/dp/hdmi probe? retina only. * Addition by Bruno Prémont : "Missing is also precise knowledge as to what the gmux depends on. From behavioral reports, it is somehow sensitive to VGA IO/MEM routing (it apparently needs the routing to go to integrated GPU, not discrete GPU). When the routing is inappropriate backlight control IO just reads back as 0xFF (and eventually gmux IO in general does so)." Signed-off-by: Lukas Wunner Acked-by: Darren Hart Link: http://patchwork.freedesktop.org/patch/msgid/da309e436fbeac886477d80376457b7d83ea4b2d.1452431795.git.lukas@wunner.de Signed-off-by: Daniel Vetter Documentation/DocBook/gpu.tmpl | 22 ++++++++ drivers/platform/x86/apple-gmux.c | 113 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) commit 5f2323658e4829ffb893553297e64795a90cbcd9 Author: Alex Deucher Date: Fri Nov 6 01:29:08 2015 -0500 drm/amdgpu: add irq domain support Hardware blocks on the GPU like ACP generate interrupts in the GPU interrupt controller, but are driven by a separate driver. Add an irq domain to the GPU driver so that blocks like ACP can register a Linux interrupt. Acked-by: Dave Airlie Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 108 +++++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 9 +++ drivers/gpu/drm/amd/amdgpu/cik_ih.c | 6 ++ drivers/gpu/drm/amd/amdgpu/cz_ih.c | 7 +++ drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 7 +++ drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 7 +++ 6 files changed, 136 insertions(+), 8 deletions(-) commit ba228ac8f512c9cd09cb4245c424ab1632da0c24 Author: Alex Deucher Date: Wed Dec 23 11:25:43 2015 -0500 drm/amdgpu/cgs: add an interface to access PCI resources This provides an interface to get access to the base address of PCI resources (MMIO, DOORBELL, etc.). Only MMIO and DOORBELL are implemented right now. This is necessary to properly utilize shared drivers on platform devices. IP modules can use this interface to get the base address of the resource and add any additional offset and set the size when setting up the platform driver(s). Acked-by: Dave Airlie Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 36 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/include/cgs_common.h | 34 ++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) commit 703872c2c53b57ac14563e64c2df086ef57690f9 Author: Dave Jiang Date: Thu Nov 19 14:00:54 2015 -0700 NTB: Clear property bits in BAR value The lower bits read from a BAR register will contain property bits that we do not care about. Clear those so that we can use the BAR values for limit and xlat registers. Reported-by: Conrad Meyer Signed-off-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_intel.c | 4 ++-- drivers/ntb/hw/intel/ntb_hw_intel.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 179f912a39ac192d2281ecb10a66918ee20f5d73 Author: Jon Mason Date: Fri Dec 18 13:22:37 2015 -0500 NTB: ntb_process_tx error path bug The transmit overrun avoidance error path in ntb_process_tx accidentally swapped the first two values being passed to the tx_handler client. This could result in crashes in the ntb_netdev (or other out-of-tree NTB clients). Reported-by: Alex Depoutovitch Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 581d9434aa56b465c5abd82caf18937e9973ca42 Author: Phil Edworthy Date: Tue Jan 5 13:00:31 2016 +0000 PCI: rcar: Add Gen2 PHY setup to pcie-rcar For PCIe compliance, the PHY registers need setting as per the manual. Signed-off-by: Phil Edworthy Signed-off-by: Bjorn Helgaas Reviewed-by: Wolfram Sang drivers/pci/host/pcie-rcar.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit de1be9a8897cb35bee7617da8b6ddd7d144db332 Author: Phil Edworthy Date: Tue Jan 5 13:00:30 2016 +0000 PCI: rcar: Add runtime PM support to pcie-rcar If runtime PM is enabled in the kernel config, simply enable the clocks once during probe. Signed-off-by: Phil Edworthy Signed-off-by: Bjorn Helgaas Acked-by: Wolfram Sang drivers/pci/host/pcie-rcar.c | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) commit 67de2dc34cc30d334cb66ab4f466e80f04d5b618 Author: Bjorn Helgaas Date: Tue Jan 5 15:56:30 2016 -0600 PCI: designware: Make config accessor override checking symmetric Drivers based on the DesignWare core can override the config read accessors by supplying rd_own_conf() and rd_other_conf() function pointers. dw_pcie_rd_conf() calls dw_pcie_rd_own_conf() (for accesses to the root bus) or dw_pcie_rd_other_conf(): dw_pcie_rd_conf dw_pcie_rd_own_conf # if on root bus dw_pcie_rd_other_conf # if not on root bus Previously we checked for rd_other_conf() directly in dw_pcie_rd_conf(), but we checked for rd_own_conf() in dw_pcie_rd_own_conf(). Check for rd_other_conf() in dw_pcie_rd_other_conf() to make this symmetric with the rd_own_conf() checking, and similarly for the write path. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Pratyush Anand drivers/pci/host/pcie-designware.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit be0270ec89e6b9b49de7e533dd1f3a89ad34d205 Author: Mauro Carvalho Chehab Date: Mon Dec 28 12:03:47 2015 -0200 [media] Postpone the addition of MEDIA_IOC_G_TOPOLOGY There are a few discussions left with regards to this ioctl: 1) the name of the new structs will contain _v2_ on it? 2) what's the best alternative to avoid compat32 issues? Due to that, let's postpone the addition of this new ioctl to the next Kernel version, to give people more time to discuss it. Signed-off-by: Mauro Carvalho Chehab Documentation/DocBook/media/v4l/media-ioc-g-topology.xml | 3 +++ drivers/media/media-device.c | 7 ++++++- include/uapi/linux/media.h | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) commit 4058937a40f73d46502f6042f87bc90f99bc36fe Author: Julia Lawall Date: Mon Jan 11 08:22:36 2016 -0600 PCI: ibmphp: Remove unneeded NULL test Remove unneeded NULL test. The index variable of list_for_each_entry is never NULL, as it is the structure that contains the list pointer. Generated by: scripts/coccinelle/iterators/itnull.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Signed-off-by: Bjorn Helgaas CC: Geliang Tang drivers/pci/hotplug/ibmphp_core.c | 3 --- 1 file changed, 3 deletions(-) commit ce084d487c8a0731bff5739e735b7bb82b94e53b Author: Mauro Carvalho Chehab Date: Wed Dec 30 11:09:39 2015 -0200 [media] mxl111sf: Add a tuner entity While mxl111sf may have multiple frontends, it has just one tuner. Reflect that on the media graph. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.h | 6 ++++++ drivers/media/usb/dvb-usb-v2/mxl111sf.c | 20 ++++++++++++++++++++ drivers/media/usb/dvb-usb-v2/mxl111sf.h | 5 +++++ 3 files changed, 31 insertions(+) commit a0cce2a05756c9308f59c0303afe2c199e0789b0 Author: Mauro Carvalho Chehab Date: Wed Dec 30 10:11:53 2015 -0200 [media] dvbdev: create links on devices with multiple frontends Devices like mxl111sf-based WinTV Aero-m have multiple frontends, all linked on the same demod. Currently, the dvb_create_graph() function is not smart enough to create multiple links. Fix it. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 57 +++++++++++++++++++++++++++++++---------- drivers/media/dvb-core/dvbdev.h | 7 +++++ 2 files changed, 51 insertions(+), 13 deletions(-) commit b01cc9ce7c13e0463575332dfa3171727f706afb Author: Mauro Carvalho Chehab Date: Wed Dec 30 09:45:48 2015 -0200 [media] media-entitiy: add a function to create multiple links Sometimes, it is desired to create 1:n and n:1 or even n:n links between different entities with the same function. This is actually needed to support DVB devices that have multiple frontends. While we could do a function like that internally at the DVB core, such function is generic enough to be at media-entity, and it could be useful on some other places. So, add such function. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 65 ++++++++++++++++++++++++++++++++++++++++++++ include/media/media-entity.h | 51 ++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) commit 33c6853347c13b7cf8d11c12714cd855a84bc992 Author: Mauro Carvalho Chehab Date: Tue Dec 29 16:45:21 2015 -0200 [media] dvb-usb-v2: postpone removal of media_device We should not remove the media_device until its last usage, or we may have use after free troubles. So, move the per-adapter media_device removal to happen at the end of the adapter removal code. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0230d60e4661d9ced6fb0b9a30f182ebdafbba7a Author: Mauro Carvalho Chehab Date: Tue Dec 29 11:52:23 2015 -0200 [media] dvbdev: Add RF connector if needed Several pure digital TV devices have a frontend with the tuner integrated on it. Add the RF connector when dvb_create_media_graph() is called on such devices. Tested with siano and dvb_usb_mxl111sf drivers. Signed-off-by: Mauro Carvalho Chehab drivers/media/common/siano/smsdvb-main.c | 2 +- drivers/media/dvb-core/dvbdev.c | 49 +++++++++++++++++++++++++++-- drivers/media/dvb-core/dvbdev.h | 20 ++++++++++-- drivers/media/usb/au0828/au0828-dvb.c | 2 +- drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 2 +- drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 2 +- 7 files changed, 70 insertions(+), 9 deletions(-) commit 0820eb5c5510b0a5c25a17c8be5e40156ace4991 Author: Mauro Carvalho Chehab Date: Mon Dec 28 10:30:06 2015 -0200 [media] dvbdev: remove two dead functions if !CONFIG_MEDIA_CONTROLLER_DVB Those functions are used only if CONFIG_MEDIA_CONTROLLER_DVB. Without that, if !CONFIG_MEDIA_CONTROLLER_DVB, it would produce two warnings: drivers/media/dvb-core/dvbdev.c:219:12: warning: 'dvb_create_tsout_entity' defined but not used [-Wunused-function] static int dvb_create_tsout_entity(struct dvb_device *dvbdev, ^ drivers/media/dvb-core/dvbdev.c:264:12: warning: 'dvb_create_media_entity' defined but not used [-Wunused-function] static int dvb_create_media_entity(struct dvb_device *dvbdev, ^ Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2e7508e40f6391762499d802226d8a31b0ea3944 Author: Mauro Carvalho Chehab Date: Mon Dec 28 09:24:23 2015 -0200 [media] call media_device_init() before registering the V4L2 device Currently, v4l2_device_register() doesn't use the media_device struct. So, calling media_device_init() could be called either before or after v4l2_device_register(). Yet, it is a good practice to initialize everything before calling the register functions. Also, the other drivers call media_device_init() before registering the V4L2 device. So, move the call for media_device_init() to happen earlier on exynos4-is and s3c-camif. This is just a cleanup patch. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/media-dev.c | 4 ++-- drivers/media/platform/s3c-camif/camif-core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7c9d6731acf2816cd94e6c51f02ac8348dc7bb7e Author: Mauro Carvalho Chehab Date: Thu Dec 17 09:07:38 2015 -0200 [media] uapi/media.h: Use u32 for the number of graph objects While we need to keep a u64 alignment to avoid compat32 issues, having the number of entities/pads/links/interfaces represented by an u64 is incoherent with the ID number, with is an u32. In order to make it coherent, change those quantities to u32. Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ba0dd729bfc09e51af238a630deba70205442afe Author: Mauro Carvalho Chehab Date: Wed Dec 16 15:33:54 2015 -0200 [media] media-entity: don't sleep at media_device_register_entity() media_device_register_entity() is protected by a spin_lock. Calling ida_pre_get() with GFP_KERNEL may put it to sleep, with is a bad idea and causes this warning: [ 8812.397195] BUG: sleeping function called from invalid context at mm/slub.c:1287 [ 8812.397203] in_atomic(): 1, irqs_disabled(): 0, pid: 15179, name: modprobe [ 8812.397207] INFO: lockdep is turned off. [ 8812.397213] CPU: 2 PID: 15179 Comm: modprobe Tainted: G B 4.4.0-rc2+ #41 [ 8812.397218] Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015 [ 8812.397222] 0000000000000000 ffff880314c77268 ffffffff818f8ba7 ffff8803b17dde00 [ 8812.397232] ffff880314c77290 ffffffff811c2ee5 ffff8803b17dde00 ffffffff8284dbc9 [ 8812.397241] 0000000000000507 ffff880314c772d0 ffffffff811c30d5 0000000041b58ab3 [ 8812.397250] Call Trace: [ 8812.397258] [] dump_stack+0x4b/0x64 [ 8812.397265] [] ___might_sleep+0x245/0x3a0 [ 8812.397270] [] __might_sleep+0x95/0x1a0 [ 8812.397276] [] ? ida_pre_get+0x113/0x250 [ 8812.397282] [] kmem_cache_alloc+0x197/0x250 [ 8812.397288] [] ida_pre_get+0x113/0x250 [ 8812.397293] [] ida_simple_get+0xa5/0x170 [ 8812.397298] [] ? ida_pre_get+0x250/0x250 [ 8812.397306] [] media_device_register_entity+0x171/0x420 [media] [ 8812.397318] [] v4l2_device_register_subdev+0x34f/0x640 [videodev] [ 8812.397324] [] v4l2_i2c_new_subdev_board+0x12a/0x250 [v4l2_common] [ 8812.397330] [] v4l2_i2c_new_subdev+0xd7/0x110 [v4l2_common] [ 8812.397337] [] ? v4l2_i2c_new_subdev_board+0x250/0x250 [v4l2_common] [ 8812.397347] [] au0828_card_analog_fe_setup+0x2e6/0x3f0 [au0828] [ 8812.397352] [] ? power_down+0xc4/0xc4 [ 8812.397361] [] ? au0828_tuner_callback+0x160/0x160 [au0828] [ 8812.397370] [] au0828_card_setup+0x11f/0x340 [au0828] [ 8812.397378] [] ? au0828_card_analog_fe_setup+0x3f0/0x3f0 [au0828] [ 8812.397384] [] ? msleep+0x7b/0xc0 [ 8812.397393] [] au0828_usb_probe+0x679/0xcf0 [au0828] [ 8812.397399] [] usb_probe_interface+0x45d/0x940 [ 8812.397406] [] driver_probe_device+0x454/0xd90 [ 8812.397411] [] ? driver_probe_device+0xd90/0xd90 [ 8812.397417] [] ? driver_probe_device+0xd90/0xd90 [ 8812.397422] [] __driver_attach+0x121/0x160 [ 8812.397427] [] bus_for_each_dev+0x11f/0x1a0 [ 8812.397433] [] ? subsys_dev_iter_exit+0x10/0x10 [ 8812.397439] [] ? _raw_spin_unlock+0x27/0x40 [ 8812.397445] [] driver_attach+0x3d/0x50 [ 8812.397450] [] bus_add_driver+0x4c9/0x770 [ 8812.397456] [] driver_register+0x18c/0x3b0 [ 8812.397462] [] ? __raw_spin_lock_init+0x32/0x100 [ 8812.397468] [] usb_register_driver+0x1f8/0x440 [ 8812.397473] [] ? 0xffffffffa0208000 [ 8812.397481] [] au0828_init+0xb7/0x1000 [au0828] [ 8812.397486] [] do_one_initcall+0x141/0x300 [ 8812.397492] [] ? try_to_run_init_process+0x40/0x40 [ 8812.397497] [] ? trace_hardirqs_on_caller+0x16/0x590 [ 8812.397502] [] ? kasan_unpoison_shadow+0x36/0x50 [ 8812.397507] [] ? kasan_unpoison_shadow+0x36/0x50 [ 8812.397512] [] ? kasan_unpoison_shadow+0x36/0x50 [ 8812.397517] [] ? __asan_register_globals+0x87/0xa0 [ 8812.397524] [] do_init_module+0x1d0/0x5a4 [ 8812.397530] [] load_module+0x6648/0x9d70 [ 8812.397535] [] ? symbol_put_addr+0x50/0x50 [ 8812.397546] [] ? module_frob_arch_sections+0x20/0x20 [ 8812.397552] [] ? open_exec+0x50/0x50 [ 8812.397559] [] ? ns_capable+0x5b/0xd0 [ 8812.397565] [] SyS_finit_module+0x108/0x130 [ 8812.397571] [] ? SyS_init_module+0x1f0/0x1f0 [ 8812.397576] [] ? lockdep_sys_exit_thunk+0x12/0x14 [ 8812.397582] [] entry_SYSCALL_64_fastpath+0x16/0x7a Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 430a672c83c3e2e9a96c777a874f345c8d21f929 Author: Mauro Carvalho Chehab Date: Wed Dec 16 15:18:25 2015 -0200 [media] media-entity: increase max number of PADs The DVB drivers may have 257 PADs. Get the next power of two that would accomodate that amount. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 630c0e80c984c0a9a325430d62770fd49f93f9b9 Author: Mauro Carvalho Chehab Date: Wed Dec 16 15:15:18 2015 -0200 [media] media-entity.h: document the remaining functions There are two ancillary functions that are missing comments. While those are used only internally at media-entity.c, document them, for completeness. Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 05b3b77cbbb01180b681bc9211f3d471123809ca Author: Mauro Carvalho Chehab Date: Wed Dec 16 14:28:01 2015 -0200 [media] media-device.h: use just one u32 counter for object ID Instead of using one u32 counter per type for object IDs, use just one counter. With such change, it makes sense to simplify the debug logs too. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 35 +++++++++++++++-------------------- include/media/media-device.h | 10 ++-------- include/media/media-entity.h | 21 ++++++++++----------- 3 files changed, 27 insertions(+), 39 deletions(-) commit 03e493388415df701d4b9e362021a83529018a3b Author: Mauro Carvalho Chehab Date: Wed Dec 16 13:58:31 2015 -0200 [media] media-entity.h fix documentation for several parameters Several parameters added by the media_ent_enum patches were declared with wrong argument names: include/media/media-device.h:333: warning: No description found for parameter 'entity_internal_idx_max' include/media/media-device.h:354: warning: No description found for parameter 'ent_enum' include/media/media-device.h:354: warning: Excess function parameter 'e' description in 'media_entity_enum_init' include/media/media-device.h:333: warning: No description found for parameter 'entity_internal_idx_max' include/media/media-device.h:354: warning: No description found for parameter 'ent_enum' include/media/media-device.h:354: warning: Excess function parameter 'e' description in 'media_entity_enum_init' include/media/media-entity.h:397: warning: No description found for parameter 'ent_enum' include/media/media-entity.h:397: warning: Excess function parameter 'e' description in 'media_entity_enum_zero' include/media/media-entity.h:409: warning: No description found for parameter 'ent_enum' include/media/media-entity.h:409: warning: Excess function parameter 'e' description in 'media_entity_enum_set' include/media/media-entity.h:424: warning: No description found for parameter 'ent_enum' include/media/media-entity.h:424: warning: Excess function parameter 'e' description in 'media_entity_enum_clear' include/media/media-entity.h:441: warning: No description found for parameter 'ent_enum' include/media/media-entity.h:441: warning: Excess function parameter 'e' description in 'media_entity_enum_test' include/media/media-entity.h:458: warning: No description found for parameter 'ent_enum' include/media/media-entity.h:458: warning: Excess function parameter 'e' description in 'media_entity_enum_test_and_set' include/media/media-entity.h:474: warning: No description found for parameter 'ent_enum' include/media/media-entity.h:474: warning: Excess function parameter 'e' description in 'media_entity_enum_empty' include/media/media-entity.h:474: warning: Excess function parameter 'entity' description in 'media_entity_enum_empty' include/media/media-entity.h:489: warning: No description found for parameter 'ent_enum1' include/media/media-entity.h:489: warning: No description found for parameter 'ent_enum2' include/media/media-entity.h:489: warning: Excess function parameter 'e' description in 'media_entity_enum_intersects' include/media/media-entity.h:489: warning: Excess function parameter 'f' description in 'media_entity_enum_intersects' Fix them. Signed-off-by: Mauro Carvalho Chehab include/media/media-device.h | 6 ++++-- include/media/media-entity.h | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 14 deletions(-) commit aa360d3de3e5c8824d48e6e273d93ee69fb53cdf Author: Mauro Carvalho Chehab Date: Wed Dec 16 13:56:14 2015 -0200 [media] DocBook: document media_entity_graph_walk_cleanup() This function was added recently, but weren't documented. Add documentation for it. Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 92777994a52e6c1fe0a6156a8b49e83efea6fd2c Author: Mauro Carvalho Chehab Date: Wed Dec 16 13:53:04 2015 -0200 [media] move documentation to the header files Some exported functions were still documented at the .c file, instead of documenting at the .h one. Move the documentation to the right place, as we only use headers at media device-drivers.xml DocBook. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 27 --------------------------- drivers/media/media-entity.c | 13 ------------- include/media/media-device.h | 6 ++++++ include/media/media-entity.h | 18 ++++++++++++++++-- 4 files changed, 22 insertions(+), 42 deletions(-) commit 0798ce4a386d605af9ddbed724a8f4c8cccc1dab Author: Sakari Ailus Date: Wed Dec 16 11:32:37 2015 -0200 [media] media: Move MEDIA_ENTITY_MAX_PADS from media-entity.h to media-entity.c This isn't really a part of any interface drivers are expected to use. In order to keep drivers from using it, hide it in media-entity.c. This was always an arbitrary number and should be removed in the long run. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 5 +++++ include/media/media-entity.h | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) commit 030e89ecab55b6e105e19fa830a7a7160237f19a Author: Sakari Ailus Date: Wed Dec 16 11:32:36 2015 -0200 [media] media: Remove pre-allocated entity enumeration bitmap The bitmaps for entity enumerations used to be statically allocated. Now that the drivers have been converted to use the new interface which explicitly initialises the enum objects, drop the pre-allocated bitmaps. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 16 +++++----------- include/media/media-entity.h | 9 ++------- 2 files changed, 7 insertions(+), 18 deletions(-) commit bb0faebdc1d377705081fed67af3f3f3001ac7b8 Author: Sakari Ailus Date: Wed Dec 16 11:32:35 2015 -0200 [media] staging: v4l: davinci_vpbe: Use the new media graph walk interface The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus Cc: Prabhakar Lad Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/vpfe_video.c | 37 ++++++++++++++++++------- drivers/staging/media/davinci_vpfe/vpfe_video.h | 1 + 2 files changed, 28 insertions(+), 10 deletions(-) commit 809fe79a5f59621202a30c248349a50765b98e1c Author: Sakari Ailus Date: Wed Dec 16 11:32:34 2015 -0200 [media] staging: v4l: omap4iss: Use the new media graph walk interface The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss.c | 59 +++++++++++++++++++----------- drivers/staging/media/omap4iss/iss.h | 4 +- drivers/staging/media/omap4iss/iss_video.c | 33 +++++++++++++++-- drivers/staging/media/omap4iss/iss_video.h | 1 + 4 files changed, 70 insertions(+), 27 deletions(-) commit 6246b2a7ad1ffab5a712c38005b668f3e4ca2825 Author: Sakari Ailus Date: Wed Dec 16 11:32:33 2015 -0200 [media] staging: v4l: omap4iss: Use media entity enumeration interface Instead of using a bitmap directly in a driver, use the new media entity enumeration interface to perform the same. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss.c | 15 +++++++++++---- drivers/staging/media/omap4iss/iss.h | 4 ++-- drivers/staging/media/omap4iss/iss_video.c | 23 ++++++++++++++++------- drivers/staging/media/omap4iss/iss_video.h | 4 ++-- 4 files changed, 31 insertions(+), 15 deletions(-) commit ad92b5cf35adc2d3ec0116f4744561d5405a0db7 Author: Sakari Ailus Date: Wed Dec 16 11:32:32 2015 -0200 [media] staging: v4l: omap4iss: Fix sub-device power management code The same bug was present in the omap4iss driver as was in the omap3isp driver. The code got copied to the omap4iss driver while broken. Fix the omap4iss driver as well. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54b5a749b4f3010b3b657507b8ef1eee3a100b09 Author: Sakari Ailus Date: Wed Dec 16 11:32:31 2015 -0200 [media] v4l: vsp1: Use media entity enumeration interface Instead of using a bitmap directly in a driver, use the new media entity enumeration interface to perform the same. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 45 ++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 17d3d4058a61329a6a4384054da6a57c65c7e8ba Author: Sakari Ailus Date: Wed Dec 16 11:32:30 2015 -0200 [media] v4l: omap3isp: Use media entity enumeration interface Instead of using a bitmap directly in a driver, use the new media entity enumeration interface to perform the same. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 21 +++++++++++++-------- drivers/media/platform/omap3isp/isp.h | 5 +++-- drivers/media/platform/omap3isp/ispccdc.c | 2 +- drivers/media/platform/omap3isp/ispvideo.c | 20 ++++++++++++++------ drivers/media/platform/omap3isp/ispvideo.h | 4 ++-- 5 files changed, 33 insertions(+), 19 deletions(-) commit 74a4133079f739eb2f4604263fdb974ce10120a8 Author: Sakari Ailus Date: Wed Dec 16 11:32:29 2015 -0200 [media] media: Keep using the same graph walk object for a given pipeline Initialise a given graph walk object once, and then keep using it whilst the same pipeline is running. Once the pipeline is stopped, release the graph walk object. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 17 +++++++++++------ include/media/media-entity.h | 4 +++- 2 files changed, 14 insertions(+), 7 deletions(-) commit 29d8da02d13020a18929a30692d454bd863d4207 Author: Sakari Ailus Date: Wed Dec 16 11:32:28 2015 -0200 [media] media: Use entity enums in graph walk This will also mean that the necessary graph related data structures will be allocated dynamically, removing the need for maximum ID checks. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 16 ++++++---------- include/media/media-entity.h | 4 ++-- 2 files changed, 8 insertions(+), 12 deletions(-) commit c1a5f1bc0b7a585efaeda40c1eb8f5f4bd9d328d Author: Sakari Ailus Date: Wed Dec 16 15:32:27 2015 +0200 [media] v4l: vsp1: Use the new media graph walk interface The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 08613c549ff5ac98d04d9dd28a4ffafa3918e2ca Author: Sakari Ailus Date: Wed Dec 16 11:32:26 2015 -0200 [media] v4l: xilinx: Use the new media graph walk interface The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus Cc: Hyun Kwon Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/xilinx/xilinx-dma.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fd7e5309a5324c243cb285257a2e5e35d9bcaa56 Author: Sakari Ailus Date: Wed Dec 16 15:32:25 2015 +0200 [media] v4l: exynos4-is: Use the new media graph walk interface The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus Cc: Javier Martinez Canillas Cc: Kamil Debski Cc: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/media-dev.c | 31 +++++++++++++++++---------- drivers/media/platform/exynos4-is/media-dev.h | 1 + 2 files changed, 21 insertions(+), 11 deletions(-) commit 28461451c0fc943fa9271e653483857f20d9b489 Author: Sakari Ailus Date: Wed Dec 16 11:32:24 2015 -0200 [media] v4l: omap3isp: Use the new media graph walk interface The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 63 ++++++++++++++++++------------ drivers/media/platform/omap3isp/isp.h | 4 +- drivers/media/platform/omap3isp/ispvideo.c | 20 +++++++++- drivers/media/platform/omap3isp/ispvideo.h | 1 + 4 files changed, 61 insertions(+), 27 deletions(-) commit 106b9907c368e32d0b01d8ea682c44ef811e6e36 Author: Sakari Ailus Date: Wed Dec 16 15:32:23 2015 +0200 [media] media: Use the new media graph walk interface The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e03d220336dd69292370393f5eee98ac17eda308 Author: Sakari Ailus Date: Wed Dec 16 11:32:22 2015 -0200 [media] media: Amend media graph walk API by init and cleanup functions Add media_entity_graph_walk_init() and media_entity_graph_walk_cleanup() functions in order to dynamically allocate memory for the graph. This is not done in media_entity_graph_walk_start() as there are situations where e.g. correct error handling, that itself may not fail, requires successful graph walk. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 27 +++++++++++++++++++++++++++ include/media/media-entity.h | 17 ++++++++++++----- 2 files changed, 39 insertions(+), 5 deletions(-) commit 5dd8775dc6b480f67be11108d7cd798fba724cab Author: Sakari Ailus Date: Wed Dec 16 11:32:21 2015 -0200 [media] media: Move media graph state for streamon/off to the pipeline The struct media_entity_graph was allocated in the stack, limiting the number of entities that could be reasonably allocated. Instead, move the struct to struct media_pipeline which is typically allocated using kmalloc() instead. The intent is to keep the enumeration around for later use for the duration of the streaming. As streaming is eventually stopped, an unfortunate memory allocation failure would prevent stopping the streaming. As no memory will need to be allocated, the problem is avoided altogether. Signed-off-by: Sakari Ailus Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 16 ++++++++-------- include/media/media-entity.h | 6 ++++++ 2 files changed, 14 insertions(+), 8 deletions(-) commit 434257f19ce0a6b635a84882257034ae79d2f274 Author: Sakari Ailus Date: Wed Dec 16 11:32:20 2015 -0200 [media] media: Add KernelDoc documentation for struct media_entity_graph KernelDoc doesn't appear to handle anonymous structs defined inside another gracefully. As the struct is internal to the framework graph walk algorithm, detailed documentation isn't seen very important. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 82c682905dbc9785f26711e34cb4d16ba3a798d7 Author: Sakari Ailus Date: Wed Dec 16 11:32:19 2015 -0200 [media] media: Move struct media_entity_graph definition up It will be needed in struct media_pipeline shortly. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c8d54cd53b43c514fbd8d36abf0f2f00f719dd54 Author: Sakari Ailus Date: Wed Dec 16 11:44:32 2015 -0200 [media] media: Add an API to manage entity enumerations This is useful in e.g. knowing whether certain operations have already been performed for an entity. The users include the framework itself (for graph walking) and a number of drivers. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 40 ++++++++++++ include/media/media-device.h | 15 +++++ include/media/media-entity.h | 141 ++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 188 insertions(+), 8 deletions(-) commit 665faa971d087e8b968ef75d04079a7a462ddfca Author: Sakari Ailus Date: Wed Dec 16 11:32:17 2015 -0200 [media] media: Introduce internal index for media entities The internal index can be used internally by the framework in order to keep track of entities for a purpose or another. The internal index is constant while it's registered to a media device, but the same index may be re-used once the entity having that index is unregistered. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 17 +++++++++++++++++ include/media/media-device.h | 4 ++++ include/media/media-entity.h | 3 +++ 3 files changed, 24 insertions(+) commit 1630b832355399dd0dc4fcc2cadbcad47153a748 Author: Dan Carpenter Date: Tue Dec 15 09:04:14 2015 -0200 [media] v4l2-device: fix a missing error code We need to set "err = -ENOMEM" here. Fixes: 38b11f19667a ('[media] v4l2-core: create MC interfaces for devnodes') Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a5c82e5622d1b7f479c9a43873c2c5ac1f67765c Author: Dan Carpenter Date: Tue Dec 15 09:00:40 2015 -0200 [media] media-device: copy_to/from_user() returns positive The copy_to/from_user() functions return the number of bytes *not* copied. They don't return error codes. Fixes: 4f6b3f363475 ('media] media-device: add support for MEDIA_IOC_G_TOPOLOGY ioctl') Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8a95079668bf35b265d3bb6381b8badb5bfa826a Author: Javier Martinez Canillas Date: Fri Dec 11 20:57:09 2015 -0200 [media] media-device: set topology version 0 at media registration The G_TOPOLOGY ioctl is used to get a graph topology and since in the future a graph can be dynamically updated, there is a way to know the topology version so userspace can be aware that the graph has changed. The version 0 is reserved to indicate that the graph is static (i.e no graphs updates since the media device was registered). So, now that the media device initialization and registration has been split and the media device node is not exposed to user-space until all the entities have been registered and links created, it is safe to set a topology version 0 in media_device_register(). Suggested-by: Laurent Pinchart Suggested-by: Mauro Carvalho Chehab Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 4 ++++ 1 file changed, 4 insertions(+) commit bdf5c198261cdda8dcc5375315afe9d8bf4d77d1 Author: Sakari Ailus Date: Mon Dec 28 01:45:00 2015 +0200 [media] v4l2-device: Register entity before calling subdev's registered ops Registering a V4L2 sub-device includes, among other things, registering the related media entity and calling the sub-device's registered op. Since patch "media: convert links from array to list", creating a link between two pads requires registering the entity first. If the registered() op involves link creation, the link list head will not be initialised before it is used. Resolve this by first registering the entity, then calling its registered() op. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-device.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 9f80679511b0544d1ed8c9bc2d80030183e9f1ed Author: Mauro Carvalho Chehab Date: Mon Dec 28 09:55:49 2015 -0200 [media] usb: check media device errors There are now two new warnings: drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usbv2_media_device_register': drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:433:2: warning: ignoring return value of '__media_device_register', declared with attribute warn_unused_result [-Wunused-result] media_device_register(adap->dvb_adap.mdev); ^ drivers/media/usb/dvb-usb/dvb-usb-dvb.c: In function 'dvb_usb_media_device_register': drivers/media/usb/dvb-usb/dvb-usb-dvb.c:128:2: warning: ignoring return value of '__media_device_register', declared with attribute warn_unused_result [-Wunused-result] media_device_register(adap->dvb_adap.mdev); ^ Those are because the drivers are not properly checking if the media device init and register were succeeded. Fix it. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 16 ++++++++++++---- drivers/media/usb/cx231xx/cx231xx-cards.c | 13 ++++++++++--- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 23 ++++++++++++++++------- drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 22 ++++++++++++++++------ 4 files changed, 54 insertions(+), 20 deletions(-) commit 9832e155f1ed3030fdfaa19e72c06472dc2ecb1d Author: Javier Martinez Canillas Date: Fri Dec 11 20:57:08 2015 -0200 [media] media-device: split media initialization and registration The media device node is registered and so made visible to user-space before entities are registered and links created which means that the media graph obtained by user-space could be only partially enumerated if that happens too early before all the graph has been created. To avoid this race condition, split the media init and registration in separate functions and only register the media device node when all the pending subdevices have been registered, either explicitly by the driver or asynchronously using v4l2_async_register_subdev(). The media_device_register() had a check for drivers not filling dev and model fields but all drivers in mainline set them and not doing it will be a driver bug so change the function return to void and add a BUG_ON() for dev being NULL instead. Also, add a media_device_cleanup() function that will destroy the graph_mutex that is initialized in media_device_init(). [mchehab@osg.samsung.com: Fix compilation if !CONFIG_MEDIA_CONTROLLER and remove two warnings added by this changeset] Suggested-by: Sakari Ailus Signed-off-by: Javier Martinez Canillas Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/common/siano/smsdvb-main.c | 1 + drivers/media/media-device.c | 37 +++++++++++++++++++++------ drivers/media/platform/exynos4-is/media-dev.c | 15 +++++------ drivers/media/platform/omap3isp/isp.c | 14 +++++----- drivers/media/platform/s3c-camif/camif-core.c | 15 +++++++---- drivers/media/platform/vsp1/vsp1_drv.c | 12 ++++----- drivers/media/platform/xilinx/xilinx-vipp.c | 12 +++------ drivers/media/usb/au0828/au0828-core.c | 29 +++++++++++---------- drivers/media/usb/cx231xx/cx231xx-cards.c | 32 +++++++++++------------ drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 23 +++++++++-------- drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 25 ++++++++++-------- drivers/media/usb/siano/smsusb.c | 5 ++-- drivers/media/usb/uvc/uvc_driver.c | 11 +++++--- include/media/media-device.h | 26 +++++++++++++++++++ 14 files changed, 158 insertions(+), 99 deletions(-) commit 821ed3662913faca0653c201fa9e36fbab81f17c Author: Mauro Carvalho Chehab Date: Tue Dec 15 08:36:51 2015 -0200 [media] media-device: better lock media_device_unregister() If media_device_unregister() is called by two different drivers, a race condition may happen, as the check if the device is not registered is not protected. Move the spin_lock() to happen earlier in the function, in order to prevent such race condition. Reported-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit b2ed8af910a436e12038f8ec8ca6c039f43767a4 Author: Mauro Carvalho Chehab Date: Tue Dec 15 08:26:52 2015 -0200 [media] media-device: move media entity register/unregister functions media entity register and unregister functions are called by media device register/unregister. Move them to occur earlier, as we'll need an unlocked version of media_device_entity_unregister() and we don't want to add a function prototype without needing it. No functional changes. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 160 +++++++++++++++++++++---------------------- 1 file changed, 80 insertions(+), 80 deletions(-) commit 223d19c56651a0204253035f9ed28834653d2b4b Author: Javier Martinez Canillas Date: Fri Dec 11 20:57:07 2015 -0200 [media] media-device: check before unregister if mdev was registered Most media functions that unregister, check if the corresponding register function succeed before. So these functions can safely be called even if a registration was never made or the component as already been unregistered. Add the same check to media_device_unregister() function for consistency. This will also allow to split the media_device_register() function in an initialization and registration functions without the need to change the generic cleanup functions and error code paths for all the media drivers. Suggested-by: Sakari Ailus Signed-off-by: Javier Martinez Canillas Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cc4a82581cb604444b0f9f2e7d999624964695e2 Author: Mauro Carvalho Chehab Date: Tue Dec 15 08:01:13 2015 -0200 [media] media-entity: cache media_device on object removal As pointed by Dan, the commit f8fd4c61b5ae ("[media] media-entity: protect object creation/removal using spin lock")' leads to the following static checker warning: drivers/media/media-entity.c:781 media_remove_intf_link() error: dereferencing freed memory 'link' drivers/media/media-entity.c 777 void media_remove_intf_link(struct media_link *link) 778 { 779 spin_lock(&link->graph_obj.mdev->lock); 780 __media_remove_intf_link(link); 781 spin_unlock(&link->graph_obj.mdev->lock); In practice, I didn't see any troubles even with KASAN enabled. I guess gcc optimizer internally cached the mdev reference, instead of getting it twice. Yet, it is a very bad idea to rely on such optimization. So, let's fix the code. Reported-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 5c883edb5b2c34e96e57037c95f9a72c4feccc50 Author: Mauro Carvalho Chehab Date: Tue Dec 15 07:58:18 2015 -0200 [media] media-entity: use mutes for link setup Changeset f8fd4c61b5ae ("[media] media-entity: protect object creation/removal using spin lock") changed the object creation/removal protection to spin lock, as this is what's used on media-device, keeping the mutex reserved for graph traversal routines. However, it also changed the link setup, by mistake. This could cause troubles, as the link setup can affect the graph traversal, and this is likely the reason for a mutex there. So, revert media_entity_setup_link() to use mutex. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75c7e295707e7a9d13691377f2154dcbae9a25f8 Author: Mauro Carvalho Chehab Date: Sun Dec 13 09:00:00 2015 -0200 [media] media-devnode.h: document the remaining struct/functions There is one struct and two functions that were not documented. Add the corresponding kernel-doc documentation for them. Signed-off-by: Mauro Carvalho Chehab include/media/media-devnode.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit fe3c565e4cbcb2adeef063accc7852de739aaa36 Author: Mauro Carvalho Chehab Date: Sun Dec 13 08:40:45 2015 -0200 [media] media-devnode: move kernel-doc documentation to the header As we're using the headers file only for documentation, move the two kernel-doc macros to the header, and fix it to avoid warnings. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-devnode.c | 24 ------------------------ include/media/media-devnode.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 24 deletions(-) commit b6e4ca8129ad65a0b1552586c1d42d2fd219661e Author: Mauro Carvalho Chehab Date: Sun Dec 13 08:36:58 2015 -0200 [media] media-device.h: document the last functions Add kernel-doc documentation for media_device_get_devres and media_device_find_devres. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 7 ------- include/media/media-device.h | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) commit 60266185d7f3eeae5714090e1e10840b96df91d2 Author: Mauro Carvalho Chehab Date: Sun Dec 13 08:20:46 2015 -0200 [media] media-entity.h: Document some ancillary functions Add a basic documentation for most ancillary functions. Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 58 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit 8aaf62b5b9bef73978973e4b825c7818528d3ca2 Author: Sakari Ailus Date: Sun Nov 29 17:20:02 2015 -0200 [media] media: Enforce single entity->pipe in a pipeline If a different entity->pipe in a pipeline was encountered, a warning was issued but the execution continued as if nothing had happened. Return an error instead right there. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 677cb4bfc23e7fd8f49d2d10af64f171942fab84 Author: Mauro Carvalho Chehab Date: Sat Dec 12 10:56:13 2015 -0200 [media] DocBook: Document MEDIA_IOC_G_TOPOLOGY Add description for this new media controller ioctl. Signed-off-by: Mauro Carvalho Chehab .../DocBook/media/v4l/media-controller.xml | 1 + .../DocBook/media/v4l/media-ioc-g-topology.xml | 391 +++++++++++++++++++++ 2 files changed, 392 insertions(+) commit dc7339bf119111d5c08156980ea742fc4120ce19 Author: Mauro Carvalho Chehab Date: Sat Dec 12 10:54:45 2015 -0200 [media] DocBook: add a table for Media Controller interfaces Document the media controller interfaces at the media uAPI docbook. Signed-off-by: Mauro Carvalho Chehab Documentation/DocBook/media/v4l/media-types.xml | 61 +++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit eb7d970aa0ab9964fe3200df4daf76c37d35f076 Author: Mauro Carvalho Chehab Date: Sat Dec 12 10:29:30 2015 -0200 [media] Docbook: media-types.xml: update the existing tables There were some changes on the media types that were not reflected on the types tables. Update them to reflect the upstream changes. Signed-off-by: Mauro Carvalho Chehab Documentation/DocBook/media/v4l/media-types.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 5fec921f49891e1343d60df3f6f40ceb52acdd42 Author: Mauro Carvalho Chehab Date: Sat Dec 12 09:56:07 2015 -0200 [media] DocBook: move data types to a separate section As MEDIA_IOC_G_TOPOLOGY shares the data types already declared for entities, pads and links, we should move those to a separate part of the document, and use cross-references where needed. So, move the following tables to a separate section at the DocBook: media-entity-type media-entity-flag media-pad-flag media-link-flag Signed-off-by: Mauro Carvalho Chehab .../DocBook/media/v4l/media-controller.xml | 3 + .../DocBook/media/v4l/media-ioc-enum-entities.xml | 104 ------------- .../DocBook/media/v4l/media-ioc-enum-links.xml | 56 ------- Documentation/DocBook/media/v4l/media-types.xml | 166 +++++++++++++++++++++ 4 files changed, 169 insertions(+), 160 deletions(-) commit b7870d692d7b0718f7153aed9e7a32f0119b525d Author: Mauro Carvalho Chehab Date: Sat Dec 12 08:59:14 2015 -0200 [media] DocBook: MC: add the concept of interfaces The Media Controller next generation patches added a new graph element type: interfaces. It also allows links between interfaces and entities. Update the docbook to reflect that. Signed-off-by: Mauro Carvalho Chehab .../DocBook/media/v4l/media-controller.xml | 40 ++++++++++++++-------- 1 file changed, 26 insertions(+), 14 deletions(-) commit fdc40b5e95ac6480f6160081774aa2ec24784ccb Author: Mauro Carvalho Chehab Date: Sat Dec 12 08:25:44 2015 -0200 [media] dvbdev: Document the new MC-related fields The Media Controller next gen patchset added several new fields to be used with it. Document them. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b3109d662d744c065f2a1da5e9b8d08f2189c2ac Author: Mauro Carvalho Chehab Date: Fri Dec 11 18:26:53 2015 -0200 [media] media.h: let be clear that tuners need to use connectors The V4L2 core won't be adding connectors to the tuners and other entities that need them. Let it be clear. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 82ae2a50597565cbb2c758b44a3f39adb158ef0a Author: Mauro Carvalho Chehab Date: Fri Dec 11 18:09:13 2015 -0200 [media] media: move MEDIA_LNK_FL_INTERFACE_LINK logic to link creation Instead of flagging an interface link as MEDIA_LNK_FL_INTERFACE_LINK only when returning to userspace, do it at link creation time. That would allow using such flag internally, and cleans up a little bit the code for G_TOPOLOGY ioctl. [mchehab@osg.samsung.com: folded with a fixup from Dan Carpenter, replacing & by &&] Suggested-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 3 --- drivers/media/media-entity.c | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) commit 313895fba2040c7f223db3d6aa6cb3b5c5022042 Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:36 2015 -0200 [media] media-entity: remove unneded enclosing parenthesis Commit 86ee417578a2 ("[media] media: convert links from array to list") had many changes that were automated using coccinelle but the semantic patch was not smart enough to rely on operators precedence and avoid using unnecessary enclosing parenthesis. This patch removes them since are not needed. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1cb2f6f4b1652ad4e19894a4b4b82b0c2ea8a4b6 Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:35 2015 -0200 [media] uvcvideo: register entity subdev on init The uvc_mc_register_entities() function iterated over the entities three times to initialize the entities, register the subdev for the ones whose type was UVC_TT_STREAMING and to create the entities links. But this can be simplied by merging the init and registration logic in a single loop. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_entity.c | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) commit 552faf4c083d8e86c6d86160ae3da0412280f690 Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:34 2015 -0200 [media] uvcvideo: remove pads prefix from uvc_mc_create_pads_links() The function uvc_mc_create_pads_links() creates entities links but the "pads" prefix is redundant since the driver doesn't handle any other kind of link, so it can be removed. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_entity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1488eee3b46736eefd9aec1e9d944f7a828773b9 Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:33 2015 -0200 [media] v4l: vsp1: use else if instead of continue when creating links The for loop in the vsp1_create_entities() function that create the links, checks the entity type and call the proper link creation function but then it uses continue to force the next iteration of the loop to take place and skipping code in between that creates links for different entities types. It is more readable and easier to understand if the if else constructs is used instead of the continue statement. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drv.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit d8a2cf41cc1c1b4af35eaf0414f83653b7b17c8b Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:32 2015 -0200 [media] v4l: vsp1: remove pads prefix from *_create_pads_links() The functions that create entities links are called *_create_pads_links() but the "pads" prefix is redundant since the driver doesn't handle any other kind of link so it can be removed. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drv.c | 4 ++-- drivers/media/platform/vsp1/vsp1_rpf.c | 4 ++-- drivers/media/platform/vsp1/vsp1_rwpf.h | 4 ++-- drivers/media/platform/vsp1/vsp1_wpf.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit 04e021511abc189ca43f1f11ec53121b9345c9fa Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:31 2015 -0200 [media] staging: omap4iss: remove pads prefix from *_create_pads_links() The functions that create ISS internal and external entities links are called *_create_pads_links() but the "pads" prefix is redundant since the driver doesn't handle any other kind of link so it can be removed. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss.c | 12 ++++++------ drivers/staging/media/omap4iss/iss_csi2.c | 4 ++-- drivers/staging/media/omap4iss/iss_csi2.h | 2 +- drivers/staging/media/omap4iss/iss_ipipeif.c | 4 ++-- drivers/staging/media/omap4iss/iss_ipipeif.h | 2 +- drivers/staging/media/omap4iss/iss_resizer.c | 4 ++-- drivers/staging/media/omap4iss/iss_resizer.h | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) commit 06a1368faf2184c71f086bfc13e81ea153d98798 Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:30 2015 -0200 [media] omap3isp: consistently use v4l2_dev var in complete notifier The isp_subdev_notifier_complete() complete callback defines a struct v4l2_device *v4l2_dev to avoid needing two level of indirections to access the V4L2 subdevs but the var is not always used when possible as when calling v4l2_device_register_subdev_nodes(). So change that to consistently use the defined v4l2_dev pointer var. Suggested-by: Sakari Ailus Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a64860e56b2f97bdcd367a6e10624cd0e51b5406 Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:29 2015 -0200 [media] omap3isp: rename single labels to just error Commit bc36b30fe06b ("[media] omap3isp: separate links creation from entities init") moved the link creation logic from the entities init functions and so removed the error_link labels from the error paths. But after that, some functions have a single error label so it makes more sense to rename the label to just "error" in thi case. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/ispccdc.c | 4 ++-- drivers/media/platform/omap3isp/ispccp2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit b285d5afcf80270fafc57b1a7f1ffab9e77e4686 Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:28 2015 -0200 [media] omap3isp: remove pads prefix from isp_create_pads_links() The function that creates the links between ISP internal and external entities is called isp_create_pads_links() but the "pads" prefix is redundant since the driver doesn't handle any other kind of link so it can just be removed. While being there, fix the function's kernel-doc since is not using a proper format. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit b5f6df0607b767fe48b179c6ccee204ee17c3373 Author: Javier Martinez Canillas Date: Fri Dec 11 15:16:27 2015 -0200 [media] omap3isp: remove per ISP module link creation functions The entities to video nodes links were created on separate functions for each ISP module but since the only thing that these functions do is to call media_create_pad_link(), there's no need for that indirection level and all link creation logic can be just inlined in the caller function. Also, since the only possible failure for the link creation is a memory allocation, there is no need for error messages since the core already reports a very verbose message in that case. Suggested-by: Laurent Pinchart Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 56 +++++++++++++++++----------- drivers/media/platform/omap3isp/ispccdc.c | 14 ------- drivers/media/platform/omap3isp/ispccdc.h | 1 - drivers/media/platform/omap3isp/ispccp2.c | 14 ------- drivers/media/platform/omap3isp/ispccp2.h | 1 - drivers/media/platform/omap3isp/ispcsi2.c | 14 ------- drivers/media/platform/omap3isp/ispcsi2.h | 1 - drivers/media/platform/omap3isp/isppreview.c | 20 ---------- drivers/media/platform/omap3isp/isppreview.h | 1 - drivers/media/platform/omap3isp/ispresizer.c | 20 ---------- drivers/media/platform/omap3isp/ispresizer.h | 1 - 11 files changed, 35 insertions(+), 108 deletions(-) commit b3b7a9f138b7539c25e036d398616f6737b08ff7 Author: Mauro Carvalho Chehab Date: Fri Dec 11 16:07:57 2015 -0200 [media] media-device: Use u64 ints for pointers By using u64 integers and pointers, we can get rid of compat32 logic. So, let's do it! Suggested-by: Arnd Bergmann Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 77 +++++++++++++++++++++++--------------------- include/uapi/linux/media.h | 32 +++++++++--------- 2 files changed, 58 insertions(+), 51 deletions(-) commit d1b9da2d606ecec587177c4c90f1905c57538149 Author: Mauro Carvalho Chehab Date: Fri Dec 11 12:41:12 2015 -0200 [media] media-device.h: Let clearer that entity function must be initialized Improve the documentation to let it clear that the entity function must be initialized. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab include/media/media-device.h | 4 ++++ include/uapi/linux/media.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 829de29bfe5a0568831f1c52a760306d642d99d4 Author: Mauro Carvalho Chehab Date: Fri Dec 11 12:23:23 2015 -0200 [media] media: use unsigned for pad index The pad index is unsigned. Replace the occurences of it where pertinent. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/ispccdc.c | 2 +- drivers/media/platform/omap3isp/ispccp2.c | 2 +- drivers/media/platform/omap3isp/ispcsi2.c | 2 +- drivers/media/platform/omap3isp/isppreview.c | 2 +- drivers/media/platform/omap3isp/ispresizer.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_isif.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 2 +- drivers/staging/media/omap4iss/iss_csi2.c | 2 +- drivers/staging/media/omap4iss/iss_ipipeif.c | 2 +- drivers/staging/media/omap4iss/iss_resizer.c | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit 1fc25d30a40c27b85510e6e598aec629532eb85c Author: Mauro Carvalho Chehab Date: Fri Dec 11 12:14:58 2015 -0200 [media] media-entity.h: move kernel-doc tags from media-entity.c Several additional functions are described at media-entity.c. Moving them to the header file, to make the code cleaner and to have all such macros at the same place. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 163 +++---------------------------------------- include/media/media-entity.h | 136 +++++++++++++++++++++++++++++++++++- 2 files changed, 145 insertions(+), 154 deletions(-) commit c350ef830f2c3dfe80e9a777c8a64ac1fb186b9a Author: Mauro Carvalho Chehab Date: Fri Dec 11 11:55:40 2015 -0200 [media] media_entity: rename media_obj functions to *_create *_destroy Those media_obj_* functions are actually creating/destroying media graph objects. So, rename them to better represent what they're actually doing. No functional changes. This was created via this small shell script: for i in $(git grep -l media_gobj_init); do sed s,media_gobj_init,media_gobj_create,g <$i >a && mv a $i; done for i in $(git grep -l media_gobj_remove); do sed s,media_gobj_remove,media_gobj_destroy,g <$i >a && mv a $i; done Suggested-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 10 +++++----- drivers/media/media-entity.c | 26 +++++++++++++------------- include/media/media-entity.h | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) commit 58f69ee9da3a2486450dac626c352f69faf964e9 Author: Mauro Carvalho Chehab Date: Fri Dec 11 11:25:23 2015 -0200 [media] media_entity: get rid of a unused var > > > + if (rlink != link->reverse) { > > > + r++; > > > > The variable is incremented here but otherwise never used, you can remove it. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5abad22fd1402c23da1f6ade8cec59ac07a28fc5 Author: Mauro Carvalho Chehab Date: Fri Dec 11 11:19:38 2015 -0200 [media] media-entity: get rid of forward __media_entity_remove_link() declaration Move this function to happen earlier, in order to avoid a uneeded forward declaration. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 67 +++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 35 deletions(-) commit 97d0a70ae5e2391f213966a69c3b6f96f2c9f25b Author: Mauro Carvalho Chehab Date: Fri Dec 11 11:12:57 2015 -0200 [media] media: remove extra blank lines No functional changes. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 3 --- include/media/media-device.h | 2 -- 2 files changed, 5 deletions(-) commit db7ee32aa1859c155e634a4d5c44b9cff4c9a6e5 Author: Mauro Carvalho Chehab Date: Fri Dec 11 11:06:08 2015 -0200 [media] media-device.h: Improve documentation and update it Now that we moved the content of the media-framework.txt into the kerneldoc documentation, move the per-function specific documentation to the corresponding functions and clean it up. It would be good if we had already the markdown kernel-doc patches merged upstream, but, while we doesn't have it, let's make it less ugly at device-drivers.xml. Signed-off-by: Mauro Carvalho Chehab include/media/media-device.h | 429 +++++++++++++++++++------------------------ include/media/media-entity.h | 148 +++++++++++++++ 2 files changed, 339 insertions(+), 238 deletions(-) commit f1fd3289e8c2b99cdf5c1c4426a7d28a809159c2 Author: Mauro Carvalho Chehab Date: Fri Dec 11 09:13:23 2015 -0200 [media] media-entity.h: convert media_entity_cleanup to inline This function was used in the past to free the links that were allocated by the media controller core. However, this is not needed anymore. We should likely get rid of the funcion on some function, but, for now, let's just convert into an inlined function and let the compiler to get rid of it. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 6 ------ include/media/media-entity.h | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) commit cc2dd94a051c8a467c66a258391cb980c3fb3312 Author: Mauro Carvalho Chehab Date: Fri Dec 11 08:21:39 2015 -0200 [media] DocBook: Move media-framework.txt contents to media-device.h Instead of using a text file, let's put it together with the struct documentation for the Media Controller. Signed-off-by: Mauro Carvalho Chehab Documentation/DocBook/device-drivers.tmpl | 1 + Documentation/media-framework.txt | 373 ----------------------------- include/media/media-device.h | 378 ++++++++++++++++++++++++++++++ 3 files changed, 379 insertions(+), 373 deletions(-) commit 8ed8c88c460fa6ce71deb9847f78a5bff4dfcb0e Author: Mauro Carvalho Chehab Date: Fri Dec 11 08:02:19 2015 -0200 [media] media-entity.h: get rid of revision and group_id fields Both revision and group_id fields were never used and were always initialized to zero. Remove them. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml | 13 ++----------- Documentation/media-framework.txt | 12 +++++------- drivers/media/media-device.c | 4 ++-- include/media/media-entity.h | 4 ---- 4 files changed, 9 insertions(+), 24 deletions(-) commit ab22e77cd3d3073c8cac51b59713ef635678dfbe Author: Mauro Carvalho Chehab Date: Fri Dec 11 07:44:40 2015 -0200 [media] media framework: rename pads init function to media_entity_pads_init() With the MC next gen rework, what's left for media_entity_init() is to just initialize the PADs. However, certain devices, like a FLASH led/light doesn't have any input or output PAD. So, there's no reason why calling media_entity_init() would be mandatory. Also, despite its name, what this function actually does is to initialize the PADs data. So, rename it to media_entity_pads_init() in order to reflect that. The media entity actual init happens during entity register, at media_device_register_entity(). We should move init of num_links and num_backlinks to it. Signed-off-by: Mauro Carvalho Chehab Documentation/media-framework.txt | 18 +++++++++++------- Documentation/video4linux/v4l2-framework.txt | 8 ++++---- Documentation/zh_CN/video4linux/v4l2-framework.txt | 8 ++++---- drivers/media/dvb-core/dvbdev.c | 4 ++-- drivers/media/dvb-frontends/au8522_decoder.c | 2 +- drivers/media/i2c/ad9389b.c | 2 +- drivers/media/i2c/adp1653.c | 2 +- drivers/media/i2c/adv7180.c | 2 +- drivers/media/i2c/adv7511.c | 2 +- drivers/media/i2c/adv7604.c | 2 +- drivers/media/i2c/adv7842.c | 2 +- drivers/media/i2c/as3645a.c | 2 +- drivers/media/i2c/cx25840/cx25840-core.c | 2 +- drivers/media/i2c/lm3560.c | 2 +- drivers/media/i2c/lm3646.c | 2 +- drivers/media/i2c/m5mols/m5mols_core.c | 2 +- drivers/media/i2c/mt9m032.c | 2 +- drivers/media/i2c/mt9p031.c | 2 +- drivers/media/i2c/mt9t001.c | 2 +- drivers/media/i2c/mt9v032.c | 2 +- drivers/media/i2c/noon010pc30.c | 2 +- drivers/media/i2c/ov2659.c | 2 +- drivers/media/i2c/ov9650.c | 2 +- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 4 ++-- drivers/media/i2c/s5k4ecgx.c | 2 +- drivers/media/i2c/s5k5baf.c | 4 ++-- drivers/media/i2c/s5k6a3.c | 2 +- drivers/media/i2c/s5k6aa.c | 2 +- drivers/media/i2c/smiapp/smiapp-core.c | 6 +++--- drivers/media/i2c/tc358743.c | 2 +- drivers/media/i2c/tvp514x.c | 2 +- drivers/media/i2c/tvp7002.c | 2 +- drivers/media/media-device.c | 2 ++ drivers/media/media-entity.c | 11 ++++------- drivers/media/platform/exynos4-is/fimc-capture.c | 4 ++-- drivers/media/platform/exynos4-is/fimc-isp-video.c | 2 +- drivers/media/platform/exynos4-is/fimc-isp.c | 2 +- drivers/media/platform/exynos4-is/fimc-lite.c | 4 ++-- drivers/media/platform/exynos4-is/fimc-m2m.c | 2 +- drivers/media/platform/exynos4-is/mipi-csis.c | 2 +- drivers/media/platform/omap3isp/ispccdc.c | 2 +- drivers/media/platform/omap3isp/ispccp2.c | 2 +- drivers/media/platform/omap3isp/ispcsi2.c | 2 +- drivers/media/platform/omap3isp/isppreview.c | 2 +- drivers/media/platform/omap3isp/ispresizer.c | 2 +- drivers/media/platform/omap3isp/ispstat.c | 2 +- drivers/media/platform/omap3isp/ispvideo.c | 2 +- drivers/media/platform/s3c-camif/camif-capture.c | 4 ++-- drivers/media/platform/vsp1/vsp1_entity.c | 2 +- drivers/media/platform/vsp1/vsp1_video.c | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 2 +- drivers/media/platform/xilinx/xilinx-tpg.c | 2 +- drivers/media/usb/au0828/au0828-video.c | 6 +++--- drivers/media/usb/cx231xx/cx231xx-video.c | 4 ++-- drivers/media/usb/uvc/uvc_entity.c | 4 ++-- drivers/media/v4l2-core/tuner-core.c | 2 +- drivers/media/v4l2-core/v4l2-flash-led-class.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_isif.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 6 +++--- drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 +- drivers/staging/media/omap4iss/iss_csi2.c | 2 +- drivers/staging/media/omap4iss/iss_ipipe.c | 2 +- drivers/staging/media/omap4iss/iss_ipipeif.c | 2 +- drivers/staging/media/omap4iss/iss_resizer.c | 2 +- drivers/staging/media/omap4iss/iss_video.c | 2 +- include/media/media-entity.h | 2 +- 68 files changed, 102 insertions(+), 99 deletions(-) commit b83e250833e6c40a9e92935ea6fc125b64792357 Author: Mauro Carvalho Chehab Date: Fri Dec 11 07:25:01 2015 -0200 [media] media-device: better name Kernelspace/Userspace links The __media_device_enum_links() copies links definitions from Kernelspace to userspace. It has to work with 3 structs that handle with links. Better name them to: link: Kernelspace internal link representation, of the type media_link; klink_desc: struct media_link_desc pointer to the kernel memory where the data will be filled; ulink_desc: struct media_link_desc pointer to the memory where the data will be copied to userspace. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 497e80cdf98ac72aaa1a4860b833920e1ba23aef Author: Mauro Carvalho Chehab Date: Fri Dec 11 07:23:09 2015 -0200 [media] media-device: put headers in alphabetic order It is better to keep the headers in alphabetic order. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db141a355d8914fe80c9e4a6c25c686f64d7e905 Author: Javier Martinez Canillas Date: Tue Sep 8 14:10:56 2015 -0300 [media] media-entity: init pads on entity init if was registered before If an entity is registered with a media device before is initialized with media_device_register_entity(), the number of pads won't be set so media_device_register_entity() won't create pad objects and add it to the media device pads list. Do this at entity initialization time if the entity was registered before so the graph is complete and correct regardless of the order in which the entities are initialized and registered. Suggested-by: Mauro Carvalho Chehab Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9033b1a47038fdba388fc13613de23508dccb075 Author: Mauro Carvalho Chehab Date: Wed Sep 9 08:23:51 2015 -0300 [media] media-device: use unsigned ints on some places The entity->num_pads are defined as u16. So, better to use an unsigned int, as this prevents additional warnings when W=2 (or W=1 on some architectures). The "i" counter at __media_device_get_topology() is also a monotonic counter that should never be below zero. So, make it unsigned too. Suggested-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0b3b72df9018c0386293c2f529b91ed17448288a Author: Mauro Carvalho Chehab Date: Wed Sep 9 08:19:25 2015 -0300 [media] media_entity: remove gfp_flags argument We should not be creating device nodes at IRQ contexts. So, the only flags we'll be using will be GFP_KERNEL. Let's remove the gfp_flags, in order to make the interface simpler. If we ever need it, it would be easy to revert those changes. While here, remove an extra blank line. Suggested-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 3 +-- drivers/media/media-entity.c | 5 ++--- drivers/media/v4l2-core/v4l2-dev.c | 3 +-- include/media/media-entity.h | 4 +--- 4 files changed, 5 insertions(+), 10 deletions(-) commit 8ed071426ee48879024c350ae92fc41062039b13 Author: Mauro Carvalho Chehab Date: Sun Sep 6 13:38:23 2015 -0300 [media] dvbdev: Don't create indirect links Indirect links are those whose interface indirectly controls other functions. There are two interfaces that have indirect controls at the DVB side: - the network interface, which also controls the demux; - the DVR interface which also controls the demux. One could argue that the frontend control to the tuner is indirect. Well, that's debatable. There's no way to create subdev interfaces for tuner and demod, as those devices are tightly coupled. So, it was decided that just one interface is the best to control both entities, and there's no plan (or easy way) to decouple both. So, the DVB frontend interface should link to both entities. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 17813e2aa2f745545643df24af8f308bc36a04b0 Author: Mauro Carvalho Chehab Date: Sun Sep 6 13:28:48 2015 -0300 [media] dvbdev: move indirect links on dvr/demux to a separate function Cleanup the code a little bit by moving the routine that creates links between DVR and demux to the I/O entitis into a separate function. While here, fix the code to use strncmp() instead of strcmp(). Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 50 +++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 19 deletions(-) commit bd3ed12be1e1262adcb733bcf63e5da4d8772774 Author: Mauro Carvalho Chehab Date: Sun Sep 6 12:30:43 2015 -0300 [media] DocBook: update entities documentation Due to the rename, the documentation became outdated. Update it to reflect what's there at media.h. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../DocBook/media/v4l/media-ioc-enum-entities.xml | 64 ++++++++++++++-------- 1 file changed, 40 insertions(+), 24 deletions(-) commit 4ca72efaeffd0d244c44307abc9d4cb11f8ad475 Author: Mauro Carvalho Chehab Date: Thu Dec 10 17:25:41 2015 -0200 [media] uapi/media.h: Rename entities types to functions Rename the userspace types from MEDIA_ENT_T_ to MEDIA_ENT_F_ and add the backward compatibility bits. The changes at the .c files was generated by the following coccinelle script: @@ @@ -MEDIA_ENT_T_UNKNOWN +MEDIA_ENT_F_UNKNOWN @@ @@ -MEDIA_ENT_T_DVB_BASE +MEDIA_ENT_F_DVB_BASE @@ @@ -MEDIA_ENT_T_V4L2_BASE +MEDIA_ENT_F_V4L2_BASE @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_BASE +MEDIA_ENT_F_V4L2_SUBDEV_BASE @@ @@ -MEDIA_ENT_T_CONNECTOR_BASE +MEDIA_ENT_F_CONNECTOR_BASE @@ @@ -MEDIA_ENT_T_V4L2_VIDEO +MEDIA_ENT_F_IO_V4L @@ @@ -MEDIA_ENT_T_V4L2_VBI +MEDIA_ENT_F_IO_VBI @@ @@ -MEDIA_ENT_T_V4L2_SWRADIO +MEDIA_ENT_F_IO_SWRADIO @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN +MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN @@ @@ -MEDIA_ENT_T_CONN_RF +MEDIA_ENT_F_CONN_RF @@ @@ -MEDIA_ENT_T_CONN_SVIDEO +MEDIA_ENT_F_CONN_SVIDEO @@ @@ -MEDIA_ENT_T_CONN_COMPOSITE +MEDIA_ENT_F_CONN_COMPOSITE @@ @@ -MEDIA_ENT_T_CONN_TEST +MEDIA_ENT_F_CONN_TEST @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_SENSOR +MEDIA_ENT_F_CAM_SENSOR @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_FLASH +MEDIA_ENT_F_FLASH @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_LENS +MEDIA_ENT_F_LENS @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_DECODER +MEDIA_ENT_F_ATV_DECODER @@ @@ -MEDIA_ENT_T_V4L2_SUBDEV_TUNER +MEDIA_ENT_F_TUNER @@ @@ -MEDIA_ENT_T_DVB_DEMOD +MEDIA_ENT_F_DTV_DEMOD @@ @@ -MEDIA_ENT_T_DVB_DEMUX +MEDIA_ENT_F_TS_DEMUX @@ @@ -MEDIA_ENT_T_DVB_TSOUT +MEDIA_ENT_F_IO_DTV @@ @@ -MEDIA_ENT_T_DVB_CA +MEDIA_ENT_F_DTV_CA @@ @@ -MEDIA_ENT_T_DVB_NET_DECAP +MEDIA_ENT_F_DTV_NET_DECAP Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 20 ++-- drivers/media/dvb-frontends/au8522_decoder.c | 2 +- drivers/media/i2c/adp1653.c | 2 +- drivers/media/i2c/adv7180.c | 2 +- drivers/media/i2c/as3645a.c | 2 +- drivers/media/i2c/cx25840/cx25840-core.c | 2 +- drivers/media/i2c/lm3560.c | 2 +- drivers/media/i2c/lm3646.c | 2 +- drivers/media/i2c/m5mols/m5mols_core.c | 2 +- drivers/media/i2c/noon010pc30.c | 2 +- drivers/media/i2c/ov2659.c | 2 +- drivers/media/i2c/ov9650.c | 2 +- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 4 +- drivers/media/i2c/s5k4ecgx.c | 2 +- drivers/media/i2c/s5k5baf.c | 6 +- drivers/media/i2c/s5k6aa.c | 2 +- drivers/media/i2c/smiapp/smiapp-core.c | 2 +- drivers/media/i2c/tvp514x.c | 2 +- drivers/media/i2c/tvp7002.c | 2 +- drivers/media/media-device.c | 4 +- drivers/media/platform/xilinx/xilinx-dma.c | 2 +- drivers/media/usb/au0828/au0828-core.c | 4 +- drivers/media/usb/au0828/au0828-video.c | 8 +- drivers/media/usb/cx231xx/cx231xx-cards.c | 4 +- drivers/media/usb/cx231xx/cx231xx-video.c | 2 +- drivers/media/v4l2-core/tuner-core.c | 2 +- drivers/media/v4l2-core/v4l2-dev.c | 14 +-- drivers/media/v4l2-core/v4l2-flash-led-class.c | 2 +- drivers/media/v4l2-core/v4l2-subdev.c | 4 +- include/media/media-entity.h | 18 ++-- include/uapi/linux/media.h | 122 +++++++++++++------------ 31 files changed, 127 insertions(+), 121 deletions(-) commit d87cdb884486bfa795be99c83a5b3ac4d428ca84 Author: Mauro Carvalho Chehab Date: Sun Sep 6 10:59:08 2015 -0300 [media] media-device: export the entity function via new ioctl Now that entities have a main function, expose it via MEDIA_IOC_G_TOPOLOGY ioctl. Please notice that some entities may have secundary functions. Such use case will be addressed later, when we add support for the Media Controller properties. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 1 + include/uapi/linux/media.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 0e576b76f5470a2f8b2287958a2b9a3dd0f56f10 Author: Mauro Carvalho Chehab Date: Sun Sep 6 09:33:39 2015 -0300 [media] media-entity.h: rename entity.type to entity.function Entities should have one or more functions. Calling it as a type proofed to not be correct, as an entity could eventually have more than one type. So, rename the field as function. Please notice that this patch doesn't extend support for multiple function entities. Such change will happen when we have real case drivers using it. No functional changes. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/video4linux/v4l2-framework.txt | 4 ++-- drivers/media/dvb-core/dvbdev.c | 14 +++++++------- drivers/media/dvb-frontends/au8522_decoder.c | 2 +- drivers/media/i2c/adp1653.c | 2 +- drivers/media/i2c/as3645a.c | 2 +- drivers/media/i2c/cx25840/cx25840-core.c | 2 +- drivers/media/i2c/lm3560.c | 2 +- drivers/media/i2c/lm3646.c | 2 +- drivers/media/i2c/m5mols/m5mols_core.c | 2 +- drivers/media/i2c/noon010pc30.c | 2 +- drivers/media/i2c/ov2659.c | 2 +- drivers/media/i2c/ov9650.c | 2 +- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 4 ++-- drivers/media/i2c/s5k4ecgx.c | 2 +- drivers/media/i2c/s5k5baf.c | 6 +++--- drivers/media/i2c/s5k6aa.c | 2 +- drivers/media/i2c/smiapp/smiapp-core.c | 2 +- drivers/media/media-device.c | 6 +++--- drivers/media/platform/xilinx/xilinx-dma.c | 2 +- drivers/media/usb/au0828/au0828-core.c | 2 +- drivers/media/usb/au0828/au0828-video.c | 8 ++++---- drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- drivers/media/usb/cx231xx/cx231xx-video.c | 2 +- drivers/media/v4l2-core/tuner-core.c | 2 +- drivers/media/v4l2-core/v4l2-dev.c | 14 +++++++------- drivers/media/v4l2-core/v4l2-flash-led-class.c | 2 +- drivers/media/v4l2-core/v4l2-subdev.c | 6 +++--- include/media/media-entity.h | 9 +++++---- 28 files changed, 55 insertions(+), 54 deletions(-) commit 77328043d9e6feb12e53a4fc5485cf664d2878e4 Author: Mauro Carvalho Chehab Date: Fri Sep 4 16:08:24 2015 -0300 [media] media-entity: must check media_create_pad_link() Drivers should check if media_create_pad_link() actually worked. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4e26f3abafa9d0f635e105c8b9021f3b5bae6702 Author: Mauro Carvalho Chehab Date: Fri Sep 4 16:08:02 2015 -0300 [media] au0828: enforce check for graph creation If the graph creation fails, don't register the device. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 58 +++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 19 deletions(-) commit ab232e46bf01db5c540a00f478853a3572b0b88b Author: Mauro Carvalho Chehab Date: Fri Sep 4 16:07:03 2015 -0300 [media] cx231xx: enforce check for graph creation If the graph creation fails, don't register the device. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 40 ++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 14 deletions(-) commit 5e5387df0491679fb1210b231173c5279061e9c4 Author: Mauro Carvalho Chehab Date: Fri Sep 4 15:34:19 2015 -0300 [media] media-entity: enforce check of interface and links creation Drivers should check if interfaces and interface links were created. Add a must_check for them. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 0d3ab8410dcb60aef2104231ba817037b3ba73bd Author: Mauro Carvalho Chehab Date: Fri Sep 4 15:33:46 2015 -0300 [media] dvb core: must check dvb_create_media_graph() If media controller is enabled and mdev is filled, it should ensure that the media graph will be properly initialized. Enforce that. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/siano/smsdvb-main.c | 6 +++++- drivers/media/dvb-core/dvbdev.h | 2 +- drivers/media/usb/au0828/au0828-dvb.c | 8 +++++--- drivers/media/usb/cx231xx/cx231xx-dvb.c | 6 +++++- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 4 +++- drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 6 ++++-- 6 files changed, 23 insertions(+), 9 deletions(-) commit 13f6e8887a1f61764a05a3348476d38071201f08 Author: Mauro Carvalho Chehab Date: Fri Sep 4 15:39:43 2015 -0300 [media] v4l2 core: enable all interface links at init Interface links are normally enabled, meaning that the interfaces are bound to the entities. So, any ioctl send to the interface are reflected at the entities managed by the interface. However, when a device is used, other interfaces for the same hardware could be decoupled from the entities linked to them, because the hardware may have some parts busy. That's for example, what happens when an hybrid TV device is in use. If it is streaming analog TV or capturing signals from S-Video/Composite connectors, typically the digital part of the hardware can't be used and vice-versa. This is generally due to some internal hardware or firmware limitation, that it is not easily mapped via data pipelines. What the Kernel drivers do internally is that they decouple the hardware from the interface. So, all changes, if allowed, are done only at some interface cache, but not physically changed at the hardware. The usage is similar to the usage of the MEDIA_LNK_FL_ENABLED on data links. So, let's use the same flag to indicate if either the interface to entity link is bound/enabled or not. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-dev.c | 3 ++- drivers/media/v4l2-core/v4l2-device.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 39d1ebc6092f8266fb788733ca92b8492b1d69f2 Author: Mauro Carvalho Chehab Date: Sun Aug 30 09:53:57 2015 -0300 [media] media-device: supress backlinks at G_TOPOLOGY ioctl Due to the graph traversal algorithm currently in usage, we need a copy of all data links. Those backlinks should not be send to userspace, as otherwise, all links there will be duplicated. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 3 +++ drivers/media/media-entity.c | 1 + include/media/media-entity.h | 2 ++ 3 files changed, 6 insertions(+) commit 28b6ba1106b5864e6bdd1b75840ccf5b1ca3d1b7 Author: Mauro Carvalho Chehab Date: Mon Aug 31 13:23:28 2015 -0300 [media] au0828: Create connector links Now that connectors are entities, we need to represent the connector links. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit d1f337375aedb2999bdca24b40ba6e5c1a796eb4 Author: Mauro Carvalho Chehab Date: Mon Aug 31 11:43:09 2015 -0300 [media] au0828: add support for the connectors Depending on the input, an au0828 may have a different number of connectors. add entities to represent them. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 15 +++++++ drivers/media/usb/au0828/au0828-video.c | 76 ++++++++++++++++++++++++++++----- drivers/media/usb/au0828/au0828.h | 3 +- 3 files changed, 82 insertions(+), 12 deletions(-) commit 49a11518f84c6fda6b2740e592ce53e1a22311a3 Author: Mauro Carvalho Chehab Date: Mon Aug 31 11:41:29 2015 -0300 [media] media.h: create connector entities for hybrid TV devices Add entities to represent the connectors that exists inside a hybrid TV device. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit c358e80d70d97efc144e7d496c92985ad74218a8 Author: Mauro Carvalho Chehab Date: Sat Aug 29 23:43:03 2015 -0300 [media] media-entity.h: document all the structs Only a few structs are documented on kernel-doc-nano format (the ones added by the MC next gen patches). Add a documentation for all structs, and ensure that they'll be producing the documentation at the Kernel's device driver DocBook. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 114 +++++++++++++++++++++++++++++++------------ 1 file changed, 84 insertions(+), 30 deletions(-) commit d9c21e3e4b459b45e11406b83ebde163181508a1 Author: Mauro Carvalho Chehab Date: Mon Aug 24 08:47:54 2015 -0300 [media] v4l2-core: create MC interfaces for devnodes V4L2 device (and subdevice) nodes should create an interface, if the Media Controller support is enabled. Please notice that radio devices should not create an entity, as radio input/output is either via wires or via ALSA. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-dev.c | 111 ++++++++++++++++++++++++++++------ drivers/media/v4l2-core/v4l2-device.c | 16 ++++- include/media/v4l2-dev.h | 1 + 3 files changed, 109 insertions(+), 19 deletions(-) commit f50d51661af375c40cae894753e8cd9b1fe82c65 Author: Mauro Carvalho Chehab Date: Fri Sep 4 15:10:29 2015 -0300 [media] dvbdev: returns error if graph object creation fails Right now, if something gets wrong at dvb_create_media_entity() or at dvb_create_media_graph(), the device will still be registered. Change the logic to properly handle it and free all media graph objects if something goes wrong at dvb_register_device(). Also, change the logic at dvb_create_media_graph() to return an error code if something goes wrong. It is up to the caller to implement the right logic and to call dvb_unregister_device() to unregister the already-created objects. While here, add a missing logic to unregister the created interfaces. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 313 +++++++++++++++++++++++----------------- drivers/media/dvb-core/dvbdev.h | 7 +- drivers/media/media-device.c | 10 +- 3 files changed, 193 insertions(+), 137 deletions(-) commit eb83a5176801d53f9f78eff8c0bf03e627110206 Author: Mauro Carvalho Chehab Date: Thu Dec 10 15:29:22 2015 -0200 [media] media-entity: fix backlink removal on __media_entity_remove_link() The logic is testing if num_links==0 at the wrong place. Due to that, a backlink may be kept without removal, causing KASAN to complain about usage after free during either entity or link removal. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a9709e435454cf84d8971261ff8ded3a453b9b13 Author: Javier Martinez Canillas Date: Mon Aug 24 14:57:53 2015 -0300 [media] media: don't try to empty links list in media_entity_cleanup() The media_entity_cleanup() function only cleans up the entity links list but this operation is already made in media_device_unregister_entity(). In most cases this should be harmless (besides having duplicated code) since the links list would be empty so the iteration would not happen but the links list is initialized in media_device_register_entity() so if a driver fails to register an entity with a media device and clean up the entity in the error path, a NULL deference pointer error will happen. So don't try to empty the links list in media_entity_cleanup() since is either done already or haven't been initialized yet. Signed-off-by: Javier Martinez Canillas drivers/media/media-entity.c | 7 ------- 1 file changed, 7 deletions(-) commit 7e9a8ad57c097b7fe7ed9ba514f78789363aa6b8 Author: Mauro Carvalho Chehab Date: Thu Dec 10 10:58:04 2015 -0200 [media] au0828: postpone call to au0828_unregister_media_device() The DVB core needs to unregister the media device. So, we can't call au0828_unregister_media_device() before calling au0828_dvb_unregister(), otherwise the DVB MC free code (that will be implemented on the next patch) will fail. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 04bf12c2d313478a3e5c9ff59a7ba92ce418bee6 Author: Mauro Carvalho Chehab Date: Thu Dec 10 09:16:34 2015 -0200 [media] dvbdev: enable all interface links at init Interface links are normally enabled, meaning that the interfaces are bound to the entities. So, any ioctl sent to the interface are reflected at the entities managed by the interface. However, when a device is in use, other interfaces for the same hardware could be decoupled from the entities linked to them, because the hardware may have some parts busy. That's for example, what happens when an hybrid TV device is in use. If it is streaming analog TV or capturing signals from S-Video/Composite connectors, typically the digital part of the hardware can't be used and vice-versa. This is generally due to some internal hardware or firmware limitation, that it is not easily mapped via data pipelines. What the Kernel drivers do internally is that they decouple the hardware from the interface. So, all changes, if allowed, are done only at some interface cache, but not physically changed at the hardware. The usage is similar to the usage of the MEDIA_LNK_FL_ENABLED on data links. So, let's use the same flag to indicate if either the interface to entity link is bound/enabled or not. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 188d2d551244f4196b616c90f3411732a6ebb2ab Author: Mauro Carvalho Chehab Date: Mon Aug 31 13:23:03 2015 -0300 [media] tuner-core: add an input pad Tuners actually have at least one connector on its input. Add a PAD to connect it. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 5 ++++- drivers/media/usb/au0828/au0828-core.c | 5 ++++- drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- drivers/media/v4l2-core/tuner-core.c | 8 +++++--- include/media/tuner.h | 8 ++++++++ 5 files changed, 22 insertions(+), 6 deletions(-) commit a08fad1ec80c69c79b3ffb6d84968b0952d32da1 Author: Mauro Carvalho Chehab Date: Wed Dec 9 19:47:35 2015 -0200 [media] media-entity: protect object creation/removal using spin lock Some parts of the media controller are using mutexes while others are using spin locks in order to protect creation and removal of elements in the graph. That's wrong! Also, the V4L2 core can remove graph elements on non-interactive context: BUG: sleeping function called from invalid context at include/linux/sched.h:2776 Fix it by always using spin locks for graph element addition/removal, just like entity creation/removal is protected at media-device.c Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 16 ++++++++-------- include/media/media-device.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit d47109fa45ee2dc4e0b2710a8225e6c3ac7ea9fd Author: Mauro Carvalho Chehab Date: Sat Aug 29 21:23:44 2015 -0300 [media] media-device: remove interfaces and interface links Just like what's done with entities, when the media controller is unregistered, release any interface and interface links that might still be there. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 30 +++++++++++++++++++----------- drivers/media/media-entity.c | 6 +++++- include/media/media-entity.h | 1 + 3 files changed, 25 insertions(+), 12 deletions(-) commit a28971ad141bf41b8d6c24f8c4e8736be0c57677 Author: Mauro Carvalho Chehab Date: Sat Aug 29 19:07:09 2015 -0300 [media] remove interface links at media_entity_unregister() Interface links connected to an entity should be removed before the entity itself can be removed. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7c4696a910d404eda3477e76a35c155a6b83ca3e Author: Mauro Carvalho Chehab Date: Mon Aug 24 08:46:46 2015 -0300 [media] media-entity: unregister entity links Add functions to explicitly unregister all entity links. This function is called automatically when an entity link is destroyed. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 23 +++++++++++++++++++++++ include/media/media-entity.h | 3 +++ 2 files changed, 26 insertions(+) commit 8309f47c32c04aae30698389073ec8c6d1b7e986 Author: Mauro Carvalho Chehab Date: Sun Aug 23 10:36:41 2015 -0300 [media] media-device: add support for MEDIA_IOC_G_TOPOLOGY ioctl Add support for the new MEDIA_IOC_G_TOPOLOGY ioctl, according with the RFC for the MC next generation. Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 158 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) commit 2521fdac28d0ceea659be1620fef96b1cbff09b6 Author: Mauro Carvalho Chehab Date: Sun Aug 23 09:40:26 2015 -0300 [media] media_device: add a topology version field Every time a graph object is added or removed, the version of the topology changes. That's a requirement for the new MEDIA_IOC_G_TOPOLOGY, in order to allow userspace to know that the topology has changed after a previous call to it. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 5 +++++ include/media/media-device.h | 4 ++++ 2 files changed, 9 insertions(+) commit 9155d859b6bec29cdbbd80a509be35de55115f00 Author: Mauro Carvalho Chehab Date: Sun Aug 23 08:00:33 2015 -0300 [media] media-device: add pads and links to media_device The MC next gen API sends objects to userspace grouped by their types. In the case of pads and links, in order to improve performance and have a simpler code, the best is to store them also on separate linked lists at MC. If we don't do that, we would need this kind of interaction to send data to userspace (code is in structured english): for each entity: for each pad: store pads for each entity: for each link: store link for each interface: for each link: store link With would require one nested loop for pads and two nested loops for links. By using separate linked lists for them, just one loop would be enough. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 2 ++ drivers/media/media-entity.c | 17 ++++++----------- include/media/media-device.h | 12 ++++++++++++ 3 files changed, 20 insertions(+), 11 deletions(-) commit 05bfa9fa1cda91953e1b5975b059542b83c5245c Author: Mauro Carvalho Chehab Date: Sun Aug 23 07:51:33 2015 -0300 [media] media: move mdev list init to gobj Let's control the topology changes inside the graph_object. So, move the addition and removal of interfaces/entities from the mdev lists to media_gobj_init() and media_gobj_remove(). The main reason is that mdev should have lists for all object types, as the new MC api will require to store objects in separate places. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 4 +--- drivers/media/media-entity.c | 15 ++++++++++++--- include/media/media-device.h | 4 ++-- include/media/media-entity.h | 3 +-- 4 files changed, 16 insertions(+), 10 deletions(-) commit cf975a4b40ec9a947dae614b23128f3984a2d324 Author: Mauro Carvalho Chehab Date: Sun Aug 23 07:51:22 2015 -0300 [media] media: Use a macro to interate between all interfaces Just like we do with entities, use a similar macro for the interfaces loop. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 3 ++- include/media/media-device.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit c398bb6441949bd1f2acf5072116ecba143df03b Author: Mauro Carvalho Chehab Date: Sun Aug 23 08:28:21 2015 -0300 [media] uapi/media.h: Add MEDIA_IOC_G_TOPOLOGY ioctl Add a new ioctl that will report the entire topology on one go. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 2 + include/uapi/linux/media.h | 88 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 1 deletion(-) commit 6c24d4602ebee64128f29944d776c19d4d53fb54 Author: Mauro Carvalho Chehab Date: Fri Aug 21 18:26:42 2015 -0300 [media] media: report if a pad is sink or source at debug msg Sometimes, it is important to see if the created pad is sink or source. Add info to track that. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit df2f94e563edcbcb4b8652d05a3789d03b395366 Author: Mauro Carvalho Chehab Date: Fri Aug 21 16:18:18 2015 -0300 [media] dvb: modify core to implement interfaces/entities at MC new gen The Media Controller New Generation redefines the types for both interfaces and entities to be used on DVB. Make the needed changes at the DVB core for all interfaces, entities and data and interface links to appear in the graph. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dmxdev.c | 4 +- drivers/media/dvb-core/dvb_ca_en50221.c | 2 +- drivers/media/dvb-core/dvb_frontend.c | 2 +- drivers/media/dvb-core/dvb_net.c | 2 +- drivers/media/dvb-core/dvbdev.c | 146 +++++++++++++++++++++++++---- drivers/media/dvb-core/dvbdev.h | 9 +- drivers/media/firewire/firedtv-ci.c | 2 +- drivers/media/pci/bt8xx/dst_ca.c | 3 +- drivers/media/pci/ddbridge/ddbridge-core.c | 2 +- drivers/media/pci/ngene/ngene-core.c | 2 +- drivers/media/pci/ttpci/av7110.c | 2 +- drivers/media/pci/ttpci/av7110_av.c | 4 +- drivers/media/pci/ttpci/av7110_ca.c | 2 +- 13 files changed, 148 insertions(+), 34 deletions(-) commit 4ae1723af80ce5a23fa5bc6db1534265af0d6107 Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:40 2015 -0300 [media] DocBook: update descriptions for the media controller entities Cleanup the media controller entities description: - remove MEDIA_ENT_T_DEVNODE and MEDIA_ENT_T_V4L2_SUBDEV entity types, as they don't mean anything; - add MEDIA_ENT_T_UNKNOWN with a proper description; - remove ALSA and FB entity types. Those should not be used, as the types are deprecated. We'll soon be adidng ALSA, but with a different entity namespace; - improve the description of some entities. Signed-off-by: Mauro Carvalho Chehab .../DocBook/media/v4l/media-ioc-enum-entities.xml | 47 ++++++++++------------ 1 file changed, 22 insertions(+), 25 deletions(-) commit 4376679a3426c88caba883bcaf4e9af04eba6d9d Author: Mauro Carvalho Chehab Date: Sat Aug 29 14:50:46 2015 -0300 [media] media.h: don't use legacy entity macros at Kernel Put the legacy MEDIA_ENT_* macros under a #ifndef __KERNEL__, in order to be sure that none of those old symbols are used inside the Kernel. Acked-by: Laurent Pinchart Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 2 ++ 1 file changed, 2 insertions(+) commit 687b4209c83e9b0633f794949c0bc6fb1401ccba Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:39 2015 -0300 [media] media controller: get rid of entity subtype on Kernel Don't use anymore the type/subtype entity data/macros inside the Kernel. Acked-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 10 ---------- include/uapi/linux/media.h | 2 -- 2 files changed, 12 deletions(-) commit b50bde4e476dede4a28e9c8fdcd134da2f34ef2e Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:38 2015 -0300 [media] v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevs Instead of abusing MEDIA_ENT_T_V4L2_SUBDEV, initialize new subdev entities as MEDIA_ENT_T_UNKNOWN. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 6 ++++++ drivers/media/v4l2-core/v4l2-subdev.c | 2 +- include/uapi/linux/media.h | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) commit bf4178a4c63443da1475c9c1bbb39963e75aa69b Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:37 2015 -0300 [media] omap4iss: change the logic that checks if an entity is a subdev As we're getting rid of an specific number range for the V4L2 subdev, we need to replace the check for MEDIA_ENT_T_V4L2_SUBDEV by a macro. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss_ipipe.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 14fae6fc53b2b390bbba650d60b9555e9f7f4f26 Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:36 2015 -0300 [media] davinci_vbpe: stop MEDIA_ENT_T_V4L2_SUBDEV abuse This driver is abusing MEDIA_ENT_T_V4L2_SUBDEV: - it uses a hack to check if the remote entity is a subdev; - it still uses the legacy entity subtype check macro, that will be removed soon. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 9 ++++++--- drivers/staging/media/davinci_vpfe/vpfe_video.c | 5 ++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 26614b9bf8b534406835ea66732c12e6fd7b50fd Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:35 2015 -0300 [media] s5k5baf: fix subdev type The driver creates two subdevs, one for the image sensor pixel array (and the related readout logic) and one for an ISP. The first subdev already uses the MEDIA_ENT_T_V4L2_SUBDEV_SENSOR type, but the second subdev isn't a sensor pixel array. So, rename the second subdev as MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5k5baf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb716165536cde417de54de4657454bf39a8ba4d Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:34 2015 -0300 [media] s5c73m3: fix subdev type This sensor driver is abusing MEDIA_ENT_T_V4L2_SUBDEV, creating some subdevs with a non-existing type. As this is a sensor driver, one of the entries is MEDIA_ENT_T_CAM_SENSOR. The other one will be using MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN, because the subdev is not any of the already existing types. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5c73m3/s5c73m3-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59ecd59d782de82d8f2d2bfda2c28f87c0e8b35a Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:33 2015 -0300 [media] omap3/omap4/davinci: get rid of MEDIA_ENT_T_V4L2_SUBDEV abuse On omap3/omap4/davinci drivers, MEDIA_ENT_T_V4L2_SUBDEV macro is abused in order to "simplify" the pad checks. Basically, it does a logical or of this macro, in order to check for a local index and if the entity is either a subdev or not. As we'll get rid of MEDIA_ENT_T_V4L2_SUBDEV macro, replace it by 2 << 16 where it occurs, and add a note saying that the code there is actually a hack. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/ispccdc.c | 15 ++++++++----- drivers/media/platform/omap3isp/ispccp2.c | 13 +++++++---- drivers/media/platform/omap3isp/ispcsi2.c | 11 +++++++--- drivers/media/platform/omap3isp/isppreview.c | 15 ++++++++----- drivers/media/platform/omap3isp/ispresizer.c | 13 +++++++---- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 13 +++++++---- drivers/staging/media/davinci_vpfe/dm365_isif.c | 13 +++++++---- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 25 +++++++++++++--------- drivers/staging/media/davinci_vpfe/vpfe_video.c | 4 ++-- drivers/staging/media/omap4iss/iss_csi2.c | 11 +++++++--- drivers/staging/media/omap4iss/iss_ipipeif.c | 13 +++++++---- drivers/staging/media/omap4iss/iss_resizer.c | 11 +++++++--- 12 files changed, 106 insertions(+), 51 deletions(-) commit 3efdf62c5f68007020ef935ad2887e7fc4e31c36 Author: Mauro Carvalho Chehab Date: Thu May 7 22:12:32 2015 -0300 [media] media: use macros to check for V4L2 subdev entities Instead of relying on media subtype, use the new macros to detect if an entity is a subdev or an A/V DMA entity. Please note that most drivers assume that there's just AV_DMA or V4L2 subdevs. This is not true anymore, as we've added MC support for DVB, and there are plans to add support for ALSA and FB/DRM too. Ok, on the current pipelines supported by those drivers, just V4L stuff are there, but, assuming that some day a pipeline that also works with other subsystems will ever added, it is better to add explicit checks for the AV_DMA stuff. Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/common.c | 3 +-- drivers/media/platform/exynos4-is/fimc-capture.c | 5 ++--- drivers/media/platform/exynos4-is/fimc-isp-video.c | 3 +-- drivers/media/platform/exynos4-is/fimc-lite.c | 10 ++++------ drivers/media/platform/exynos4-is/media-dev.c | 7 +++---- drivers/media/platform/omap3isp/isp.c | 14 ++++++-------- drivers/media/platform/omap3isp/ispvideo.c | 7 +++---- drivers/media/platform/s3c-camif/camif-capture.c | 2 +- drivers/media/platform/vsp1/vsp1_video.c | 9 ++++----- drivers/media/platform/xilinx/xilinx-dma.c | 6 ++---- drivers/media/v4l2-core/v4l2-subdev.c | 2 +- drivers/staging/media/davinci_vpfe/vpfe_video.c | 6 +++--- drivers/staging/media/omap4iss/iss.c | 14 ++++++-------- drivers/staging/media/omap4iss/iss_video.c | 5 ++--- 14 files changed, 39 insertions(+), 54 deletions(-) commit fa17b46a6a01013f48c33934c09e02f51f099f2b Author: Mauro Carvalho Chehab Date: Fri Aug 21 12:17:40 2015 -0300 [media] media: add macros to check if subdev or V4L2 DMA As we'll be removing entity subtypes from the Kernel, we need to provide a way for drivers and core to check if a given entity is represented by a V4L2 subdev or if it is an V4L2 I/O entity (typically with DMA). Drivers that create entities that don't belong to any defined subdev category should use MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 34 ++++++++++++++++++++++++++++++++++ include/uapi/linux/media.h | 3 +++ 2 files changed, 37 insertions(+) commit fef486a07d69cbcae81bf65a6817ff7383104a24 Author: Mauro Carvalho Chehab Date: Fri Aug 21 11:54:40 2015 -0300 [media] replace all occurrences of MEDIA_ENT_T_DEVNODE_DVB Now that interfaces and entities are distinct, it makes no sense of keeping something named as MEDIA_ENT_T_DEVNODE_DVB_foo. Made via this script: for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DEVNODE_DVB_,MEDIA_ENT_T_DVB_, <$i >a && mv a $i; done for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DVB_DVR,MEDIA_ENT_T_DVB_TSOUT, <$i >a && mv a $i; done for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DVB_FE,MEDIA_ENT_T_DVB_DEMOD, <$i >a && mv a $i; done for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DVB_NET,MEDIA_ENT_T_DVB_DEMOD_NET_DECAP, <$i >a && mv a $i; done Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cf49066152c5b46c0b90f44593beda27997ca58b Author: Mauro Carvalho Chehab Date: Fri Aug 21 11:50:17 2015 -0300 [media] replace all occurrences of MEDIA_ENT_T_DEVNODE_V4L Now that interfaces and entities are distinct, it makes no sense of keeping something named as MEDIA_ENT_T_DEVNODE. This change was done with this script: for i in $(git grep -l MEDIA_ENT_T|grep -v uapi/linux/media.h); do sed s,MEDIA_ENT_T_DEVNODE_V4L,MEDIA_ENT_T_V4L2_VIDEO, <$i >a && mv a $i; done Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 2 +- drivers/media/v4l2-core/v4l2-dev.c | 2 +- drivers/media/v4l2-core/v4l2-subdev.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 32fdc0e1a87c1ed50f77a9e54413165282e99b8b Author: Mauro Carvalho Chehab Date: Fri Aug 21 11:40:34 2015 -0300 [media] uapi/media.h: Fix entity namespace Now that interfaces got created, we need to fix the entity namespace. So, let's create a consistent new namespace and add backward compatibility macros to keep the old namespace preserved. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 26 +++++++------- include/uapi/linux/media.h | 76 ++++++++++++++++++++++++++++++----------- 2 files changed, 70 insertions(+), 32 deletions(-) commit 8ddb90d2e5dc1b80c538d371bfe361e1bae29297 Author: Mauro Carvalho Chehab Date: Fri Aug 21 09:32:38 2015 -0300 [media] dvbdev: add support for indirect interface links Some interfaces indirectly control multiple entities. Add support for those. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 57cf79b79b18d885c144889989b47149e23c8dc2 Author: Mauro Carvalho Chehab Date: Fri Aug 21 09:23:22 2015 -0300 [media] media: add a linked list to track interfaces by mdev The media device should list the interface objects, so add a linked list for those interfaces in struct media_device. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 1 + drivers/media/media-entity.c | 3 +++ include/media/media-device.h | 2 ++ include/media/media-entity.h | 3 +++ 4 files changed, 9 insertions(+) commit 8211b187ec6461e8d80a36304bd9fc087e3c490f Author: Mauro Carvalho Chehab Date: Fri Aug 21 08:20:22 2015 -0300 [media] dvbdev: add support for interfaces Now that the infrastruct for that is set, add support for interfaces. Please notice that we're missing two links: DVB FE intf -> tuner DVB demux intf -> dvr Those should be added latter, after having the entire graph set. With the current infrastructure, those should be added at dvb_create_media_graph(), but it would also require some extra core changes, to allow the function to enumerate the interfaces. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 102 ++++++++++++++++++++++++++++++---------- drivers/media/dvb-core/dvbdev.h | 1 + 2 files changed, 79 insertions(+), 24 deletions(-) commit 1283f849dce2e64690e610216cd8dc3df9789bae Author: Mauro Carvalho Chehab Date: Fri Aug 28 15:43:36 2015 -0300 [media] media-entity: add a helper function to create interface As we'll be adding other interface types in the future, put the common interface create code on a separate function. Suggested-by: Hans Verkuil Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 86e2662071d6f26704bb290317746149ce07be7a Author: Mauro Carvalho Chehab Date: Fri Aug 7 10:36:25 2015 -0300 [media] media: add support to link interfaces and entities Now that we have a new graph object called "interfaces", we need to be able to link them to the entities. Add a linked list to the interfaces to allow them to be linked to the entities. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 38 ++++++++++++++++++++++++++++++++++++++ include/media/media-entity.h | 9 +++++++++ 2 files changed, 47 insertions(+) commit 3c0e266fba5897c02c4bd23521a3271d338650ad Author: Mauro Carvalho Chehab Date: Fri Aug 21 08:45:34 2015 -0300 [media] media: make link debug printk more generic Remove entity name from the link as this exists only if the object type is PAD on both link ends. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 4b8a3c08592ae0d530c87e2e1672ed8d9184dc09 Author: Mauro Carvalho Chehab Date: Thu Aug 20 09:10:07 2015 -0300 [media] media: make media_link more generic to handle interace links By adding an union at media_link, we get for free a way to represent interface->entity links. No need to change anything at the code, just at the internal header file. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 23615de5ee742f2f49833777ab015cf1a83fcbc3 Author: Mauro Carvalho Chehab Date: Thu Aug 20 08:21:35 2015 -0300 [media] media: make add link more generic The media_entity_add_link() function takes an entity as an argument just to get the list head. Make it more generic by changing the function argument to list_head. No functional changes. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 57208e5e25f263d27ea00e530c95f62071573cb7 Author: Mauro Carvalho Chehab Date: Fri Aug 7 06:55:40 2015 -0300 [media] media: convert links from array to list The entire logic that represent graph links were developed on a time where there were no needs to dynamic remove links. So, although links are created/removed one by one via some functions, they're stored as an array inside the entity struct. As the array may grow, there's a logic inside the code that checks if the amount of space is not enough to store the needed links. If it isn't the core uses krealloc() to change the size of the link, with is bad, as it leaves the memory fragmented. So, convert links into a list. Also, currently, both source and sink entities need the link at the graph traversal logic inside media_entity. So there's a logic duplicating all links. That makes it to spend twice the memory needed. This is not a big deal for today's usage, where the number of links are not big. Yet, if during the MC workshop discussions, it was said that IIO graphs could have up to 4,000 entities. So, we may want to remove the duplication on some future. The problem is that it would require a separate linked list to store the backlinks inside the entity, or to use a more complex algorithm to do graph backlink traversal, with is something that the current graph traversal inside the core can't cope with. So, let's postpone a such change if/when it is actually needed. It should also be noticed that the media_link structure uses 44 bytes on 32-bit architectures and 84 bytes on 64-bit architecture. It will thus be allocated out of the 64-bytes and 96-bytes pools respectively. That's a 12.5% memory waste on 64-bit architectures and 31.25% on 32-bit architecture. A linked list is less efficient than an array in this case, but this could later be optimized if we can get rid of the reverse links (with would reduce memory allocation by 50%). Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 9 +-- drivers/media/media-device.c | 25 +++--- drivers/media/media-entity.c | 128 +++++++++++++++--------------- drivers/media/usb/au0828/au0828-core.c | 12 ++- drivers/media/usb/au0828/au0828-video.c | 8 +- drivers/media/usb/cx231xx/cx231xx-video.c | 8 +- include/media/media-entity.h | 10 +-- 7 files changed, 97 insertions(+), 103 deletions(-) commit 8f6d368f726bb4fa069af5ef5806f15ba6da6ad8 Author: Mauro Carvalho Chehab Date: Wed Aug 19 20:18:35 2015 -0300 [media] media: Don't accept early-created links Links are graph objects that represent the links of two already existing objects in the graph. While with the current implementation, it is possible to create the links earlier, It doesn't make any sense to allow linking two objects when they are not both created. So, remove the code that would be handling those early-created links and add a BUG_ON() to ensure that. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 7 ------- drivers/media/media-entity.c | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) commit ada58ced508ffb75ff59f23b726ffc79ac2282fe Author: Javier Martinez Canillas Date: Thu Sep 3 09:00:27 2015 -0300 [media] smiapp: create pad links after subdev registration The smiapp driver creates the pads links before the media entity is registered with the media device. This doesn't work now that object IDs are used to create links so the media_device has to be set. Move entity registration logic before pads links creation. Signed-off-by: Javier Martinez Canillas Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c5a98cac6ecd78ca647c41cb25e3ea1835579d70 Author: Javier Martinez Canillas Date: Thu Sep 3 08:46:06 2015 -0300 [media] uvcvideo: create pad links after subdev registration The uvc driver creates the pads links before the media entity is registered with the media device. This doesn't work now that obj IDs are used to create links so the media_device has to be set. Move entities registration logic before pads links creation. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_entity.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit c7621b3044f705dd20019e82a8418491b8080327 Author: Javier Martinez Canillas Date: Thu Sep 3 12:19:25 2015 -0300 [media] v4l: vsp1: separate links creation from entities init The vsp1 driver initializes the entities and creates the pads links before the entities are registered with the media device. This doesn't work now that object IDs are used to create links so the media_device has to be set. Split out the pads links creation from the entity initialization so are made after the entities registration. Signed-off-by: Javier Martinez Canillas Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drv.c | 14 ++++++++++-- drivers/media/platform/vsp1/vsp1_rpf.c | 29 ++++++++++++++++-------- drivers/media/platform/vsp1/vsp1_rwpf.h | 5 +++++ drivers/media/platform/vsp1/vsp1_wpf.c | 40 ++++++++++++++++++++------------- 4 files changed, 62 insertions(+), 26 deletions(-) commit 7213fe7eec174fb2b958ecc3ce04a6f811c2d4da Author: Javier Martinez Canillas Date: Thu Sep 3 11:20:34 2015 -0300 [media] v4l: vsp1: create pad links after subdev registration The vsp1 driver creates the pads links before the media entities are registered with the media device. This doesn't work now that object IDs are used to create links so the media_device has to be set. Move entities registration logic before pads links creation. Signed-off-by: Javier Martinez Canillas Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drv.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5837ceea11ca11339e49947aacbccb62f3646993 Author: Javier Martinez Canillas Date: Wed Sep 2 11:28:08 2015 -0300 [media] staging: omap4iss: separate links creation from entities init The omap4iss driver initializes the entities and creates the pads links before the entities are registered with the media device. This does not work now that object IDs are used to create links so the media_device has to be set. Split out the pads links creation from the entity initialization so are made after the entities registration. Signed-off-by: Javier Martinez Canillas Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss.c | 101 ++++++++++++++++++--------- drivers/staging/media/omap4iss/iss_csi2.c | 35 +++++++--- drivers/staging/media/omap4iss/iss_csi2.h | 1 + drivers/staging/media/omap4iss/iss_ipipeif.c | 29 ++++---- drivers/staging/media/omap4iss/iss_ipipeif.h | 1 + drivers/staging/media/omap4iss/iss_resizer.c | 29 ++++---- drivers/staging/media/omap4iss/iss_resizer.h | 1 + 7 files changed, 132 insertions(+), 65 deletions(-) commit 68a57fa93a9f7776ab502db389469dd1ac6a1c66 Author: Javier Martinez Canillas Date: Fri Aug 28 06:28:33 2015 -0300 [media] omap3isp: create links after all subdevs have been bound The omap3isp driver parses the graph endpoints to know how many subdevices needs to be registered async and register notifiers callbacks for to know when these are bound and when the async registrations are completed. Currently the entities pad are linked with the correct ISP input interface when the subdevs are bound but it happens before entitities are registered with the media device so that won't work now that the entity links list is initialized on device registration. So instead creating the pad links when the subdevice is bound, create them on the complete callback once all the subdevices have been bound but only try to create for the ones that have a bus configuration set during bound. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit f2f6da0d77027d05bf8a06eb8b80fe139f9cc853 Author: Javier Martinez Canillas Date: Wed Aug 26 09:24:45 2015 -0300 [media] omap3isp: separate links creation from entities init The omap3isp driver initializes the entities and creates the pads links before the entities are registered with the media device. This does not work now that object IDs are used to create links so the media_device has to be set. Split out the pads links creation from the entity initialization so the links are created after the entities have been registered with the media device. Suggested-by: Mauro Carvalho Chehab Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 152 +++++++++++++++++---------- drivers/media/platform/omap3isp/ispccdc.c | 22 ++-- drivers/media/platform/omap3isp/ispccdc.h | 1 + drivers/media/platform/omap3isp/ispccp2.c | 22 ++-- drivers/media/platform/omap3isp/ispccp2.h | 1 + drivers/media/platform/omap3isp/ispcsi2.c | 22 ++-- drivers/media/platform/omap3isp/ispcsi2.h | 1 + drivers/media/platform/omap3isp/isppreview.c | 33 +++--- drivers/media/platform/omap3isp/isppreview.h | 1 + drivers/media/platform/omap3isp/ispresizer.c | 33 +++--- drivers/media/platform/omap3isp/ispresizer.h | 1 + 11 files changed, 185 insertions(+), 104 deletions(-) commit 27e543fa87deea308f0cc5224ab19e397b0a5ded Author: Mauro Carvalho Chehab Date: Thu Aug 20 09:07:34 2015 -0300 [media] media: add functions to allow creating interfaces Interfaces are different than entities: they represent a Kernel<->userspace interaction, while entities represent a piece of hardware/firmware/software that executes a function. Let's distinguish them by creating a separate structure to store the interfaces. Later patches should change the existing drivers and logic to split the current interface embedded inside the entity structure (device nodes) into a separate object of the graph. Acked-by: Hans Verkuil Reviewed-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 83 ++++++++++++++++++++++++++++++++++++++++++++ include/media/media-device.h | 2 ++ include/media/media-entity.h | 48 +++++++++++++++++++++++++ 3 files changed, 133 insertions(+) commit a1d2510ebd7a14f0d1a89c138101beaeac076dd2 Author: Mauro Carvalho Chehab Date: Thu Aug 20 07:43:07 2015 -0300 [media] uapi/media.h: Declare interface types for V4L2 and DVB Declare the interface types that will be used by the new G_TOPOLOGY ioctl that will be defined later on. For now, we need those types, as they'll be used on the internal structs associated with the new media_interface graph object defined on the next patch. Acked-by: Hans Verkuil Reviewed-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit b42ff142b8d880427e8c30b05de71b841a67aaad Author: Javier Martinez Canillas Date: Wed Aug 19 12:35:22 2015 -0300 [media] media: remove media entity .parent field Now that the struct media_entity .parent field is unused, it can be safely removed. Since all the previous users were converted to use the .mdev field from the embedded struct media_gobj instead. Signed-off-by: Javier Martinez Canillas Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/media-entity.h | 1 - 1 file changed, 1 deletion(-) commit d10c98949d1a1fff14d750fe5162213bb5b39e11 Author: Javier Martinez Canillas Date: Wed Aug 19 12:35:21 2015 -0300 [media] media: use entity.graph_obj.mdev instead of .parent The struct media_entity has a .parent field that stores a pointer to the parent struct media_device. But recently a media_gobj was embedded into the entities and since struct media_gojb already has a pointer to a struct media_device in the .mdev field, the .parent field becomes redundant and can be removed. This patch replaces all the usage of .parent by .graph_obj.mdev so that field will become unused and can be removed on a later patch. No functional changes. The transformation was made using the following coccinelle spatch: @@ struct media_entity *me; @@ - me->parent + me->graph_obj.mdev @@ struct media_entity *link; @@ - link->source->entity->parent + link->source->entity->graph_obj.mdev @@ struct exynos_video_entity *ve; @@ - ve->vdev.entity.parent + ve->vdev.entity.graph_obj.mdev Suggested-by: Mauro Carvalho Chehab Signed-off-by: Javier Martinez Canillas Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 8 ++--- drivers/media/media-entity.c | 34 ++++++++++++---------- drivers/media/platform/exynos4-is/fimc-isp-video.c | 6 ++-- drivers/media/platform/exynos4-is/fimc-lite.c | 8 ++--- drivers/media/platform/exynos4-is/media-dev.c | 2 +- drivers/media/platform/exynos4-is/media-dev.h | 8 ++--- drivers/media/platform/omap3isp/isp.c | 4 +-- drivers/media/platform/omap3isp/ispvideo.c | 2 +- drivers/media/platform/vsp1/vsp1_video.c | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 2 +- drivers/staging/media/davinci_vpfe/vpfe_video.c | 6 ++-- drivers/staging/media/omap4iss/iss.c | 4 +-- drivers/staging/media/omap4iss/iss_video.c | 2 +- 13 files changed, 45 insertions(+), 43 deletions(-) commit 8df00a15817e3a252510ac914870214859325189 Author: Mauro Carvalho Chehab Date: Fri Aug 7 08:14:38 2015 -0300 [media] media: rename the function that create pad links With the new API, a link can be either between two PADs or between an interface and an entity. So, we need to use a better name for the function that create links between two pads. So, rename the such function to media_create_pad_link(). No functional changes. This patch was created via this shell script: for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a && mv a $i; done Acked-by: Hans Verkuil Tested-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab Documentation/media-framework.txt | 2 +- drivers/media/dvb-core/dvbdev.c | 8 ++++---- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 4 ++-- drivers/media/i2c/s5k5baf.c | 2 +- drivers/media/i2c/smiapp/smiapp-core.c | 4 ++-- drivers/media/media-entity.c | 4 ++-- drivers/media/platform/exynos4-is/media-dev.c | 16 ++++++++-------- drivers/media/platform/omap3isp/isp.c | 18 +++++++++--------- drivers/media/platform/omap3isp/ispccdc.c | 2 +- drivers/media/platform/omap3isp/ispccp2.c | 2 +- drivers/media/platform/omap3isp/ispcsi2.c | 2 +- drivers/media/platform/omap3isp/isppreview.c | 4 ++-- drivers/media/platform/omap3isp/ispresizer.c | 4 ++-- drivers/media/platform/s3c-camif/camif-core.c | 4 ++-- drivers/media/platform/vsp1/vsp1_drv.c | 4 ++-- drivers/media/platform/vsp1/vsp1_rpf.c | 2 +- drivers/media/platform/vsp1/vsp1_wpf.c | 2 +- drivers/media/platform/xilinx/xilinx-vipp.c | 4 ++-- drivers/media/usb/au0828/au0828-core.c | 6 +++--- drivers/media/usb/cx231xx/cx231xx-cards.c | 6 +++--- drivers/media/usb/uvc/uvc_entity.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_isif.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 8 ++++---- drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 10 +++++----- drivers/staging/media/omap4iss/iss.c | 12 ++++++------ drivers/staging/media/omap4iss/iss_csi2.c | 2 +- drivers/staging/media/omap4iss/iss_ipipeif.c | 2 +- drivers/staging/media/omap4iss/iss_resizer.c | 2 +- include/media/media-entity.h | 2 +- 30 files changed, 72 insertions(+), 72 deletions(-) commit 39a956c4147e4f696f729916f677673e9a9dc7ab Author: Mauro Carvalho Chehab Date: Thu Aug 13 14:42:42 2015 -0300 [media] media: add a debug message to warn about gobj creation/removal It helps to check if the media controller is doing the right thing with the object creation and removal. No extra code/data will be produced if DEBUG or CONFIG_DYNAMIC_DEBUG is not enabled. Acked-by: Hans Verkuil Reviewed-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 68 +++++++++++++++++++++++++++++++++++++++++++- include/media/media-entity.h | 7 +++++ 2 files changed, 74 insertions(+), 1 deletion(-) commit 8f5a3188fbd13fdd5525fc6177cb19bf3996ee99 Author: Mauro Carvalho Chehab Date: Thu Aug 13 15:22:24 2015 -0300 [media] media: add messages when media device gets (un)registered We can only free the media device after being sure that no graph object is used. In order to help tracking it, let's add debug messages that will print when the media controller gets registered or unregistered. Acked-by: Hans Verkuil Reviewed-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6b6a42780597028135f82c96e42c6d2bcd83fbae Author: Mauro Carvalho Chehab Date: Fri Aug 14 12:54:36 2015 -0300 [media] media: use media_gobj inside links Just like entities and pads, links also need to have unique Object IDs along a given media controller. So, let's add a media_gobj inside it and initialize the object then a new link is created. Acked-by: Hans Verkuil Tested-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 9 +++++++++ drivers/media/media-entity.c | 9 +++++++++ include/media/media-device.h | 2 ++ include/media/media-entity.h | 3 +++ 4 files changed, 23 insertions(+) commit 18710dc67a433ed2c3ecaaffefd8e34502e53262 Author: Mauro Carvalho Chehab Date: Fri Aug 14 12:50:08 2015 -0300 [media] media: use media_gobj inside pads PADs also need unique object IDs that won't conflict with the entity object IDs. The pad objects are currently created via media_entity_init() and, once created, never change. While this will likely change in the future in order to support dynamic changes, for now we'll keep PADs as arrays and initialize the media_gobj embedded structs when registering the entity. Acked-by: Hans Verkuil Tested-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 11 +++++++++++ drivers/media/media-entity.c | 3 +++ include/media/media-device.h | 2 ++ include/media/media-entity.h | 3 +++ 4 files changed, 19 insertions(+) commit bfab2aacccfc144e2cceccb71ec89f1eff1b8c51 Author: Mauro Carvalho Chehab Date: Fri Aug 14 12:47:48 2015 -0300 [media] media: use media_gobj inside entities As entities are graph objects, let's embed media_gobj on it. That ensures an unique ID for entities that can be global along the entire media controller. For now, we'll keep the already existing entity ID. Such field need to be dropped at some point, but for now, let's not do this, to avoid needing to review all drivers and the userspace apps. Acked-by: Hans Verkuil Tested-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 8 +++----- drivers/media/media-entity.c | 7 ++++++- include/media/media-device.h | 3 ++- include/media/media-entity.h | 9 ++++----- 4 files changed, 15 insertions(+), 12 deletions(-) commit ec6e4c950621a1d0db1e9b015ede4a3938fdfd18 Author: Mauro Carvalho Chehab Date: Tue Aug 25 10:28:36 2015 -0300 [media] media: add a common struct to be embed on media graph objects Due to the MC API proposed changes, we'll need to have an unique object ID for all graph objects, and have some shared fields that will be common on all media graph objects. Right now, the only common object is the object ID, but other fields will be added later on. Acked-by: Hans Verkuil Reviewed-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 32 +++++++++++++++++++++++ include/media/media-entity.h | 61 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) commit e0077cfdee9d249d3f85b9c7efd9e49d218093c8 Author: Javier Martinez Canillas Date: Wed Aug 19 12:35:20 2015 -0300 [media] omap3isp: get entity ID using media_entity_id() Accessing media_entity ID should now use media_entity_id() macro to obtain the entity ID, as a next patch will remove the .id field from struct media_entity . So, get rid of it, otherwise the omap3isp driver will fail to build. Signed-off-by: Javier Martinez Canillas Acked-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 7 +++++-- drivers/media/platform/omap3isp/ispccdc.c | 2 +- drivers/media/platform/omap3isp/ispvideo.c | 8 +++++--- 3 files changed, 11 insertions(+), 6 deletions(-) commit 1302d39c4a7e31b9844638acb45c784633015cfd Author: Javier Martinez Canillas Date: Wed Aug 19 12:35:19 2015 -0300 [media] staging: omap4iss: get entity ID using media_entity_id() Accessing media_entity ID should now use media_entity_id() macro to obtain the entity ID, as a next patch will remove the .id field from struct media_entity . So, get rid of it, otherwise the omap4iss driver will fail to build. Signed-off-by: Javier Martinez Canillas Acked-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss.c | 2 +- drivers/staging/media/omap4iss/iss_video.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fa762394fd85c838ade769990478bc4e01fd95e8 Author: Mauro Carvalho Chehab Date: Fri Aug 14 10:42:05 2015 -0300 [media] media: create a macro to get entity ID Instead of accessing directly entity.id, let's create a macro, as this field will be moved into a common struct later on. Acked-by: Hans Verkuil Reviewed-by: Javier Martinez Canillas Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 8 ++++---- drivers/media/media-entity.c | 8 ++++---- drivers/media/platform/vsp1/vsp1_video.c | 4 ++-- include/media/media-entity.h | 5 +++++ 4 files changed, 15 insertions(+), 10 deletions(-) commit 20fe0319de9aca71ba45e2f93c4a2a73dabde4da Author: Mauro Carvalho Chehab Date: Thu Aug 20 06:53:10 2015 -0300 [media] au0828: Fix the logic that enables the analog demoder link This logic was broken on the original patch, likely due to a cut-and-paste mistake. Fix it. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21a0654200f24208aadd7bdc80fcdec65d2eb64b Author: Mauro Carvalho Chehab Date: Wed Aug 19 06:57:59 2015 -0300 [media] Kconfig: Re-enable Media controller support for DVB This was depending on broken because we're working at the Media Controller API, with has... issues. As this got fixed, we can re-enable it. Signed-off-by: Mauro Carvalho Chehab drivers/media/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 1809510715c4187fa7338204cac53e30326d5d04 Author: Mauro Carvalho Chehab Date: Thu Aug 6 09:25:57 2015 -0300 [media] media: get rid of unused "extra_links" param on media_entity_init() Currently, media_entity_init() creates an array with the links, allocated at init time. It provides a parameter (extra_links) that would allocate more links than the current needs, but this is not used by any driver. As we want to be able to do dynamic link allocation/removal, we'll need to change the implementation of the links. So, before doing that, let's first remove that extra unused parameter, in order to cleanup the interface first. Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/media-framework.txt | 7 +++---- Documentation/video4linux/v4l2-framework.txt | 4 ++-- Documentation/zh_CN/video4linux/v4l2-framework.txt | 4 ++-- drivers/media/dvb-core/dvbdev.c | 2 +- drivers/media/dvb-frontends/au8522_decoder.c | 2 +- drivers/media/i2c/ad9389b.c | 2 +- drivers/media/i2c/adp1653.c | 2 +- drivers/media/i2c/adv7180.c | 2 +- drivers/media/i2c/adv7511.c | 2 +- drivers/media/i2c/adv7604.c | 2 +- drivers/media/i2c/adv7842.c | 2 +- drivers/media/i2c/as3645a.c | 2 +- drivers/media/i2c/cx25840/cx25840-core.c | 2 +- drivers/media/i2c/lm3560.c | 2 +- drivers/media/i2c/lm3646.c | 2 +- drivers/media/i2c/m5mols/m5mols_core.c | 2 +- drivers/media/i2c/mt9m032.c | 2 +- drivers/media/i2c/mt9p031.c | 2 +- drivers/media/i2c/mt9t001.c | 2 +- drivers/media/i2c/mt9v032.c | 2 +- drivers/media/i2c/noon010pc30.c | 2 +- drivers/media/i2c/ov2659.c | 2 +- drivers/media/i2c/ov9650.c | 2 +- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 4 ++-- drivers/media/i2c/s5k4ecgx.c | 2 +- drivers/media/i2c/s5k5baf.c | 4 ++-- drivers/media/i2c/s5k6a3.c | 2 +- drivers/media/i2c/s5k6aa.c | 2 +- drivers/media/i2c/smiapp/smiapp-core.c | 4 ++-- drivers/media/i2c/tc358743.c | 2 +- drivers/media/i2c/tvp514x.c | 2 +- drivers/media/i2c/tvp7002.c | 2 +- drivers/media/media-entity.c | 18 ++++++++---------- drivers/media/platform/exynos4-is/fimc-capture.c | 4 ++-- drivers/media/platform/exynos4-is/fimc-isp-video.c | 2 +- drivers/media/platform/exynos4-is/fimc-isp.c | 2 +- drivers/media/platform/exynos4-is/fimc-lite.c | 4 ++-- drivers/media/platform/exynos4-is/fimc-m2m.c | 2 +- drivers/media/platform/exynos4-is/mipi-csis.c | 2 +- drivers/media/platform/omap3isp/ispccdc.c | 2 +- drivers/media/platform/omap3isp/ispccp2.c | 2 +- drivers/media/platform/omap3isp/ispcsi2.c | 2 +- drivers/media/platform/omap3isp/isppreview.c | 2 +- drivers/media/platform/omap3isp/ispresizer.c | 2 +- drivers/media/platform/omap3isp/ispstat.c | 2 +- drivers/media/platform/omap3isp/ispvideo.c | 2 +- drivers/media/platform/s3c-camif/camif-capture.c | 4 ++-- drivers/media/platform/vsp1/vsp1_entity.c | 2 +- drivers/media/platform/vsp1/vsp1_video.c | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 2 +- drivers/media/platform/xilinx/xilinx-tpg.c | 2 +- drivers/media/usb/au0828/au0828-video.c | 4 ++-- drivers/media/usb/cx231xx/cx231xx-video.c | 4 ++-- drivers/media/usb/uvc/uvc_entity.c | 4 ++-- drivers/media/v4l2-core/tuner-core.c | 2 +- drivers/media/v4l2-core/v4l2-flash-led-class.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_isif.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 6 +++--- drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 +- drivers/staging/media/omap4iss/iss_csi2.c | 2 +- drivers/staging/media/omap4iss/iss_ipipe.c | 2 +- drivers/staging/media/omap4iss/iss_ipipeif.c | 2 +- drivers/staging/media/omap4iss/iss_resizer.c | 2 +- drivers/staging/media/omap4iss/iss_video.c | 2 +- include/media/media-entity.h | 2 +- 67 files changed, 89 insertions(+), 92 deletions(-) commit 0158e7b6a29f33a2c91cf045468958fbe8cb0b4c Author: Mauro Carvalho Chehab Date: Thu Jun 18 13:06:38 2015 -0300 [media] au0828: Cache the decoder info at au0828 dev structure Instead of seeking for the decoder every time analog stream is started, cache it. This simplifies the code a little bit. Requested-by: Hans Verkuil Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-cards.c | 4 ++++ drivers/media/usb/au0828/au0828-video.c | 19 +++++-------------- drivers/media/usb/au0828/au0828.h | 1 + 3 files changed, 10 insertions(+), 14 deletions(-) commit bed6919665072b1e5bad31a013d53798394e097c Author: Rafael Lourenço de Lima Chehab Date: Mon Jun 8 22:20:46 2015 -0300 [media] au0828: Add support for media controller Add support for analog and dvb tv using media controller. Signed-off-by: Rafael Lourenço de Lima Chehab Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/au8522_decoder.c | 17 +++++ drivers/media/dvb-frontends/au8522_priv.h | 12 ++++ drivers/media/usb/au0828/au0828-core.c | 98 ++++++++++++++++++++++++++++ drivers/media/usb/au0828/au0828-dvb.c | 10 +++ drivers/media/usb/au0828/au0828-video.c | 83 +++++++++++++++++++++++ drivers/media/usb/au0828/au0828.h | 6 ++ 6 files changed, 226 insertions(+) commit b28cf57246d5b797ba725bb033110c247f2c301f Merge: a305810 a7ca422 Author: Chris Mason Date: Mon Jan 11 06:08:37 2016 -0800 Merge branch 'misc-cleanups-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5 Signed-off-by: Chris Mason commit e576d60bb21e7add884f052ff0e5c28ebf7b7461 Author: Shuah Khan Date: Fri Jun 5 17:11:54 2015 -0300 [media] media: define Media Controller API when CONFIG_MEDIA_CONTROLLER enabled Change to define Media Controller API when CONFIG_MEDIA_CONTROLLER is enabled. Define stubs for CONFIG_MEDIA_CONTROLLER disabled case. This will help avoid drivers needing to enclose Media Controller code within ifdef CONFIG_MEDIA_CONTROLLER block. Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 4 ++++ include/media/media-device.h | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit d062f91193dbd5a0c1d8469c8517ec8dd552c3f2 Author: Shuah Khan Date: Wed Jun 3 12:12:53 2015 -0300 [media] media: new media controller API for device resource support Add new media controller API to allocate media device as a device resource. When a media device is created on the main struct device which is the parent device for the interface device, it will be available to all drivers associated with that interface. For example, if a usb media device driver creates the media device on the main struct device which is common for all the drivers that control the media device, including the non-media ALSA driver, media controller API can be used to share access to the resources on the media device. This new interface provides the above described feature. A second interface that finds and returns the media device is added to allow drivers to find the media device created by any of the drivers associated with the device. Signed-off-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 33 +++++++++++++++++++++++++++++++++ include/media/media-device.h | 2 ++ 2 files changed, 35 insertions(+) commit a3058101c17d2825f34a0ab5c37d93ead0f4d9dc Merge: 511711a ee592d0 Author: Chris Mason Date: Mon Jan 11 05:59:32 2016 -0800 Merge branch 'misc-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5 commit d0021d3bdfe9d551859bca1f58da0e6be8e26043 Merge: d5221ab 2d4a326 Author: Mark Brown Date: Mon Jan 11 13:54:40 2016 +0000 Merge remote-tracking branch 'asoc/topic/wm8960' into asoc-next commit d5221ab6b289da82dcf73b475aaee6a3da5c4ca5 Merge: 5450487 3ae08dc Author: Mark Brown Date: Mon Jan 11 13:54:39 2016 +0000 Merge remote-tracking branch 'asoc/topic/rt5651' into asoc-next commit 5450487a0954f87607b14d52a71d44c147d2d0d5 Merge: 4aace4c 8012c98 4ab936d Author: Mark Brown Date: Mon Jan 11 13:54:38 2016 +0000 Merge remote-tracking branches 'asoc/topic/rcar' and 'asoc/topic/rockchip' into asoc-next commit 4aace4ce8d49e1ee46b9690a456752999e53fe92 Merge: d6c513e d44c611 f51e3d5 Author: Mark Brown Date: Mon Jan 11 13:54:36 2016 +0000 Merge remote-tracking branches 'asoc/topic/fsl-asrc' and 'asoc/topic/fsl-ssi' into asoc-next commit d6c513e8b6d0d18b7f47dd555d36c048e6c9ee82 Merge: e72ceb2 f644eb6 4acfa36 Author: Mark Brown Date: Mon Jan 11 13:54:35 2016 +0000 Merge remote-tracking branches 'asoc/topic/da7218' and 'asoc/topic/da7219' into asoc-next commit e72ceb2aca268af62384bd5c0fc7afdf678d49ec Merge: 188bdf7 7905f08 bb18f09 Author: Mark Brown Date: Mon Jan 11 13:54:34 2016 +0000 Merge remote-tracking branches 'asoc/topic/bcm2835' and 'asoc/topic/cleanup' into asoc-next commit 188bdf726877fb27530934baea90876dfc2012ba Merge: 551e13a4 83a40ce 7cb1dc8 Author: Mark Brown Date: Mon Jan 11 13:54:32 2016 +0000 Merge remote-tracking branches 'asoc/topic/adsp' and 'asoc/topic/amd' into asoc-next commit 551e13a4b94301e8a65e29b652935b81d8d32861 Merge: 51a545a 15b0f4d Author: Mark Brown Date: Mon Jan 11 13:54:32 2016 +0000 Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next commit 51a545a343a4af02c7c1f27822c9dc63b6a8280b Merge: a1916ff 0471cd9 Author: Mark Brown Date: Mon Jan 11 13:54:31 2016 +0000 Merge remote-tracking branch 'asoc/topic/pcm1792a' into asoc-next commit a1916ff3500db308bff5913996a62b0bf8c4a97e Merge: 2dd49f8 f2ed6b0 Author: Mark Brown Date: Mon Jan 11 13:54:31 2016 +0000 Merge remote-tracking branch 'asoc/topic/pcm-list' into asoc-next commit 2dd49f8e6f2029e1fd449d5e5190fd19fa0fa3d3 Merge: 804c0a9 3f80978 Author: Mark Brown Date: Mon Jan 11 13:54:30 2016 +0000 Merge remote-tracking branch 'asoc/topic/pcm' into asoc-next commit 804c0a9569bd383358680199a22404aafedcc993 Merge: fffe9b8 26eb5a9 Author: Mark Brown Date: Mon Jan 11 13:54:29 2016 +0000 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next commit fffe9b89d808782a7370b0f70c7271a9f65a261c Merge: 7b2f32c 822ad70 Author: Mark Brown Date: Mon Jan 11 13:54:29 2016 +0000 Merge tag 'asoc-v4.5' into asoc-next ASoC: Updates for v4.5 This is quite a busy release on the driver front with a lot of new drivers being added but comparatively quiet on the core side with only one big change going in and that a fairly straightforward refactoring. - Conversion of the array of DAI links to a list by Mengdong Lin, supporting dynamically adding and removing DAI links. - Some more fixes for the topology code, though it is still not final and ready for enabling in production. We really need to get to the point where that can be done. - A pile of changes for Intel SkyLake drivers which hopefully deliver some useful initial functionality for systems with this chipset, though there is more work still to come. - New drivers for a number of Imagination Technologies IPs. - Lots of new features and cleanups for the Renesas drivers. - ANC support for WM5110. - New driver for Atmel class D speaker drivers. - New drivers for Cirrus CS47L24 and WM1831. - New driver for Dialog DA7128. - New drivers for Realtek RT5659 and RT56156. - New driver for Rockchip RK3036. - New driver for TI PC3168A # gpg: Signature made Wed 23 Dec 2015 00:42:40 GMT using RSA key ID 5D5487D0 # gpg: Good signature from "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0 commit 7b2f32cc81e14149e2fe515f69f35f9e11e8ba5a Merge: b7f08d2 fe09dd8 Author: Mark Brown Date: Mon Jan 11 13:54:28 2016 +0000 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit b7f08d29c9ef76fb4bc95385e3f90b51e0494a3b Merge: c8980d2 a106804 Author: Mark Brown Date: Mon Jan 11 13:54:27 2016 +0000 Merge remote-tracking branch 'asoc/fix/compress' into asoc-linus commit c8980d2c17e40767c0971e0200c645c198a96fe3 Merge: d672e98 2433872 Author: Mark Brown Date: Mon Jan 11 13:54:26 2016 +0000 Merge remote-tracking branch 'asoc/fix/arizona' into asoc-linus commit d672e98b9b718d66e41e6e11ae2668a04a87c3c5 Merge: 1683098 bc42f36 Author: Mark Brown Date: Mon Jan 11 13:54:26 2016 +0000 Merge tag 'asoc-fix-v4.4-rc8' into asoc-linus ASoC: Last minute fixes for v4.4 A few final fixes for v4.4, the main one being the two patches to the new Sky Lake drivers which fix a previous incorrect fix that went in during an earlier -rc. # gpg: Signature made Wed 06 Jan 2016 17:12:57 GMT using RSA key ID 5D5487D0 # gpg: Good signature from "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: aka "Mark Brown " # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0 commit c3152592e70bbf023ec106ee9ea271e9060bc09a Merge: afd2ff9 768acf4 Author: Mauro Carvalho Chehab Date: Mon Jan 11 11:13:27 2016 -0200 Merge branch 'patchwork' into v4l_for_linus * patchwork: (204 commits) [media] rc: sunxi-cir: Initialize the spinlock properly [media] rtl2832: do not filter out slave TS null packets [media] rtl2832: print reg number on error case [media] rtl28xxu: return demod reg page from driver cache [media] coda: enable MPEG-2 ES decoding [media] coda: don't start streaming without queued buffers [media] coda: hook up vidioc_prepare_buf [media] coda: relax coda_jpeg_check_buffer for trailing bytes [media] coda: make to_coda_video_device static [media] s5p-mfc: remove volatile attribute from MFC register addresses [media] s5p-mfc: merge together s5p_mfc_hw_call and s5p_mfc_hw_call_void [media] s5p-mfc: use spinlock to protect MFC context [media] s5p-mfc: remove unnecessary callbacks [media] s5p-mfc: make queue cleanup code common [media] s5p-mfc: use one implementation of s5p_mfc_get_new_ctx [media] s5p-mfc: constify s5p_mfc_codec_ops structures [media] au8522: Avoid memory leak for device config data [media] ir-lirc-codec.c: don't leak lirc->drv-rbuf [media] uvcvideo: small cleanup in uvc_video_clock_update() [media] uvcvideo: Fix reading the current exposure value of UVC ... commit fe09dd8eb2310ec658f49a5431df2259f11cbe9e Author: Arnd Bergmann Date: Mon Jan 11 13:09:55 2016 +0100 ASoC: hdac_hdmi: remove unused hdac_hdmi_query_pin_connlist A recent rework removed the only user of the hdac_hdmi_query_pin_connlist function, so we now get a warning when building the hdac_hdmi driver: hdac_hdmi.c:313:12: warning: 'hdac_hdmi_query_pin_connlist' defined but not used [-Wunused-function] This removes the function, which makes the file build cleanly again. Signed-off-by: Arnd Bergmann Fixes: 15b914476bf2 ("ASoC: hdac_hdmi: Use list to add pins and converters") Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 7cb1dc810935fbf82ad06007dc7fb08d93c1e59f Author: Guenter Roeck Date: Mon Jan 11 02:41:05 2016 -0800 ASoC: AMD: Add missing include file arm:allmodconfig, s390:allmodconfig, sparc64:allmodconfig, and probably other builds fail with sound/soc/amd/acp-pcm-dma.c:83:2: error: implicit declaration of function ‘readl’ sound/soc/amd/acp-pcm-dma.c:88:2: error: implicit declaration of function ‘writel’ Include linux/io.h explicitly to fix the problem. Fixes: 7c31335a03b6a ("ASoC: AMD: add AMD ASoC ACP 2.x DMA driver") Cc: Maruthi Srinivas Bayyavarapu Signed-off-by: Guenter Roeck Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 1 + 1 file changed, 1 insertion(+) commit 4dd041b6f68ad942b843038e4ff6932c6571ccad Merge: 0c6623e 8bc403b Author: Arnd Bergmann Date: Mon Jan 11 13:26:37 2016 +0100 Merge tag 'renesas-dt-fixes-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Merge "Renesas ARM Based SoC DT Fixes for v4.5" from Simon Horman: * Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), which is in v4.4-rc6, the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. * tag 'renesas-dt-fixes-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: silk: Add compatible property to "partitions" node ARM: dts: gose: Add compatible property to "partitions" node ARM: dts: porter: Add compatible property to "partitions" node ARM: dts: koelsch: Add compatible property to "partitions" node ARM: dts: lager: Add compatible property to "partitions" node ARM: dts: bockw: Add compatible property to "partitions" node commit c2ab7282f0fcd11eea4d0ba45d1c65d89428c314 Author: Heiko Carstens Date: Thu Jan 7 13:37:22 2016 +0100 s390/sclp: fix possible control register corruption sclp_sync_wait() disables all external interrupt classes except for the service signal subclass. The static mask used for that however is wrong. It clears a couple of bits which shouldn't be cleared and on the other hand potentially does not clear bits which should be cleared. Fix this by using the same generic mask like we do it in our delay implementation. Signed-off-by: Heiko Carstens Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bcb7825a77f41c7dd91da6f7ac10b928156a322e Author: Ard Biesheuvel Date: Fri Jan 1 13:39:22 2016 +0100 s390: fix normalization bug in exception table sorting The normalization pass in the sorting routine of the relative exception table serves two purposes: - it ensures that the address fields of the exception table entries are fully ordered, so that no ambiguities arise between entries with identical instruction offsets (i.e., when two instructions that are exactly 8 bytes apart each have an exception table entry associated with them) - it ensures that the offsets of both the instruction and the fixup fields of each entry are relative to their final location after sorting. Commit eb608fb366de ("s390/exceptions: switch to relative exception table entries") ported the relative exception table format from x86, but modified the sorting routine to only normalize the instruction offset field and not the fixup offset field. The result is that the fixup offset of each entry will be relative to the original location of the entry before sorting, likely leading to crashes when those entries are dereferenced. Fixes: eb608fb366de ("s390/exceptions: switch to relative exception table entries") Signed-off-by: Ard Biesheuvel Cc: Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/extable.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit cb14def6a9cae973ba6f702443c8fc589998279c Author: Heiko Carstens Date: Thu Jul 2 17:30:31 2015 +0200 s390/configs: update default configurations Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/configs/default_defconfig | 27 ++++++++++++--------------- arch/s390/configs/gcov_defconfig | 24 ++++++++++-------------- arch/s390/configs/performance_defconfig | 24 ++++++++++-------------- arch/s390/configs/zfcpdump_defconfig | 10 ++-------- arch/s390/defconfig | 30 +++++++++++++++++++++++++++--- 5 files changed, 61 insertions(+), 54 deletions(-) commit 249c543b97e1409b13fb9539b2f880e58ddd87cf Author: Martin Schwidefsky Date: Tue Jan 5 13:29:38 2016 +0100 s390/vdso: optimize getcpu system call Add the CPU number to the per-cpu vdso data page and add the __kernel_getcpu function to the vdso object to retrieve the CPU number in user space. Suggested-by: Heiko Carstens Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/vdso.h | 2 ++ arch/s390/kernel/asm-offsets.c | 2 ++ arch/s390/kernel/vdso.c | 9 +++++++- arch/s390/kernel/vdso32/Makefile | 2 +- arch/s390/kernel/vdso32/getcpu.S | 43 ++++++++++++++++++++++++++++++++++++ arch/s390/kernel/vdso32/vdso32.lds.S | 1 + arch/s390/kernel/vdso64/Makefile | 2 +- arch/s390/kernel/vdso64/getcpu.S | 42 +++++++++++++++++++++++++++++++++++ arch/s390/kernel/vdso64/vdso64.lds.S | 1 + 9 files changed, 101 insertions(+), 3 deletions(-) commit 8c31902cffc4d716450be549c66a67a8a3dd479c Author: H.J. Lu Date: Mon Jan 4 10:17:09 2016 -0800 x86/boot: Double BOOT_HEAP_SIZE to 64KB When decompressing kernel image during x86 bootup, malloc memory for ELF program headers may run out of heap space, which leads to system halt. This patch doubles BOOT_HEAP_SIZE to 64KB. Tested with 32-bit kernel which failed to boot without this patch. Signed-off-by: H.J. Lu Acked-by: H. Peter Anvin Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: Signed-off-by: Ingo Molnar arch/x86/include/asm/boot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dab3e0e59ac3692e2f95cb37ba17d5dfb3d1e5f Author: Michael S. Tsirkin Date: Tue Jan 5 18:17:53 2016 +0200 s390: drop smp_mb in vdso_init The initial s390 vdso code is heavily influenced by the powerpc version which does have a smp_wmb in vdso_init right before the vdso_ready=1 assignment. s390 has no need for that. Signed-off-by: Michael S. Tsirkin Message-Id: <1452010645-25380-1-git-send-email-mst@redhat.com> Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/kernel/vdso.c | 2 -- 1 file changed, 2 deletions(-) commit c667aeacc16e0de9e205faa93f57121d6f691973 Author: Heiko Carstens Date: Thu Dec 31 10:29:00 2015 +0100 s390: rename struct _lowcore to struct lowcore Finally get rid of the leading underscore. I tried this already two or three years ago, however Michael Holzheu objected since this would break the crash utility (again). However Michael integrated support for the new name into the crash utility back then, so it doesn't break if the name will be changed now. So finally get rid of the ever confusing leading underscore. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/lowcore.h | 6 +- arch/s390/include/asm/processor.h | 2 +- arch/s390/include/asm/vdso.h | 4 +- arch/s390/kernel/asm-offsets.c | 174 +++++++++++++++++++------------------- arch/s390/kernel/crash_dump.c | 4 +- arch/s390/kernel/ipl.c | 4 +- arch/s390/kernel/setup.c | 6 +- arch/s390/kernel/smp.c | 16 ++-- arch/s390/kernel/vdso.c | 6 +- arch/s390/kvm/interrupt.c | 4 +- arch/s390/kvm/priv.c | 2 +- arch/s390/mm/maccess.c | 4 +- 12 files changed, 116 insertions(+), 116 deletions(-) commit 423d5b364c108c00d98e3da9f72d598e8f2ef948 Author: Heiko Carstens Date: Thu Dec 31 10:07:21 2015 +0100 s390/mem_detect: use unsigned longs The memory detection code historically had to use unsigned long long since the machine reported the true memory size (>4GB) even if the virtual machine was running in ESA/390 mode. Since the old code is gone use unsigned long everywhere and also get rid of an unused ADDR2G define. (this patch converts all long longs within sclp_info to longs) There are many more possible conversions, however that can be done if somebody touches the corresponding code. Since people started to convert unrelated long types to long longs because of the types within struct sclp_info convert this now. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/sclp.h | 8 ++++---- arch/s390/mm/mem_detect.c | 7 ++----- 2 files changed, 6 insertions(+), 9 deletions(-) commit cb951785a78c68bf802f5e3d9016b0205ddd24c2 Author: Heiko Carstens Date: Thu Dec 31 09:58:02 2015 +0100 s390/ptrace: get rid of long longs in psw_bits The long longs were introduced by me in order to have a working definition of the struct psw_bits also in 31 bit mode. Since that is gone also get rid of the long longs. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ptrace.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 7022ec496005b47257b8c0a1c1a40df92df7c79f Author: Heiko Carstens Date: Wed Dec 30 13:42:37 2015 +0100 s390/sysinfo: add missing SYSIB 1.2.2 multithreading fields Add missing multithreading fields of SYSIB 1.2.2 (Basic-Machine CPUs) to the output of /proc/sysinfo. Also use bitfields for SYSIB 2.2.2 to simplify the C code a bit. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/sysinfo.h | 17 +++++++++++++---- arch/s390/kernel/sysinfo.c | 15 ++++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) commit 71b3c126e61177eb693423f2e18a1914205b165e Author: Andy Lutomirski Date: Wed Jan 6 12:21:01 2016 -0800 x86/mm: Add barriers and document switch_mm()-vs-flush synchronization When switch_mm() activates a new PGD, it also sets a bit that tells other CPUs that the PGD is in use so that TLB flush IPIs will be sent. In order for that to work correctly, the bit needs to be visible prior to loading the PGD and therefore starting to fill the local TLB. Document all the barriers that make this work correctly and add a couple that were missing. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: linux-mm@kvack.org Cc: stable@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 33 ++++++++++++++++++++++++++++++++- arch/x86/mm/tlb.c | 29 ++++++++++++++++++++++++++--- 2 files changed, 58 insertions(+), 4 deletions(-) commit 60d613d6aef4ae49988eeb3ad38af948c561db1e Author: Vladimir Zapolskiy Date: Sun Jun 14 17:32:14 2015 +0300 backlight: pwm_bl: Free PWM requested by legacy API on error path If pwm is requested by legacy pwm_request() and if the following backlight_device_register() call fails, add pwm_free() clean-up. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 2 ++ 1 file changed, 2 insertions(+) commit 68adb7bfd66504e97364651fb7dac3f9c8aa8561 Author: Uma Krishnan Date: Mon Dec 7 16:03:32 2015 -0600 cxl: Enable PCI device ID for future IBM CXL adapter Add support for future IBM Coherent Accelerator (CXL) device with ID of 0x0601. Signed-off-by: Uma Krishnan Reviewed-by: Matthew R. Ochs Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 1 + 1 file changed, 1 insertion(+) commit 57f7c3932516b9f7908d9b0a24396112d0f4ca55 Author: Brian Norris Date: Fri Jan 8 10:30:10 2016 -0800 cxl: use -Werror only with CONFIG_PPC_WERROR Some developers really like to have -Werror enabled for their code, as it helps to ensure warning free code. Others don't want -Werror, as it (for example) can cause problems when newer (or older) compilers have different sets of warnings, or new warnings can appear just when turning up the warning level (e.g., make W=1 or W=2). Thus, it seems prudent to have the use of -Werror be configurable. It so happens that cxl is only built on PowerPC, and PowerPC already has a nice set of Kconfig options for this, under CONFIG_PPC_WERROR. So let's use that, and the world is a happy place again! (Note that PPC_WERROR defaults to =y, so the common case compile should still be enforcing -Werror.) Fixes: d3d73f4b38a8 ("cxl: Compile with -Werror") Signed-off-by: Brian Norris Signed-off-by: Michael Ellerman drivers/misc/cxl/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aa09545589ceeff884421d8eb38d04963190afbe Author: Brian Norris Date: Fri Jan 8 10:30:09 2016 -0800 cxl: fix build for GCC 4.6.x GCC 4.6.3 does not support -Wno-unused-const-variable. Instead, use the kbuild infrastructure that checks if this options exists. Fixes: 2cd55c68c0a4 ("cxl: Fix build failure due to -Wunused-variable behaviour change") Suggested-by: Michal Marek Suggested-by: Arnd Bergmann Signed-off-by: Brian Norris Signed-off-by: Michael Ellerman drivers/misc/cxl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e708c24cd01ce80b1609d8baccee40ccc3608a01 Author: Michael Ellerman Date: Mon Jan 11 13:59:04 2016 +1100 powerpc: Add HWCAP bits for Power9 In order to support Power9 we need two new HWCAP bits. We are merging these ahead of the cputable entry so that glibc can start referring to them. Signed-off-by: Michael Ellerman arch/powerpc/include/uapi/asm/cputable.h | 2 ++ 1 file changed, 2 insertions(+) commit 08f48f3234a79bca86c2283a166aec83bf52b265 Author: Alistair Popple Date: Mon Jan 11 16:53:50 2016 +1100 powerpc/powernv: Reserve PE#0 on NPU P8+ hardware reports all errors on PE#0. This patch ensures PE#0 is not assigned to NPU devices so that it can be used for EEH. Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b521549a09ddfac3bed38e261168cda92d04ce81 Author: Alistair Popple Date: Mon Jan 11 16:53:49 2016 +1100 powerpc/powernv: Change NPU PE# assignment The P8+ hardware supports four partitionable endpoints (PEs) however the hardware reports all errors as occurring on PE#0. This means we need to reserve this PE for error handling (EEH) and not assign it to a NPU device, implying that some devices will need to share PEs. This patch changes the PE assignment for NPU devices such that NPU devices which connect to the same GPU are assigned to the same PE#. Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 73 ++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 7 deletions(-) commit 419dbd5e1ff0e45a6e1d28c1f7b74d121d2a56e7 Author: Alistair Popple Date: Fri Jan 8 11:35:09 2016 +1100 powerpc/powernv: Fix update of NVLink DMA mask The emulated NVLink PCI devices share the same IODA2 TCE tables but only support a single TVT (instead of the normal two for PCI devices). This requires the kernel to manually replace windows with either the bypass or non-bypass window depending on what the driver has requested. Unfortunately an incorrect optimisation was made in pnv_pci_ioda_dma_set_mask() which caused updating of some NPU device PEs to be skipped in certain configurations due to an incorrect assumption that a NULL peer PE in the array indicated there were no more peers present. This patch fixes the problem by ensuring all peer PEs are updated. Fixes: 5d2aa710e697 ("powerpc/powernv: Add support for Nvlink NPUs") Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 56f27013482c0803d978b667fe85de04ce9357cd Author: David Henningsson Date: Mon Jan 11 09:33:14 2016 +0100 ALSA: hda - Fixup inverted internal mic for Lenovo E50-80 Inform userspace that one channel of the internal mic has reversed polarity, so it does not attempt to add both channels together and end up with silence. Cc: stable@vger.kernel.org Reported-by: Andrzej Mendel Alsa-info: http://www.alsa-project.org/db/?f=3088f82a0cf977855f92af9db8ad406c04f71efa BugLink: https://bugs.launchpad.net/bugs/1529624 Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a4eae3a506ea4a7d4474cd74e20b423fa8053d91 Author: Jurgen Kramer Date: Mon Jan 11 08:16:58 2016 +0100 ALSA: usb: Add native DSD support for Oppo HA-1 This patch adds native DSD support for the Oppo HA-1. It uses a XMOS chipset but they use their own vendor ID. Signed-off-by: Jurgen Kramer Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) commit 5b61c7bd25f13daa58f2507991e87e990d7c6010 Author: Chris Bainbridge Date: Fri Jan 8 20:44:04 2016 +0000 kconfig: fix qconf segfault by deleting heap objects On Debian stable (qt-4.8.6) 'make xconfig' intermittently fails due to qconf segfaulting at exit time in QXcbEventReader. The cause of this is destructors on the heap objects never being called, so fix this by properly deleting the heap objects before exit. Signed-off-by: Chris Bainbridge Signed-off-by: Michal Marek scripts/kconfig/qconf.cc | 2 ++ 1 file changed, 2 insertions(+) commit 5f7e5445a2de848c66d2d80ba5479197e8287c33 Author: Peter Hutterer Date: Mon Jan 11 00:08:58 2016 -0800 Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE As of e0361b70175 ("Input: wacom_w8001 - split the touch and pen devices into two devices") the touch events aren't multiplexed over the same device anymore, the use of ABS_MT_TOOL_TYPE is superfluous. And even before then it only ever sent MT_TOOL_TYPE_FINGER anyway. Signed-off-by: Peter Hutterer Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wacom_w8001.c | 3 --- 1 file changed, 3 deletions(-) commit 02f22c004ff2ab0ce1f2fa3cc6a87cf20a4fed40 Author: Arnd Bergmann Date: Mon Nov 30 12:24:23 2015 +0100 backlight: adp8860: Fix another uninitialized variable use A recent patch I did fixed two potential uses of uninitialized variables in the adp8870 and adp8860 drivers. Unfortunately, I missed another one: drivers/video/backlight/adp8860_bl.c: In function 'adp8860_bl_ambient_light_level_show': drivers/video/backlight/adp8860_bl.c:570:11: warning: 'reg_val' may be used uninitialized in this function This does the same change as before in one additional function, and also changes the check for the return value in a way that avoids another false positive warning with a similar message. Signed-off-by: Arnd Bergmann Fixes: 6be3a5a9cd91 ("backlight: adp88x0: Fix uninitialized variable use") Acked-by: Michael Hennerich Acked-by: Jingoo Han Signed-off-by: Lee Jones drivers/video/backlight/adp8860_bl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2f4647a149943b1f87e46858e9f13e02010347f7 Author: Stefan Agner Date: Fri Oct 23 16:44:43 2015 -0700 backlight: gpio-backlight: Use default-on on GPIO request There are situations where the backlight should be on at boot time (e.g. if the boot loader already turned the display on). The DT bindings specify the "default-on" property for that purpose. Currently, the initial state of the GPIO at request time is always set to logical off (high or low depending on whether it is an active high or low GPIO). Since the GPIO is requested as an output, the GPIO will be driven low for a short period of time, which leads to a flickering display in the above use-case. Initialize the GPIO depending on the default-on property to be logical on or off. Signed-off-by: Stefan Agner Signed-off-by: Lee Jones drivers/video/backlight/gpio_backlight.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 0c7f3f92ffe8dc4e631b2f20c06543ec9f521f7c Author: Linus Walleij Date: Tue Dec 22 15:48:33 2015 +0100 mfd: ucb1x00-core: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Lee Jones Signed-off-by: Linus Walleij Signed-off-by: Lee Jones drivers/mfd/ucb1x00-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5dca7dc7e80f0cb4dcc9251983fb51745541f48 Author: Charles Keepax Date: Mon Dec 14 10:19:12 2015 +0000 mfd: arizona: Update binding docs for selecting mono/stereo outputs Update the device tree binding documentation to include the wlf,out-mono property that is used to specify whether each output is a mono or stereo output. Signed-off-by: Charles Keepax Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/arizona.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit f199d39349beabcb1a374cb02e0845a0ae84f3fd Author: Charles Keepax Date: Mon Dec 14 10:19:11 2015 +0000 mfd: arizona: Add device tree binding to specify mono outputs Add device tree bindings to support specifying outputs from the chip as mono outputs. Whilst we are doing it change the out_mono pdata from a bool to an int, because Sparse gets upset about using ARRAY_SIZE on bools. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 10 ++++++++++ include/linux/mfd/arizona/pdata.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) commit 8726cacc7f38e7e122e6910fb0b979dcd1ca89d3 Author: Geert Uytterhoeven Date: Mon Dec 7 17:16:43 2015 +0100 mfd: da9063: Allow modular build Allow support for the DA9063 PMIC to be modular, cfr. DA9062, which allows to decrease size of multi-platform kernels (e.g. multi_v7_defconfig). Signed-off-by: Geert Uytterhoeven Acked-by: Steve Twiss Signed-off-by: Lee Jones drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c006b1b17f8841d83f09b2bc34227e2f9428872 Author: Charles Keepax Date: Wed Dec 16 13:53:59 2015 +0000 mfd: arizona: Request parent IRQ before we request child IRQs Currently the driver requests the boot done and control interface IRQs before it has requested its own IRQ line. This can cause problems on edge triggered IRQ systems as if an edge occurs before the parent IRQ is enabled it will be missed. Whilst we are changing the error handling remove an unused label as well. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-irq.c | 57 ++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 30 deletions(-) commit 7d07d15abb606f6e0c611e9bc9a2de4745456e5f Author: Richard Fitzgerald Date: Tue Nov 3 15:08:34 2015 +0000 gpio: arizona: Support Cirrus Logic CS47L24 and WM1831 The CS47L24 and WM1831 codecs only have two GPIO lines, but are otherwise similar to the WM8280. Signed-off-by: Richard Fitzgerald Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/gpio-arizona.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8777078015bb77f0561303b6dea23d40bd9f3053 Author: Philipp Zabel Date: Thu Dec 10 10:09:06 2015 +0100 backlight: pwm_bl: Fix broken PWM backlight for non-dt platforms Commit ee65ad0e2a9e ("backlight: pwm_bl: Avoid backlight flicker when probed from DT") tries to dereference the device of_node pointer unconditionally, causing a NULL pointer dereference on non-dt platforms. Fix it by replacing the phandle variable with a node variable and by checking that for NULL before dereferencing it. Reported-by: Robert Jarzmik Signed-off-by: Philipp Zabel Acked-by: Thierry Reding Tested-by: Robert Jarzmik Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit fcf13f0b9e4b54c51dff8366fc9a96d85129ff4c Author: Enric Balletbo i Serra Date: Sun Nov 29 17:29:46 2015 +0100 backlight: tps65217_bl: Add MODULE_DEVICE_TABLE The device table is required to load modules based on modaliases. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Lee Jones drivers/video/backlight/tps65217_bl.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 668f4729837dabf2a774063da230915dbbd22e4d Author: Stanimir Varbanov Date: Tue Jan 5 15:38:25 2016 -0600 ARM: dts: ifc6410: enable PCIe DT node for this board Enable PCIe DT node and fill PCIe DT node with regulator, pinctrl and reset GPIO, to use the PCIe on the ifc6410 board. Signed-off-by: Stanimir Varbanov Signed-off-by: Bjorn Helgaas arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit bcc74b0957d63394f873680cce705eacfb41eed0 Author: Stanimir Varbanov Date: Fri Dec 18 14:38:58 2015 +0200 ARM: dts: apq8064: add PCIe devicetree node Add the PCIe DT node so that it can probe and be used. Signed-off-by: Stanimir Varbanov Signed-off-by: Bjorn Helgaas arch/arm/boot/dts/qcom-apq8064.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit a7b956fd38dd217dd78e3058110929f5ac914df1 Author: Arnd Bergmann Date: Tue Dec 8 16:21:05 2015 +0100 mfd: as3722: Mark PM functions as __maybe_unused The newly introduced as3722_i2c_suspend/resume functions are built unconditionally, but only used when power management is enabled, so we get a warning otherwise: drivers/mfd/as3722.c:427:12: warning: 'as3722_i2c_suspend' defined but not used [-Wunused-function] drivers/mfd/as3722.c:438:12: warning: 'as3722_i2c_resume' defined but not used [-Wunused-function] This marks them both as __maybe_unused, which avoids an ugly #ifdef and gives us best compile-time coverage. When they are unused, the compiler will silently drop the functions from its output. Signed-off-by: Arnd Bergmann Fixes: 35deff7eb212 ("mfd: as3722: Handle interrupts on suspend") Signed-off-by: Lee Jones drivers/mfd/as3722.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d91d76d84c3adf7ca04ef1932431d49f51edee5e Author: Thierry Reding Date: Wed Dec 2 17:28:11 2015 +0100 mfd: sta2x11: Use platform_register/unregister_drivers() These new helpers simplify implementing multi-driver modules and properly handle failure to register one driver by unregistering all previously registered drivers. Signed-off-by: Thierry Reding Signed-off-by: Lee Jones drivers/mfd/sta2x11-mfd.c | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) commit 742dcd115cb523f4b518bfcda870e10a027a8024 Author: Ivan T. Ivanov Date: Tue Nov 17 16:06:44 2015 -0800 mfd: qcom-spmi-pmic: Don't access non-existing registers Revision ID registers are available only on devices with Slave IDs that are even, so don't make access to unavailable registers. Signed-off-by: Ivan T. Ivanov [sboyd@codeaurora.org: Consider all slave ids that are even] Signed-off-by: Stephen Boyd Signed-off-by: Lee Jones drivers/mfd/qcom-spmi-pmic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a5656a708050bd3be5c3a3bc45297db21e88cecd Author: Rasmus Villemoes Date: Sun Dec 6 00:39:39 2015 +0100 mfd: wm831x: Fix broken wm831x_unique_id_show wm831x_unique_id_show currently displays an interesting pattern of '0' and '3' characters which isn't very useful (figuring out why is left as an exercise for the reader). Presumably "buf[i]" should have been "id[i] & 0xff". But while there, it is much simpler to simply use %phN and do all the formatting at once. Signed-off-by: Rasmus Villemoes Acked-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm831x-otp.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit db2fb60cd35d2d03699e570906ced73b4c05586e Author: Damien Riegel Date: Mon Nov 30 10:59:47 2015 -0500 mfd: syscon: Add a DT property to set value width Currently syscon has a fixed configuration of 32 bits for register and values widths. In some cases, it would be desirable to be able to customize the value width. For example, certain boards (like the ones manufactured by Technologic Systems) have a FPGA that is memory-mapped, but its registers are only 16-bit wide. This patch adds an optional "reg-io-width" DT binding for syscon that allows to change the width for the data bus (i.e. val_bits). If this property is provided, it will also set the register stride to reg-io-width's value. If not provided, the default configuration is used. Signed-off-by: Damien Riegel Acked-by: Rob Herring Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/syscon.txt | 4 ++++ drivers/mfd/syscon.c | 13 +++++++++++++ 2 files changed, 17 insertions(+) commit 32e9725d9a87549eb8b2a6455de0bce9dc8385de Author: Charles Keepax Date: Thu Nov 26 17:40:17 2015 +0000 mfd: wm5110: Correct defaults for micbias control registers Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm5110-tables.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6d6e44a953161e4ce60d1fe805d165d8290ce9e8 Author: Nicolas Boichat Date: Wed Nov 25 13:51:07 2015 +0800 mfd: cros ec: Lock the SPI bus while holding chipselect cros_ec_cmd_xfer_spi and cros_ec_pkt_xfer_spi generally work like this: - Pull CS down (active), wait a bit, then send a command - Wait for response (multiple requests) - Wait a while, pull CS up (inactive) These operations, individually, lock the SPI bus, but there is nothing preventing the SPI framework from interleaving messages intended for other devices as the bus is unlocked in between. This is a problem as the EC expects CS to be held low for the whole duration. Solution: Lock the SPI bus during the whole transaction, to make sure that no other messages can be interleaved. Signed-off-by: Nicolas Boichat Reviewed-by: Gwendal Grignou Signed-off-by: Lee Jones drivers/mfd/cros_ec_spi.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 3698d7e7d221a5c90d4b55e96d0c8f98a8b4d7df Author: Philipp Zabel Date: Wed Nov 18 18:12:25 2015 +0100 backlight: pwm_bl: Avoid backlight flicker when probed from DT If the driver is probed from the device tree, and there is a phandle property set on it, and the enable GPIO is already configured as output, and the backlight is currently disabled, keep it disabled. If all these conditions are met, assume there will be some other driver that can enable the backlight at the appropriate time. Signed-off-by: Philipp Zabel Reviewed-by: Christian Gmeiner Tested-by: Heiko Stuebner Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 86c68e2fb3eeb87ef716a0d61c5a346e9aee2ecb Author: Arnd Bergmann Date: Mon Nov 23 14:44:13 2015 +0100 backlight: adp88x0: Fix uninitialized variable use gcc correctly warns about both the adp8860 and adp8870 backlight drivers using an uninitialized variable in their error handling path: drivers/video/backlight/adp8870_bl.c: In function 'adp8870_bl_ambient_light_zone_store': drivers/video/backlight/adp8870_bl.c:811:11: warning: 'reg_val' may be used uninitialized in this function This changes the code to only write back the data if it was correctly read to start with. As a side-note, the drivers are mostly identical, so I think they should really be merged into one file to avoid having to fix every bug twice. Signed-off-by: Arnd Bergmann Acked-by: Michael Hennerich Signed-off-by: Lee Jones drivers/video/backlight/adp8860_bl.c | 10 ++++++---- drivers/video/backlight/adp8870_bl.c | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) commit b0eab5b29a55fd9f31fad28df520337545c813ef Author: Russell Currey Date: Fri Jan 8 16:16:47 2016 +1100 powerpc/powernv: Remove misleading comment in pci.c PCI in powernv now supports quite a bit more than p5ioc2, so remove the outdated comment. Signed-off-by: Russell Currey Acked-by: Stewart Smith Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci.c | 2 -- 1 file changed, 2 deletions(-) commit 617cfc753049a4e1e161ae5e5e00e92d56be2b90 Author: Alexander Kuleshov Date: Sun Jan 10 21:26:57 2016 +0600 net/rtnetlink: remove unused sz_idx variable The sz_idx variable is defined in the rtnetlink_rcv_msg(), but not used anywhere. Let's remove it. Signed-off-by: Alexander Kuleshov Signed-off-by: David S. Miller net/core/rtnetlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 366ce60315292a579b8ceae2777102e1954a2024 Author: Ido Schimmel Date: Sun Jan 10 09:32:16 2016 +0100 mlxsw: spectrum: Add FDB lock to prevent session interleaving Dumping the FDB (invoked with a process context) or handling FDB notifications (polled periodicly in delayed work) might each entail multiple EMAD transcations due to the number of entries. While we only allow one EMAD transaction at a time, there is nothing stopping the dump and notification processing sessions from interleaving. However, this is forbidden by the hardware, so we need to make sure only one of these sessions can run at a time. Solve this by adding a mutex ('fdb_lock'), as both kernel threads can sleep while waiting for the response EMAD. Fixes: 56ade8fe3f ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 5 +++++ 2 files changed, 6 insertions(+) commit 712f4aad406bb1ed67f3f98d04c044191f0ff593 Author: willy tarreau Date: Sun Jan 10 07:54:56 2016 +0100 unix: properly account for FDs passed over unix sockets It is possible for a process to allocate and accumulate far more FDs than the process' limit by sending them over a unix socket then closing them to keep the process' fd count low. This change addresses this problem by keeping track of the number of FDs in flight per user and preventing non-privileged processes from having more FDs in flight than their configured FD limit. Reported-by: socketpair@gmail.com Reported-by: Tetsuo Handa Mitigates: CVE-2013-4312 (Linux 2.0+) Suggested-by: Linus Torvalds Acked-by: Hannes Frederic Sowa Signed-off-by: Willy Tarreau Signed-off-by: David S. Miller include/linux/sched.h | 1 + net/unix/af_unix.c | 24 ++++++++++++++++++++---- net/unix/garbage.c | 13 ++++++++----- 3 files changed, 29 insertions(+), 9 deletions(-) commit 713d40248bde50fba40c5bf1b5dde6d5df02cfd0 Author: Guenter Roeck Date: Sun Jan 10 20:43:49 2016 -0800 net: bfin_mac: Use phy_find_first() instead of open-coding it Use phy_find_first() to find the first phy device instead of open-coding it. Cc: Andrew Lunn Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller drivers/net/ethernet/adi/bfin_mac.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 50ee63824f5e0702da9909b989cdda96a2128afb Merge: 3c6396d c5420eb1 Author: David S. Miller Date: Sun Jan 10 23:49:21 2016 -0500 Merge branch 'ovs-cleanups' Jean Sacren says: ==================== Trivial fix-ups for openvswitch This series does trivial fix-ups for openvswitch as follows: 1) Clean up the leftover of the unused function. 2) Fix up the twisted struct geneve_port member name. 3) Update the kernel doc to reflect the changes in struct vport. ==================== Signed-off-by: David S. Miller commit c5420eb12f8e26dd2951c5acc954ca4848f488cb Author: Jean Sacren Date: Sat Jan 9 16:07:11 2016 -0700 openvswitch: update kernel doc for struct vport commit be4ace6e6b1b ("openvswitch: Move dev pointer into vport itself") The commit above added @dev and moved @rcu to the bottom of struct vport, but the change was not reflected in the kernel doc. So let's update the kernel doc as well. Signed-off-by: Jean Sacren Cc: Thomas Graf Acked-by: Thomas Graf Signed-off-by: David S. Miller net/openvswitch/vport.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f7066ada15c865eeab5a3f6c69dcf58d196e349 Author: Jean Sacren Date: Sat Jan 9 16:07:10 2016 -0700 openvswitch: fix struct geneve_port member name commit 6b001e682e90 ("openvswitch: Use Geneve device.") The commit above introduced 'port_no' as the name for the member of struct geneve_port. The correct name should be 'dst_port' as described in the kernel doc. Let's fix that member name and all the pertinent instances so that both doc and code would be consistent. Signed-off-by: Jean Sacren Acked-by: Thomas Graf Signed-off-by: David S. Miller net/openvswitch/vport-geneve.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5ea030429fed07ea47e45152202d6ecb24133374 Author: Jean Sacren Date: Sat Jan 9 16:07:09 2016 -0700 openvswitch: clean up unused function commit 6b001e682e90 ("openvswitch: Use Geneve device.") The commit above deleted the only call site of ovs_tunnel_route_lookup() and now that function is not used any more. So let's delete the function definition as well. Signed-off-by: Jean Sacren Acked-by: Thomas Graf Signed-off-by: David S. Miller net/openvswitch/vport.h | 20 -------------------- 1 file changed, 20 deletions(-) commit 3c6396d6309b446fe28c8c6b49fbb4fa22754650 Author: Guenter Roeck Date: Sat Jan 9 13:19:39 2016 -0800 net: ti: cpmac: Fix build error due to missed API change Commit 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus") introduces an API to access mii_bus structures, but missed to update the TI cpamc driver. This results in the following error message. drivers/net/ethernet/ti/cpmac.c: In function 'cpmac_probe': drivers/net/ethernet/ti/cpmac.c:1119:18: error: 'struct mii_bus' has no member named 'phy_map' Fixes: 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus") Cc: Andrew Lunn Signed-off-by: Guenter Roeck Acked-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e253e8fbab01059c25c6d091e4888c68a26691f5 Author: Guenter Roeck Date: Sun Jan 10 07:10:45 2016 -0800 net: tc35815: Drop unused variable Commit e7f4dc3536a4 ("mdio: Move allocation of interrupts into core") removes some code from tc_mii_init(), but does not remove a now unused variable. This results in the following build warning. drivers/net/ethernet/toshiba/tc35815.c: In function 'tc_mii_init': drivers/net/ethernet/toshiba/tc35815.c:670:6: warning: unused variable 'i' Fixes: e7f4dc3536a4 ("mdio: Move allocation of interrupts into core") Cc: Andrew Lunn Acked-by: Andrew Lunn Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/tc35815.c | 1 - 1 file changed, 1 deletion(-) commit a05876b30cae6af79a5f0ff2cf5b42248aa0528f Author: Guenter Roeck Date: Sun Jan 10 07:10:44 2016 -0800 net: tc35815: Fix build error due to missed API change Commit 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus") introduces an API to access mii_bus structures, but missed to update the tc35815 driver. This results in the following error message. drivers/net/ethernet/toshiba/tc35815.c: In function 'tc_mii_probe': drivers/net/ethernet/toshiba/tc35815.c:617:18: error: 'struct mii_bus' has no member named 'phy_map' drivers/net/ethernet/toshiba/tc35815.c:623:24: error: 'struct mii_bus' has no member named 'phy_map' Instead of looping over the list of phy addresses to find a phy chip, use phy_find_first(). While the intent of the original code was to return an error if more than one phy was specified, this code path was never executed because the loop aborted after finding the first phy. The original code is therefore semantically identical to phy_find_first(), thus it is simpler and more straightforward to use phy_find_first() directly. Fixes: 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus") Cc: Andrew Lunn Signed-off-by: Guenter Roeck Acked-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/tc35815.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 26706d43b82b881bd10ce1428516e4a411748ddb Author: Joshua Henderson Date: Sat Jan 9 04:54:21 2016 -0700 net: phy: Add support for SMSC LAN8740 PHY LAN8740 has a different phy_id than LAN8710/LAN8720. Signed-off-by: Joshua Henderson Signed-off-by: David S. Miller drivers/net/phy/smsc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7d7f5d04c2b41672570fd1b6e4eb33dfbfb087e9 Merge: a78cb84 42e0ed0 Author: David S. Miller Date: Sun Jan 10 23:10:10 2016 -0500 Merge tag 'wireless-drivers-next-for-davem-2016-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== brcmfmac * query features through firmware command * ARP offload through inet notifier * force probe to succeed for debugging purposes * random mac support for scheduled scan * support wowl upon net detect iwlwifi * bug fixes and improvements for firmware debug system * advertise support for Rx A-MSDU in A-MPDU * support -20.ucode * fix WoWLAN for iwldvm * preparations towards multiple Rx queues * platform power improvements for GO mode when no clients are associated ==================== Signed-off-by: David S. Miller commit 3e4006f0b86a5ae5eb0e8215f9a9e1db24506977 Author: Eric Dumazet Date: Fri Jan 8 09:35:51 2016 -0800 ipv6: tcp: add rcu locking in tcp_v6_send_synack() When first SYNACK is sent, we already hold rcu_read_lock(), but this is not true if a SYNACK is retransmitted, as a timer (soft) interrupt does not hold rcu_read_lock() Fixes: 45f6fad84cc30 ("ipv6: add complete rcu protection around np->opt") Reported-by: Dave Jones Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 2 ++ 1 file changed, 2 insertions(+) commit a78cb84c62c427807d917c5aa8797740f00b0bbe Author: Eric Dumazet Date: Fri Jan 8 08:37:20 2016 -0800 net: add scheduling point in recvmmsg/sendmmsg Applications often have to reduce number of datagrams they receive or send per system call to avoid starvation problems. Really the kernel should take care of this by using cond_resched(), so that applications can experiment bigger batch sizes. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/socket.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d171f3907329d4b1ce31d5ec9c852c5f0269578 Author: Lubomir Rintel Date: Fri Jan 8 13:47:23 2016 +0100 ipv6: always add flag an address that failed DAD with DADFAILED The userspace needs to know why is the address being removed so that it can perhaps obtain a new address. Without the DADFAILED flag it's impossible to distinguish removal of a temporary and tentative address due to DAD failure from other reasons (device removed, manual address removal). Signed-off-by: Lubomir Rintel Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/addrconf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 541b8e291f29e480fb9c6400ce796c2eaefe9229 Author: Fabio Estevam Date: Fri Jan 8 10:19:16 2016 -0200 net: lpc_eth: Remove unused variables Commit e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") introduced the following build warnings: drivers/net/ethernet/nxp/lpc_eth.c: In function 'lpc_mii_init': drivers/net/ethernet/nxp/lpc_eth.c:865:1: warning: label 'err_out_1' defined but not used [-Wunused-label] drivers/net/ethernet/nxp/lpc_eth.c:826:20: warning: unused variable 'i' [-Wunused-variable] Remove the unused variables to fix them. Reported-by: Olof's autobuilder Signed-off-by: Fabio Estevam Acked-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/nxp/lpc_eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fdffd2e8c7b361a831dc023c22bb8f4685c241ac Author: Sudip Mukherjee Date: Fri Jan 8 16:58:15 2016 +0530 bfin_mac: fix error path While building blackfin defconfig we were getting a build warning: warning: label 'out_err_irq_alloc' defined but not used. Commit e7f4dc3536a4 ("mdio: Move allocation of interrupts into core") removed the label out_err_mdiobus_register but then mistakenly jumped to out_err_alloc. But it was actually supposed to jump to out_err_irq_alloc. Fixes: e7f4dc3536a4 ("mdio: Move allocation of interrupts into core") Cc: Andrew Lunn Signed-off-by: Sudip Mukherjee Signed-off-by: David S. Miller drivers/net/ethernet/adi/bfin_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 053842a8bffed47fab386954e2e9d0a00e13ae2c Author: Sudip Mukherjee Date: Fri Jan 8 16:58:14 2016 +0530 phy: fix blackfin build failure The build of blackfin defconfig is failing with the error: error: 'struct mii_bus' has no member named 'phy_map' A new API mdiobus_get_phy() was introduced and phy_map was removed but it was not changed here. Fixes: 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus.") Cc: Andrew Lunn Signed-off-by: Sudip Mukherjee Acked-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/adi/bfin_mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 89e7a154e01cffa325874e90cbb124057416de02 Author: Hariprasad Shenai Date: Fri Jan 8 12:21:25 2016 +0530 cxgb4: Fixes static checker warning in mps_tcam_show() The commit 115b56af88b5 ("cxgb4: Update mps_tcam output to include T6 fields") from Dec 23, 2015, leads to the following static checker warning: drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:1735 mps_tcam_show() warn: we tested 'lookup_type' before and it was 'true' Fixing it. Reported-by: Dan Carpenter Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35de3b1aa16842214e0cd7c6036daf4619294314 Author: Steven Rostedt Date: Tue Dec 8 13:50:56 2015 -0500 powerpc: Implement save_stack_trace_regs() to enable kprobe stack tracing It has come to my attention that kprobe event stack tracing does not work on powerpc. You can see with the following: # cd /sys/kernel/debug/tracing # echo stacktrace > trace_options # echo 'p kfree' > kprobe_events # echo 1 > events/kprobes/enable Will print the following warning: save_stack_trace_regs() not implemented yet. Although save_stack_trace() (which normal event stack traces use) is implemented, save_stack_trace_regs() which kprobe events use is not. This is a cheap attempt to implement that function. Note, This may have issues if a task tries to get a stack trace from another task with its regs, because it just passes in "current" to save_context_stack(). But this does solve the issue with stack tracing kprobe events. Reported-by: Chunyu Hu Signed-off-by: Steven Rostedt Signed-off-by: Michael Ellerman arch/powerpc/kernel/stacktrace.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1f76f7315dd2ac7b462a36d2971a9328583b5eb7 Merge: 0652cb5 af72261 Author: David S. Miller Date: Sun Jan 10 22:21:32 2016 -0500 Merge branch 'emac-RK3036' Xing Zheng says: ==================== Add support emac for the RK3036 SoC platform We have supported the emac for RK3066/RK3188, but the RK3036 have some configuration different with them. We should let the driver of emac_rockchip compatible with other Rockchip SoCs. Changes in v2: - Separate DTS from patch series. ==================== Signed-off-by: David S. Miller commit af72261f33ee4958bb53e299746014f44e1134c4 Author: Xing Zheng Date: Fri Jan 8 09:35:02 2016 +0800 net: ethernet: arc: Add support emac for RK3036 The RK3036's GRFs offset are different with RK3066/RK3188, and need to set mac TX/RX clock before probe emac. Signed-off-by: Xing Zheng Signed-off-by: David S. Miller drivers/net/ethernet/arc/Kconfig | 4 ++-- drivers/net/ethernet/arc/emac_rockchip.c | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) commit f4c9d3ee0334fd9c6c8f2c3a8bd7d0841880e127 Author: Xing Zheng Date: Fri Jan 8 09:35:01 2016 +0800 net: ethernet: arc: Keep emac compatibility for more Rockchip SoCs On the RK3066/RK3188, there was fixed GRF offset configuration to set emac and fixed DIV2 mac TX/RX clock. So, we need to easily set and fit to other SoCs (RK3036) which maybe have different GRF offset, and need adjust mac TX/RX clock. Signed-off-by: Xing Zheng Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_rockchip.c | 69 +++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 24 deletions(-) commit c9bca2fe3ca6d6dac2a27eb8619955648369efed Author: Xing Zheng Date: Fri Jan 8 09:35:00 2016 +0800 net: ethernet: arc: Probe emac after set RMII clock After enter arc_emac_probe, emac will get_phy_id, phy_poll_reset and other connecting PHY via mdiobus_read, so we need to set correct ref clock rate for emac before probe emac. Signed-off-by: Xing Zheng Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_rockchip.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 0652cb5b8b228db53b686c735c64bdb9071979de Merge: 1f211a1 d2d6318 Author: David S. Miller Date: Sun Jan 10 22:19:19 2016 -0500 Merge branch 'bnxt_en-zeropad-fw-and-reset' Michael Chan says: ==================== bnxt_en: Zero pad fw messages and add fw reset. 2 patches related to firmware for net-next. ==================== Signed-off-by: David S. Miller commit d2d6318cb996f39112ba24ff23abe67578a611bc Author: Rob Swindell Date: Thu Jan 7 19:56:58 2016 -0500 bnxt_en: Reset embedded processor after applying firmware upgrade Use HWRM_FW_RESET command to request a self-reset of the embedded processor(s) after successfully applying a firmware update. For boot processor, the self-reset is currently deferred until the next PCIe reset. Signed-off-by: Rob Swindell Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 46 +++++++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) commit d79979a103f7820d3107cdc04096e87b37f90008 Author: Michael Chan Date: Thu Jan 7 19:56:57 2016 -0500 bnxt_en: Zero pad firmware messages to 128 bytes. For future compatibility, zero pad all messages that the driver sends to the firmware to 128 bytes. If these messages are extended in the future with new byte enables, zero padding these messages now will guarantee future compatibility. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) commit 1f211a1b929c804100e138c5d3d656992cfd5622 Author: Daniel Borkmann Date: Thu Jan 7 22:29:47 2016 +0100 net, sched: add clsact qdisc This work adds a generalization of the ingress qdisc as a qdisc holding only classifiers. The clsact qdisc works on ingress, but also on egress. In both cases, it's execution happens without taking the qdisc lock, and the main difference for the egress part compared to prior version of [1] is that this can be applied with _any_ underlying real egress qdisc (also classless ones). Besides solving the use-case of [1], that is, allowing for more programmability on assigning skb->priority for the mqprio case that is supported by most popular 10G+ NICs, it also opens up a lot more flexibility for other tc applications. The main work on classification can already be done at clsact egress time if the use-case allows and state stored for later retrieval f.e. again in skb->priority with major/minors (which is checked by most classful qdiscs before consulting tc_classify()) and/or in other skb fields like skb->tc_index for some light-weight post-processing to get to the eventual classid in case of a classful qdisc. Another use case is that the clsact egress part allows to have a central egress counterpart to the ingress classifiers, so that classifiers can easily share state (e.g. in cls_bpf via eBPF maps) for ingress and egress. Currently, default setups like mq + pfifo_fast would require for this to use, for example, prio qdisc instead (to get a tc_classify() run) and to duplicate the egress classifier for each queue. With clsact, it allows for leaving the setup as is, it can additionally assign skb->priority to put the skb in one of pfifo_fast's bands and it can share state with maps. Moreover, we can access the skb's dst entry (f.e. to retrieve tclassid) w/o the need to perform a skb_dst_force() to hold on to it any longer. In lwt case, we can also use this facility to setup dst metadata via cls_bpf (bpf_skb_set_tunnel_key()) without needing a real egress qdisc just for that (case of IFF_NO_QUEUE devices, for example). The realization can be done without any changes to the scheduler core framework. All it takes is that we have two a-priori defined minors/child classes, where we can mux between ingress and egress classifier list (dev->ingress_cl_list and dev->egress_cl_list, latter stored close to dev->_tx to avoid extra cacheline miss for moderate loads). The egress part is a bit similar modelled to handle_ing() and patched to a noop in case the functionality is not used. Both handlers are now called sch_handle_ingress() and sch_handle_egress(), code sharing among the two doesn't seem practical as there are various minor differences in both paths, so that making them conditional in a single handler would rather slow things down. Full compatibility to ingress qdisc is provided as well. Since both piggyback on TC_H_CLSACT, only one of them (ingress/clsact) can exist per netdevice, and thus ingress qdisc specific behaviour can be retained for user space. This means, either a user does 'tc qdisc add dev foo ingress' and configures ingress qdisc as usual, or the 'tc qdisc add dev foo clsact' alternative, where both, ingress and egress classifier can be configured as in the below example. ingress qdisc supports attaching classifier to any minor number whereas clsact has two fixed minors for muxing between the lists, therefore to not break user space setups, they are better done as two separate qdiscs. I decided to extend the sch_ingress module with clsact functionality so that commonly used code can be reused, the module is being aliased with sch_clsact so that it can be auto-loaded properly. Alternative would have been to add a flag when initializing ingress to alter its behaviour plus aliasing to a different name (as it's more than just ingress). However, the first would end up, based on the flag, choosing the new/old behaviour by calling different function implementations to handle each anyway, the latter would require to register ingress qdisc once again under different alias. So, this really begs to provide a minimal, cleaner approach to have Qdisc_ops and Qdisc_class_ops by its own that share callbacks used by both. Example, adding qdisc: # tc qdisc add dev foo clsact # tc qdisc show dev foo qdisc mq 0: root qdisc pfifo_fast 0: parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent :3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent :4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc clsact ffff: parent ffff:fff1 Adding filters (deleting, etc works analogous by specifying ingress/egress): # tc filter add dev foo ingress bpf da obj bar.o sec ingress # tc filter add dev foo egress bpf da obj bar.o sec egress # tc filter show dev foo ingress filter protocol all pref 49152 bpf filter protocol all pref 49152 bpf handle 0x1 bar.o:[ingress] direct-action # tc filter show dev foo egress filter protocol all pref 49152 bpf filter protocol all pref 49152 bpf handle 0x1 bar.o:[egress] direct-action A 'tc filter show dev foo' or 'tc filter show dev foo parent ffff:' will show an empty list for clsact. Either using the parent names (ingress/egress) or specifying the full major/minor will then show the related filter lists. Prior work on a mqprio prequeue() facility [1] was done mainly by John Fastabend. [1] http://patchwork.ozlabs.org/patch/512949/ Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Signed-off-by: David S. Miller include/linux/netdevice.h | 4 +- include/linux/rtnetlink.h | 5 +++ include/uapi/linux/pkt_sched.h | 4 ++ net/Kconfig | 3 ++ net/core/dev.c | 82 +++++++++++++++++++++++++++++++++++---- net/sched/Kconfig | 14 +++++-- net/sched/cls_bpf.c | 2 +- net/sched/sch_ingress.c | 88 +++++++++++++++++++++++++++++++++++++++++- 8 files changed, 186 insertions(+), 16 deletions(-) commit ede5599753802b5733f671e5f14403ae1eadce5a Author: Andrew Lunn Date: Mon Jan 11 01:13:21 2016 +0100 ethernet: amd: au1000: Remove pointless warning The warning about being able to read any MDIO device, not just the attached ethernet devices PHY applies to all MDIO drivers. So remove it. This also removes a reference to a member in phy_device which has moved. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/amd/au1000_eth.c | 3 --- 1 file changed, 3 deletions(-) commit 3fe01e2406ead2bdc4ae436254c66b5341c1e5c7 Author: Andrew Lunn Date: Mon Jan 11 00:57:43 2016 +0100 staging: netlogic: Fix build error due to missed API change Fix a number of build errors due to moving the phy_map and centralizing interrupt allocation. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/staging/netlogic/xlr_net.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit e574f39816f0227e3f43806952c8bc551d61770a Author: Guenter Roeck Date: Sun Jan 10 12:04:32 2016 -0800 net: ethernet: faraday: Use phy_find_first() instead of open coding it Use phy_find_first() to find the first phy device instead of open coding it. Cc: Andrew Lunn Signed-off-by: Guenter Roeck Acked-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit ee64f08ea9832b8127aeb808411e350bc4463399 Author: Guenter Roeck Date: Sun Jan 10 12:03:16 2016 -0800 net: ethernet: broadcom: Fix build errors Commit 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus") introduces an API to access mii_bus structures, but missed to update the sb1250 driver. This results in the following build error. drivers/net/ethernet/broadcom/sb1250-mac.c: In function 'sbmac_mii_probe': drivers/net/ethernet/broadcom/sb1250-mac.c:2360:24: error: 'struct mii_bus' has no member named 'phy_map' Use phy_find_first() instead of open coding it. Commit 2220943a21e2 ("phy: Centralise print about attached phy") introduces the following build error. drivers/net/ethernet/broadcom/sb1250-mac.c: In function 'sbmac_mii_probe': drivers/net/ethernet/broadcom/sb1250-mac.c:2383:20: error: 'phydev' undeclared Fixes: 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus") Fixes: 2220943a21e2 ("phy: Centralise print about attached phy") Cc: Andrew Lunn Signed-off-by: Guenter Roeck Acked-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/sb1250-mac.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 57b4f7e68720e8a9f5e6e9e61446ec36822e4c57 Merge: b483666 a18c91d Author: Dave Airlie Date: Mon Jan 11 11:48:18 2016 +1000 Merge branch 'linux-4.5' of git://github.com/skeggsb/linux into drm-next - gk20a instmem fixes / improvements - more gm10x vs gm20x differences deal with - better support for high-frequency hdmi modes - pstate control interfaces moved to debugfs - support for pcie link speed changes - misc other fixes across the board * 'linux-4.5' of git://github.com/skeggsb/linux: (50 commits) drm/nouveau/pmu: prevent falcon from acking interrupts routed to the host drm/nouveau/perf: change pcie speed on pstate change drm/nouveau/perf: add fields for pci speed and width and use it for the pstates drm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer cards drm/nouveau/pci: implement pcie speed change for kepler+ drm/nouveau/pci: implement pcie speed change for Fermi drm/nouveau/pci: implement pcie speed change for tesla drm/nouveau/pci: implement generic code for pcie speed change drm/nouveau/pci: add gk104 variant drm/nouveau/pci: add gf106 variant drm/nouveau/kms: take mode_config mutex in connector hotplug path drm/nouveau/nouveau/perfmon: add interface files for current core voltage drm/nouveau/sysfs: remove pstate interface drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs drm/nouveau/debugfs: we need a ctrl object for debugfs drm/nouveau/debugfs: rename functions to indicate they are used inside drm drm/nouveau/debugfs: add infrastructure to add files with other fops than only read drm/nouveau/fifo/gf100: remove references to "daemon" drm/nouveau/fb/nv50: remove references to "daemon" drm/nouveau/clk: remove references to "daemon" ... commit a18c91decee6ba4fc252bf82108adc1207dd1f86 Author: Ben Skeggs Date: Mon Jan 11 10:29:08 2016 +1000 drm/nouveau/pmu: prevent falcon from acking interrupts routed to the host Signed-off-by: Ben Skeggs .../drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 1366 +++++++++--------- .../drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 1284 +++++++++-------- .../drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 338 +++-- .../drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 1516 ++++++++++---------- .../gpu/drm/nouveau/nvkm/subdev/pmu/fuc/kernel.fuc | 14 +- 5 files changed, 2252 insertions(+), 2266 deletions(-) commit f68f4c960a3f39bf1ca30313f690486361639745 Author: Karol Herbst Date: Tue Sep 15 18:49:32 2015 +0200 drm/nouveau/perf: change pcie speed on pstate change v2: remove error and only set link for pcie devices v6: remove check for pcie device Signed-off-by: Karol Herbst drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 3 +++ 1 file changed, 3 insertions(+) commit d3b378c09c7b81e9005c2118343f8b7feeaaca8b Author: Karol Herbst Date: Tue Sep 15 18:49:08 2015 +0200 drm/nouveau/perf: add fields for pci speed and width and use it for the pstates Signed-off-by: Karol Herbst drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h | 3 +++ drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 2 ++ 2 files changed, 5 insertions(+) commit c6e2f9bc0367c0e5c734bf8b3ab1ee097977f1e2 Author: Karol Herbst Date: Tue Sep 15 18:47:12 2015 +0200 drm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer cards Signed-off-by: Karol Herbst drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit 3aba825ffa6615971bb5feae57806288c14d4096 Author: Karol Herbst Date: Tue Jan 5 21:44:52 2016 +0100 drm/nouveau/pci: implement pcie speed change for kepler+ v2: rename functions v3: remove pcie2 accessors v6: fix alignement and line width, also remove useless code Signed-off-by: Karol Herbst drivers/gpu/drm/nouveau/nvkm/subdev/pci/gk104.c | 189 ++++++++++++++++++++++++ 1 file changed, 189 insertions(+) commit 7c923844bf618d8d9cbe49901089915afba86f2e Author: Karol Herbst Date: Tue Jan 5 21:44:39 2016 +0100 drm/nouveau/pci: implement pcie speed change for Fermi v5: don't set kepler func pointers v6: fix alignment and line length drivers/gpu/drm/nouveau/nvkm/subdev/pci/gf100.c | 57 +++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/pci/gf106.c | 10 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/pci/priv.h | 7 +++ 3 files changed, 74 insertions(+) commit 5cca4bdc0d0518b31c7bf8f5e8a895af01c4c90a Author: Karol Herbst Date: Tue Jan 5 21:44:18 2016 +0100 drm/nouveau/pci: implement pcie speed change for tesla v5: don't set fermi or kepler func pointers v6: fix alignment drivers/gpu/drm/nouveau/nvkm/subdev/pci/g84.c | 92 ++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/pci/g94.c | 18 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/pci/priv.h | 10 +++ 3 files changed, 120 insertions(+) commit bcc19d9bf5cd8d49428c487adced1aa101271b18 Author: Karol Herbst Date: Tue Sep 15 18:48:37 2015 +0200 drm/nouveau/pci: implement generic code for pcie speed change v2: rename and group functions v4: change copyright information move printing of pcie speeds into oneinit, rename all pcie functions to nvkm_pcie_* don't try to raise the pcie version when no higher one is supported v5: revert Copyright changes and rename nvkm_pcie_raise_version to nvkm_pcie_set_version v6: remove some useless pci_is_pcie checks and rework messages Signed-off-by: Karol Herbst drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 14 ++ drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c | 14 ++ drivers/gpu/drm/nouveau/nvkm/subdev/pci/pcie.c | 165 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/pci/priv.h | 16 +++ 5 files changed, 210 insertions(+) commit 28c80605757883016c11a13465bd0573848f2139 Author: Karol Herbst Date: Sun Aug 30 20:06:16 2015 +0200 drm/nouveau/pci: add gk104 variant v2: change email used in header v4: change Copyright information v5: revert Copyright changes Signed-off-by: Karol Herbst drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 20 ++++++------ drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pci/gk104.c | 39 +++++++++++++++++++++++ 4 files changed, 51 insertions(+), 10 deletions(-) commit bec4961e2af539b167b470909861bfb6d9c3c363 Author: Karol Herbst Date: Sun Sep 27 02:41:34 2015 +0200 drm/nouveau/pci: add gf106 variant v2: change email used in header v4: change Copyright information v5: revert Copyright changes Signed-off-by: Karol Herbst drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 10 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pci/gf106.c | 39 +++++++++++++++++++++++ 4 files changed, 46 insertions(+), 5 deletions(-) commit 0a882cadbc63fd2da3994af7115b4ada2fcbd638 Author: Ben Skeggs Date: Fri Jan 8 08:56:51 2016 +1000 drm/nouveau/kms: take mode_config mutex in connector hotplug path fdo#93634 Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +++ 1 file changed, 3 insertions(+) commit 2e7db87dee8f4a731a560b1f6a2bc588f78823bf Author: Karol Herbst Date: Sun Sep 20 14:40:27 2015 +0200 drm/nouveau/nouveau/perfmon: add interface files for current core voltage Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/device.h | 1 + drivers/gpu/drm/nouveau/nouveau_hwmon.c | 50 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit fcc95ce90fdd00b48252fe971ae1ea950bc63562 Author: Karol Herbst Date: Thu Jul 30 11:56:20 2015 +0200 drm/nouveau/sysfs: remove pstate interface Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/Kbuild | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 4 - drivers/gpu/drm/nouveau/nouveau_drm.h | 1 - drivers/gpu/drm/nouveau/nouveau_sysfs.c | 198 -------------------------------- drivers/gpu/drm/nouveau/nouveau_sysfs.h | 21 ---- 5 files changed, 225 deletions(-) commit 6e9fc177399f08446293fec7607913fdbc95e191 Author: Karol Herbst Date: Thu Jul 30 11:53:31 2015 +0200 drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_debugfs.c | 140 +++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 2 deletions(-) commit b126a200e9dbd90fbe2148ee572dd0c2508be81f Author: Karol Herbst Date: Thu Jul 30 11:52:23 2015 +0200 drm/nouveau/debugfs: we need a ctrl object for debugfs Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_debugfs.c | 28 ++++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_debugfs.h | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_drm.c | 2 ++ drivers/gpu/drm/nouveau/nouveau_drm.h | 1 + 4 files changed, 57 insertions(+) commit 56c101af401f3c1f0c97bc98ad6f32e4d4a6b05a Author: Karol Herbst Date: Fri Jul 31 00:35:42 2015 +0200 drm/nouveau/debugfs: rename functions to indicate they are used inside drm We will need our own debugfs_init and cleanup functions, because nouveau_drm isn't ready while the DRM ones are called by DRM. Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_debugfs.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_debugfs.h | 9 +++++---- drivers/gpu/drm/nouveau/nouveau_drm.c | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) commit 1b7ab1a1c3807523417fe4c20876546caf936242 Author: Karol Herbst Date: Wed Jul 29 13:44:21 2015 +0200 drm/nouveau/debugfs: add infrastructure to add files with other fops than only read v2: use the same object for private data as with the drm debugfs functions Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_debugfs.c | 56 +++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) commit 9402aec5448fe0d307beb0dcebb2153cf9c23161 Author: Ben Skeggs Date: Mon Jan 4 12:24:46 2016 +1000 drm/nouveau/fifo/gf100: remove references to "daemon" Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bac34ed63571f9c1a0bd049c2c0b6997e2287882 Author: Ben Skeggs Date: Mon Jan 4 12:22:54 2016 +1000 drm/nouveau/fb/nv50: remove references to "daemon" Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 547dd2714ae2b76f4703666ab420dba8fee5de86 Author: Ben Skeggs Date: Mon Jan 4 12:17:52 2016 +1000 drm/nouveau/clk: remove references to "daemon" Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/gf100.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk104.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) commit caf2be8a345f9edd00f54a77629ff7509b1d6c4b Author: Ilia Mirkin Date: Sat Jan 2 17:54:51 2016 -0500 drm/nouveau/gr/gf100: provide a bit more info for various errors Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 78 +++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 9 deletions(-) commit cf0912924fd799028470bb1ccccf4928c1cbc7a9 Author: Ben Skeggs Date: Mon Dec 21 09:27:49 2015 +1000 drm/nouveau/bios: parse 8.1 Gbps DP link rate From DCB 4.1 spec. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 7d2813c437a094d8df4997ddc55d32f24f832757 Author: Ben Skeggs Date: Sat Dec 19 16:48:34 2015 +1000 drm/nouveau/ltc/gm204: split implementation from gm107 Differences from GM10x: - GM20x LTC count detection differs from GM10x - GM20x init doesn't require large page size setting Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 +-- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c | 10 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm204.c | 63 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h | 6 +++ 6 files changed, 79 insertions(+), 8 deletions(-) commit 4fb9c3f3e56c92a914db4fea39f3c302e3c786c3 Author: Ben Skeggs Date: Sat Dec 19 16:42:22 2015 +1000 drm/nouveau/ltc/gm107: use nvkm_mask to set cbc_ctrl1 resman and nvgpu both do this, presumably for good reason. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3d26d0860920080f9fa1fc10a9bd01d98a96261 Author: Ben Skeggs Date: Sat Dec 19 16:24:10 2015 +1000 drm/nouveau/ibus/gm204: split implementation from gk104 GM20x doesn't require the priv ring timeout bumps that GK/GM10x have. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 4 +-- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c | 4 +-- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm204.c | 40 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/ibus/priv.h | 1 + 6 files changed, 47 insertions(+), 4 deletions(-) commit 5bf561eecaeeb23942c556f0e88ba82bdc5d04cb Author: Ben Skeggs Date: Tue Dec 15 19:22:49 2015 +1000 drm/nouveau/gr/gf100-: subclass nvkm_object to store channel pointer Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit f01c4e682c941ba70e0ebec44db754844a1b9b82 Author: Ben Skeggs Date: Mon Nov 9 09:21:27 2015 +1000 drm/nouveau/nvif: modify nvif_unvers/nvif_unpack macros to be more obvious Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/unpack.h | 34 +++++++------ drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 +- drivers/gpu/drm/nouveau/nouveau_usif.c | 25 +++++----- drivers/gpu/drm/nouveau/nvkm/core/client.c | 8 ++-- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 56 +++++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c | 12 ++--- drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 16 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 8 ++-- .../gpu/drm/nouveau/nvkm/engine/disp/basenv50.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/corenv50.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/cursnv50.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 8 ++-- .../gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigf119.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/oimmnv50.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/ovlynv50.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootgf119.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c | 8 ++-- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 16 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/dma/user.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/dma/usergf100.c | 3 +- .../gpu/drm/nouveau/nvkm/engine/dma/usergf119.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv50.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 9 ++-- drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c | 28 +++++------ drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c | 4 +- 45 files changed, 186 insertions(+), 171 deletions(-) commit 13db6d6ea7190a377af31246016af66803766588 Author: Ben Skeggs Date: Sun Nov 8 12:26:01 2015 +1000 drm/nouveau/nvif: split out client interface definitions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 13 ------------- drivers/gpu/drm/nouveau/include/nvif/if0000.h | 12 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/core/client.c | 1 + 3 files changed, 13 insertions(+), 13 deletions(-) commit 923bc416aa1a4be7d31b0388116965245b73c3e4 Author: Ben Skeggs Date: Sun Nov 8 12:23:16 2015 +1000 drm/nouveau/nvif: split out device interface definitions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl0080.h | 45 +++++++++++++++++++++ drivers/gpu/drm/nouveau/include/nvif/class.h | 49 +---------------------- drivers/gpu/drm/nouveau/include/nvif/device.h | 2 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 1 + drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 1 + 6 files changed, 50 insertions(+), 49 deletions(-) commit 845f27253c34204bb33acb7dfeeb9f7163443efb Author: Ben Skeggs Date: Sun Nov 8 12:16:40 2015 +1000 drm/nouveau/nvif: split out ctxdma interface definitions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl0002.h | 66 +++++++++++++++++++ drivers/gpu/drm/nouveau/include/nvif/class.h | 74 +--------------------- drivers/gpu/drm/nouveau/nouveau_abi16.c | 1 + drivers/gpu/drm/nouveau/nouveau_chan.c | 1 + drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + drivers/gpu/drm/nouveau/nv17_fence.c | 1 + drivers/gpu/drm/nouveau/nv50_display.c | 1 + drivers/gpu/drm/nouveau/nv50_fence.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/dma/user.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/dma/usergf100.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/dma/usergf119.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv50.c | 2 +- 12 files changed, 79 insertions(+), 75 deletions(-) commit 75445a4d6423e7f742fcfe2b06eee3ce9c7de4c0 Author: Ben Skeggs Date: Sun Nov 8 12:12:15 2015 +1000 drm/nouveau/nvif: split out perfmon interface definitions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 79 +-------------------------- drivers/gpu/drm/nouveau/include/nvif/if0002.h | 38 +++++++++++++ drivers/gpu/drm/nouveau/include/nvif/if0003.h | 33 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c | 2 + 4 files changed, 75 insertions(+), 77 deletions(-) commit 671e9696969d9f458164f836278445d46c3f5f38 Author: Ben Skeggs Date: Sun Nov 8 11:56:00 2015 +1000 drm/nouveau/nvif: split out device control interface definitions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 50 +---------------------- drivers/gpu/drm/nouveau/include/nvif/if0001.h | 46 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_sysfs.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c | 1 + 4 files changed, 49 insertions(+), 49 deletions(-) commit 8ed1730ccd6cf2a84243456e371a5f4484be60f5 Author: Ben Skeggs Date: Sun Nov 8 11:28:26 2015 +1000 drm/nouveau/nvif: split out fifo interface definitions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl006b.h | 11 +++ drivers/gpu/drm/nouveau/include/nvif/cl506e.h | 12 +++ drivers/gpu/drm/nouveau/include/nvif/cl506f.h | 13 ++++ drivers/gpu/drm/nouveau/include/nvif/cl826e.h | 14 ++++ drivers/gpu/drm/nouveau/include/nvif/cl826f.h | 15 ++++ drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 14 ++++ drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 21 ++++++ drivers/gpu/drm/nouveau/include/nvif/class.h | 87 +++------------------- drivers/gpu/drm/nouveau/nouveau_abi16.c | 1 + drivers/gpu/drm/nouveau/nouveau_chan.c | 4 + drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + drivers/gpu/drm/nouveau/nouveau_fence.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c | 1 + .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c | 3 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 1 + .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 1 + .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c | 1 + 23 files changed, 132 insertions(+), 78 deletions(-) commit 7568b106718165feacdf411f1b8f95ae4263456a Author: Ben Skeggs Date: Sun Nov 8 10:44:19 2015 +1000 drm/nouveau/nvif: split out display interface definitions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl0046.h | 28 +++ drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 99 ++++++++ drivers/gpu/drm/nouveau/include/nvif/cl507a.h | 11 + drivers/gpu/drm/nouveau/include/nvif/cl507b.h | 11 + drivers/gpu/drm/nouveau/include/nvif/cl507c.h | 12 + drivers/gpu/drm/nouveau/include/nvif/cl507d.h | 11 + drivers/gpu/drm/nouveau/include/nvif/cl507e.h | 12 + drivers/gpu/drm/nouveau/include/nvif/class.h | 258 ++++----------------- drivers/gpu/drm/nouveau/nouveau_connector.c | 1 + drivers/gpu/drm/nouveau/nouveau_display.c | 1 + drivers/gpu/drm/nouveau/nv50_display.c | 6 + drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/basenv50.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/corenv50.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/cursnv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/dacnv50.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmig84.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigk104.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/hdmigt215.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/oimmnv50.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/ovlynv50.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/piornv50.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootgf119.c | 3 +- .../gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c | 1 + .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/sornv50.c | 2 +- 30 files changed, 261 insertions(+), 222 deletions(-) commit 538b269bc5edb9be1dfbb1ebdc50a2dab90e98cc Author: Ben Skeggs Date: Sun Nov 8 10:34:50 2015 +1000 drm/nouveau/nvif: split out nvsw interface definitons Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 22 ++++------------------ drivers/gpu/drm/nouveau/include/nvif/if0004.h | 13 +++++++++++++ drivers/gpu/drm/nouveau/include/nvif/if0005.h | 4 ++++ drivers/gpu/drm/nouveau/nouveau_drm.c | 6 ++++-- drivers/gpu/drm/nouveau/nv04_fence.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c | 4 ++-- 7 files changed, 30 insertions(+), 22 deletions(-) commit 53a6df7785c1af55e11784ec18dfa0260898453d Author: Ben Skeggs Date: Sun Nov 8 10:15:09 2015 +1000 drm/nouveau/nvif: split out fermi interface definitions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl9097.h | 44 ++++++++++++++++++ drivers/gpu/drm/nouveau/include/nvif/class.h | 62 ++++---------------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 1 + 3 files changed, 53 insertions(+), 54 deletions(-) commit 08f7633c1de8007c3735764d5ca0c1bde4239b84 Author: Ben Skeggs Date: Sun Nov 8 10:18:19 2015 +1000 drm/nouveau/nvif: move internal class identifiers to class.h Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 11 ++++++++--- drivers/gpu/drm/nouveau/include/nvif/ioctl.h | 8 -------- drivers/gpu/drm/nouveau/nouveau_abi16.c | 16 ++++++++-------- drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +- drivers/gpu/drm/nouveau/nouveau_sysfs.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c | 4 ++-- 11 files changed, 28 insertions(+), 31 deletions(-) commit 21f560e990441a86a380c0e981c6017d6fd8360c Author: Ben Skeggs Date: Mon Nov 23 05:28:52 2015 +1000 drm/nouveau/gr/gm107-: make use of gpc_addr() macro for tpc ramchain setup Should be no functional change here. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc | 5 +- .../drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h | 332 ++++++++++----------- 2 files changed, 167 insertions(+), 170 deletions(-) commit b306712d924af4dd63e44a08eb78c779e2d04154 Author: Alexandre Courbot Date: Wed Nov 11 17:07:51 2015 +0900 drm/nouveau/instmem/gk20a: use DMA API CPU mapping Commit 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access") tried to be smart while using the DMA-API by managing the CPU mappings of buffers allocated with the DMA-API by itself. In doing so, it relied on dma_to_phys() which is an architecture-private function not available everywhere. This broke the build on several architectures. Since there is no reliable and portable way to obtain the physical address of a DMA-API buffer, stop trying to be smart and just use the CPU mapping that the DMA-API can provide. This means that buffers will be CPU-mapped for all their life as opposed to when we need them, but anyway using the DMA-API here is a fallback for when no IOMMU is available so we should not expect optimal behavior. This makes the IOMMU and DMA-API implementations of instmem diverge enough that we should maybe put them into separate files... Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 154 +++++++++------------ 1 file changed, 62 insertions(+), 92 deletions(-) commit 338840eed18e05209c0e9f20f818964a66fce053 Author: Alexandre Courbot Date: Mon Nov 9 16:37:53 2015 +0900 drm/nouveau/instmem/gk20a: fix race conditions The LRU list used for recycling CPU mappings was handling concurrency very poorly. For instance, if an instobj was acquired twice before being released once, it would end up into the LRU list even though there is still a client accessing it. This patch fixes this by properly counting how many clients are currently using a given instobj. While at it, we also raise errors when inconsistencies are detected, and factorize some code. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 66 ++++++++++++---------- 1 file changed, 37 insertions(+), 29 deletions(-) commit 5a9e822f8098e6aa7a8305627ca5dd09d87ef846 Author: Nicolas Chauvet Date: Mon Sep 28 17:08:13 2015 +0200 drm/nouveau/gk20a: Add MODULE_FIRMWARE for gk20a This patch is needed by initramfs tools to detect the required firmware files for the module. This patch tests for either TEGRA_124_SOC or TEGRA_132_SOC for the firmwares related to the Tegra K1 generation. v2: move the MODULE_FIRMWARE to the nvidia_platform.c file. This will avoid to test for NOUVEAU_PLATFORM_DRIVER Signed-off-by: Nicolas Chauvet Reviewed-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_platform.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit da4ee13cd5755a347f16e80e0a8583478c3fef5b Author: Vince Hsu Date: Mon Nov 16 15:38:30 2015 +0800 drm/nouveau/fifo/gk104: fix engine status register offset The offset should be 8 on Kepler and later. Signed-off-by: Vince Hsu Reviewed-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 864d55f4074885705768df01a2f56b0018eef191 Author: Ben Skeggs Date: Wed Nov 11 13:06:10 2015 +1000 drm/nouveau/ce/gk104: attempt at better handling of LAUNCHERR Very rough, no idea how correct it is at this point, but it prevents getteximage-depth from piglit from hanging the GPU. v2: updated with NV_PCE_FE_LAUNCHERR_REPORT values provided by NVIDIA Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/ce/gk104.c | 54 ++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 4 deletions(-) commit d40d0fd487375c66ed444ec2bbd5ffa5d64ebede Author: Ben Skeggs Date: Wed Nov 11 10:07:22 2015 +1000 drm/nouveau/fifo/gf100: fix race condition when updating engine runlists Similar in spirit to the gk104 fix with a similar title. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 20 ++++++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 5 ++++- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 8 ++++---- 3 files changed, 26 insertions(+), 7 deletions(-) commit 386ffd5e80d54fd6ecca0a81fc50abc97aeee73f Author: Ben Skeggs Date: Wed Nov 11 09:37:05 2015 +1000 drm/nouveau/fifo/gk104: fix race condition when updating engine runlists The CPU-side tracking of engine runlists was not protected by a lock, leading to list corruption, eventually causing runlist_update() to overrun the GPU-side runlist, triggering an OOPS. Fixes some of the issues noticed during parallel piglit runs. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 20 ++++++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 5 ++++- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 8 ++++---- 3 files changed, 26 insertions(+), 7 deletions(-) commit cfb4f929f7f8716af4de085da1d3881384644b81 Author: Ilia Mirkin Date: Thu Nov 5 02:33:40 2015 -0500 drm/nouveau/nvkm: add/remove 0's to make 7 (or 9)-nibble constants use 8 nibbles Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 700c18ca08bf79360c117e39490c74c681189b65 Author: Ilia Mirkin Date: Tue Nov 3 21:14:26 2015 -0500 drm/nouveau/kms: no need to check for empty edid before drm_detect_hdmi_monitor Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 1 - 1 file changed, 1 deletion(-) commit 1299b6377b099bc4348d955930ebe1f0ee5ccc46 Author: Alexandre Courbot Date: Mon Oct 26 14:55:37 2015 +0900 drm/nouveau/core: fix return in error path of device probe We want to unlock nv_devices_mutex in this error path as well. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a0c96c075bb4517d4ce4fb6750ee0a3cf38714c Author: Ilia Mirkin Date: Tue Nov 3 21:00:11 2015 -0500 drm/nouveau/kms: allow 225/297MHz pixel clocks for HDMI on Fermi/Kepler Some Fermi's apparently alow allow 297MHz clocks, so create a parameter which allows end-users to set it themselves until we have a reliable way to determine the board's maximum pixel clocks. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_connector.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 16ef53a93c107392cd652f47251954064fa171e6 Author: Hauke Mehrtens Date: Tue Nov 3 21:00:10 2015 -0500 drm/nouveau/disp: activate dual link TMDS links only when possible Without this patch a pixel clock rate above 165 MHz on a TMDS link is assumed to be dual link. This is true for DVI, but not for HDMI. HDMI supports no dual link, but it supports pixel clock rates above 165 MHz. Only activate Dual Link mode when it is actually possible and requested. Signed-off-by: Hauke Mehrtens [imirkin: check for hdmi monitor for computing proto, use sor ctrl to enable extra config bit] Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 15 +++++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) commit f6106efae5f4144b32f6c10de0dc3e7efc9181e3 Author: Eric Sandeen Date: Mon Jan 11 11:34:01 2016 +1100 xfs: eliminate committed arg from xfs_bmap_finish Calls to xfs_bmap_finish() and xfs_trans_ijoin(), and the associated comments were replicated several times across the attribute code, all dealing with what to do if the transaction was or wasn't committed. And in that replicated code, an ASSERT() test of an uninitialized variable occurs in several locations: error = xfs_attr_thing(&args); if (!error) { error = xfs_bmap_finish(&args.trans, args.flist, &committed); } if (error) { ASSERT(committed); If the first xfs_attr_thing() failed, we'd skip the xfs_bmap_finish, never set "committed", and then test it in the ASSERT. Fix this up by moving the committed state internal to xfs_bmap_finish, and add a new inode argument. If an inode is passed in, it is passed through to __xfs_trans_roll() and joined to the transaction there if the transaction was committed. xfs_qm_dqalloc() was a little unique in that it called bjoin rather than ijoin, but as Dave points out we can detect the committed state but checking whether (*tpp != tp). Addresses-Coverity-Id: 102360 Addresses-Coverity-Id: 102361 Addresses-Coverity-Id: 102363 Addresses-Coverity-Id: 102364 Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_attr.c | 141 +++++++--------------------------------- fs/xfs/libxfs/xfs_attr_remote.c | 31 ++------- fs/xfs/libxfs/xfs_bmap.c | 6 +- fs/xfs/libxfs/xfs_bmap.h | 2 +- fs/xfs/xfs_bmap_util.c | 43 +++++------- fs/xfs/xfs_dquot.c | 13 ++-- fs/xfs/xfs_inode.c | 25 +++---- fs/xfs/xfs_iomap.c | 10 ++- fs/xfs/xfs_rtalloc.c | 3 +- fs/xfs/xfs_symlink.c | 12 +--- 10 files changed, 68 insertions(+), 218 deletions(-) commit b483666bb4939ee14501da9978e5f87e4aa22228 Merge: c11b898 13c240e Author: Dave Airlie Date: Mon Jan 11 10:00:38 2016 +1000 Merge branch 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-next Misc fixes for amdgpu and radeon for 4.5. The bulk of the changes are smatch fixes and cleanups. This also includes the DP MST fixes from Mykola. Beyond that some fixes from Christian to avoid -ENOMEM errors in some corner cases in the CS ioctl, some suspend and resume fixes, and some powerplay fixes. * 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux: (33 commits) drm/radeon: fix trivial typo in warning message radeon: r100: Silence 'may be used uninitialized' warnings drm/amdgpu: add warning to amdgpu_bo_gpu_offset() v2 drm/amd/powerplay: implement power down asic task for CZ drm/amd/powerplay: enable power down asic task. (v2) drm/amd/powerplay: enable set boot state task drm/amd/powerplay: add thermal control task when resume. drm/amdgpu: fix hex/decimal bug when show gpu load. drm/amdgpu: Show gpu load when display gpu performance for Fiji of VI. drm/amdgpu: Show gpu load when display gpu performance for Ci. drm/amd/powerplay: Reload and initialize the smc firmware on powerplay resume. drm/amd/powerplay: add powerplay valid check to avoid null point. (v2) drm/amd/powerplay: fix Smatch static checker warnings drm/amd/powerplay: fix Smatch static checker warnings with indenting (v2) drm/amd/powerplay: fix bug that NULL checks are reversed. amdgpu/dce11: Add test for crtc < 0 to various DCEv11 functions amdgpu/dce11: Remove division from dce_v11_0_vblank_wait() amdgpu/vce3: Simplify vce_v3_0_hw_init and ensure both rings default to not ready. amdgpu/vce3: Remove magic constants from harvest register masks. amdgpu/vce3: Simplify vce_v3_0_process_interrupt() ... commit 5c721d561dc6cded61e28425b30ca66aef09a14d Merge: 6c672c9 0c129bf Author: David S. Miller Date: Sun Jan 10 18:03:47 2016 -0500 Merge branch 'mdio-device-fixes' Andrew Lunn says: ==================== Fix breakage from mdio device These two patches fix MIPS platforms which got broken by the recent mdio device patchset. ==================== Signed-off-by: David S. Miller commit 0c129bf756f869dc386005c59c2f815305dccc86 Author: Andrew Lunn Date: Thu Jan 7 21:55:52 2016 +0100 net: ethernet-rgmii.c: Fix breakage from moving phdev bus The mdio device patches moved the bus member in phy_device into a substructure. This driver got missed. Fix it. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/staging/octeon/ethernet-rgmii.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2a4fc4ea29fbe4c59cf67d73cca309d9fe7e1fa5 Author: Andrew Lunn Date: Thu Jan 7 21:55:51 2016 +0100 net: lantiq_etop.c: Use helper to find first phy Make use of the helper to find the first phy device. This also fixes the compile breakage. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/lantiq_etop.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 6c672c9bf44e718ccc8bb137032a57070980bb4e Author: Romain Perier Date: Thu Jan 7 21:13:28 2016 +0100 stmmac: Don't exit mdio registration when mdio subnode is not found in the DTS Originally, most of the platforms using this driver did not define an mdio subnode in the devicetree. Commit e34d65 ("stmmac: create of compatible mdio bus for stmmac driver") introduced a backward compatibily issue by using of_mdiobus_register explicitly with an mdio subnode. This patch fixes the issue by calling the function mdiobus_register, when mdio subnode is not found. The driver is now compatible with both modes. Fixes: e34d65696d2e ("stmmac: create of compatible mdio bus for stmmac driver") Signed-off-by: Romain Perier Tested-by: Phil Reid Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 320f1a4a175e7cd5d3f006f92b4d4d3e2cbb7bb5 Author: Sasha Levin Date: Thu Jan 7 14:52:43 2016 -0500 net: sctp: prevent writes to cookie_hmac_alg from accessing invalid memory proc_dostring() needs an initialized destination string, while the one provided in proc_sctp_do_hmac_alg() contains stack garbage. Thus, writing to cookie_hmac_alg would strlen() that garbage and end up accessing invalid memory. Fixes: 3c68198e7 ("sctp: Make hmac algorithm selection for cookie generation dynamic") Signed-off-by: Sasha Levin Signed-off-by: David S. Miller net/sctp/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18715b261541f35ccede9b8686ee3ebaac697d38 Author: Kristian Evensen Date: Thu Jan 7 16:41:33 2016 +0100 net: qmi_wwan: Add SIMCom 7230E SIMCom 7230E is a QMI LTE module with support for most "normal" bands. Manual testing has showed that only interface five works. Cc: Bjørn Mork Signed-off-by: Kristian Evensen Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 749f7df18689b113dc0d914e40122b37ddaeff41 Merge: 4156afa f8ffad6 Author: David S. Miller Date: Sun Jan 10 17:54:28 2016 -0500 Merge branch 'bpf-next' Daniel Borkmann says: ==================== BPF update Fixes a csum issue on ingress. As mentioned previously, net-next seems just fine imho. Later on, will follow up with couple of replacements like ovs_skb_postpush_rcsum() etc. Thanks! v1 -> v2: - Added patch 1 with helper - Implemented Hannes' idea to just use csum_partial, thanks! ==================== Signed-off-by: David S. Miller commit f8ffad69c9f8b8dfb0b633425d4ef4d2493ba61a Author: Daniel Borkmann Date: Thu Jan 7 15:50:23 2016 +0100 bpf: add skb_postpush_rcsum and fix dev_forward_skb occasions Add a small helper skb_postpush_rcsum() and fix up redirect locations that need CHECKSUM_COMPLETE fixups on ingress. dev_forward_skb() expects a proper csum that covers also Ethernet header, f.e. since 2c26d34bbcc0 ("net/core: Handle csum for CHECKSUM_COMPLETE VXLAN forwarding"), we also do skb_postpull_rcsum() after pulling Ethernet header off via eth_type_trans(). When using eBPF in a netns setup f.e. with vxlan in collect metadata mode, I can trigger the following csum issue with an IPv6 setup: [ 505.144065] dummy1: hw csum failure [...] [ 505.144108] Call Trace: [ 505.144112] [] dump_stack+0x44/0x5c [ 505.144134] [] netdev_rx_csum_fault+0x3a/0x40 [ 505.144142] [] __skb_checksum_complete+0xcf/0xe0 [ 505.144149] [] nf_ip6_checksum+0xb2/0x120 [ 505.144161] [] icmpv6_error+0x17e/0x328 [nf_conntrack_ipv6] [ 505.144170] [] ? ip6t_do_table+0x2fa/0x645 [ip6_tables] [ 505.144177] [] ? ipv6_get_l4proto+0x65/0xd0 [nf_conntrack_ipv6] [ 505.144189] [] nf_conntrack_in+0xc2/0x5a0 [nf_conntrack] [ 505.144196] [] ipv6_conntrack_in+0x1c/0x20 [nf_conntrack_ipv6] [ 505.144204] [] nf_iterate+0x5d/0x70 [ 505.144210] [] nf_hook_slow+0x66/0xc0 [ 505.144218] [] ipv6_rcv+0x3f2/0x4f0 [ 505.144225] [] ? ip6_make_skb+0x1b0/0x1b0 [ 505.144232] [] __netif_receive_skb_core+0x36b/0x9a0 [ 505.144239] [] ? __netif_receive_skb+0x18/0x60 [ 505.144245] [] __netif_receive_skb+0x18/0x60 [ 505.144252] [] process_backlog+0x9f/0x140 [ 505.144259] [] net_rx_action+0x145/0x320 [...] What happens is that on ingress, we push Ethernet header back in, either from cls_bpf or right before skb_do_redirect(), but without updating csum. The "hw csum failure" can be fixed by using the new skb_postpush_rcsum() helper for the dev_forward_skb() case to correct the csum diff again. Thanks to Hannes Frederic Sowa for the csum_partial() idea! Fixes: 3896d655f4d4 ("bpf: introduce bpf_clone_redirect() helper") Fixes: 27b29f63058d ("bpf: add bpf_redirect() helper") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/skbuff.h | 17 +++++++++++++++++ net/core/filter.c | 17 +++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) commit fdc5432a7b44ab7de17141beec19d946b9344e91 Author: Daniel Borkmann Date: Thu Jan 7 15:50:22 2016 +0100 net, sched: add skb_at_tc_ingress helper Add a skb_at_tc_ingress() as this will be needed elsewhere as well and can hide the ugly ifdef. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/net/sch_generic.h | 9 +++++++++ net/sched/cls_bpf.c | 6 +----- 2 files changed, 10 insertions(+), 5 deletions(-) commit 4156afafcc4c522adfd59c694126edc30247b7ad Merge: d3517f1 b840d15 Author: David S. Miller Date: Sun Jan 10 17:32:09 2016 -0500 Merge branch 'tcp-keepalive-namespaceify' Nikolay Borisov says: ==================== Namespaceify tcp keepalive machinery The following patch series enables the tcp keepalive mechanism to be configured per net namespace. This is especially useful if you have multiple containers hosted on one node and one of them is under DoS- in such situations one thing which could be done is to configure the tcp keepalive settings such that connections for that particular container are being reset faster. Another scenario where not being able to control those knob comes per container is problematic is occurs the value of net.netfilter.nf_conntrack_tcp_timeout_established is set below the keepalive interval, in such situations the server won't send an RST packet resulting in applications not trying to reconnect and stale connection waiting. Changing the global keepalive value is a possible solution but it might interfere with other containers. The three patches gradually convert each of the affected knobs to be per netns. I thought it would be easier for review than put everything in one patch. If people deem it more appropriate to squash everything in one patch (maybe after review) I'd be more than happy to do it. The patches have been compile-tested on 4.4 and functionally tested on 3.12 and they work as expected. These are based off 4.4-rc8 ==================== Acked-by: "Eric W. Biederman" Signed-off-by: David S. Miller commit b840d15d39128d08ed4486085e5507d2617b9ae1 Author: Nikolay Borisov Date: Thu Jan 7 16:38:45 2016 +0200 ipv4: Namespecify the tcp_keepalive_intvl sysctl knob This is the final part required to namespaceify the tcp keep alive mechanism. Signed-off-by: Nikolay Borisov Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 5 +++-- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_timer.c | 1 - 5 files changed, 12 insertions(+), 10 deletions(-) commit 9bd6861bd4326e3afd3f14a9ec8a723771fb20bb Author: Nikolay Borisov Date: Thu Jan 7 16:38:44 2016 +0200 ipv4: Namespecify tcp_keepalive_probes sysctl knob This is required to have full tcp keepalive mechanism namespace support. Signed-off-by: Nikolay Borisov Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 5 +++-- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_timer.c | 1 - 5 files changed, 12 insertions(+), 10 deletions(-) commit 13b287e8d1cad951634389f85b8c9b816bd3bb1e Author: Nikolay Borisov Date: Thu Jan 7 16:38:43 2016 +0200 ipv4: Namespaceify tcp_keepalive_time sysctl knob Different net namespaces might have different requirements as to the keepalive time of tcp sockets. This might be required in cases where different firewall rules are in place which require tcp timeout sockets to be increased/decreased independently of the host. Signed-off-by: Nikolay Borisov Signed-off-by: David S. Miller include/net/netns/ipv4.h | 2 ++ include/net/tcp.h | 5 +++-- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_ipv4.c | 2 ++ net/ipv4/tcp_timer.c | 1 - 5 files changed, 14 insertions(+), 10 deletions(-) commit 787d7ac308ff2279e4b2ea393ad4d990de486ef2 Author: Hannes Frederic Sowa Date: Thu Jan 7 14:28:39 2016 +0100 udp: restrict offloads to one namespace udp tunnel offloads tend to aggregate datagrams based on inner headers. gro engine gets notified by tunnel implementations about possible offloads. The match is solely based on the port number. Imagine a tunnel bound to port 53, the offloading will look into all DNS packets and tries to aggregate them based on the inner data found within. This could lead to data corruption and malformed DNS packets. While this patch minimizes the problem and helps an administrator to find the issue by querying ip tunnel/fou, a better way would be to match on the specific destination ip address so if a user space socket is bound to the same address it will conflict. Cc: Tom Herbert Cc: Eric Dumazet Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/geneve.c | 2 +- drivers/net/vxlan.c | 2 +- include/net/protocol.h | 2 +- net/ipv4/fou.c | 2 +- net/ipv4/udp_offload.c | 10 +++++++--- 5 files changed, 11 insertions(+), 7 deletions(-) commit 2ac83cccabbc8d264c20ce11931d60e0e6ea3f53 Author: Geliang Tang Date: Sat Dec 12 21:36:57 2015 +0800 PCI: hotplug: Use list_for_each_entry() to simplify code Use list_for_each_entry() instead of list_for_each() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/ibmphp_core.c | 21 ++++++--------------- drivers/pci/hotplug/ibmphp_ebda.c | 24 +++++++++--------------- drivers/pci/hotplug/ibmphp_hpc.c | 18 ++++++++---------- drivers/pci/hotplug/ibmphp_res.c | 32 +++++++++----------------------- drivers/pci/hotplug/pci_hotplug_core.c | 4 +--- drivers/pci/hotplug/pcihp_skeleton.c | 7 ++----- drivers/pci/hotplug/rpadlpar_core.c | 7 +++---- drivers/pci/hotplug/rpaphp_core.c | 7 +++---- drivers/pci/hotplug/s390_pci_hpc.c | 7 +++---- drivers/pci/hotplug/shpchp_core.c | 7 ++----- 10 files changed, 46 insertions(+), 88 deletions(-) commit d3517f19f2c41f1b4e9b6a763c0cea3f7d72b589 Merge: c9c9931 4f5590f Author: David S. Miller Date: Sun Jan 10 16:50:21 2016 -0500 Merge branch 'mlxsw-layer2-multicast' Jiri Pirko says: ==================== mlxsw: Adding layer 2 multicast Elad says: This patchset add Linux hardware reflection for L2 multicast offload and add MC support in mlxsw. For every bridge MDB entry insertion, either by IGMP snooping or by static insertion/removal, a switchdev ops is been called. In mlxsw, a new multicast group (MID) is been created and ports are assigned. When all ports are removed, the multicast group is been deleted. --- v1->v2: - GFP_ATOMIC->GFP_KERNEL change in patch 7/8 ==================== Signed-off-by: David S. Miller commit 4f5590f8cd736768170818d1b7ea0075972e2701 Author: Elad Raz Date: Sun Jan 10 21:06:29 2016 +0100 switchdev: Adding IGMP snooping documentation Signed-off-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller Documentation/networking/switchdev.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3a49b4fde2a1384101bc80d66e41271bb37a66e7 Author: Elad Raz Date: Sun Jan 10 21:06:28 2016 +0100 mlxsw: Adding layer 2 multicast support Add SWITCHDEV_OBJ_ID_PORT_MDB switchdev ops support. On first MDB insertion creates a new multicast group (MID) and add members port to the MID. Also add new MDB entry for the flooding-domain (fid-vid) and link the MDB entry to the newly constructed MC group. Signed-off-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 13 ++ .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 176 +++++++++++++++++++++ 3 files changed, 190 insertions(+) commit e4b6f6931c0840b6a9505415bd02bd0c8520e4c9 Author: Elad Raz Date: Sun Jan 10 21:06:27 2016 +0100 mlxsw: Adding VID to FID translatation Adding a generic function that translate VID to FID. Signed-off-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 30 ++++++++++++++-------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 53ae628316b8db6659bc8cef07698f624608c448 Author: Elad Raz Date: Sun Jan 10 21:06:26 2016 +0100 mlxsw: Changing the maximum number of multicast group to a define Signed-off-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit fabe5483226e9c804837374dadcb472325950e72 Author: Elad Raz Date: Sun Jan 10 21:06:25 2016 +0100 mlxsw: reg: Adding SMID register Adding back SMID register definition and packing. For each MC group a new SMID entry will be generated. Signed-off-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 5230b25f06da95032320d95e859eb95e463af12c Author: Elad Raz Date: Sun Jan 10 21:06:24 2016 +0100 mlxsw: reg: Add definition of multicast record for SFD register Multicast-related records have specific format in SFD register. Signed-off-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 49 +++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 5 deletions(-) commit f1fecb1d10ecc2f94d19e67827b9f678b36bfc61 Author: Elad Raz Date: Sun Jan 10 21:06:23 2016 +0100 bridge: Reflect MDB entries to hardware Offload MDB changes per port to hardware Signed-off-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_mdb.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 4d41e12593a9a6c4aaf113d44c8c619067b2b0aa Author: Elad Raz Date: Sun Jan 10 21:06:22 2016 +0100 switchdev: Adding MDB entry offload Define HW multicast entry: MAC and VID. Using a MAC address simplifies support for both IPV4 and IPv6. Signed-off-by: Elad Raz Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/switchdev.h | 11 +++++++++++ net/switchdev/switchdev.c | 2 ++ 2 files changed, 13 insertions(+) commit 3e46b25376321db119bc8507ce8c8841c580e736 Author: Mickaël Salaün Date: Tue Dec 22 22:15:10 2015 +0100 um: Use race-free temporary file creation Open the memory mapped file with the O_TMPFILE flag when available. Signed-off-by: Mickaël Salaün Cc: Jeff Dike Cc: Richard Weinberger Acked-by: Tristan Schmelcher Signed-off-by: Richard Weinberger arch/um/os-Linux/mem.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 571d2f0c341fa15dbbb4fb73c80bd740ef37a9f0 Author: Mickaël Salaün Date: Tue Dec 22 22:15:09 2015 +0100 um: Do not set unsecure permission for temporary file Remove the insecure 0777 mode for temporary file to prohibit other users to change the executable mapped code. An attacker could gain access to the mapped file descriptor from the temporary file (before it is unlinked) in a read-only mode but it should not be accessible in write mode to avoid arbitrary code execution. To not change the hostfs behavior, the temporary file creation permission now depends on the current umask(2) and the implementation of mkstemp(3). Signed-off-by: Mickaël Salaün Cc: Jeff Dike Cc: Richard Weinberger Acked-by: Tristan Schmelcher Signed-off-by: Richard Weinberger arch/um/os-Linux/mem.c | 6 ------ 1 file changed, 6 deletions(-) commit 42d91f612c879627c925d3779c36877cd440f9f9 Author: Mickaël Salaün Date: Thu Dec 24 13:12:11 2015 +0100 um: Fix build error and kconfig for i386 Fix build error by generating elfcore.o only when ELF_CORE (depending on COREDUMP) is selected: arch/x86/um/built-in.o: In function `elf_core_write_extra_phdrs': (.text+0x3e62): undefined reference to `dump_emit' arch/x86/um/built-in.o: In function `elf_core_write_extra_data': (.text+0x3eef): undefined reference to `dump_emit' Fixes: 5d2acfc7b974 ("kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT") Signed-off-by: Mickaël Salaün Cc: Jeff Dike Cc: Richard Weinberger Cc: Josh Triplett Cc: Paul E. McKenney Cc: Michal Marek Cc: Andrew Morton Cc: Linus Torvalds Signed-off-by: Richard Weinberger Reviewed-by: Josh Triplett arch/x86/um/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c50b4659e444b020657e01bdf769c965e5597cb0 Author: Mickaël Salaün Date: Tue Dec 29 21:35:47 2015 +0100 um: Add seccomp support This brings SECCOMP_MODE_STRICT and SECCOMP_MODE_FILTER support through prctl(2) and seccomp(2) to User-mode Linux for i386 and x86_64 subarchitectures. secure_computing() is called first in handle_syscall() so that the syscall emulation will be aborted quickly if matching a seccomp rule. This is inspired from Meredydd Luff's patch (https://gerrit.chromium.org/gerrit/21425). Signed-off-by: Mickaël Salaün Cc: Jeff Dike Cc: Richard Weinberger Cc: Ingo Molnar Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: Chris Metcalf Cc: Michael Ellerman Cc: James Hogan Cc: Meredydd Luff Cc: David Drysdale Signed-off-by: Richard Weinberger Acked-by: Kees Cook .../features/seccomp/seccomp-filter/arch-support.txt | 2 +- arch/um/Kconfig.common | 1 + arch/um/Kconfig.um | 16 ++++++++++++++++ arch/um/include/asm/thread_info.h | 2 ++ arch/um/kernel/skas/syscall.c | 5 +++++ 5 files changed, 25 insertions(+), 1 deletion(-) commit d8f8b8445648c267a24f30a72533e77cb6543f21 Author: Mickaël Salaün Date: Tue Dec 29 21:35:46 2015 +0100 um: Add full asm/syscall.h support Add subarchitecture-independent implementation of asm-generic/syscall.h allowing access to user system call parameters and results: * syscall_get_nr() * syscall_rollback() * syscall_get_error() * syscall_get_return_value() * syscall_set_return_value() * syscall_get_arguments() * syscall_set_arguments() * syscall_get_arch() provided by arch/x86/um/asm/syscall.h This provides the necessary syscall helpers needed by HAVE_ARCH_SECCOMP_FILTER plus syscall_get_error(). This is inspired from Meredydd Luff's patch (https://gerrit.chromium.org/gerrit/21425). Signed-off-by: Mickaël Salaün Cc: Jeff Dike Cc: Richard Weinberger Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: Meredydd Luff Cc: David Drysdale Signed-off-by: Richard Weinberger Acked-by: Kees Cook arch/um/include/asm/syscall-generic.h | 138 ++++++++++++++++++++++++++++++++++ arch/x86/um/asm/syscall.h | 1 + 2 files changed, 139 insertions(+) commit 4a0b88070406323487bad730d8945f482151a145 Author: Mickaël Salaün Date: Tue Dec 29 21:35:45 2015 +0100 selftests/seccomp: Remove the need for HAVE_ARCH_TRACEHOOK Some architectures do not implement PTRACE_GETREGSET nor PTRACE_SETREGSET (required by HAVE_ARCH_TRACEHOOK) but only implement PTRACE_GETREGS and PTRACE_SETREGS (e.g. User-mode Linux). This improve seccomp selftest portability for architectures without HAVE_ARCH_TRACEHOOK support by defining a new trigger HAVE_GETREGS. For now, this is only enabled for i386 and x86_64 architectures. This is required to be able to run this tests on User-mode Linux. Signed-off-by: Mickaël Salaün Cc: Jeff Dike Cc: Richard Weinberger Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: Shuah Khan Cc: Meredydd Luff Cc: David Drysdale Signed-off-by: Richard Weinberger Acked-by: Kees Cook tools/testing/selftests/seccomp/seccomp_bpf.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit e04c989eb785af61d2895d76d38c09166296f9c5 Author: Mickaël Salaün Date: Tue Dec 29 21:35:44 2015 +0100 um: Fix ptrace GETREGS/SETREGS bugs This fix two related bugs: * PTRACE_GETREGS doesn't get the right orig_ax (syscall) value * PTRACE_SETREGS can't set the orig_ax value (erased by initial value) Get rid of the now useless and error-prone get_syscall(). Fix inconsistent behavior in the ptrace implementation for i386 when updating orig_eax automatically update the syscall number as well. This is now updated in handle_syscall(). Signed-off-by: Mickaël Salaün Cc: Jeff Dike Cc: Richard Weinberger Cc: Thomas Gleixner Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: Thomas Meyer Cc: Nicolas Iooss Cc: Anton Ivanov Cc: Meredydd Luff Cc: David Drysdale Signed-off-by: Richard Weinberger Acked-by: Kees Cook arch/um/include/shared/os.h | 1 - arch/um/kernel/skas/syscall.c | 26 ++++++++++++++------------ arch/um/os-Linux/skas/process.c | 7 ------- arch/x86/um/ptrace_32.c | 8 +++----- 4 files changed, 17 insertions(+), 25 deletions(-) commit a7df4716d19594b7b3f106f0bc0ca1c548e508e6 Author: Vegard Nossum Date: Thu Dec 31 17:06:17 2015 +0100 um: link with -lpthread Similarly to commit fb1770aa78a43530940d0c2dd161e77bc705bdac, with gcc 5 on Ubuntu and CONFIG_STATIC_LINK=y I was seeing these linker errors: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new': (.text+0xcd): undefined reference to `pthread_once' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new': (.text+0x126): undefined reference to `pthread_attr_init' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new': (.text+0x168): undefined reference to `pthread_attr_setdetachstate' [...] Obviously we also need -lpthread for librt.a. Cc: stable@vger.kernel.org # 4.4 Signed-off-by: Vegard Nossum Signed-off-by: Richard Weinberger scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c6157b6b30a765ec233a1be5f9446f24a5283de Author: Anton Ivanov Date: Mon Dec 21 18:54:00 2015 +0000 um: Update UBD to use pread/pwrite family of functions This decreases the number of syscalls per read/write by half. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger arch/um/drivers/ubd_kern.c | 27 +++++---------------------- arch/um/include/shared/os.h | 2 ++ arch/um/os-Linux/file.c | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 22 deletions(-) commit 470a166e8c5a4da4be88545b1c4dde308abac5b2 Author: Anton Ivanov Date: Mon Dec 21 11:28:03 2015 +0000 um: Do not change hard IRQ flags in soft IRQ processing Software IRQ processing in generic architectures assumes that the exit out of hard IRQ may have re-enabled interrupts (some architectures may have an implicit EOI). It presumes them enabled and toggles the flags once more just in case unless this is turned off in the architecture specific hardirq.h by setting __ARCH_IRQ_EXIT_IRQS_DISABLED This patch adds this to UML where due to the way IRQs are handled it is an optimization (it works fine without it too). Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger arch/um/include/asm/hardirq.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit d5e3f5cbe5cee7fe6da26566559a978547179b37 Author: Anton Ivanov Date: Mon Dec 21 11:28:02 2015 +0000 um: Prevent IRQ handler reentrancy The existing IRQ handler design in UML does not prevent reentrancy This is mitigated by fd-enable/fd-disable semantics for the IO portion of the UML subsystem. The timer, however, can and is re-entered resulting in very deep stack usage and occasional stack exhaustion. This patch prevents this by checking if there is a timer interrupt in-flight before processing any pending timer interrupts. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger arch/um/os-Linux/signal.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 0754fb298f2f2719f0393491d010d46cfb25d043 Author: Vegard Nossum Date: Fri Dec 18 21:28:53 2015 +0100 uml: flush stdout before forking I was seeing some really weird behaviour where piping UML's output somewhere would cause output to get duplicated: $ ./vmlinux | head -n 40 Checking that ptrace can change system call numbers...Core dump limits : soft - 0 hard - NONE OK Checking syscall emulation patch for ptrace...Core dump limits : soft - 0 hard - NONE OK Checking advanced syscall emulation patch for ptrace...Core dump limits : soft - 0 hard - NONE OK Core dump limits : soft - 0 hard - NONE This is because these tests do a fork() which duplicates the non-empty stdout buffer, then glibc flushes the duplicated buffer as each child exits. A simple workaround is to flush before forking. Cc: stable@vger.kernel.org Signed-off-by: Vegard Nossum Signed-off-by: Richard Weinberger arch/um/os-Linux/start_up.c | 2 ++ 1 file changed, 2 insertions(+) commit 9f2dfda2f2f1c6181c3732c16b85c59ab2d195e0 Author: Vegard Nossum Date: Wed Dec 16 21:59:56 2015 +0100 uml: fix hostfs mknod() An inverted return value check in hostfs_mknod() caused the function to return success after handling it as an error (and cleaning up). It resulted in the following segfault when trying to bind() a named unix socket: Pid: 198, comm: a.out Not tainted 4.4.0-rc4 RIP: 0033:[<0000000061077df6>] RSP: 00000000daae5d60 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 000000006092a460 RCX: 00000000dfc54208 RDX: 0000000061073ef1 RSI: 0000000000000070 RDI: 00000000e027d600 RBP: 00000000daae5de0 R08: 00000000da980ac0 R09: 0000000000000000 R10: 0000000000000003 R11: 00007fb1ae08f72a R12: 0000000000000000 R13: 000000006092a460 R14: 00000000daaa97c0 R15: 00000000daaa9a88 Kernel panic - not syncing: Kernel mode fault at addr 0x40, ip 0x61077df6 CPU: 0 PID: 198 Comm: a.out Not tainted 4.4.0-rc4 #1 Stack: e027d620 dfc54208 0000006f da981398 61bee000 0000c1ed daae5de0 0000006e e027d620 dfcd4208 00000005 6092a460 Call Trace: [<60dedc67>] SyS_bind+0xf7/0x110 [<600587be>] handle_syscall+0x7e/0x80 [<60066ad7>] userspace+0x3e7/0x4e0 [<6006321f>] ? save_registers+0x1f/0x40 [<6006c88e>] ? arch_prctl+0x1be/0x1f0 [<60054985>] fork_handler+0x85/0x90 Let's also get rid of the "cosmic ray protection" while we're at it. Fixes: e9193059b1b3 "hostfs: fix races in dentry_name() and inode_name()" Signed-off-by: Vegard Nossum Cc: Jeff Dike Cc: Al Viro Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger fs/hostfs/hostfs_kern.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8679ee4204cfd5cf78b996508ccadc1ec6130f1a Author: Dmitry Torokhov Date: Wed Jan 6 14:20:07 2016 -0800 Input: gpio-keys - fix check for disabling unsupported keys Commit 4ea14a53d8f881034fa9e186653821c4e3d9a8fb ("Input: gpio-keys - report error when disabling unsupported key") tried let user know that they attempted to disable an unsupported key, unfortunately the check is wrong as it believes that all codes are invalid. Fix it by ensuring that keys that we try to disable are subset of keys (or switches) that device reports. Fixes: 4ea14a53d8f8 ("Input: gpio-keys - report error when disabling unsupported key") Reported-by: Ivaylo Dimitrov Tested-by: Ivaylo Dimitrov Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 2cfa2b191e56fd4c5c6ffb72e1d1e82ed225676d Author: Rami Rosen Date: Sat Jan 9 23:33:06 2016 +0200 cgroup: fix a typo. This patch fixes a typo in a comment in cgroup.c. Signed-off-by: Rami Rosen Signed-off-by: Tejun Heo kernel/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b63b6bfc1a551acf154061699028c7032d7890c Merge: e07ecd7 55f5560 Author: Dan Williams Date: Sun Jan 10 07:53:55 2016 -0800 Merge branch 'for-4.5/block-dax' into for-4.5/libnvdimm commit eb37bc3f85b69f529d2ad06c41fad8dedd654c76 Author: Sudip Mukherjee Date: Wed Jan 6 10:48:54 2016 +1100 m68k: Provide __phys_to_pfn() and __pfn_to_phys() The defconfig build of m68k was failing with the error: implicit declaration of function '__pfn_to_phys' Other architectures have added , but if we do so here then we will also get redeclaration of some other functions. So it is better to copy these macros into page.h. Fixes: 0a3c3bf11240 ("x86, mm: introduce vmem_altmap to augment vmemmap_populate()") Signed-off-by: Sudip Mukherjee Cc: Dan Williams Reported-by: Guenter Roeck (m68knommu) [geert: Apply to page.h instead of page_mm.h to cover nommu, reword] Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/page.h | 3 +++ 1 file changed, 3 insertions(+) commit 2d522618c8d13abe87f8203dcb115bfcc555f88b Author: Finn Thain Date: Fri Dec 18 12:44:28 2015 +1100 m68k/atari, m68k/sun3: Fix SCSI platform device registration when driver is modular Fixes: 3ff228af84b5 ("atari_scsi: Convert to platform device") Fixes: 0d31f8759109 ("sun3_scsi: Convert to platform device") Reported-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/atari/config.c | 4 ++-- arch/m68k/sun3/config.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f2ed6b07645ed29c1e090ead2e41066385cba3ea Author: Mengdong Lin Date: Wed Jan 6 13:29:31 2016 +0800 ASoC: Make aux_dev more like a generic component aux_dev is mainly used by the machine driver to specify analog devices, which are registered as codecs. Making it more like a generic component can help the machine driver to use it to specify any component with topology info by name. Details: - Remove the stub 'rtd_aux' array from the soc card. - Add a list 'aux_comp_list' to store the components of aux_devs. And add a list head 'list_aux' to struct snd_soc_component, for adding such components to the above list. - Add a 'init' ops to a component for machine specific init. soc_bind_aux_dev() will set it to be aux_dev's init. And it will be called when probing the component. - soc_bind_aux_dev() will also search components by name of an aux_dev, since it may not be a codec. - Move probing of aux_devs before checking new DAI links brought by topology. - Move removal of aux_devs later than removal of links. Because topology of aux components may register DAIs and the DAI drivers will go with removal of the aux components, we want soc_remove_link_dais() to remove the DAIs at first. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown include/sound/soc.h | 8 ++- sound/soc/soc-core.c | 146 +++++++++++++++++++++++++++------------------------ 2 files changed, 83 insertions(+), 71 deletions(-) commit 7905f08247131ac5d5c0e2f057e0cf19da40e5da Author: Martin Sperl Date: Sat Jan 9 09:25:53 2016 +0000 ASoC: bcm2835: cleanup includes by ordering them alphabetically Cleanup of includes so that they are ordered alphabetically. Signed-off-by: Martin Sperl Signed-off-by: Mark Brown sound/soc/bcm/bcm2835-i2s.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c36d9b3f6de7c6aefed5fdf6ad752773bdafa60c Author: Maruthi Srinivas Bayyavarapu Date: Fri Jan 8 18:22:11 2016 -0500 ASoC: AMD: Manage ACP 2.x SRAM banks power ACP SRAM banks gets turned on when ACP is powered on. Not all banks are used for playback/capture. So, power on required banks during audio device open and power off during audio device close. Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 94 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 87 insertions(+), 7 deletions(-) commit 1927da9355670d04889ce57716bbc671fdca4135 Author: Maruthi Srinivas Bayyavarapu Date: Fri Jan 8 18:22:10 2016 -0500 ASoC: AMD: add pm ops genpd will power off/on ACP to manage runtime ACP PM. ACP runtime PM hooks are added to get it deinitialized and initialized respectively, after it is powered off/on. When system goes to suspend when audio usecase is active, ACP will be powered off through genpd. When it resumes, ACP needs to be initialized and reconfigured. Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 7c31335a03b6afff1c474c693c3187f13b8587cc Author: Maruthi Srinivas Bayyavarapu Date: Fri Jan 8 18:22:09 2016 -0500 ASoC: AMD: add AMD ASoC ACP 2.x DMA driver ACP IP has internal DMA controller with multiple channels which can be programmed in cyclic/non cyclic manner. ACP can generate interrupt upon completion of DMA transfer, if required. The PCM driver provides the platform DMA component to ALSA core. Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Reviewed-by: Murali Krishna Vemuri Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/amd/Kconfig | 4 + sound/soc/amd/Makefile | 3 + sound/soc/amd/acp-pcm-dma.c | 914 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/amd/acp.h | 118 ++++++ 6 files changed, 1041 insertions(+) commit 2fa86e94a383cd6dd6e34a10950ddc93c0bb173b Author: Maruthi Srinivas Bayyavarapu Date: Fri Jan 8 18:22:08 2016 -0500 ASoC: AMD : add ACP 2.2 register headers These are register headers for the ACP (Audio CoProcessor) v2.2 Signed-off-by: Maruthi Bayyavarapu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/include/acp_2_2_d.h | 609 ++++++++ sound/soc/amd/include/acp_2_2_enum.h | 1068 ++++++++++++++ sound/soc/amd/include/acp_2_2_sh_mask.h | 2292 +++++++++++++++++++++++++++++++ 3 files changed, 3969 insertions(+) commit f51e3d5372b4bf80006cdc1694a7656aba7c9b58 Author: Maciej S. Szmigiero Date: Sun Dec 20 21:31:48 2015 +0100 ASoC: fsl_ssi: mark some registers precious Mark some registers precious since their reads have side effects (like clearing flags). Signed-off-by: Maciej S. Szmigiero Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3f1c241f0f5f90046258e6b8d4aeb6463ffdc08e Author: Maciej S. Szmigiero Date: Sun Dec 20 21:30:25 2015 +0100 ASoC: fsl_ssi: mark SACNT register volatile SACNT register should be marked volatile since its WR and RD bits are cleared by SSI after completing the relevant operation. This unbreaks AC'97 register access. Fixes: 05cf237972fe ("ASoC: fsl_ssi: Add driver suspend and resume to support MEGA Fast") Signed-off-by: Maciej S. Szmigiero Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3637976b8975afb0a55a1fc88a2c320a2839a9da Author: Jeeja KP Date: Fri Dec 18 15:12:09 2015 +0530 ASoC: Intel: Skylake: Add Resume capability in PCM info. This patch adds pcm capability to support Resume. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 1 + 1 file changed, 1 insertion(+) commit 920982c93c26a9a94d1e90221953a2ce16e91c0b Author: Jeeja KP Date: Fri Dec 18 15:12:08 2015 +0530 ASoC: Intel: Skylake: Reconfigure Link stream on suspend/resume On suspend the link register are lost so we need to reconfigure them in resume. This patch adds the reconfiguration of the link register in trigger resume. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 748a1d5a3fb75e1102320214a8bde347d7b228c3 Author: Jeeja KP Date: Fri Dec 18 15:12:07 2015 +0530 ASoC: Intel: Skylake: Add DMA resume position in Trigger resume/suspend Use the DMA resume capability to resume the DMA position when stream is suspended/resumed. In suspend we save the position and when stream is resumed the stream needs to be started from the position when the stream was suspended using the new DMA resume capabilities Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 1f4956fd96c98e3fbe9a2818014cf36854398db0 Author: Jeeja KP Date: Fri Dec 18 15:12:06 2015 +0530 ASoC: Intel: Skylake: enable interrupt as wake source in active suspend In active suspend, any HDA interrupt should wake the system. When device enters active suspend, we need to enable HDA controller interrupt as wake source. Similarly disable HDA controller interrupt as wake source when exiting active suspend. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 4 ++++ 1 file changed, 4 insertions(+) commit c2e20cd8187cb576362e7c8ecb0b1c51eedb2686 Author: Vinod Koul Date: Fri Dec 18 15:12:05 2015 +0530 ASoC: Intel: Skylake: manage link power in active suspend When device enters active suspend, we should turn off the links as they are not in use. Similarly we need to bring back links when we exit active suspend. Signed-off-by: Jayachandran B Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 2 ++ 1 file changed, 2 insertions(+) commit 721c3e36f774150f453216efcf5e1895577ac68c Author: Dharageswari.R Date: Fri Dec 18 15:12:04 2015 +0530 ASoC: Intel: Skylake: Use CGCTL.MISCBDCGE for Phrase detection notification Per HW recommendation, SW shall clear the CGCTL.MISCBDCGE and set it back once data is transferred. So clear this when we get the IPC and track using a driver flag, and set back on closure Signed-off-by: Dharageswari.R Signed-off-by: Jayachandran B Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 13 +++++++++++++ sound/soc/intel/skylake/skl-sst-ipc.c | 15 +++++++++++++++ 2 files changed, 28 insertions(+) commit 0c8ba9d28518822d612de23fc9020b2a66a0228c Author: Jayachandran B Date: Fri Dec 18 15:12:03 2015 +0530 ASoC: Intel: Skylake: fix reset controller sequencing MISCBDCGE is a new register for Misc Backbone clock gate control which is useful to control while resetting the link and ensuring controller is in required state so add API to control it HW recommends that we reset with CGCTL.MISCBDCGE disabled, so add that while doing init chip and reset sequence. Signed-off-by: Jayachandran B Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-ipc.h | 5 ++++ sound/soc/intel/skylake/skl.c | 55 +++++++++++++++++++++++++++++++++-- sound/soc/intel/skylake/skl.h | 3 ++ 3 files changed, 60 insertions(+), 3 deletions(-) commit 648e3a5bdddf8e7ad9c27450ac368b8bccd807a5 Merge: 15b9144 6706a19 Author: Mark Brown Date: Sun Jan 10 12:13:34 2016 +0000 Merge branch 'topic/hdac' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit a242cac1d3aa098fbe51097d2b1dcae8b662b761 Author: Maruthi Srinivas Bayyavarapu Date: Fri Jan 8 18:22:05 2016 -0500 ASoC: dwc: add quirk to override COMP_PARAM_1 register DWC for capture in ACP 2.x IP reports playback and capture capabilities though it supports only capture. Added a quirk to override default value to represent capture capability only. Signed-off-by: Maruthi Bayyavarapu Signed-off-by: Alex Deucher Signed-off-by: Mark Brown include/sound/designware_i2s.h | 1 + sound/soc/dwc/designware_i2s.c | 4 ++++ 2 files changed, 5 insertions(+) commit 68003e6cf2bbd239a322bd8a28dacfaf8174fdee Author: Mengdong Lin Date: Thu Dec 31 16:40:43 2015 +0800 ASoC: Support registering a DAI dynamically Define API snd_soc_register_dai() to add a DAI dynamically and create the DAI widgets. Topology can use this API to register DAIs when probing a component with topology info. These DAIs's playback & capture widgets will be freed when the sound card is unregistered and the DAIs will be freed when cleaning up the component. And a dobj is embedded into the struct snd_soc_dai_driver. Topology can use the dobj to find the DAI drivers created by it and free them when the topology component is removed. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown include/sound/soc-dai.h | 1 + include/sound/soc.h | 3 +++ sound/soc/soc-core.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit 5e4fb372117f476e0c7f85418ed3e39506fbb75c Author: Mengdong Lin Date: Thu Dec 31 16:40:20 2015 +0800 ASoC: Define soc_add_dai() to add a DAI to a component Define soc_add_dai() as a wrapper to add a single DAI to a component. It can be reused to register a DAI dynamically by topology. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown sound/soc/soc-core.c | 88 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 36 deletions(-) commit 6706a19747eb693ff35ce140f5cbee66dcfec0c4 Author: Vinod Koul Date: Fri Dec 18 15:12:02 2015 +0530 ALSA: hdac: add snd_hdac_ext_bus_link_power_up_all We have an API for powering down all links, we need a similar one for powering up links, so add for power up as well Signed-off-by: Jayachandran B Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown include/sound/hdaudio_ext.h | 1 + sound/hda/ext/hdac_ext_controller.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit cf8fe58b1066cea668e030d0ab61e4b8eef8b219 Author: Jayachandran B Date: Fri Dec 18 15:12:01 2015 +0530 ALSA: hdac: Increase timeout value for link power check HW recommends 180us for worst case values for link power up delay, so change the current delay value from 50 (150us) to 150 (450us) Signed-off-by: Jayachandran B Signed-off-by: Vinod Koul Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown sound/hda/ext/hdac_ext_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88888155c555487037b894a97a2a4c6a8155cda0 Author: Jeeja KP Date: Fri Dec 18 15:12:00 2015 +0530 ALSA: hdac: couple the hda DMA stream in cleanup A stream is by default in coupled mode, in DSP operation we move it to decoupled mode. On cleanup HW expects that we leave it back to default state so couple the DMA on cleanup. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown sound/hda/ext/hdac_ext_stream.c | 1 + 1 file changed, 1 insertion(+) commit a9c48f7f5906d02d4ec4aa50b1c20fccbce53eec Author: Jeeja KP Date: Fri Dec 18 15:11:59 2015 +0530 ALSA: hdac: Add support for hda DMA Resume capability Skylake sports new capability of DMA resume, DRSM where we can resume the DMA. This capability is defined by presence of AZX_DRSM_CAP_ID. If this capability is present, we use this capability. So we add: snd_hdac_ext_stream_drsm_enable() - DMA resume caps snd_hdac_ext_stream_set_dpibr() - set the DMA position snd_hdac_ext_stream_set_lpib() - set the lpib Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown include/sound/hda_register.h | 9 +++++ include/sound/hdaudio_ext.h | 14 ++++++++ sound/hda/ext/hdac_ext_controller.c | 6 ++++ sound/hda/ext/hdac_ext_stream.c | 71 +++++++++++++++++++++++++++++++++++++ 4 files changed, 100 insertions(+) commit 0471cd938e244e22f3ead77d2b82230f83e35f69 Author: Michael Trimarchi Date: Sun Jan 10 00:38:04 2016 +0100 ASoC: pcm1792a: Rename pcm1792a to pcm179x pcm1792a is compatible with pcm1795 and pcm1796 so it's better to have them under the common name pcm179x Signed-off-by: Michael Trimarchi Signed-off-by: Mark Brown .../devicetree/bindings/sound/pcm1792a.txt | 18 -- .../devicetree/bindings/sound/pcm179x.txt | 18 ++ sound/soc/codecs/Kconfig | 6 +- sound/soc/codecs/Makefile | 4 +- sound/soc/codecs/pcm1792a.c | 271 --------------------- sound/soc/codecs/pcm1792a.h | 27 -- sound/soc/codecs/pcm179x.c | 271 +++++++++++++++++++++ sound/soc/codecs/pcm179x.h | 27 ++ 8 files changed, 321 insertions(+), 321 deletions(-) commit 823733b91619aef5a2be21d0918ef6dd996de72a Author: Michael Trimarchi Date: Sun Jan 10 00:38:03 2016 +0100 ASoC: pcm1792a: Rename internal data and function to pcm179x Signed-off-by: Michael Trimarchi Signed-off-by: Mark Brown sound/soc/codecs/pcm1792a.c | 158 ++++++++++++++++++++++---------------------- sound/soc/codecs/pcm1792a.h | 6 +- 2 files changed, 82 insertions(+), 82 deletions(-) commit 4ab936d1aca69978dc738592a00e34f836bda1c3 Author: Michael Trimarchi Date: Sat Jan 9 23:47:58 2016 +0100 ASoC: rockchip: i2s: Add SNDRV_PCM_FMTBIT_S32_LE support Signed-off-by: Michael Trimarchi Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4fdd1d51ad5d059548c6539ac9d281f74d24bcbe Author: Richard Weinberger Date: Sat Jan 2 23:12:42 2016 +0100 ubifs: Use XATTR_*_PREFIX_LEN ...instead of open coding it. Signed-off-by: Richard Weinberger fs/ubifs/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 170eb55f7d4ba9564736ba298a7d4985422db4cc Author: Dongsheng Yang Date: Tue Dec 22 09:22:01 2015 +0800 UBIFS: add a comment in key.h for unused parameter Add a comment in key.h to explain why we keep an unused parameter in key helpers. Signed-off-by: Dongsheng Yang Signed-off-by: Richard Weinberger fs/ubifs/key.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 34b89df90374b631692132640c6b3dbef52f808d Author: Sebastian Siewior Date: Thu Nov 26 21:23:50 2015 +0100 mtd: ubi: wl: avoid erasing a PEB which is empty wear_leveling_worker() currently unconditionally puts a PEB on erase in the error case even it just been taken from the free_list and never used. In case the PEB was never used it can be put back on the free list saving a precious erase cycle. v1…v2: - to_leb_clean -> dst_leb_clean - use the nested option for ensure_wear_leveling() - do_sync_erase() can't go -ENOMEM so we can just go into RO-mode now. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Richard Weinberger drivers/mtd/ubi/wl.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 607259e17b37017e9ec0249a8b0a7d8b76b572aa Merge: aa98b94 1d6d167 Author: James Morris Date: Sun Jan 10 21:52:17 2016 +1100 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into ra-next commit c55281531282930de0aace46b2d6b22653937818 Author: Gao Pan Date: Fri Jan 8 13:33:15 2016 +0800 i2c: imx: fix i2c resource leak with dma transfer In i2c_imx_dma_xfer(), when dmaengine_submit() returns error, the context goto label err_submit and then return. However, the memory allocated for txdesc has not been freed yet, which leads to resource leak. Signed-off-by: Gao Pan Signed-off-by: Fugang Duan Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 1 + 1 file changed, 1 insertion(+) commit a570a27af4d781619dfb5139f3b760e964373c29 Author: Wolfram Sang Date: Thu Jan 7 21:51:00 2016 +0100 dt-bindings: i2c: eeprom: add another EEPROM device Signed-off-by: Wolfram Sang Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++ 1 file changed, 2 insertions(+) commit f5e12d0d5bd4d2bc028bf3dda1732bde3824a008 Author: Wolfram Sang Date: Thu Jan 7 21:50:59 2016 +0100 dt-bindings: move I2C eeprom descriptions to the proper file EEPROMs can have additional properties, so they are not suitable for trivial-devices.txt. Move most bindings to the designated eeprom.txt. Add the missing "atmel,24c08" while doing that. Note that the remaining ones in trivial-devices need to be dealt with separately because of improper manufacturer names. Signed-off-by: Wolfram Sang Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/eeprom/eeprom.txt | 19 ++++++++++++++----- .../devicetree/bindings/i2c/trivial-devices.txt | 13 ------------- 2 files changed, 14 insertions(+), 18 deletions(-) commit b33af11de236fd6e25f3716182f008039ec68e93 Author: Suravee Suthikulpanit Date: Mon Jan 4 09:17:35 2016 -0600 i2c: designware: Do not require clock when SSCN and FFCN are provided The current driver uses input clock source frequency to calculate values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not currently have a good way to provide the frequency information. Instead, we can leverage the SSCN and FFCN ACPI methods, which can be used to directly provide these values. So, the clock information should no longer be required during probing. However, since clk can be invalid, additional checks must be done where we are making use of it. Signed-off-by: Mika Westerberg Signed-off-by: Suravee Suthikulpanit Tested-by: Loc Ho Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 22 +++++++++++++------- drivers/i2c/busses/i2c-designware-platdrv.c | 31 +++++++++++++++++++---------- 2 files changed, 35 insertions(+), 18 deletions(-) commit fa5b0bfa26d54b9b94e5c2ff9c826d1e12d6ad3a Author: Akshay Bhat Date: Wed Dec 23 13:38:58 2015 -0500 DT: i2c: trivial-devices: Add Epson RX8010 and MPL3115 Signed-off-by: Akshay Bhat Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/trivial-devices.txt | 2 ++ 1 file changed, 2 insertions(+) commit 2fe3e5189206f725b054e23b06762e50a7ab6276 Author: Wolfram Sang Date: Wed Dec 23 18:19:29 2015 +0100 i2c: s3c2410: remove superfluous runtime PM calls RuntimePM of the adapter device is now taken care of by the core. So, we can remove these calls. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-s3c2410.c | 6 ------ 1 file changed, 6 deletions(-) commit 9f924169c0358f630f9b6d26bb3de97360d8647b Author: Wolfram Sang Date: Wed Dec 23 18:19:28 2015 +0100 i2c: always enable RuntimePM for the adapter device The adapter device is a logical device. Because of that, it already uses pm_runtime_no_callbacks() in the core. To ensure proper propagation from the children (i2c devices) to the parent of the adapter (the HW device), make sure RuntimePM is enabled in any case. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 3 +++ 1 file changed, 3 insertions(+) commit 8d22f309384cc410da91543f1eb30fe5daf91c3b Author: Baruch Siach Date: Wed Dec 23 18:43:24 2015 +0200 i2c: designware: retry transfer on transient failure Set the i2c_adapter retries field to a sensible value. This allows the i2c core to retry master_xfer() when it returns -EAGAIN. Currently the i2c-designware driver returns -EAGAIN only on Tx arbitration failure (DW_IC_TX_ARB_LOST). Reported-by: Rolland Chau Signed-off-by: Baruch Siach Acked-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.c | 1 + 1 file changed, 1 insertion(+) commit 55f5560d8c18fe33fc169f8d244a9247dcac7612 Author: Dan Williams Date: Tue Jan 5 00:28:18 2016 -0800 block: kill disk_{check|set|clear|alloc}_badblocks These actions are completely managed by a block driver or can use the badblocks api directly. Signed-off-by: Dan Williams block/genhd.c | 42 ------------------------------------------ include/linux/genhd.h | 5 ----- 2 files changed, 47 deletions(-) commit 710d69cc99507803ed91b4ec7368fbd66d59f014 Author: Dan Williams Date: Mon Jan 4 23:31:24 2016 -0800 libnvdimm, pmem: nvdimm_read_bytes() badblocks support Support badblock checking in all the pmem read paths that do not go through the block layer. This protects info block reads (btt or pfn) as well as data reads to a pmem namespace via a btt instance. Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 57f7f317abdd07954cb116280c88d18378afb33e Author: Dan Williams Date: Wed Jan 6 12:03:42 2016 -0800 pmem, dax: disable dax in the presence of bad blocks Longer term teach dax to punch "error" holes in mapping requests and deliver SIGBUS to applications that consume a bad pmem page. For now, simply disable the dax performance optimization in the presence of known errors. Signed-off-by: Dan Williams block/ioctl.c | 10 ++++++++++ drivers/nvdimm/pmem.c | 1 + 2 files changed, 11 insertions(+) commit c9c99311b55d4765cae35c652cb637747cc637b7 Merge: 12f1501 ed21d17 Author: David S. Miller Date: Sat Jan 9 21:48:36 2016 -0500 Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== Included changes: - increase internal module version - increase BLA wait periods to 6 - purge BLA backbone table when it is disabled - make sure post function is invoked only if sysfs value is changed - simplify code by removing useless NULL checks - various corrections to existing kerneldoc - minor cleanups ==================== Signed-off-by: David S. Miller commit 12f1501e7511958b3a7244e24f290803d0a3c41f Author: Jiri Pirko Date: Thu Jan 7 11:50:30 2016 +0100 mlxsw: spectrum: remove FDB entry in case we get unknown object notification It may happen that we get notification for FDB entry for object (port, lag, vport), which does not exist. Currently we ignore that, which only causes this being re-sent in next notification. The entry will never disappear. So get rid of it by simply removing it using SFD register. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 38 +++++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) commit 2fa9d45e16089b499909d807025f0d66b2442d57 Author: Jiri Pirko Date: Thu Jan 7 11:50:29 2016 +0100 mlxsw: spectrum: pass local_port to mlxsw_sp_port_fdb_uc_op Do not pass struct mlxsw_sp_port to mlxsw_sp_port_fdb_uc_op and rather just pass local_port. This is needed in case this is called from SFN process function and mlxsw_sp_port is not existent for particular local_port. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 07b9b37c227cb8d88d478b4a9c5634fee514ede1 Author: Nicolas Dichtel Date: Thu Jan 7 11:26:53 2016 +0100 vxlan: fix test which detect duplicate vxlan iface When a vxlan interface is created, the driver checks that there is not another vxlan interface with the same properties. To do this, it checks the existing vxlan udp socket. Since commit 1c51a9159dde, the creation of the vxlan socket is done only when the interface is set up, thus it breaks that test. Example: $ ip l a vxlan10 type vxlan id 10 group 239.0.0.10 dev eth0 dstport 0 $ ip l a vxlan11 type vxlan id 10 group 239.0.0.10 dev eth0 dstport 0 $ ip -br l | grep vxlan vxlan10 DOWN f2:55:1c:6a:fb:00 vxlan11 DOWN 7a:cb:b9:38:59:0d Instead of checking sockets, let's loop over the vxlan iface list. Fixes: 1c51a9159dde ("vxlan: fix race caused by dropping rtnl_unlock") Reported-by: Thomas Faivre Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/net/vxlan.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 824b1a97400338e47ba7f878a42cd89d80cd5b81 Author: Sudip Mukherjee Date: Thu Jan 7 15:42:37 2016 +0530 net: plip: use new parport device model Modify plip driver to use the new parallel port device model. Signed-off-by: Sudip Mukherjee Signed-off-by: David S. Miller drivers/net/plip/plip.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit 29c6dd591bbd592472247441de9fa694acdabae8 Author: Oliver Neukum Date: Thu Jan 7 11:01:00 2016 +0100 cdc-acm: fix NULL pointer reference The union descriptor must be checked. Its usage was conditional before the parser was introduced. This is important, because many RNDIS device, which also use the common parser, have bogus extra descriptors. Signed-off-by: Oliver Neukum Tested-by: Vasily Galkin Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ab3f09fe16d158cb4f84e558c61ec5d6d601f2e0 Author: John Crispin Date: Mon Jan 4 20:36:38 2016 +0100 watchdog: add MT7621 watchdog support This patch adds support for the watchdog core found on newer MediaTek Wifi SoCs MT7621 and MT7628. There is no symbol for MT7628 as it is a subtype of MT7620 so we depend on that instead. Signed-off-by: John Crispin Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/watchdog/mt7621-wdt.txt | 12 ++ drivers/watchdog/Kconfig | 7 + drivers/watchdog/Makefile | 1 + drivers/watchdog/mt7621_wdt.c | 186 +++++++++++++++++++++ 4 files changed, 206 insertions(+) commit e10624f8c09710b3b0740ea3847627ea02f55c39 Author: Dan Williams Date: Wed Jan 6 12:03:41 2016 -0800 pmem: fail io-requests to known bad blocks Check the sectors specified in a read bio to see if they hit a known bad block, and return an error code pmem_do_bvec(). Note that the ->rw_page() is not in a position to return errors. For now, copy the same layering violation present in zram_rw_page() to avoid crashes of the form: kernel BUG at mm/filemap.c:822! [..] Call Trace: [] page_endio+0x1e/0x60 [] mpage_end_io+0x39/0x60 [] bio_endio+0x3f/0x60 [] pmem_make_request+0x111/0x230 [nd_pmem] ...i.e. unlock a page that was already unlocked via pmem_rw_page() => page_endio(). Reported-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) commit b95f5f4391fad65f1819c2404080b05ca95bdd92 Author: Dan Williams Date: Mon Jan 4 23:50:23 2016 -0800 libnvdimm: convert to statically allocated badblocks If a device will ever have badblocks it should always have a badblocks instance available. So, similar to md, embed a badblocks instance in pmem_device. This reduces pointer chasing in the i/o fast path, and simplifies the init path. Reported-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/core.c | 57 +++++++++++++++------------------------------------ drivers/nvdimm/nd.h | 4 ++-- drivers/nvdimm/pmem.c | 10 ++++----- 3 files changed, 24 insertions(+), 47 deletions(-) commit 87ba05dff3510f9e058b35d3c3fa222b6f406ecc Author: Dan Williams Date: Sat Jan 9 07:48:43 2016 -0800 libnvdimm: don't fail init for full badblocks list If the badblocks list runs out of space it simply means that software is unable to intercept all errors. This is no different than the latent discovery of new badblocks case and should not be an initialization failure condition. Signed-off-by: Dan Williams drivers/nvdimm/core.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 16263ff6c72eb4cc00aa287230144dda12ccad12 Author: Dan Williams Date: Mon Jan 4 23:50:23 2016 -0800 block, badblocks: introduce devm_init_badblocks Provide a devres interface for initializing a badblocks instance. The pmem driver has several scenarios where it will be beneficial to have this structure automatically freed when the device is disabled / fails probe. Signed-off-by: Dan Williams block/badblocks.c | 48 ++++++++++++++++++++++++++++++++++------------- include/linux/badblocks.h | 14 +++++++++++++- 2 files changed, 48 insertions(+), 14 deletions(-) commit 20a308f09e0d29ce6f5a4114cc476a998d569bfb Author: Dan Williams Date: Wed Jan 6 12:03:41 2016 -0800 block: clarify badblocks lifetime The badblocks list attached to a gendisk is allocated by the driver which equates to the driver owning the lifetime of the object. Do not automatically free it in del_gendisk(). This is in preparation for expanding the use of badblocks in libnvdimm drivers and introducing devm_init_badblocks(). Signed-off-by: Dan Williams block/badblocks.c | 2 ++ block/genhd.c | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) commit d3b407fb3f782bd915db64e266010ea30a2d381e Author: Dan Williams Date: Wed Jan 6 12:19:22 2016 -0800 badblocks: rename badblocks_free to badblocks_exit For symmetry with badblocks_init() make it clear that this path only destroys incremental allocations of a badblocks instance, and does not free the badblocks instance itself. Signed-off-by: Dan Williams block/badblocks.c | 6 +++--- block/genhd.c | 2 +- drivers/md/md.c | 2 +- include/linux/badblocks.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit ad9a8bde2cb19f6876f964fc48acc8b6a2f325ff Author: Dan Williams Date: Wed Jan 6 12:03:41 2016 -0800 libnvdimm, pmem: move definition of nvdimm_namespace_add_poison to nd.h nd-core.h is private to the libnvdimm core internals and should not be used by drivers. Signed-off-by: Dan Williams drivers/nvdimm/nd-core.h | 2 -- drivers/nvdimm/nd.h | 2 ++ drivers/nvdimm/pmem.c | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) commit 0caeef63e6d2f866d85bb507bf63e0ce8ec91cef Author: Vishal Verma Date: Thu Dec 24 19:21:43 2015 -0700 libnvdimm: Add a poison list and export badblocks During region creation, perform Address Range Scrubs (ARS) for the SPA (System Physical Address) ranges to retrieve known poison locations from firmware. Add a new data structure 'nd_poison' which is used as a list in nvdimm_bus to store these poison locations. When creating a pmem namespace, if there is any known poison associated with its physical address space, convert the poison ranges to bad sectors that are exposed using the badblocks interface. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit.c | 203 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/core.c | 187 ++++++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/nd-core.h | 3 + drivers/nvdimm/nd.h | 6 ++ drivers/nvdimm/pmem.c | 6 ++ include/linux/libnvdimm.h | 1 + 6 files changed, 406 insertions(+) commit d26f73f083ed6fbea7fd3fdbacb527b7f3e75ac0 Author: Dan Williams Date: Wed Dec 30 15:01:19 2015 -0800 nfit_test: Enable DSMs for all test NFITs In preparation for getting a poison list using ARS DSMs, enable DSMs for all manufactured NFITs supplied by the test framework. Also, supply valid response data for ars_status. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fc974ee2bffdde47d1e4b220cf326952cc2c4794 Author: Vishal Verma Date: Thu Dec 24 19:20:34 2015 -0700 md: convert to use the generic badblocks code Retain badblocks as part of rdev, but use the accessor functions from include/linux/badblocks for all manipulation. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/md/md.c | 516 +++----------------------------------------------------- drivers/md/md.h | 40 +---- 2 files changed, 28 insertions(+), 528 deletions(-) commit 99e6608c9e7414ae4f2168df8bf8fae3eb49e41f Author: Vishal Verma Date: Sat Jan 9 08:36:51 2016 -0800 block: Add badblock management for gendisks NVDIMM devices, which can behave more like DRAM rather than block devices, may develop bad cache lines, or 'poison'. A block device exposed by the pmem driver can then consume poison via a read (or write), and cause a machine check. On platforms without machine check recovery features, this would mean a crash. The block device maintaining a runtime list of all known sectors that have poison can directly avoid this, and also provide a path forward to enable proper handling/recovery for DAX faults on such a device. Use the new badblock management interfaces to add a badblocks list to gendisks. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams block/genhd.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/genhd.h | 7 +++++ 2 files changed, 83 insertions(+) commit 97a249e98a72d6b79fb7350a8dd56b147e9d5bdb Author: Yong Li Date: Wed Jan 6 09:09:43 2016 +0800 iio: dac: mcp4725: set iio name property in sysfs Without this change, the name entity for mcp4725 is missing in /sys/bus/iio/devices/iio\:device*/name With this change, name is reported correctly Signed-off-by: Yong Li Cc: Signed-off-by: Jonathan Cameron drivers/iio/dac/mcp4725.c | 1 + 1 file changed, 1 insertion(+) commit 3eb9ede23bdd96e9ba60e2b4d4d17a7c35d58448 Merge: 9cc2617 775d8a1 Author: Ingo Molnar Date: Sat Jan 9 17:17:33 2016 +0100 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Allow using trace events fields as sort order keys, making 'perf evlist --trace_fields' show those, and then the user can select a subset and use like: perf top -e sched:sched_switch -s prev_comm,next_comm That works as well in 'perf report' when handling files containing tracepoints. The default when just tracepoint events are found in a perf.data file is to format it like ftrace, using the libtraceevent formatters, plugins, etc (Namhyung Kim) - Add support in 'perf script' to process 'perf stat record' generated files, culminating in a python perf script that calculates CPI (Cycles per Instruction) (Jiri Olsa) - Show random perf tool tips in the 'perf report' bottom line (Namhyung Kim) - perf report now defaults to --group if the perf.data file has grouped events, try it with: # perf record -e '{cycles,instructions}' -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.093 MB perf.data (1247 samples) ] # perf report # Samples: 1K of event 'anon group { cycles, instructions }' # Event count (approx.): 1955219195 # # Overhead Command Shared Object Symbol 2.86% 0.22% swapper [kernel.kallsyms] [k] intel_idle 1.05% 0.33% firefox libxul.so [.] js::SetObjectElement 1.05% 0.00% kworker/0:3 [kernel.kallsyms] [k] gen6_ring_get_seqno 0.88% 0.17% chrome chrome [.] 0x0000000000ee27ab 0.65% 0.86% firefox libxul.so [.] js::ValueToId<(js::AllowGC)1> 0.64% 0.23% JS Helper libxul.so [.] js::SplayTree::splay 0.62% 1.27% firefox libxul.so [.] js::GetIterator 0.61% 1.74% firefox libxul.so [.] js::NativeSetProperty 0.61% 0.31% firefox libxul.so [.] js::SetPropertyByDefining User visible fixes: - Coect data mmaps so that the DWARF unwinder can handle usecases needing them, like softice (Jiri Olsa) - Decay callchains in fractal mode, fixing up cases where 'perf top -g' would show entries with more than 100% (Namhyung Kim) Infrastructure changes: - Sync tools/lib with the lib/ in the kernel sources for find_bit.c and move bitmap.[ch] from tools/perf/util/ to tools/lib/ (Arnaldo Carvalho de Melo) - No need to set attr.sample_freq in some 'perf test' entries that only want to deal with PERF_RECORD_ meta-events, improve a bit error output for CQM test (Arnaldo Carvalho de Melo) - Fix python binding build, adding some missing object files now required due to cpumap using find_bit stuff (Arnaldo Carvalho de Melo) - tools/build improvemnts (Jiri Olsa) - Add more files to cscope/ctags databases (Jiri Olsa) - Do not show 'trace' in 'perf help' if it is not compiled in (Jiri Olsa) - Make perf_evlist__open() open evsels with their cpus and threads, like perf record does, making them consistent (Adrian Hunter) - Fix pmu snapshot initialization bug (Stephane Eranian) - Add missing headers in perf's MANIFEST (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 91918d13eb17b8c11a9b6b76bfdd7cc0efab4f50 Author: Guenter Roeck Date: Thu Feb 19 09:21:29 2015 -0800 hwmon: (nct6683) Add basic support for NCT6683 on Mitac boards Mitac microcode differs from Intel microcode. One key difference is that pwm values can be written. Detect vendor from customer ID field and no longer use DMI data to identify which microcode is running on the chip. Signed-off-by: Guenter Roeck drivers/hwmon/nct6683.c | 78 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 61 insertions(+), 17 deletions(-) commit 9e0e252a048b0ba5066f0dc15c3b2468ffe5c422 Author: Vishal Verma Date: Thu Dec 24 19:20:32 2015 -0700 badblocks: Add core badblock management code Take the core badblocks implementation from md, and make it generally available. This follows the same style as kernel implementations of linked lists, rb-trees etc, where you can have a structure that can be embedded anywhere, and accessor functions to manipulate the data. The only changes in this copy of the code are ones to generalize function/variable names from md-specific ones. Also add init and free functions. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams block/Makefile | 2 +- block/badblocks.c | 561 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/badblocks.h | 53 +++++ 3 files changed, 615 insertions(+), 1 deletion(-) commit ac34f15e0c6d2fd58480052b6985f6991fb53bcc Author: Dan Williams Date: Tue Dec 29 14:02:29 2015 -0800 block: fix del_gendisk() vs blkdev_ioctl crash When tearing down a block device early in its lifetime, userspace may still be performing discovery actions like blkdev_ioctl() to re-read partitions. The nvdimm_revalidate_disk() implementation depends on disk->driverfs_dev to be valid at entry. However, it is set to NULL in del_gendisk() and fatally this is happening *before* the disk device is deleted from userspace view. There's no reason for del_gendisk() to clear ->driverfs_dev. That device is the parent of the disk. It is guaranteed to not be freed until the disk, as a child, drops its ->parent reference. We could also fix this issue locally in nvdimm_revalidate_disk() by using disk_to_dev(disk)->parent, but lets fix it globally since ->driverfs_dev follows the lifetime of the parent. Longer term we should probably just add a @parent parameter to add_disk(), and stop carrying this pointer in the gendisk. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] nvdimm_revalidate_disk+0x18/0x90 [libnvdimm] CPU: 2 PID: 538 Comm: systemd-udevd Tainted: G O 4.4.0-rc5 #2257 [..] Call Trace: [] rescan_partitions+0x87/0x2c0 [] ? __lock_is_held+0x49/0x70 [] __blkdev_reread_part+0x72/0xb0 [] blkdev_reread_part+0x25/0x40 [] blkdev_ioctl+0x4fd/0x9c0 [] ? current_kernel_time64+0x69/0xd0 [] block_ioctl+0x3d/0x50 [] do_vfs_ioctl+0x308/0x560 [] ? __audit_syscall_entry+0xb1/0x100 [] ? do_audit_syscall_entry+0x66/0x70 [] SyS_ioctl+0x79/0x90 [] entry_SYSCALL_64_fastpath+0x12/0x76 Reported-by: Robert Hu Signed-off-by: Dan Williams block/genhd.c | 1 - 1 file changed, 1 deletion(-) commit 5a023cdba50c5f5f2bc351783b3131699deb3937 Author: Dan Williams Date: Mon Nov 30 10:20:29 2015 -0800 block: enable dax for raw block devices If an application wants exclusive access to all of the persistent memory provided by an NVDIMM namespace it can use this raw-block-dax facility to forgo establishing a filesystem. This capability is targeted primarily to hypervisors wanting to provision persistent memory for guests. It can be disabled / enabled dynamically via the new BLKDAXSET ioctl. Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Dave Chinner Cc: Andrew Morton Cc: Ross Zwisler Reported-by: kbuild test robot Reviewed-by: Jan Kara Signed-off-by: Dan Williams block/ioctl.c | 61 ++++++++++++++++++++++++++++ fs/block_dev.c | 103 ++++++++++++++++++++++++++++++++++++++++++++---- include/linux/fs.h | 11 ++++++ include/uapi/linux/fs.h | 2 + 4 files changed, 169 insertions(+), 8 deletions(-) commit 4ebb16ca9a06a54cdb2e7f2ce1e506fa4d432445 Author: Dan Williams Date: Wed Oct 28 07:48:19 2015 +0900 block: introduce bdev_file_inode() Similar to the file_inode() helper, provide a helper to lookup the inode for a raw block device itself. Cc: Al Viro Suggested-by: Jan Kara Reviewed-by: Jan Kara Reviewed-by: Jeff Moyer Signed-off-by: Dan Williams fs/block_dev.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 90a545e981267e917b9d698ce07affd69787db87 Author: Dan Williams Date: Mon Nov 23 15:49:03 2015 -0800 restrict /dev/mem to idle io memory ranges This effectively promotes IORESOURCE_BUSY to IORESOURCE_EXCLUSIVE semantics by default. If userspace really believes it is safe to access the memory region it can also perform the extra step of disabling an active driver. This protects device address ranges with read side effects and otherwise directs userspace to use the driver. Persistent memory presents a large "mistake surface" to /dev/mem as now accidental writes can corrupt a filesystem. In general if a device driver is busily using a memory region it already informs other parts of the kernel to not touch it via request_mem_region(). /dev/mem should honor the same safety restriction by default. Debugging a device driver from userspace becomes more difficult with this enabled. Any application using /dev/mem or mmap of sysfs pci resources will now need to perform the extra step of either: 1/ Disabling the driver, for example: echo > /dev/bus//drivers//unbind 2/ Rebooting with "iomem=relaxed" on the command line 3/ Recompiling with CONFIG_IO_STRICT_DEVMEM=n Traditional users of /dev/mem like dosemu are unaffected because the first 1MB of memory is not subject to the IO_STRICT_DEVMEM restriction. Legacy X configurations use /dev/mem to talk to graphics hardware, but that functionality has since moved to kernel graphics drivers. Cc: Arnd Bergmann Cc: Russell King Cc: Andrew Morton Cc: Greg Kroah-Hartman Acked-by: Kees Cook Acked-by: Ingo Molnar Signed-off-by: Dan Williams kernel/resource.c | 11 +++++++++-- lib/Kconfig.debug | 23 ++++++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) commit 21266be9ed542f13436bd9c75316d43e1e84f6ae Author: Dan Williams Date: Thu Nov 19 18:19:29 2015 -0800 arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug Let all the archs that implement devmem_is_allowed() opt-in to a common definition of CONFIG_STRICT_DEVM in lib/Kconfig.debug. Cc: Kees Cook Cc: Russell King Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Martin Schwidefsky Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: "David S. Miller" Acked-by: Catalin Marinas Acked-by: Heiko Carstens [heiko: drop 'default y' for s390] Acked-by: Ingo Molnar Suggested-by: Arnd Bergmann Signed-off-by: Dan Williams arch/arm/Kconfig | 1 + arch/arm/Kconfig.debug | 14 -------------- arch/arm64/Kconfig | 1 + arch/arm64/Kconfig.debug | 14 -------------- arch/frv/Kconfig | 1 + arch/m32r/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/powerpc/Kconfig.debug | 12 ------------ arch/s390/Kconfig | 1 + arch/s390/Kconfig.debug | 12 ------------ arch/tile/Kconfig | 4 +--- arch/unicore32/Kconfig | 1 + arch/unicore32/Kconfig.debug | 14 -------------- arch/x86/Kconfig | 1 + arch/x86/Kconfig.debug | 17 ----------------- lib/Kconfig.debug | 22 ++++++++++++++++++++++ 16 files changed, 31 insertions(+), 86 deletions(-) commit ed21d170e878b6b067a3216040b7b935c8007196 Author: Sven Eckelmann Date: Sun Sep 6 21:38:48 2015 +0200 batman-adv: Add kerneldoc for batadv_neigh_node::refcount Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/types.h | 1 + 1 file changed, 1 insertion(+) commit 8a3719a184cfd122eba9212c8d4a2fab5c9fb628 Author: Sven Eckelmann Date: Sun Sep 6 21:38:47 2015 +0200 batman-adv: Remove kerneldoc for missing struct members Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/types.h | 4 ---- 1 file changed, 4 deletions(-) commit 006a199d5d1d4e1666b0d8b4f51b5a978ddc6aab Author: Sven Eckelmann Date: Sun Sep 6 21:38:46 2015 +0200 batman-adv: Fix kerneldoc member names in for main structs Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/types.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 426fc6c8119820164dd44e99862dda85159eef93 Author: Sven Eckelmann Date: Sun Sep 6 21:38:45 2015 +0200 batman-adv: Fix kernel-doc parsing of main structs kernel-doc is not able to skip an #ifdef between the kernel documentation block and the start of the struct. Moving the #ifdef before the kernel doc block avoids this problem Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/types.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit cc69d3dbbbfa134df2a7e7a72da6484c5d34fb0d Author: Sven Eckelmann Date: Wed Oct 28 10:58:00 2015 +0100 batman-adv: Change ifconfig examples to iproute2 Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli Documentation/networking/batman-adv.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e087f34f28d8597f7c82f079337939367ba96537 Author: Markus Elfring Date: Tue Nov 3 19:20:34 2015 +0100 batman-adv: Split a condition check Let us split a check for a condition at the beginning of the batadv_is_ap_isolated() function so that a direct return can be performed in this function if the variable "vlan" contained a null pointer. Signed-off-by: Markus Elfring Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/translation-table.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f75a33aeed0776f52da05276c2ef98e16d680a6b Author: Markus Elfring Date: Tue Nov 3 19:20:34 2015 +0100 batman-adv: Delete an unnecessary check before the function call "batadv_softif_vlan_free_ref" The batadv_softif_vlan_free_ref() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/translation-table.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8bbb7cb2324d6a5fb7ccdc4ab0099dc18b91b690 Author: Markus Elfring Date: Sun Nov 15 09:00:42 2015 +0100 batman-adv: Less checks in batadv_tvlv_unicast_send() * Let us return directly if a call of the batadv_orig_hash_find() function returned a null pointer. * Omit the initialisation for the variable "skb" at the beginning. * Replace an assignment by a call of the kfree_skb() function and delete the affected variable "ret" then. Signed-off-by: Markus Elfring Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/main.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit c799443ee13ef37221732839f1cca6f11c798b7a Author: Markus Elfring Date: Sun Nov 15 08:04:43 2015 +0100 batman-adv: Delete unnecessary checks before the function call "kfree_skb" The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/main.c | 2 +- net/batman-adv/network-coding.c | 4 +--- net/batman-adv/send.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit d737ccbed3e62dd45d631cf69183de005144d05b Author: Sven Eckelmann Date: Sun Sep 13 09:44:45 2015 +0200 batman-adv: Add function to convert string to batadv throughput The code to convert the throughput information from a string to the batman-adv internal (100Kibit/s) representation is duplicated in batadv_parse_gw_bandwidth. Move this functionality to its own function batadv_parse_throughput to reduce the code complexity. Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/gateway_common.c | 117 +++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 68 deletions(-) commit 9e728e84389ba8317d1444bdf256e34ad467f3da Author: Simon Wunderlich Date: Tue Nov 17 14:11:26 2015 +0100 batman-adv: only call post function if something changed Currently, the post function is also called on errors or if there were no changes, which is redundant for the functions currently using these facilities. Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/sysfs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit e1544f3c87778ab4af9689d571570d6abfd2f6c2 Author: Simon Wunderlich Date: Mon Nov 9 16:20:53 2015 +0100 batman-adv: increase BLA wait periods to 6 If networks take a long time to come up, e.g. due to lossy links, then the bridge loop avoidance wait time to suppress broadcasts may not wait long enough and detect a backbone before the mesh is brought up. Increasing the wait period further to 60 seconds makes this scenario less likely. Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d68081a24081f9a1910a41778a8411d924255471 Author: Simon Wunderlich Date: Mon Nov 9 16:20:52 2015 +0100 batman-adv: purge bridge loop avoidance when its disabled When bridge loop avoidance is disabled through sysfs, the internal datastructures are not disabled, but only BLA operations are disabled. To be sure that they are removed, purge the data immediately. That is especially useful if a firmwares network state is changed, and the BLA wait periods should restart on the new network. Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/bridge_loop_avoidance.c | 20 ++++++++++++++++++++ net/batman-adv/bridge_loop_avoidance.h | 2 ++ net/batman-adv/sysfs.c | 4 +++- 3 files changed, 25 insertions(+), 1 deletion(-) commit 143d157c9ecfa09ed777bf33635eb27fabce3e0a Author: Marek Lindner Date: Sun Aug 9 23:56:50 2015 +0800 batman-adv: remove leftovers of unused BATADV_PRIMARIES_FIRST_HOP flag Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/bat_iv_ogm.c | 3 --- net/batman-adv/packet.h | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) commit 008a374487070a391c12aa39288fd8511f822cab Author: Sven Eckelmann Date: Tue Nov 3 19:20:34 2015 +0100 batman-adv: Fix lockdep annotation of batadv_tlv_container_remove The function handles tlv containers and not tlv handlers. Thus the lockdep_assert_held has to check for the container_list lock. Fixes: 2c72d655b044 ("batman-adv: Annotate deleting functions with external lock via lockdep") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a4d045eb2c174472b68f366108bf76f1802f803 Author: Simon Wunderlich Date: Mon Nov 23 20:30:15 2015 +0100 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich Signed-off-by: Antonio Quartulli net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbddca8e8fac07ece3938e03526b5d00fa791a4c Author: NeilBrown Date: Thu Jan 7 16:08:20 2016 -0500 nfsd: don't hold i_mutex over userspace upcalls We need information about exports when crossing mountpoints during lookup or NFSv4 readdir. If we don't already have that information cached, we may have to ask (and wait for) rpc.mountd. In both cases we currently hold the i_mutex on the parent of the directory we're asking rpc.mountd about. We've seen situations where rpc.mountd performs some operation on that directory that tries to take the i_mutex again, resulting in deadlock. With some care, we may be able to avoid that in rpc.mountd. But it seems better just to avoid holding a mutex while waiting on userspace. It appears that lookup_one_len is pretty much the only operation that needs the i_mutex. So we could just drop the i_mutex elsewhere and do something like mutex_lock() lookup_one_len() mutex_unlock() In many cases though the lookup would have been cached and not required the i_mutex, so it's more efficient to create a lookup_one_len() variant that only takes the i_mutex when necessary. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields Signed-off-by: Al Viro fs/namei.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfsd/nfs3xdr.c | 2 +- fs/nfsd/nfs4xdr.c | 8 +++--- fs/nfsd/vfs.c | 23 +++++++---------- include/linux/namei.h | 1 + 5 files changed, 86 insertions(+), 19 deletions(-) commit db39c16724d019029d7533561754d92bef1b389a Author: DengChao Date: Thu Nov 12 21:40:41 2015 +0800 fs:affs:Replace time_t with time64_t The affs code uses "time_t" and "get_seconds()". This will cause problems on 32-bit architectures in 2038 when time_t overflows. This patch replaces them with "time64_t" and "ktime_get_real_seconds()". This patch introduces expensive 64-bit divsion in "secs_to_datestamp()", considering this function is not called so often, the cost should be acceptable. Reviewed-by: Arnd Bergmann Signed-off-by: DengChao Signed-off-by: Al Viro fs/affs/affs.h | 2 +- fs/affs/amigaffs.c | 13 +++++++------ fs/affs/super.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) commit 8f5fed1e917588f946ad8882bd47a4093db0ff4c Author: Sasha Levin Date: Thu Jan 7 17:49:51 2016 -0500 fs/9p: use fscache mutex rather than spinlock We may sleep inside a the lock, so use a mutex rather than spinlock. Signed-off-by: Sasha Levin Signed-off-by: Al Viro fs/9p/cache.c | 8 ++++---- fs/9p/v9fs.h | 2 +- fs/9p/vfs_inode.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 3cc4a84e026e8d61b7ffe4a7367ed09a555f2c5b Author: Eric Dumazet Date: Thu Dec 3 11:12:07 2015 -0800 proc: add a reschedule point in proc_readfd_common() User can pass an arbitrary large buffer to getdents(). It is typically a 32KB buffer used by libc scandir() implementation. When scanning /proc/{pid}/fd, we can hold cpu way too long, so add a cond_resched() to be kind with other tasks. We've seen latencies of more than 50ms on real workloads. Signed-off-by: Eric Dumazet Cc: Alexander Viro Signed-off-by: Al Viro fs/proc/fd.c | 1 + 1 file changed, 1 insertion(+) commit bc51b2a9193f917f2065313d9971d7d5e867bc81 Author: Julia Lawall Date: Fri Dec 11 17:03:26 2015 +0100 logfs: constify logfs_block_ops structures The logfs_block_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Al Viro fs/logfs/logfs.h | 4 ++-- fs/logfs/readwrite.c | 4 ++-- fs/logfs/segment.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 0dbf5f20652108106cb822ad7662c786baaa03ff Author: Stanislav Kinsburskiy Date: Tue Dec 15 19:41:31 2015 +0400 fcntl: allow to set O_DIRECT flag on pipe With packetized mode for pipes, it's not possible to set O_DIRECT on pipe file via sys_fcntl, because of unsupported sanity checks. Ability to set this flag will be used by CRIU to migrate packetized pipes. v2: Fixed typos and mode variable to check. Signed-off-by: Stanislav Kinsburskiy Signed-off-by: Al Viro fs/fcntl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 90330e689c32e5105265c461c54af6ecec3373fa Author: Abhi Das Date: Fri Dec 18 14:11:36 2015 -0600 fs: __generic_file_splice_read retry lookup on AOP_TRUNCATED_PAGE During testing, I discovered that __generic_file_splice_read() returns 0 (EOF) when aops->readpage fails with AOP_TRUNCATED_PAGE on the first page of a single/multi-page splice read operation. This EOF return code causes the userspace test to (correctly) report a zero-length read error when it was expecting otherwise. The current strategy of returning a partial non-zero read when ->readpage returns AOP_TRUNCATED_PAGE works only when the failed page is not the first of the lot being processed. This patch attempts to retry lookup and call ->readpage again on pages that had previously failed with AOP_TRUNCATED_PAGE. With this patch, my tests pass and I haven't noticed any unwanted side effects. This version removes the thrice-retry loop and instead indefinitely retries lookups on AOP_TRUNCATED_PAGE errors from ->readpage. This behavior is now similar to do_generic_file_read(). Signed-off-by: Abhi Das Reviewed-by: Jan Kara Cc: Bob Peterson Cc: Al Viro Signed-off-by: Al Viro fs/splice.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 0b2a6f231dcbc7bd543a5aaa23b0ea76ce16e585 Author: Richard Weinberger Date: Sat Jan 2 23:09:47 2016 +0100 fs: xattr: Use kvfree() ... instead of open coding it. Signed-off-by: Richard Weinberger Signed-off-by: Al Viro fs/xattr.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) commit bdb97e91e0140230bda9a83f6dbaa29b0c2e0522 Author: Al Viro Date: Sat Jan 9 02:16:04 2016 -0500 [s390] page_to_phys() always returns a multiple of PAGE_SIZE Acked-by: Martin Schwidefsky Signed-off-by: Al Viro arch/s390/pci/pci_dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 041497eb721ddbdc1e690316976dd8ba7bc136a2 Author: Paul Gortmaker Date: Thu Dec 17 10:05:46 2015 -0500 drivers/tty/serial: delete unused MODULE_DEVICE_TABLE from atmel_serial.c In commit c39dfebc7798956fd2140ae6321786ff35da30c3 ("drivers/tty/serial: make serial/atmel_serial.c explicitly non-modular") we removed the code relating to modular support since it currently only supports built in. However, when redoing my build coverage for mips allmodconfig, which sets CONFIG_OF, I noticed a remaining line that needs to be removed, else we will get a build failure for an undefined module macro. Unfortunately this didn't appear for any of the other arch I tested more frequently, such as ARM. Since MODULE_DEVICE_TABLE is a no-op for non-modular code, we can just remove the offending line. Fixes: c39dfebc7798 ("drivers/tty/serial: make serial/atmel_serial.c explicitly non-modular") Cc: Nicolas Ferre Cc: Jiri Slaby Reported-by: Sudip Mukherjee Signed-off-by: Paul Gortmaker Acked-by: Nicolas Ferre Acked-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 2 -- 1 file changed, 2 deletions(-) commit 841e3ed977e0284e3680d6345d880a64e8072573 Author: Greg Kroah-Hartman Date: Fri Jan 8 21:00:08 2016 -0800 Revert "arm64: dts: Add dts files to enable ION on Hi6220 SoC." This reverts commit 59dfafd03fc67d38307d2ba30bbfdd1224b8a75d Mark Brown reports that the dts file should not be accepted at this time as it is not following the convention that has been agreed on for the ion drivers. Reported-by: Mark Brown Cc: Mark Rutland Cc: Chen Feng Cc: Yu Dongbin Signed-off-by: Greg Kroah-Hartman arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 - arch/arm64/boot/dts/hisilicon/hi6220-ion.dtsi | 20 -------------------- 2 files changed, 21 deletions(-) commit d86cdfcd5d7e1179e695977b7088882822f365c4 Merge: 01dd194 cda9fb0 Author: David S. Miller Date: Fri Jan 8 21:57:26 2016 -0500 Merge branch 'r8152-adjustments' Hayes Wang says: ==================== r8152: code adjustment Adjust test_bit(), clear_bit(), disable_aldps(), and enable_aldps(). ==================== Signed-off-by: David S. Miller commit cda9fb01dc3cafd718b2865b447e869bf6624ddd Author: hayeswang Date: Thu Jan 7 17:51:12 2016 +0800 r8152: adjust ALDPS function Replace disable_aldps() and enable_aldps() with aldps_en(). Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 72 +++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 38 deletions(-) commit 216a8349d3a0dd1bc2afbcc821e374c8f929bd62 Author: hayeswang Date: Thu Jan 7 17:51:11 2016 +0800 r8152: use test_and_clear_bit Replace test_bit() followed by clear_bit() with test_and_clear_bit(). Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 5ee3c60c8d3b88cab6496c9b7d49a01576dd9cf9 Author: hayeswang Date: Thu Jan 7 17:12:17 2016 +0800 r8152: fix the wake event When the autosuspend is enabled and occurs before system suspend, we should wake the device before running system syspend. Then, we could change the wake event for system suspend. Otherwise, the device would resume the system when receiving any packet. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit b4c19f71252e3b6b8c6478fd712c592f00b11438 Author: Roosen Henri Date: Thu Jan 7 09:31:15 2016 +0100 phy: micrel: Fix finding PHY properties in MAC node for KSZ9031. Commit 651df2183543 ("phy: micrel: Fix finding PHY properties in MAC node.") only fixes finding PHY properties in MAC node for KSZ9021. This commit applies the same fix for KSZ9031. Fixes: 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not the bus' parent.") Acked-by: Andrew Lunn Signed-off-by: Henri Roosen Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b1c1f23ef0c64fb7e54c5b44015640e068643023 Merge: 6757e6f 13bbdd3 Author: David S. Miller Date: Fri Jan 8 21:46:04 2016 -0500 Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== Included change: - Fix invalid read while copying bat_iv.bcast_own by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 01dd194c387af5b3c4c1f6459d30f596565e466c Author: Daniel Borkmann Date: Wed Jan 6 22:32:16 2016 +0100 bpf: cleanup bpf_prog_run_{save,clear}_cb helpers Move the details behind the cb[] access into a small helper to decouple and make them generic for bpf_prog_run_save_cb()/bpf_prog_run_clear_cb() that was introduced via commit ff936a04e5f2 ("bpf: fix cb access in socket filter programs"). Also add a comment to better clarify what is done in bpf_skb_cb(). Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/filter.h | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit b351a0633e771676f94262a209ae28699eb26038 Merge: 9b59377 ad64b8b Author: David S. Miller Date: Fri Jan 8 21:30:50 2016 -0500 Merge branch 'net-sparse-warnings' Lance Richardson says: ==================== ipv4: fix various issues reported by sparse This trivial patch series addresses a number of endianness- and lock-related issues reported by sparse. ==================== Signed-off-by: David S. Miller commit ad64b8be71e3a37ea43745aa69817c4bcd489987 Author: Lance Richardson Date: Wed Jan 6 17:22:47 2016 -0500 ipv4: eliminate lock count warnings in ping.c Add lock release/acquire annotations to ping_seq_start() and ping_seq_stop() to satisfy sparse. Signed-off-by: Lance Richardson Signed-off-by: David S. Miller net/ipv4/ping.c | 2 ++ 1 file changed, 2 insertions(+) commit 0797cbd8e2741c69a4d416d8f669639a064db8d1 Author: Lance Richardson Date: Wed Jan 6 17:22:46 2016 -0500 ipv4: eliminate endianness warnings in ip_fib.h fib_multipath_hash() computes a hash using __be32 values, force cast these to u32 to pacify sparse. Signed-off-by: Lance Richardson Signed-off-by: David S. Miller include/net/ip_fib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 30d3d83a7dcef7a26c5c48e548bdd6a76754cbcd Author: Lance Richardson Date: Wed Jan 6 17:22:45 2016 -0500 ipv4: fix endianness warnings in ip_tunnel_core.c Eliminate endianness mismatch warnings (reported by sparse) in this file by using appropriate nla_put_*()/nla_get_*() calls. Signed-off-by: Lance Richardson Signed-off-by: David S. Miller net/ipv4/ip_tunnel_core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 263a3df18fa2c078ab3e8b14fece6cfa6053e86a Author: Al Viro Date: Thu Jan 7 10:04:37 2016 -0500 nbd: use ->compat_ioctl() Signed-off-by: Al Viro drivers/block/nbd.c | 1 + fs/compat_ioctl.c | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) commit 6108209c4ae964836f6bac5210f1c64153800b62 Merge: a1c6f057 a7f61e89 Author: Al Viro Date: Fri Jan 8 21:20:11 2016 -0500 Merge branch 'for-linus' into work.misc commit a7f61e89af73e9bf760826b20dba4e637221fcb9 Author: Jann Horn Date: Tue Jan 5 18:27:30 2016 +0100 compat_ioctl: don't call do_ioctl under set_fs(KERNEL_DS) This replaces all code in fs/compat_ioctl.c that translated ioctl arguments into a in-kernel structure, then performed do_ioctl under set_fs(KERNEL_DS), with code that allocates data on the user stack and can call the VFS ioctl handler under USER_DS. This is done as a hardening measure because the caller does not know what kind of ioctl handler will be invoked, only that no corresponding compat_ioctl handler exists and what the ioctl command number is. The accidental invocation of an unlocked_ioctl handler that unexpectedly calls copy_to_user could be a severe security issue. Signed-off-by: Jann Horn Signed-off-by: Al Viro fs/compat_ioctl.c | 130 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 68 insertions(+), 62 deletions(-) commit 66cf191f3eae4582a83cb4251b75b43bee95a999 Author: Al Viro Date: Thu Jan 7 09:53:30 2016 -0500 compat_ioctl: don't pass fd around when not needed Signed-off-by: Al Viro fs/compat_ioctl.c | 103 +++++++++++++++++++++++++++-------------------------- fs/internal.h | 7 ++++ fs/ioctl.c | 4 +-- include/linux/fs.h | 2 -- 4 files changed, 61 insertions(+), 55 deletions(-) commit b43417216e9ce55e1f1ab7c834c7ab43db0b53e1 Author: Jann Horn Date: Tue Jan 5 18:27:29 2016 +0100 compat_ioctl: don't look up the fd twice In code in fs/compat_ioctl.c that translates ioctl arguments into a in-kernel structure, then performs sys_ioctl, possibly under set_fs(KERNEL_DS), this commit changes the sys_ioctl calls to do_ioctl calls. do_ioctl is a new function that does the same thing as sys_ioctl, but doesn't look up the fd again. This change is made to avoid (potential) security issues because of ioctl handlers that accept one of the ioctl commands I2C_FUNCS, VIDEO_GET_EVENT, MTIOCPOS, MTIOCGET, TIOCGSERIAL, TIOCSSERIAL, RTC_IRQP_READ, RTC_EPOCH_READ. This can happen for multiple reasons: - The ioctl command number could be reused. - The ioctl handler might not check the full ioctl command. This is e.g. true for drm_ioctl. - The ioctl handler is very special, e.g. cuse_file_ioctl The real issue is that set_fs(KERNEL_DS) is used here, but that's fixed in a separate commit "compat_ioctl: don't call do_ioctl under set_fs(KERNEL_DS)". This change mitigates potential security issues by preventing a race that permits invocation of unlocked_ioctl handlers under KERNEL_DS through compat code even if a corresponding compat_ioctl handler exists. So far, no way has been identified to use this to damage kernel memory without having CAP_SYS_ADMIN in the init ns (with the capability, doing reads/writes at arbitrary kernel addresses should be easy through CUSE's ioctl handler with FUSE_IOCTL_UNRESTRICTED set). [AV: two missed sys_ioctl() taken care of] Signed-off-by: Jann Horn Signed-off-by: Al Viro fs/compat_ioctl.c | 122 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 54 deletions(-) commit 9b59377b756670d9516e72276b6c4efa92137b5f Merge: 7d39721 48f66c9 Author: David S. Miller Date: Fri Jan 8 20:53:16 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next, they are: 1) Release nf_tables objects on netns destructions via nft_release_afinfo(). 2) Destroy basechain and rules on netdevice removal in the new netdev family. 3) Get rid of defensive check against removal of inactive objects in nf_tables. 4) Pass down netns pointer to our existing nfnetlink callbacks, as well as commit() and abort() nfnetlink callbacks. 5) Allow to invert limit expression in nf_tables, so we can throttle overlimit traffic. 6) Add packet duplication for the netdev family. 7) Add forward expression for the netdev family. 8) Define pr_fmt() in conntrack helpers. 9) Don't leave nfqueue configuration on inconsistent state in case of errors, from Ken-ichirou MATSUZAWA, follow up patches are also from him. 10) Skip queue option handling after unbind. 11) Return error on unknown both in nfqueue and nflog command. 12) Autoload ctnetlink when NFQA_CFG_F_CONNTRACK is set. 13) Add new NFTA_SET_USERDATA attribute to store user data in sets, from Carlos Falgueras. 14) Add support for 64 bit byteordering changes nf_tables, from Florian Westphal. 15) Add conntrack byte/packet counter matching support to nf_tables, also from Florian. ==================== Signed-off-by: David S. Miller commit 385277bfb57faac44e92497104ba542cdd82d5fe Author: Mikulas Patocka Date: Fri Jan 8 19:07:55 2016 -0500 dm snapshot: fix hung bios when copy error occurs When there is an error copying a chunk dm-snapshot can incorrectly hold associated bios indefinitely, resulting in hung IO. The function copy_callback sets pe->error if there was error copying the chunk, and then calls complete_exception. complete_exception calls pending_complete on error, otherwise it calls commit_exception with commit_callback (and commit_callback calls complete_exception). The persistent exception store (dm-snap-persistent.c) assumes that calls to prepare_exception and commit_exception are paired. persistent_prepare_exception increases ps->pending_count and persistent_commit_exception decreases it. If there is a copy error, persistent_prepare_exception is called but persistent_commit_exception is not. This results in the variable ps->pending_count never returning to zero and that causes some pending exceptions (and their associated bios) to be held forever. Fix this by unconditionally calling commit_exception regardless of whether the copy was successful. A new "valid" parameter is added to commit_exception -- when the copy fails this parameter is set to zero so that the chunk that failed to copy (and all following chunks) is not recorded in the snapshot store. Also, remove commit_callback now that it is merely a wrapper around pending_complete. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org drivers/md/dm-exception-store.h | 2 +- drivers/md/dm-snap-persistent.c | 5 ++++- drivers/md/dm-snap-transient.c | 4 ++-- drivers/md/dm-snap.c | 20 +++++--------------- 4 files changed, 12 insertions(+), 19 deletions(-) commit 6b9b21073d3b250e17812cd562fffc9006962b39 Author: Jeff Layton Date: Tue Dec 8 07:23:48 2015 -0500 nfsd: give up on CB_LAYOUTRECALLs after two lease periods Have the CB_LAYOUTRECALL code treat NFS4_OK and NFS4ERR_DELAY returns equivalently. Change the code to periodically resend CB_LAYOUTRECALLS until the ls_layouts list is empty or the client returns a different error code. If we go for two lease periods without the list being emptied or the client sending a hard error, then we give up and clean out the list anyway. Signed-off-by: Jeff Layton Tested-by: Christoph Hellwig Signed-off-by: J. Bruce Fields fs/nfsd/nfs4layouts.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit c33e54fafacaf83b3e345aae0e241c1f152224a0 Author: Michael Ellerman Date: Sat Jan 9 08:25:01 2016 +1100 powerpc: Fix build break due to paca mm_context_t changes Commit 2fc251a8dda5 ("powerpc: Copy only required pieces of the mm_context_t to the paca") broke the build for CONFIG_PPC_STD_MMU_64=y and CONFIG_PPC_MM_SLICES=n. That only happens for a kernel built with 4K pages and HUGETLB disabled, which is why we missed it. Fix it by adding a mm_ctx_user_psize member to the paca and populating it in the appropriate places. Fixes: 2fc251a8dda5 ("powerpc: Copy only required pieces of the mm_context_t to the paca") Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman arch/powerpc/include/asm/paca.h | 2 ++ arch/powerpc/mm/hash_utils_64.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit b197367ed1ba81b0d26f7e7f76f61731ac6e5842 Author: Andreas Gruenbacher Date: Tue Jan 5 23:12:33 2016 +0100 selinux: Inode label revalidation performance fix Commit 5d226df4 has introduced a performance regression of about 10% in the UnixBench pipe benchmark. It turns out that the call to inode_security in selinux_file_permission can be moved below the zero-mask test and that inode_security_revalidate can be removed entirely, which brings us back to roughly the original performance. Signed-off-by: Andreas Gruenbacher Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 68ce7bfcd995a8a393b1b14fa67dbc16fa3dc784 Author: Theodore Ts'o Date: Fri Jan 8 16:01:25 2016 -0500 fs: clean up the flags definition in uapi/linux/fs.h Add an explanation for the flags used by FS_IOC_[GS]ETFLAGS and remind people that changes should be revised by linux-fsdevel and linux-api. Add flags that are used on-disk for ext4, and remove FS_DIRECTIO_FL since it was used only by gfs2 and support was removed in 2008 in commit c9f6a6bbc28 ("The ability to mark files for direct i/o access when opened normally is both unused and pointless, so this patch removes support for that feature.") Now we have _two_ remaining flags left. But since we want to discourage people from assigning new flags, that's OK. Signed-off-by: Theodore Ts'o include/uapi/linux/fs.h | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 9b7365fc1c82038faa52d56173b20221cf422cbe Author: Li Xi Date: Fri Jan 8 16:01:22 2016 -0500 ext4: add FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support This patch adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR ioctl interface support for ext4. The interface is kept consistent with XFS_IOC_FSGETXATTR/XFS_IOC_FSGETXATTR. Signed-off-by: Li Xi Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Reviewed-by: Jan Kara fs/ext4/ext4.h | 47 +++++++ fs/ext4/ioctl.c | 376 +++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 336 insertions(+), 87 deletions(-) commit 689c958cbe6be4f211b40747951a3ba2c73b6715 Author: Li Xi Date: Fri Jan 8 16:01:22 2016 -0500 ext4: add project quota support This patch adds mount options for enabling/disabling project quota accounting and enforcement. A new specific inode is also used for project quota accounting. [ Includes fix from Dan Carpenter to crrect error checking from dqget(). ] Signed-off-by: Li Xi Signed-off-by: Dmitry Monakhov Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Reviewed-by: Jan Kara fs/ext4/ext4.h | 2 +- fs/ext4/super.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 61 insertions(+), 6 deletions(-) commit 040cb3786d9b25293b8b0b05b90da0f871e1eb9b Author: Li Xi Date: Fri Jan 8 16:01:21 2016 -0500 ext4: adds project ID support Signed-off-by: Li Xi Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Reviewed-by: Jan Kara fs/ext4/ext4.h | 17 +++++++++++++---- fs/ext4/ialloc.c | 7 +++++++ fs/ext4/inode.c | 28 ++++++++++++++++++++++++++++ fs/ext4/namei.c | 19 +++++++++++++++++++ fs/ext4/super.c | 1 + 5 files changed, 68 insertions(+), 4 deletions(-) commit 56a04915df4e85b34b1c1613c64b87dd2283c26a Author: Theodore Ts'o Date: Fri Jan 8 16:00:31 2016 -0500 ext4 crypto: simplify interfaces to directory entry insert functions A number of functions include ext4_add_dx_entry, make_indexed_dir, etc. are being passed a dentry even though the only thing they use is the containing parent. We can shrink the code size slightly by making this replacement. This will also be useful in cases where we don't have a dentry as the argument to the directory entry insert functions. Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 3 +-- fs/ext4/inline.c | 10 ++++------ fs/ext4/namei.c | 15 ++++++--------- 3 files changed, 11 insertions(+), 17 deletions(-) commit 049f419399e937e333bf121b7b234888d804a25e Author: Phil Edworthy Date: Tue Jan 5 13:00:28 2016 +0000 PCI: rcar: Remove unused pci_sys_data struct from pcie-rcar The pci_sys_data struct was previously used by pci_common_init_dev() and by the ARM pcibios_align_resource(), but recent commits removed those uses: cbce7900598c ("PCI: designware: Make driver arch-agnostic") b3a72384fe29 ("ARM/PCI: Replace pci_sys_data->align_resource with global function pointer") cbce7900598c removed the use of pci_common_init_dev() by DesignWare drivers, including pcie-rcar.c, and b3a72384fe29 removed the use of struct pci_sys_data by the ARM pcibios_align_resource(). Remove struct pci_sys_data from pcie-rcar.c. [bhelgaas: changelog] Signed-off-by: Phil Edworthy Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rcar.c | 9 --------- 1 file changed, 9 deletions(-) commit 13c240ef95e6569956ba9c731a650cecb3603f0e Author: Alexandre Demers Date: Thu Jan 7 19:22:44 2016 -0500 drm/radeon: fix trivial typo in warning message Reviewed-by: Christian König Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ef897e4645392c6c5230f2ae92c6bc658e44345 Author: Tim Gardner Date: Thu Jan 7 10:31:32 2016 -0700 radeon: r100: Silence 'may be used uninitialized' warnings CC [M] drivers/gpu/drm/radeon/r100.o In file included from drivers/gpu/drm/radeon/radeon_mode.h:37:0, from drivers/gpu/drm/radeon/radeon.h:80, from drivers/gpu/drm/radeon/r100.c:33: drivers/gpu/drm/radeon/r100.c: In function 'r100_bandwidth_update': include/drm/drm_fixed.h:64:13: warning: 'crit_point_ff.full' may be used uninitialized in this function [-Wmaybe-uninitialized] u64 tmp = ((u64)A.full << 13); ^ drivers/gpu/drm/radeon/r100.c:3153:63: note: 'crit_point_ff.full' was declared here fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff, crit_point_ff; ^ drivers/gpu/drm/radeon/r100.c:3583:42: warning: 'disp_drain_rate.full' may be used uninitialized in this function [-Wmaybe-uninitialized] temp_ff.full = read_return_rate.full - disp_drain_rate.full; gcc version 5.3.1 20151219 (Ubuntu 5.3.1-4ubuntu1) Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Signed-off-by: Tim Gardner Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/r100.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 191caba6cc4c95ba282304a10a2a9cba85450317 Author: Christian König Date: Tue Dec 15 11:10:30 2015 +0100 drm/amdgpu: add warning to amdgpu_bo_gpu_offset() v2 Check if there really is a valid offset for the BO. v2: user WARN_ON_ONCE Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher (v1) Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + 1 file changed, 1 insertion(+) commit 4d42fa492eb80aed28d2237efaee004453579556 Author: Rex Zhu Date: Tue Dec 29 11:23:16 2015 +0800 drm/amd/powerplay: implement power down asic task for CZ Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 55 ++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit e1d32e607b5ce25a7852bef4ab4de2a80f30c546 Author: Rex Zhu Date: Tue Dec 29 11:22:34 2015 +0800 drm/amd/powerplay: enable power down asic task. (v2) v2: AGD: rebase on upstream Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 17 ++++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 ++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 6 ++++-- 4 files changed, 23 insertions(+), 5 deletions(-) commit 018462d015c5672de0be8045b1acff19f5df6010 Author: Rex Zhu Date: Tue Dec 29 11:19:14 2015 +0800 drm/amd/powerplay: enable set boot state task Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 6 ++++-- drivers/gpu/drm/amd/powerplay/eventmgr/psm.c | 3 +-- drivers/gpu/drm/amd/powerplay/eventmgr/psm.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit f556c2744a8e7508493cf409849d5a248ed3fb9d Author: Rex Zhu Date: Tue Dec 29 11:23:57 2015 +0800 drm/amd/powerplay: add thermal control task when resume. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventactionchains.c | 1 + 1 file changed, 1 insertion(+) commit ab4f4b14c36f7ae6fa204ca304477e42f6696453 Author: Rex Zhu Date: Wed Jan 6 17:17:53 2016 +0800 drm/amdgpu: fix hex/decimal bug when show gpu load. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 10 +++++----- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 0cfd9f26975be88e8d902f9bc7070f98dfdfeea2 Author: Rex Zhu Date: Wed Jan 6 17:15:59 2016 +0800 drm/amdgpu: Show gpu load when display gpu performance for Fiji of VI. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 9354573d76f599e05a34e0b468ffce681769115f Author: Rex Zhu Date: Wed Jan 6 17:08:46 2016 +0800 drm/amdgpu: Show gpu load when display gpu performance for Ci. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e0b71a7eff644ca256aee6478bf220ba0a835bed Author: Rex Zhu Date: Tue Dec 29 10:25:19 2015 +0800 drm/amd/powerplay: Reload and initialize the smc firmware on powerplay resume. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a969e163a4ac1b0cfa2dc7ab890aaa9ab092951c Author: Rex Zhu Date: Tue Dec 29 13:56:03 2015 +0800 drm/amd/powerplay: add powerplay valid check to avoid null point. (v2) In case CONFIG_DRM_AMD_POWERPLAY is defined and amdgpu.powerplay=0. some functions in powrplay can also be called by DAL. and the input parameter is *adev. if just check point not NULL was not enough and will lead to NULL point error. V2: AGD: rebase on upstream Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 15 ++++++++++++--- drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) commit c15c8d70207d467bb4312d6ac5536c101246fdc6 Author: Rex Zhu Date: Wed Jan 6 16:48:38 2016 +0800 drm/amd/powerplay: fix Smatch static checker warnings 1. return -1 instead of -ENOMEM 2. The struct type mismatch warnings. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 2 +- .../gpu/drm/amd/powerplay/hwmgr/functiontables.c | 13 +++++----- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 +++ .../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 11 +++++++- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 30 +++++++++++++--------- .../amd/powerplay/hwmgr/tonga_processpptables.c | 20 +++++++-------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 +- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +- 8 files changed, 51 insertions(+), 32 deletions(-) commit 75ac63dbc3b0f4d3af67a5857790749e954e2ba6 Author: Rex Zhu Date: Wed Jan 6 16:38:48 2016 +0800 drm/amd/powerplay: fix Smatch static checker warnings with indenting (v2) v2: AGD: rebase on upstream Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 51 +- .../gpu/drm/amd/powerplay/hwmgr/fiji_powertune.c | 12 +- .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 555 ++++++++++----------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 8 +- 6 files changed, 312 insertions(+), 317 deletions(-) commit 53d3de140b668d37e1ebfe01c94ec36d369edcbf Author: Rex Zhu Date: Wed Jan 6 16:22:07 2016 +0800 drm/amd/powerplay: fix bug that NULL checks are reversed. && was used instead of ||. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5930fe4edee072d403cfbafa0aacca78587edd73 Author: Gabriele Paoloni Date: Fri Nov 27 01:17:05 2015 +0800 PCI: hisi: Add support for HiSilicon Hip06 PCIe host controllers Add support for the HiSilicon Hip06 SoC. Documentation has been updated to include Hip06. Add Gabriele Paoloni as maintainer of the driver. Signed-off-by: Gabriele Paoloni Signed-off-by: Bjorn Helgaas Reviewed-by: Zhou Wang .../devicetree/bindings/pci/hisilicon-pcie.txt | 8 +-- MAINTAINERS | 1 + drivers/pci/host/Kconfig | 5 +- drivers/pci/host/pcie-hisi.c | 76 ++++++++++++++++++---- 4 files changed, 73 insertions(+), 17 deletions(-) commit 9b72a388f5867f4a31113a41d24bbf1026611d7b Author: Chao Yu Date: Fri Jan 8 20:24:00 2016 +0800 f2fs: skip releasing nodes in chindless extent tree If there are no nodes in extent tree, let's skip releasing step to avoid any overhead of grabbing/releasing extent tree lock. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 68e353851002dc07555b067a0baff1cc2f709c04 Author: Chao Yu Date: Fri Jan 8 20:22:52 2016 +0800 f2fs: use atomic type for node count in extent tree 1. rename field in struct extent_tree from count to node_cnt for readability. 2. alter to use atomic type for node_cnt. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 17 +++++++++-------- fs/f2fs/f2fs.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) commit da5af127a1a17bac121c6889c88cc90f8a278a84 Author: Chao Yu Date: Fri Jan 8 20:19:27 2016 +0800 f2fs: recognize encrypted data in f2fs_fiemap This patch fixes to teach f2fs_fiemap to recognize encrypted data. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2c4db1a6f6b42e2a9fb611cbbeb71a3a9a358ee0 Author: Jaegeuk Kim Date: Thu Jan 7 14:15:04 2016 -0800 f2fs: clean up f2fs_balance_fs This patch adds one parameter to clean up all the callers of f2fs_balance_fs. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 17 ++++++----------- fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 17 ++++++++--------- fs/f2fs/inline.c | 3 +-- fs/f2fs/inode.c | 2 +- fs/f2fs/namei.c | 22 +++++++++++----------- fs/f2fs/segment.c | 6 ++++-- fs/f2fs/xattr.c | 2 +- 8 files changed, 33 insertions(+), 38 deletions(-) commit 2a4b8e9fab9cea45d90179d9ee8e718c5ed26457 Author: Jaegeuk Kim Date: Thu Jan 7 13:52:34 2016 -0800 f2fs: remove redundant calls This patch removes redundant calls. Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 --- 1 file changed, 3 deletions(-) commit 12719ae14e57980ebf0a7baa63bc80494c76b192 Author: Jaegeuk Kim Date: Thu Jan 7 13:23:12 2016 -0800 f2fs: avoid unnecessary f2fs_balance_fs calls Only when node page is newly dirtied, it needs to check whether we need to do f2fs_gc. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 ++-- fs/f2fs/f2fs.h | 4 ++-- fs/f2fs/inode.c | 19 ++++++++++--------- fs/f2fs/node.c | 26 ++++++++++++++------------ fs/f2fs/node.h | 4 ++-- fs/f2fs/super.c | 2 -- 6 files changed, 30 insertions(+), 29 deletions(-) commit 7612118ae8cdd36cbd74d873855d70252d2d49e3 Author: Jaegeuk Kim Date: Fri Jan 1 22:03:47 2016 -0800 f2fs: check the page status filled from disk After reading a page, we need to check whether there is any error. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0e022ea8fc49ed9c72ab9dcd9ca96414dc026184 Author: Chao Yu Date: Tue Jan 5 16:52:46 2016 +0800 f2fs: introduce __get_node_page to reuse common code There are duplicated code in between get_node_page and get_node_page_ra, introduce __get_node_page to includes common parts of these two, and export get_node_page and get_node_page_ra by reusing __get_node_page. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 88 +++++++++++++++++++++++----------------------------------- 1 file changed, 35 insertions(+), 53 deletions(-) commit e84587250ab7e38b7d85e93a8c317e065e5c0a1f Author: Chao Yu Date: Fri Jan 8 20:13:37 2016 +0800 f2fs: check node id earily when readaheading node page Add node id check in ra_node_page and get_node_page_ra like get_node_page. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 9e35fdcb9cd54e381135310aae3d9bbb23cecda3 Author: Zhu Yanjun Date: Tue Jan 5 18:39:04 2016 +0800 mtip32xx: restrict variables visible in current code module The modified variables are only used in the file mtip32xx.c. As such, the static keyword is inserted to define that object to be only visible to the current code module during compilation. Signed-off-by: Zhu Yanjun Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d39721466175a075abc9662ca790fe81bf78864 Merge: 250fbf1 e19dcde Author: David S. Miller Date: Fri Jan 8 13:31:06 2016 -0500 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2016-01-08 This series contains updates to ixgbe only. Vasu provides three fixes for ixgbe, first assigns a minimum credit to a traffic class to resolve a Tx hang for CEE mode configuration. Second fix changes the driver to use netdev->fcoe_ddp_xid instead of our local IXGBE_FCOE_DDP_MAX, since it is correctly set for our different devices and avoids a DDP skip error on X550. Lastly fix the PFC configuration to include X550 devices. Emil provides a fix for reporting the speed in ethtool by using the stored value in out adapter structure. This is due to external drivers may end up with unknown speed when calling ethtool_get_settings(). Mark fixes the handling of any outer UDP checksum, by passing the skb up with CHECKSUM_NONE when an outer UDP checksum is set. This will cause the stack to check the checksum, also do not increment an error counter because we do not really know if there is an actual error. Ixgbe ATR was not handling IPv6 extended headers, so ATR is not being performed on such packets. Fix this by skipping extended headers when they are present. Usha fixes an issue with X550 and getting FDMI HBA attributes when FCoE support is enabled. Neerav fixes an issue for X550 when FCoE and SR-IOV are enabled, which the hardware generates MDD events. Resolve this by setting the expected values in the transmit context descriptors for FCoE/FIP frames and adding a flush after writing the RDLEN register. ==================== Signed-off-by: David S. Miller commit 1f1a89ac05f6e88aa341e86e57435fdbb1177c0c Author: Chris Wilson Date: Fri Jan 8 09:55:33 2016 +0000 x86/mm: Micro-optimise clflush_cache_range() Whilst inspecting the asm for clflush_cache_range() and some perf profiles that required extensive flushing of single cachelines (from part of the intel-gpu-tools GPU benchmarks), we noticed that gcc was reloading boot_cpu_data.x86_clflush_size on every iteration of the loop. We can manually hoist that read which perf regarded as taking ~25% of the function time for a single cacheline flush. Signed-off-by: Chris Wilson Reviewed-by: Ross Zwisler Acked-by: "H. Peter Anvin" Cc: Toshi Kani Cc: Borislav Petkov Cc: Luis R. Rodriguez Cc: Stephen Rothwell Cc: Sai Praneeth Link: http://lkml.kernel.org/r/1452246933-10890-1-git-send-email-chris@chris-wilson.co.uk Signed-off-by: Thomas Gleixner arch/x86/mm/pageattr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6757e6f5f44de32bc8cd0bb2dc800580380792db Author: Dan Carpenter Date: Fri Jan 8 14:04:04 2016 +0300 irda: toim3232-sir: delete some dead code I noticed this code because it has a typo in the module_param(), the "trs" at the end of "toim3232fliptrs" should be "rts". But it's dead code so instead of fixing it, I just deleted it. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/irda/toim3232-sir.c | 10 ---------- 1 file changed, 10 deletions(-) commit 85f37d17b3f19cf9cde3fd7b90c7a30c97c04023 Author: Dan Carpenter Date: Fri Jan 8 13:58:50 2016 +0300 isdn: act200: fix MODULE_PARM_DESC() typo There is no "membase", it was "act_port" that was intended. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/isdn/act2000/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 250fbf129e913781a7c9f8bb38d5aa30b4f0f947 Merge: a33ad9a 8cf60cf Author: David S. Miller Date: Fri Jan 8 13:17:31 2016 -0500 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2016-01-08 Here's one more bluetooth-next pull request for the 4.5 kernel: - Support for CRC check and promiscuous mode for CC2520 - Fixes to btmrvl driver - New ACPI IDs for hci_bcm driver - Limited Discovery support for the Bluetooth mgmt interface - Minor other cleanups here and there Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 47b975d234eac39f3a72e5496d5f6158d8b806d1 Author: Edward O'Callaghan Date: Fri Jan 8 12:16:04 2016 -0600 PCI: Avoid iterating through memory outside the resource window If the 'image' pointer has been advanced more than 'size', we've already iterated through memory outside the resource window. We have zero control over whatever we find in the option ROM, if it's even an option ROM and not just an accident of random data just happening to look like an option ROM. Signed-off-by: Edward O'Callaghan Signed-off-by: Bjorn Helgaas drivers/pci/rom.c | 3 +++ 1 file changed, 3 insertions(+) commit 1b47fd4551061ad6db5adf063d424aded798a7c9 Author: Colin Ian King Date: Sat Jan 2 00:27:01 2016 +0000 PCI: acpiphp_ibm: Fix null dereferences on null ibm_slot ibm_slot_from_id() can return null if the des header signature is not "aPCI" or if the kmalloc() for the return ACPI descriptor fails, causing potential null pointer dereferences on the return null descriptor. Handle the null case with appropriate check and error return. Signed-off-by: Colin Ian King Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/acpiphp_ibm.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit bd7900825a3db4c4916fafb400c1f669120039d2 Author: Julia Lawall Date: Wed Dec 23 21:35:35 2015 +0100 PCI: shpchp: Constify hpc_ops structure The hpc_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/shpchp.h | 4 ++-- drivers/pci/hotplug/shpchp_hpc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit a290dd57926cb0c54eec7ea506885119e296b755 Author: Sudip Mukherjee Date: Tue Jan 5 18:10:50 2016 +0530 imm: Use new parport device model Modify imm driver to use the new parallel port device model. Signed-off-by: Sudip Mukherjee Reviewed-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/imm.c | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 7 deletions(-) commit 554a60379aaa502def3c77ae1af69247588c020a Author: Geliang Tang Date: Wed Dec 23 20:28:13 2015 +0800 PCI: Use kobj_to_dev() instead of open-coding it Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Bjorn Helgaas drivers/pci/pci-label.c | 4 ++-- drivers/pci/pci-sysfs.c | 40 +++++++++++++++------------------------- 2 files changed, 17 insertions(+), 27 deletions(-) commit f3d2f1655b543e2e8aaeaac0e1f6250c09fe1692 Author: Geliang Tang Date: Fri Jan 8 12:05:39 2016 -0600 PCI: Use to_pci_dev() instead of open-coding it Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/shpchp_sysfs.c | 2 +- drivers/pci/pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ac3e5fcae8ca658e7dcc3fdcd50af7e4779f58c1 Author: Andrey Smetanin Date: Wed Dec 23 16:54:00 2015 +0300 kvm/x86: Hyper-V SynIC timers tracepoints Trace the following Hyper SynIC timers events: * periodic timer start * one-shot timer start * timer callback * timer expiration and message delivery result * timer config setup * timer count setup * timer cleanup Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 27 +++++++- arch/x86/kvm/trace.h | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+), 1 deletion(-) commit 18659a9cb1885d00dd428f8857f7f628e54a45ee Author: Andrey Smetanin Date: Wed Dec 23 16:53:59 2015 +0300 kvm/x86: Hyper-V SynIC tracepoints Trace the following Hyper SynIC events: * set msr * set sint irq * ack sint * sint irq eoi Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 10 +++--- arch/x86/kvm/trace.h | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 5 deletions(-) commit f3b138c5d89a1f74a2b46adaa1067aea9a7e3cbb Author: Andrey Smetanin Date: Mon Dec 28 18:27:24 2015 +0300 kvm/x86: Update SynIC timers on guest entry only Consolidate updating the Hyper-V SynIC timers in a single place: on guest entry in processing KVM_REQ_HV_STIMER request. This simplifies the overall logic, and makes sure the most current state of msrs and guest clock is used for arming the timers (to achieve that, KVM_REQ_HV_STIMER has to be processed after KVM_REQ_CLOCK_UPDATE). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 38 +++++++++++++++++++------------------- arch/x86/kvm/x86.c | 6 ++++++ 2 files changed, 25 insertions(+), 19 deletions(-) commit 7be58a6488a9d36886d9423a1ed54fe104c7b182 Author: Andrey Smetanin Date: Mon Dec 28 18:27:23 2015 +0300 kvm/x86: Skip SynIC vector check for QEMU side QEMU zero-inits Hyper-V SynIC vectors. We should allow that, and don't reject zero values if set by the host. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 23a3b201fd187f1e7af573b3794c3c5ebf7d2c06 Author: Andrey Smetanin Date: Mon Dec 28 18:27:22 2015 +0300 kvm/x86: Hyper-V fix SynIC timer disabling condition Hypervisor Function Specification(HFS) doesn't require to disable SynIC timer at timer config write if timer->count = 0. So drop this check, this allow to load timers MSR's during migration restore, because config are set before count in QEMU side. Also fix condition according to HFS doc(15.3.1): "It is not permitted to set the SINTx field to zero for an enabled timer. If attempted, the timer will be marked disabled (that is, bit 0 cleared) immediately." Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cdeabb1186fc3a6c7854f05cec7c99e32935ebc Author: Andrey Smetanin Date: Mon Dec 28 18:27:21 2015 +0300 kvm/x86: Reorg stimer_expiration() to better control timer restart Split stimer_expiration() into two parts - timer expiration message sending and timer restart/cleanup based on timer state(config). This also fixes a bug where a one-shot timer message whose delivery failed once would get lost for good. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit f808495da56f28e94c6448125158f1175009fcfc Author: Andrey Smetanin Date: Mon Dec 28 18:27:20 2015 +0300 kvm/x86: Hyper-V unify stimer_start() and stimer_restart() This will be used in future to start Hyper-V SynIC timer in several places by one logic in one function. Changes v2: * drop stimer->count == 0 check inside stimer_start() * comment stimer_start() assumptions Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) commit 019b9781ccd667d4160f3636c8735e3baa085555 Author: Andrey Smetanin Date: Mon Dec 28 18:27:19 2015 +0300 kvm/x86: Drop stimer_stop() function The function stimer_stop() is called in one place so remove the function and replace it's call by function content. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 1ac1b65ac199205724a8077d37ba7e64a1b7e77c Author: Andrey Smetanin Date: Mon Dec 28 18:27:18 2015 +0300 kvm/x86: Hyper-V timers fix incorrect logical operation Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2860c4b1678646c99f5f1d77d026cd12ffd8a3a9 Author: Paolo Bonzini Date: Thu Jan 7 15:05:10 2016 +0100 KVM: move architecture-dependent requests to arch/ Since the numbers now overlap, it makes sense to enumerate them in asm/kvm_host.h rather than linux/kvm_host.h. Functions that refer to architecture-specific requests are also moved to arch/. Signed-off-by: Paolo Bonzini arch/powerpc/include/asm/kvm_host.h | 4 ++++ arch/s390/include/asm/kvm_host.h | 4 ++++ arch/x86/include/asm/kvm_host.h | 28 ++++++++++++++++++++++++ arch/x86/kvm/x86.c | 15 +++++++++++++ include/linux/kvm_host.h | 43 ++----------------------------------- virt/kvm/kvm_main.c | 10 --------- 6 files changed, 53 insertions(+), 51 deletions(-) commit 7296f62f0322d808362b21064deb34f20799c20d Author: Nicholas Krause Date: Tue Jan 5 14:32:54 2016 -0500 megaraid: Fix possible NULL pointer deference in mraid_mm_ioctl This adds the needed check after the call to the function mraid_mm_alloc_kioc in order to make sure that this function has not returned NULL and therefore makes sure we do not deference a NULL pointer if one is returned by mraid_mm_alloc_kioc. Further more add needed comments explaining that this function call can return NULL if the list head is empty for the pointer passed in order to allow furture users to understand this required pointer check. Signed-off-by: Nicholas Krause Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_mm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6662ba347b29b6df0756ffedb167fa4d89bab06f Author: Paolo Bonzini Date: Thu Jan 7 15:02:44 2016 +0100 KVM: renumber vcpu->request bits Leave room for 4 more arch-independent requests. Reviewed-by: Christian Borntraeger Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 59 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 30 deletions(-) commit 0cd310437255be81cd2413407c1d61eb70286fe2 Author: Paolo Bonzini Date: Thu Jan 7 15:00:53 2016 +0100 KVM: document which architecture uses each request bit Reviewed-by: Christian Borntraeger Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 6c71f8ae155422a030b4c382cb985dde006ccc3f Author: Paolo Bonzini Date: Thu Jan 7 14:53:46 2016 +0100 KVM: Remove unused KVM_REQ_KICK to save a bit in vcpu->requests Suggested-by: Takuya Yoshikawa [Takuya moved all subsequent constants to fill the void, but that is useless in view of the following patches. So this change looks nothing like the original. - Paolo] Reviewed-by: Christian Borntraeger Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0ecb44dd459164d9d6e7a126024dc3c961a12ed Merge: 1dab134 c6e5f16 Author: Paolo Bonzini Date: Fri Jan 8 19:03:03 2016 +0100 Merge tag 'kvm-s390-next-4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Feature and fix for 4.5 - allow the runtime instrumentation support inside the guests - remove a useless memory barrier commit 74e26784f1c50469585f483cf404c2b1d621c101 Author: Dan Carpenter Date: Fri Jan 8 14:02:04 2016 +0300 storvsc: Fix typo in MODULE_PARM_DESC The module_param is "storvsc_vcpus_per_sub_channel" so we need to use that for MODULE_PARM_DESC() as well. Signed-off-by: Dan Carpenter Reviewed-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 856690ca98059388f9f7e0afc8f0d7441a965e35 Author: Dan Carpenter Date: Fri Jan 8 14:01:36 2016 +0300 cxgbi: Typo in MODULE_PARM_DESC The module_param is "cxgb3i_rx_credit_thres" so the MODULE_PARM_DESC() should match that. Signed-off-by: Dan Carpenter Reviewed-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f44f35dd8cf0818c51f399611ef868ebfdaccba Author: Ryan C. Underwood Date: Thu Dec 24 21:45:27 2015 -0800 3w-xxxx: Pass through compat mode ioctls This allows 32-bit userspace tools (tw_cli, smartctl) to work on a 64-bit system. The command buffer is opaque to us, so, no word size problems. Signed-off-by: Ryan C. Underwood Reviewed-by: Shane Seymour Reviewed-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/3w-xxxx.c | 3 +++ 1 file changed, 3 insertions(+) commit 4e09bff3301ac570cb5d68277e755f1759edfeb2 Author: John Garry Date: Mon Dec 21 19:35:09 2015 +0800 hisi_sas: Use u64 for qw0 in free_device_v1_hw() By reading in itct.qw0 into a 32b variable the top 32 bits were being lost. In practice this was OK as they were zeroes. Fixes: 27a3f229 ("hisi_sas: Add cq interrupt") Signed-off-by: John Garry Reviewed-by: Matthew R. Ochs Reviewed-by: Shane Seymour Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9146cbd52b11d4ade62dba8f238ec5e421c3fa2b Author: Brian Norris Date: Thu Jan 7 09:53:08 2016 -0800 mtd: jz4780_nand: replace if/else blocks with switch/case Using switch/case helps make this logic more clear and more robust. With this structure: * it's clear that this driver only support ECC_{HW,SOFT,SOFT_BCH}; and * we can sanely handle new ECC unsupported modes (right now, this code makes incorrect assumptions about the possible values in the nand_ecc_modes_t enum; e.g., what happens with NAND_ECC_HW_OOB_FIRST?) Signed-off-by: Brian Norris Cc: Alex Smith Reviewed-by: Boris Brezillon Tested-by: Harvey Hunt Acked-by: Harvey Hunt drivers/mtd/nand/jz4780_nand.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 6c1207b5b8422cdddf467b9fbef922c4c374d382 Author: Harvey Hunt Date: Fri Jan 8 16:45:17 2016 +0000 mtd: nand: jz4780: Update ecc correction error codes Update jz4780_bch_ecc_correct's return codes with appropriate values, as specified in /include/linux/mtd/nand.h. Signed-off-by: Harvey Hunt Cc: Alex Smith Cc: Boris Brezillon Cc: linux-kernel@vger.kernel.org Reviewed-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/nand/jz4780_bch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a33ad9ac818ecd36fdaa3ad1f9c5471398f41647 Merge: 24759da 5602815 Author: David S. Miller Date: Fri Jan 8 12:44:21 2016 -0500 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2016-01-08 This series contains updates to i40e and i40evf only. Mitch adds a useful error message and return value when the VFs are being reset, since there is a brief window of time when the VF cannot be configured because they do not have a VSI to configure. Also made a driver change to allow the user to specify a zero MAC address for VFs, which causes the existing MAC address to be removed and allows the VF to use a random address (like libvirt). Sowmini Varadhan from Oracle adds similar functionality/fix to i40e that was added to ixgbe earlier. The fix attempts to look up the MAC address in the Open Firmware on systems that support it and use IDPROM on SPARC if no OF address is found. Anjali provides a fix the code path so that we do not call skb_set_hash() if the feature is disabled. Jesse removes a device ID that has never been productized and there are no plans to use it, so just remove it. ==================== Signed-off-by: David S. Miller commit 775d8a1b0d75211cc6123915c6b5b688f2002478 Author: Namhyung Kim Date: Thu Jan 7 09:12:29 2016 +0900 perf evlist: Add --trace-fields option to show trace fields To use dynamic sort keys, it might be good to add an option to see the list of field names. $ perf evlist -i perf.data.sched sched:sched_switch sched:sched_stat_wait sched:sched_stat_sleep sched:sched_stat_iowait sched:sched_stat_runtime sched:sched_process_fork sched:sched_wakeup sched:sched_wakeup_new sched:sched_migrate_task # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events $ perf evlist -i perf.data.sched --trace-fields sched:sched_switch: trace_fields: prev_comm,prev_pid,prev_prio,prev_state,next_comm,next_pid,next_prio sched:sched_stat_wait: trace_fields: comm,pid,delay sched:sched_stat_sleep: trace_fields: comm,pid,delay sched:sched_stat_iowait: trace_fields: comm,pid,delay sched:sched_stat_runtime: trace_fields: comm,pid,runtime,vruntime sched:sched_process_fork: trace_fields: parent_comm,parent_pid,child_comm,child_pid sched:sched_wakeup: trace_fields: comm,pid,prio,success,target_cpu sched:sched_wakeup_new: trace_fields: comm,pid,prio,success,target_cpu sched:sched_migrate_task: trace_fields: comm,pid,prio,orig_cpu,dest_cpu Committer notes: For another file, in verbose mode: # perf evlist -v --trace-fields sched:sched_switch: type: 2, size: 112, config: 0x10b, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|PERIOD|RAW, disabled: 1, inherit: 1, mmap: 1, comm: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, trace_fields: prev_comm,prev_pid,prev_prio,prev_state,next_comm,next_pid,next_prio # Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1452125549-1511-5-git-send-email-namhyung@kernel.org [ Replaced 'trace_fields=' with 'trace_fields: ' to make the output consistent in -v mode ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-evlist.txt | 3 +++ tools/perf/builtin-evlist.c | 11 ++++++++++- tools/perf/util/evsel.c | 23 +++++++++++++++++++++++ tools/perf/util/evsel.h | 1 + 4 files changed, 37 insertions(+), 1 deletion(-) commit 5c0cf22477eaa890beeb4bc3554e5bebbea4b007 Author: Jiri Olsa Date: Thu Jan 7 14:30:22 2016 +0100 perf record: Store data mmaps for dwarf unwind Currently we don't synthesize data mmap by default. It depends on -d option, that enables data address sampling. But we've seen cases (softice) where DWARF unwinder went through non executable mmaps, which we need to lookup in MAP__VARIABLE tree. Making data mmaps to be synthesized for dwarf unwind as well. Reported-by: Noel Grandin Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160107133022.GA32115@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0ba98149f8c8b6b2ba36be9938afb731fa719004 Author: Jiri Olsa Date: Thu Jan 7 10:14:02 2016 +0100 perf libdw: Check for mmaps also in MAP__VARIABLE tree We've seen cases (softice) where DWARF unwinder went through non executable mmaps, which we need to lookup in MAP__VARIABLE tree. Reported-and-Tested-by: Noel Grandin Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-6-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libdw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0ddf5246f70ecc04e1bb4c4dc2be65977d1c03a7 Author: Jiri Olsa Date: Thu Jan 7 10:14:01 2016 +0100 perf unwind: Check for mmaps also in MAP__VARIABLE tree We've seen cases (softice) where DWARF unwinder went through non executable mmaps, which we need to lookup in MAP__VARIABLE tree. Reported-and-Tested-by: Noel Grandin Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libunwind.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f22ed827a8d5ff5a85e7c8e865baaaaf71a8d0cc Author: Jiri Olsa Date: Thu Jan 7 10:14:00 2016 +0100 perf unwind: Use find_map function in access_dso_mem The find_map helper is already there, so let's use it. Also we're going to introduce wider search in following patch, so it'll be easier to make this change on single place. Signed-off-by: Jiri Olsa Tested-by: Noel Grandin Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libunwind.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit d2190a8091124f832c8862ace3a3d7d70a2506a5 Author: Jiri Olsa Date: Thu Jan 7 10:13:58 2016 +0100 perf evlist: Remove perf_evlist__(enable|disable)_event functions Replacing them with perf_evsel__(enable|disable). Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/intel-bts.c | 4 ++-- tools/perf/arch/x86/util/intel-pt.c | 4 ++-- tools/perf/tests/keep-tracking.c | 2 +- tools/perf/tests/switch-tracking.c | 6 +++--- tools/perf/util/evlist.c | 42 ------------------------------------ tools/perf/util/evlist.h | 4 ---- 6 files changed, 8 insertions(+), 54 deletions(-) commit 23df7f798435796aff07d641456326b81cb34a77 Author: Adrian Hunter Date: Thu Jan 7 10:13:59 2016 +0100 perf evlist: Make perf_evlist__open() open evsels with their cpus and threads (like perf record does) 'perf record' uses perf_evsel__open() to open events and passes the evsel->cpus and evsel->threads. Many tests and some tools instead use perf_evlist__open() which passes instead evlist->cpus and evlist->threads. Make perf_evlist__open() follow the 'perf record' behaviour so that a consistent approach is taken. Signed-off-by: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fb88201b4303159638976c2c4c4769fc89d64d1 Author: John Garry Date: Mon Dec 21 19:35:08 2015 +0800 hisi_sas: Fix typo in setup_itct_v1_hw() We were doing a arithmetic comparison instead of logical shift by accident. Mis-programming the itct did not seem to make a difference to operation. Fixes: abda97c2fe874 ("hisi_sas: Add dev_found") Signed-off-by: John Garry Reviewed-by: Matthew R. Ochs Reviewed-by: Shane Seymour Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8ceec33223f0cf8849d47dbe2203ce82c9875d09 Author: John Garry Date: Mon Dec 21 19:35:07 2015 +0800 hisi_sas: Fix v1 itct masks The mask fields are for quad-words, so add ULL suffix. Also unreferenced ITCT_HDR_BREAK_REPLY and ITCT_HDR_MAX_BURST are removed. Fixes: 50af155b6c ("hisi_sas: Add v1 hardware reg") Signed-off-by: John Garry Reviewed-by: Shane Seymour Reviewed-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit e39b2bb3b72b999a04e8d295882be3255aca5ade Author: Danesh Petigara Date: Thu Jan 7 16:03:33 2016 -0800 libata: skip debounce delay on link resume The link resume logic uses a 200msec delay while debouncing the SControl register. The rationale behind that delay is to accommodate some PHYs that behave badly if their SStatus/ SControl registers are pounded immediately on resume. The Broadcom STB SATA PHY does not seem to have this issue. This patch introduces a new link flag that allows platforms to skip the debounce delay if it isn't needed. Signed-off-by: Danesh Petigara Signed-off-by: Florian Fainelli Signed-off-by: Tejun Heo drivers/ata/ahci_brcmstb.c | 1 + drivers/ata/libata-core.c | 3 ++- include/linux/libata.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit b4d629a39e104a8326d5b281ce07c21240c130c9 Author: Jeff Layton Date: Thu Jan 7 18:27:42 2016 -0500 locks: rename __posix_lock_file to posix_lock_inode ...a more descriptive name and we can drop the double underscore prefix. Signed-off-by: Jeff Layton Acked-by: "J. Bruce Fields" fs/locks.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e24dadab08a2a38455434607f52b54a6dc990721 Author: Jeff Layton Date: Wed Jan 6 21:28:41 2016 -0500 locks: prink more detail when there are leaked locks Right now, we just get WARN_ON_ONCE, which is not particularly helpful. Have it dump some info about the locks and the inode to make it easier to track down leaked locks in the future. Signed-off-by: Jeff Layton Acked-by: "J. Bruce Fields" fs/locks.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit f27a0fe083bf46fef0d7045aa2e9a7e56e72d8d8 Author: Jeff Layton Date: Thu Jan 7 15:08:51 2016 -0500 locks: pass inode pointer to locks_free_lock_context ...so we can print information about it if there are leaked locks. Signed-off-by: Jeff Layton Acked-by: "J. Bruce Fields" fs/inode.c | 2 +- fs/locks.c | 4 +++- include/linux/fs.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit 1890910fd06fefbfa1cbeaf88357783914af71f6 Author: Jeff Layton Date: Wed Jan 6 21:26:10 2016 -0500 locks: sprinkle some tracepoints around the file locking code Add some tracepoints around the POSIX locking code. These were useful when tracking down problems when handling the race between setlk and close. Signed-off-by: Jeff Layton Acked-by: "J. Bruce Fields" fs/locks.c | 12 +++++-- include/trace/events/filelock.h | 77 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 3 deletions(-) commit 0752ba807b04ccd69cb4bc8bbf829a80ee208a3c Author: Jeff Layton Date: Fri Jan 8 07:30:43 2016 -0500 locks: don't check for race with close when setting OFD lock We don't clean out OFD locks on close(), so there's no need to check for a race with them here. They'll get cleaned out at the same time that flock locks are. Signed-off-by: Jeff Layton Acked-by: "J. Bruce Fields" fs/locks.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit ff3ce480e8b59fbc0f459476fe1b5451464592a5 Author: Bogicevic Sasa Date: Sun Dec 27 13:21:11 2015 -0800 PCI: Fix all whitespace issues Fix all whitespace issues (missing or needed whitespace) in all files in drivers/pci. Code is compiled with allyesconfig before and after code changes and objects are recorded and checked with objdiff and they are not changed after this commit. Signed-off-by: Bogicevic Sasa Signed-off-by: Bjorn Helgaas drivers/pci/access.c | 8 +- drivers/pci/host/pci-imx6.c | 2 +- drivers/pci/hotplug/acpi_pcihp.c | 10 +- drivers/pci/hotplug/acpiphp.h | 2 +- drivers/pci/hotplug/acpiphp_core.c | 14 +- drivers/pci/hotplug/acpiphp_glue.c | 2 +- drivers/pci/hotplug/acpiphp_ibm.c | 2 +- drivers/pci/hotplug/cpci_hotplug.h | 14 +- drivers/pci/hotplug/cpci_hotplug_core.c | 16 +- drivers/pci/hotplug/cpci_hotplug_pci.c | 10 +- drivers/pci/hotplug/cpcihp_generic.c | 12 +- drivers/pci/hotplug/cpcihp_zt5550.c | 14 +- drivers/pci/hotplug/cpqphp.h | 14 +- drivers/pci/hotplug/cpqphp_core.c | 32 +- drivers/pci/hotplug/cpqphp_ctrl.c | 200 ++++----- drivers/pci/hotplug/cpqphp_nvram.c | 92 ++-- drivers/pci/hotplug/cpqphp_pci.c | 84 ++-- drivers/pci/hotplug/cpqphp_sysfs.c | 6 +- drivers/pci/hotplug/ibmphp.h | 12 +- drivers/pci/hotplug/ibmphp_core.c | 30 +- drivers/pci/hotplug/ibmphp_ebda.c | 524 +++++++++++------------ drivers/pci/hotplug/ibmphp_hpc.c | 386 ++++++++--------- drivers/pci/hotplug/ibmphp_pci.c | 728 ++++++++++++++++---------------- drivers/pci/hotplug/ibmphp_res.c | 518 +++++++++++------------ drivers/pci/hotplug/pci_hotplug_core.c | 10 +- drivers/pci/hotplug/pciehp.h | 8 +- drivers/pci/hotplug/pciehp_core.c | 16 +- drivers/pci/hotplug/pcihp_skeleton.c | 24 +- drivers/pci/hotplug/rpaphp.h | 8 +- drivers/pci/hotplug/rpaphp_core.c | 2 +- drivers/pci/hotplug/rpaphp_pci.c | 2 +- drivers/pci/hotplug/rpaphp_slot.c | 2 +- drivers/pci/hotplug/sgi_hotplug.c | 6 +- drivers/pci/hotplug/shpchp.h | 10 +- drivers/pci/hotplug/shpchp_core.c | 28 +- drivers/pci/hotplug/shpchp_hpc.c | 2 +- drivers/pci/hotplug/shpchp_sysfs.c | 10 +- drivers/pci/pci.c | 2 +- drivers/pci/setup-bus.c | 2 +- 39 files changed, 1432 insertions(+), 1432 deletions(-) commit a333e4bf2556b93c908e56b39be7bbd555f1b6cc Author: Sasha Levin Date: Mon Nov 9 16:06:53 2015 -0500 fs/9p: use fscache mutex rather than spinlock We may sleep inside a the lock, so use a mutex rather than spinlock. Signed-off-by: Sasha Levin Signed-off-by: Eric Van Hensbergen fs/9p/cache.c | 8 ++++---- fs/9p/v9fs.h | 2 +- fs/9p/vfs_inode.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 6ca92dd7aff899777a3081c5948409f4bdef7d38 Author: Danesh Petigara Date: Thu Jan 7 16:03:31 2016 -0800 ata: ahci_brcmstb: disable DIPM support The Broadcom STB SATA host controller does not support device initiated power management. Disable support for this feature so the driver never sends SETFEATURES commands to the device to enable/disable DIPM. Signed-off-by: Danesh Petigara Signed-off-by: Florian Fainelli Signed-off-by: Tejun Heo drivers/ata/ahci_brcmstb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6863caaf15fce962db0387e852b26d9fbf206cfe Author: Danesh Petigara Date: Thu Jan 7 16:03:30 2016 -0800 ata: ahci_brcmstb: enable support for ALPM Enable support for ALPM in the host controller's capabilities register. Also adjust the PLL timeout to give it enough time to lock when the port exits slumber mode. tj: minor style updates Signed-off-by: Danesh Petigara Signed-off-by: Florian Fainelli Signed-off-by: Tejun Heo drivers/ata/ahci_brcmstb.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 14cbfbeb76540cc0c53fbb0ba34b3a4900ebe40f Author: Namhyung Kim Date: Thu Jan 7 20:41:53 2016 +0900 perf report: Show random usage tip on the help line Currently perf report only shows a help message "For a higher level overview, try: perf report --sort comm,dso" unconditionally (even if the sort keys were used). Add more help tips and show randomly. Load tips from ${prefix}/share/doc/perf-tip/tips.txt file. $ perf report | tail 0.10% swapper [kernel.vmlinux] [k] irq_exit 0.09% swapper [kernel.vmlinux] [k] flush_smp_call_function_queue 0.08% swapper [kernel.vmlinux] [k] native_write_msr_safe 0.03% swapper [kernel.vmlinux] [k] group_sched_in 0.01% perf [kernel.vmlinux] [k] native_write_msr_safe # # (Tip: Search options using a keyword: perf report -h ) # Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1452166913-27046-1-git-send-email-namhyung@kernel.org [ Renamed it to perf_tip() and the parameter dirname to dirpath to fix the build on older distros ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Build | 1 + tools/perf/Documentation/tips.txt | 14 ++++++++++++++ tools/perf/Makefile.perf | 3 +++ tools/perf/builtin-report.c | 2 +- tools/perf/config/Makefile | 6 ++++++ tools/perf/perf.c | 4 ++++ tools/perf/util/util.c | 27 +++++++++++++++++++++++++++ tools/perf/util/util.h | 2 ++ 8 files changed, 58 insertions(+), 1 deletion(-) commit fc284be9d88528dd2a28d5471e40a6acde6c3036 Author: Namhyung Kim Date: Thu Jan 7 10:14:10 2016 +0100 perf hists: Export a couple of hist functions These are necessary for multi threaded sample processing: - hists__get__get_rotate_entries_in() - hists__collapse_insert_entry() - __hists__init() Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: David Ahern Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-14-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 19 ++++++++++++------- tools/perf/util/hist.h | 5 +++++ 2 files changed, 17 insertions(+), 7 deletions(-) commit 21e6d8428664293f203be3004dcd8d70f68ebdb9 Author: Jiri Olsa Date: Thu Jan 7 10:14:09 2016 +0100 perf diff: Use perf_hpp__register_sort_field interface Using perf_hpp__register_sort_field interface instead of directly adding the entry. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: David Ahern Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-13-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b97511c5bc94ef12613f485ab82f989df04088da Author: Jiri Olsa Date: Thu Jan 7 10:14:08 2016 +0100 perf tools: Add overhead/overhead_children keys defaults via string We currently set 'overhead' and 'overhead_children' as default sort keys within perf_hpp__init function by directly adding into the sort list. This patch adds 'overhead' and 'overhead_children' in text form into sort_keys and let them be added by standard sort dimension interface. We need to eliminate dirrect sort_list additions to be able to add support for hists specific sort keys. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: David Ahern Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-12-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/hist.c | 12 ------------ tools/perf/util/sort.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 12 deletions(-) commit bb4ced29f5d5ff1d4d51b602dad34a0d15495a67 Author: Jiri Olsa Date: Thu Jan 7 10:14:07 2016 +0100 perf tools: Remove list entry from struct sort_entry It's no longer needed. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: David Ahern Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-11-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.h | 2 -- 1 file changed, 2 deletions(-) commit 685c84154cef61dd7d961f36ab92f13c3ef5d354 Author: Jiri Olsa Date: Thu Jan 7 10:14:06 2016 +0100 perf tools: Include all tools/lib directory for tags/cscope/TAGS targets Besides lockdep we use all the 'tools/lib' code in perf, so include it completely in tags. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-10-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cdbc409626b29ab30f06a6393db6763f040f753 Author: Jiri Olsa Date: Thu Jan 7 10:14:05 2016 +0100 perf script: Align event name properly Adding code to align event names, so we get aligned output in case of multiple events with different names. Before: $ perf script :13757 13757 163918.230829: cpu/mem-snp-none/P: ffff88085f20d010 :13757 13757 163918.230832: cpu/mem-loads,ldlat=30/P: 7f5a5f719f00 :13757 13757 163918.230835: cpu/mem-loads,ldlat=30/P: 7f5a5f719f00 :13758 13758 163918.230838: cpu/mem-snp-none/P: ffff88085f4ad810 :13758 13758 163918.154093: cpu/mem-stores/P: ffff88085bb53f28 :13757 13757 163918.155264: cpu/mem-snp-hitm/P: 601080 ... After: $ perf script :13757 13757 163918.228831: cpu/mem-snp-none/P: ffffffff81a841c0 :13757 13757 163918.228834: cpu/mem-loads,ldlat=30/P: 7f5a5f719f08 :13757 13757 163918.228837: cpu/mem-loads,ldlat=30/P: 7f5a5f719f08 :13758 13758 163918.228837: cpu/mem-snp-none/P: ffff88085f4ad800 :13758 13758 163918.154093: cpu/mem-stores/P: ffff88085bb53f28 :13757 13757 163918.155264: cpu/mem-snp-hitm/P: 601080 ... Signed-off-by: Jiri Olsa Acked-by: David Ahern Cc: Adrian Hunter Cc: Namhyung Kim Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-9-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 2d7c03e6b0c604decae33b0ce03e69b79b2a39a1 Author: Wang Nan Date: Fri Jan 8 14:23:57 2016 +0000 perf tools: Add missing headers in perf's MANIFEST These lost headers are found in arm64 cross buildings, failing to build perf using tarballs generated using: $ make perf-targz-src-pkg Signed-off-by: Wang Nan Cc: Jiri Olsa Cc: Namhyung Kim Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452263041-225488-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/MANIFEST | 2 ++ 1 file changed, 2 insertions(+) commit cbd08b7335c9d559f424dcef7bea333605597490 Author: Jiri Olsa Date: Thu Jan 7 10:14:04 2016 +0100 perf tools: Do not show trace command if it's not compiled in The trace command still appears in help message when you run simple 'perf' command. It's because the generate-cmdlist.sh does not care about the HAVE_LIBAUDIT_SUPPORT dependency of trace command and puts it into generated common_cmds array. Wrapping trace command under HAVE_LIBAUDIT_SUPPORT dependency, which will exclude it from common_cmds array if HAVE_LIBAUDIT_SUPPORT is not set. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-8-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/command-list.txt | 2 +- tools/perf/util/generate-cmdlist.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 1e9abf8b03c8f9352f54171647296c41317679a4 Author: Namhyung Kim Date: Sun Nov 29 23:24:17 2015 +0900 perf report: Change default to use event group view The event group view feature is to see related events together. To use the group view, events should be recorded as a group with a dedicated syntax of surrounding events by braces (-e '{ evt1, evt2, ... }'). Also 'perf report' also requires the --group option to enable it. However it's almost always beneficial to use the group view to see the group events as it's more expressive. And I think it's more natural to see events together if they are recorded as a group. Thus this patch changes the default value to enable it. If users don't want to see like it and keep the original behavior, they can set the report.group config variable to false and/or use --no-group option in the 'perf report' command line. Requested-by: Ingo Molnar Signed-off-by: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Taeung Song Link: http://lkml.kernel.org/r/1448807057-3506-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol.c | 1 + 1 file changed, 1 insertion(+) commit 42b276a2351517409d55b1202a1fa8b05c0cdc99 Author: Namhyung Kim Date: Tue Jan 5 12:06:00 2016 +0900 perf top: Decay periods in callchains It missed to decay periods in callchains when decaying hist entries. This resulted in more than 100 percent overhead in callchains in the fractal style output. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1451963160-17196-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 28 ++++++++++++++++++++++++++++ tools/perf/util/callchain.h | 1 + tools/perf/util/hist.c | 1 + 3 files changed, 30 insertions(+) commit 848c3920866fdb7b8b353408348df7929306e9be Author: Anil Veliyankara Madam Date: Thu Jan 7 21:18:52 2016 -0800 drivers: libata-core: Use usleep_range() instead of msleep() for short sleeps (<20 ms) Since msleep() may sleep longer than intended time for values less than 20ms, this patch allows the use of usleep_range for waits less that 20ms. usleep_range is a finer precision implementation of msleep and is designed to be a drop-in replacement for udelay where a precise sleep/busy-wait is unnecessary. More details can be found at http://lkml.org/lkml/2007/8/3/250 and in Documentation/timers/timers-howto.txt. This change has been done to improve the performace in PIO6 mode which is used by viking flash. Cc: xe-kernel@external.cisco.com Signed-off-by: Anil Veliyankara Madam Signed-off-by: Shikha Jain Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 915b0882c3108a21e9b3b5e176d3151ad522242d Author: Arnaldo Carvalho de Melo Date: Fri Jan 8 12:33:37 2016 -0300 tools lib: Move bitmap.[ch] from tools/perf/ to tools/{lib,include}/ So that lib/find_bit.c doesn't requires anything inside tools/perf/ Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: George Spelvin Cc: Namhyung Kim Cc: Rasmus Villemoes Cc: Wang Nan Cc: Yury Norov Link: http://lkml.kernel.org/n/tip-7lxe7jgohaac5faodndhdmvk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/bitmap.h | 68 ++++++++++++++++++++++++++++++++++ tools/lib/bitmap.c | 31 ++++++++++++++++ tools/perf/util/Build | 5 +++ tools/perf/util/bitmap.c | 31 ---------------- tools/perf/util/include/linux/bitmap.h | 68 ---------------------------------- tools/perf/util/python-ext-sources | 2 +- 6 files changed, 105 insertions(+), 100 deletions(-) commit 64af4e0da419ef9e9db0d34a3b5836adbf90a5e8 Author: Arnaldo Carvalho de Melo Date: Fri Jan 8 11:26:43 2016 -0300 tools lib: Sync tools/lib/find_bit.c with the kernel Need to move the bitmap.[ch] things from tools/perf/ to tools/lib, will be done in the next patches. Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: George Spelvin Cc: Namhyung Kim Cc: Rasmus Villemoes Cc: Wang Nan Cc: Yury Norov Link: http://lkml.kernel.org/n/tip-5fys65wkd7gu8j7a7xgukc5t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/find_bit.c | 103 ++++++++++++++++----------------- tools/perf/util/include/linux/bitmap.h | 2 + 2 files changed, 51 insertions(+), 54 deletions(-) commit 552eb975b83756e3d95aeb5edaeb5c3c032b0021 Author: Arnaldo Carvalho de Melo Date: Fri Jan 8 10:46:52 2016 -0300 tools lib: Move find_next_bit.c to tools/lib/ The commit that introduced it should've moved it to the same place, plus the 'tools/' prefix, but instead moved it to a bogus tools/lib/util/ directory, being the only file there. Move it to tools/lib/find_bit.c, picking the name for the file where these routines live since: 8f6f19dd5143 ("lib: move find_last_bit to lib/find_next_bit.c") Next step is to make tools/lib/find_bit.c to differ from lib/find_bit.c just in removing what is not used by tools/. Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: George Spelvin Cc: Namhyung Kim Cc: Rasmus Villemoes Cc: Wang Nan Cc: Yury Norov Link: http://lkml.kernel.org/n/tip-p391cex5mqvahp4pwrton87n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/find_bit.c | 89 ++++++++++++++++++++++++++++++++++++++ tools/lib/util/find_next_bit.c | 89 -------------------------------------- tools/perf/MANIFEST | 2 +- tools/perf/util/Build | 6 +-- tools/perf/util/python-ext-sources | 2 +- 5 files changed, 94 insertions(+), 94 deletions(-) commit 8083013fc3201b75535afc39338cc7d2cad32e37 Author: Michael S. Tsirkin Date: Thu Jan 7 19:55:24 2016 +0200 ld-version: Fix it on Fedora On Fedora 23, ld --version outputs: GNU ld version 2.25-15.fc23 But ld-version.sh fails to parse this, so e.g. mips build fails to enable VDSO, printing a warning that binutils >= 2.24 is required. To fix, teach ld-version to parse this format. Signed-off-by: Michael S. Tsirkin Cc: linux-kernel@vger.kernel.org Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12023/ Signed-off-by: Ralf Baechle scripts/ld-version.sh | 2 ++ 1 file changed, 2 insertions(+) commit d9d8c4cf23e8badfa8d49fe66c6a49970f896689 Author: Dan Carpenter Date: Fri Jan 8 14:00:45 2016 +0300 drm: move MODULE_PARM_DESC to other file We moved the module options from drm_drv.c to drm_irq.c in 18882995713d ('drm: Move vblank related module options into drm_irq.c'). Let's move the MODULE_PARM_DESC()s as well so they're together. Signed-off-by: Dan Carpenter Link: http://patchwork.freedesktop.org/patch/msgid/20160108110045.GF32195@mwanda Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_drv.c | 4 ---- drivers/gpu/drm/drm_irq.c | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) commit d9278b4c2c31603474eec19d9ea1dea6b3a81087 Author: Jani Nikula Date: Fri Jan 8 13:21:51 2016 +0200 drm/edid: index CEA/HDMI mode tables using the VIC Add a dummy entry to CEA/HDMI mode tables so they can be indexed directly using the VIC, avoiding a +1/-1 dance here and there. This adds clarity to the error checking for various functions that return the VIC on success and zero on failure; we can now explicitly check for 0 instead of just subtracting one from an unsigned type. Also add drm_valid_cea_vic() and drm_valid_hdmi_vic() helpers for checking valid VICs. v2: add drm_valid_cea_vic and drm_valid_hdmi_vic helpers (Ville) use { } instead of { 0 } for initializing the dummy modes Cc: Ville Syrjälä Cc: Alex Deucher Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1452252111-6439-1-git-send-email-jani.nikula@intel.com Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_edid.c | 94 ++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 41 deletions(-) commit 48f66c905a976bf0ff092fc24f08d9addd82a245 Author: Florian Westphal Date: Thu Jan 7 21:34:24 2016 +0100 netfilter: nft_ct: add byte/packet counter support If the accounting extension isn't present, we'll return a counter value of 0. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nft_ct.c | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit a1068045883ed4a18363a4ebad0c3d55e473b716 Author: Vinod Koul Date: Thu Jan 7 21:48:14 2016 +0530 ASoC: compress: Fix compress device direction check The detection of direction for compress was only taking into account codec capabilities and not CPU ones. Fix this by checking the CPU side capabilities as well Cc: Tested-by: Ashish Panwar Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/soc-compress.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 15b914476bf24185534a59fb8e149d465ff79c59 Author: Subhransu S. Prusty Date: Wed Dec 9 21:46:10 2015 +0530 ASoC: hdac_hdmi: Use list to add pins and converters Future platforms may have a different set of pins/converters. So use lists to add pins and converters based on enumeration. Also it may be required to connect any converter to any pin dynamically as per different use cases (for example DP is connected to pin 6 on skylake board). So this will help in dynamically select and route. Fix the dai map as well to use the pin/cvt from list. Not enabling all dai maps for now. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 154 +++++++++++++++++++++++++++++-------------- 1 file changed, 106 insertions(+), 48 deletions(-) commit 44aab3e09ef947e546ee61c5082c41b86dd15e53 Author: Trond Myklebust Date: Fri Jan 8 08:12:47 2016 -0500 NFS: Fix a compile warning about unused variable in nfs_generic_pg_pgios() Signed-off-by: Trond Myklebust fs/nfs/pagelist.c | 3 --- 1 file changed, 3 deletions(-) commit 926ea40a7ee294767994b67eebff9fa015562902 Author: Trond Myklebust Date: Fri Jan 8 08:11:54 2016 -0500 NFSv4: Fix a compile warning about no prototype for nfs4_ioctl() Signed-off-by: Trond Myklebust fs/nfs/nfs4file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d4a32602bc5d4d8f9a80c6b66a4e28d5f2d4798 Author: Zidan Wang Date: Fri Jan 8 16:57:02 2016 +0800 ASoC: wm8960: boost switch should be closed when using L/RINPUT1 L/RINPUT1 can line to Left/Right Boost Mixer through boost switch. If boost switch is open, there will be no voice when using L/RINPUT1. Signed-off-by: Zidan Wang Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit defbf708baf2a4cc4421699d02b57d7c3bb728b0 Author: Zidan Wang Date: Fri Jan 8 16:57:01 2016 +0800 ASoC: wm8960: add DAC mono mix kcontrol In normal operation, the left and right channel digital audio data is converted to analogue in two separate DACs. There is a mono-mix mode where the two audio channels are mixed together digitally and then converted to analogue using only one DAC, while the other DAC is switched off. The mono-mix signal can be selected to appear on both analogue output channels. The mono mix is automatically attenuated by 6dB to prevent clipping. Signed-off-by: Zidan Wang Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 3 +++ 1 file changed, 3 insertions(+) commit 5307246015bceb2758f1eee078c6bdc8545ac91f Author: Subhransu S. Prusty Date: Wed Dec 9 21:46:09 2015 +0530 ASoC: hdac_hdmi: Fix to warn instead of err for no connected nids It is possible that some pin widget may return with no converter connected. So don't throw error if none are found to be connected. Instead print a warning and continue. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 8caad1da223c361e2804b76d68405b1abe7886ff Author: Dan Carpenter Date: Fri Jan 8 13:48:51 2016 +0300 spi: loopback: fix typo in MODULE_PARM_DESC There should be an 's' on "dump_message" so it matches the module_param. Fixes: 84e0c4e5e2c4 ('spi: add loopback test driver to allow for spi_master regression tests') Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43c555ca4e7e1521ca500db7e372f67abb1378a2 Author: Sjoerd Simons Date: Fri Jan 8 13:16:46 2016 +0100 ARM: multi_v7_defconfig: Add rockchip audio support As the rockchip SPDIF driver landed for 4.4 and the required clock patches to make it work properly are scheduled for the 4.5 merge window it seems time to support for audio device found on rockchip boards in the defconfig as well. Signed-off-by: Sjoerd Simons Acked-by: Heiko Stuebner Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit ce1e7989d989e36ee3b032d46aab28b7d5e30428 Author: Florian Westphal Date: Fri Jan 8 10:29:12 2016 +0100 netfilter: nft_byteorder: provide 64bit le/be conversion Needed to convert the (64bit) conntrack counters to BE ordering. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_byteorder.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit e6d8ecac9e68265aee9be711c5bd29406129666f Author: Carlos Falgueras García Date: Tue Jan 5 14:03:32 2016 +0100 netfilter: nf_tables: Add new attributes into nft_set to store user data. User data is stored at after 'nft_set_ops' private data into 'data[]' flexible array. The field 'udata' points to user data and 'udlen' stores its length. Add new flag NFTA_SET_USERDATA. Signed-off-by: Carlos Falgueras García Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 4 ++++ include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nf_tables_api.c | 21 ++++++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) commit eb075954e9fde114f57adc39a9ea6d379c13f81e Author: Ken-ichirou MATSUZAWA Date: Tue Jan 5 09:34:34 2016 +0900 netfilter: nfnetlink_log: just returns error for unknown command This patch stops processing options for unknown command. Signed-off-by: Ken-ichirou MATSUZAWA Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71b2e5f5ca3b163b90e487a96fd0cabbaf16792b Author: Ken-ichirou MATSUZAWA Date: Tue Jan 5 09:32:59 2016 +0900 netfilter: nfnetlink_queue: autoload nf_conntrack_netlink module NFQA_CFG_F_CONNTRACK config flag This patch enables to load nf_conntrack_netlink module if NFQA_CFG_F_CONNTRACK config flag is specified. Signed-off-by: Ken-ichirou MATSUZAWA Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_queue.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 21c3c971d1eb5d5598ddb1eda2fc3e4d2c992182 Author: Ken-ichirou MATSUZAWA Date: Tue Jan 5 09:31:40 2016 +0900 netfilter: nfnetlink_queue: just returns error for unknown command This patch stops processing options for unknown command. Signed-off-by: Ken-ichirou MATSUZAWA Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17bc6b4884340b045e779be38ba9f574256866a2 Author: Ken-ichirou MATSUZAWA Date: Tue Jan 5 09:29:54 2016 +0900 netfilter: nfnetlink_queue: don't handle options after unbind This patch stops processing after destroying a queue instance. Signed-off-by: Ken-ichirou MATSUZAWA Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60d2c7f9ab1cac8b2d44307b660eb7813091dbf0 Author: Ken-ichirou MATSUZAWA Date: Tue Jan 5 09:28:05 2016 +0900 netfilter: nfnetlink_queue: validate dependencies to avoid breaking atomicity Check that dependencies are fulfilled before updating the queue instance, otherwise we can leave things in intermediate state on errors in nfqnl_recv_config(). Signed-off-by: Ken-ichirou MATSUZAWA Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_queue.c | 72 ++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 40 deletions(-) commit e19dcdeb3527e996a96ea49d86cccce768b1079a Author: Mark Rustad Date: Wed Dec 9 14:55:37 2015 -0800 ixgbe: Make ATR recognize IPv6 extended headers Right now ATR is not handling IPv6 extended headers, so ATR is not being performed on such packets. Fix that by skipping extended headers when they are present. This also fixes a problem where the ATR code was not checking that the inner protocol was actually TCP before setting up the signature rules. Since the protocol check is intimately involved with the extended header processing as well, this all gets fixed together. Signed-off-by: Mark Rustad Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 47 +++++++++++++++++++++------ 1 file changed, 37 insertions(+), 10 deletions(-) commit 8b75451be1fc05b6ee3f9d0eaea0006d60caff89 Author: Neerav Parikh Date: Tue Dec 8 22:13:58 2015 -0800 ixgbe: Fix MDD events generated when FCoE+SRIOV are enabled When FCoE is enabled with SR-IOV on the X550 NIC the hardware generates MDD events. This patch fixes these by setting the expected values in the Tx context descriptors for FCoE/FIP frames and adding a flush after writing the RDLEN register. Signed-off-by: Neerav Parikh Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 5 ++++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +++ drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) commit b262a9a772eae649159fd2480992713a2dd2b3d3 Author: Usha Ketineni Date: Tue Dec 8 04:01:18 2015 -0800 ixgbe: Fix to get FDMI HBA attributes information with X550 Check whether the FCOE support is enabled for the devices to get the FDMI HBA attributes information instead of checking each device id. Also, add Model string information for X550. Signed-off-by: Usha Ketineni Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d469251bfd06d15289c9dd5dd60b8ebf65785b03 Author: Mark Rustad Date: Fri Dec 4 11:26:43 2015 -0800 ixgbe: Correct handling of any outer UDP checksum setting If an outer UDP checksum is set, pass the skb up with CHECKSUM_NONE so that the stack will check the checksum. Do not increment an error counter, because we don't know that there is an actual error. Signed-off-by: Mark Rustad Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e4d422f5f7249324ac8d1b8e12772e530787a66 Author: Emil Tantilov Date: Thu Dec 3 15:20:06 2015 -0800 ixgbe: do not call check_link for ethtool in ixgbe_get_settings() In ixgbe_get_settings() the link status and speed of the interface are determined based on a read from the LINKS register via the call to mac.ops.check.link(). This can cause issues where external drivers may end up with unknown speed when calling ethtool_get_setings(). Instead of calling the mac.ops.check_link() we can report the speed from the adapter structure which is populated by the driver. Signed-off-by: Emil Tantilov Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit cb78cf12d6e90f57f6e7d090867ef19b6a189dde Author: Vasu Dev Date: Mon Nov 23 10:31:25 2015 -0800 ixgbe: fix broken PFC with X550 PFC is configuration is skipped for X550 devices due to a incorrect device id check, fixing that to include X550 PFC configuration. Signed-off-by: Vasu Dev Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f10166aba2def9bc6443290231c60f7e2f70129b Author: Vasu Dev Date: Mon Nov 23 10:31:01 2015 -0800 ixgbe: use correct FCoE DDP max check Use fcoe_ddp_xid from netdev as this is correctly set for different device IDs to avoid DDP skip error on X550 as "xid=0x20b out-of-range" Signed-off-by: Vasu Dev Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3efcb86e2da69989827066c231edb30ec10de932 Author: Vasu Dev Date: Mon Nov 23 10:30:51 2015 -0800 ixgbe: Fill at least min credits to a TC credit refills Currently credit_refill and credit_max could be zero for a TC and that is causing Tx hang for CEE mode configuration, so to fix that have at min credit assigned to a TC and that is as what IEEE mode already does. Change-ID: If652c133093a21e530f4e9eab09097976f57fb12 Signed-off-by: Vasu Dev Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d5e2c954d3f56388b45879d3579f43960117a1f2 Author: Andre Przywara Date: Mon Jan 4 14:50:33 2016 +0000 arm: multi_v7_defconfig: Add virtio drivers To make multi_v7_defconfig really "multi", let's add virtio drivers to allow booting a default kernel as a KVM/QEMU guest. MACH_VIRT is already defined, so we just add VIRTIO_BLK, VIRTIO_NET and VIRTIO_CONSOLE to actually make this kernel useful in a guest. Signed-off-by: Andre Przywara Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0c6623e35992c08d0462504253c669363d3f7ccb Author: Ilya Ledvich Date: Tue Dec 22 11:10:59 2015 +0200 ARM: dts: compulab: add new board description Add description for newly introduced Compulab devices: - CL-SOM-iMX7 - SBC-iMX7 Signed-off-by: Ilya Ledvich Acked-by: Rob Herring Signed-off-by: Arnd Bergmann .../devicetree/bindings/arm/compulab-boards.txt | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit de2dbca289da0740c8887259b55cd9866c39833a Author: Shawn Lin Date: Mon Jan 4 11:18:56 2016 +0800 ARM: zx_defconfig: remove CONFIG_MMC_DW_IDMAC dw_mmc driver never use this macro, so remove it from zx_defconfig Signed-off-by: Shawn Lin Reviewed-by: Jun Nie Signed-off-by: Arnd Bergmann arch/arm/configs/zx_defconfig | 1 - 1 file changed, 1 deletion(-) commit 07ebfa59b9db40ae29fbf2ef24ba7dc5fa8a5dad Author: Linus Walleij Date: Tue Jan 5 15:02:08 2016 +0100 ARM: versatile: add the syscon LEDs to the DT The device tree version of Versatile AP/PB never had LED support so we are missing LEDs from our hardware boards. Add this as syscon LEDs like we did for Integrator and Juno. We need to spawn devices in the syscon with "simple-mfd" for this to work. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/boot/dts/versatile-ab.dts | 62 +++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) commit 5255a847c30f309258325f5ce16f7ba35c04b2cd Author: Linus Walleij Date: Tue Jan 5 15:02:09 2016 +0100 ARM: versatile: enable the right LEDs The Versatile now only has device tree boot support, and the device tree version does not support CONFIG_LEDS_VERSATILE. Instead select CONFIG_LEDS_SYSCON and MFD_SYSCON, so we can get LEDs support from the same generic driver that drives most other ARM reference boards. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/configs/versatile_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3168eb330b867f77238d68421c00e5b119f0609d Author: Robert Jarzmik Date: Sat Jan 2 21:00:57 2016 +0100 ARM: pxa: add defconfig covering all the boards Add a defconfig covering all known pxa board, ie. all selectable machine files in arch/arm/mach-pxa/*.c. This defconfig was built by doing : - aggregation of all known defconfigs by cat am200epdkit_defconfig cm_x2xx_defconfig cm_x300_defconfig colibri_pxa270_defconfig colibri_pxa300_defconfig corgi_defconfig em_x270_defconfig eseries_pxa_defconfig ezx_defconfig h5000_defconfig imote2_defconfig lpd270_defconfig lubbock_defconfig magician_defconfig mainstone_defconfig multi_v7_defconfig palmz72_defconfig pcm027_defconfig pxa255-idp_defconfig pxa3xx_defconfig raumfeld_defconfig spitz_defconfig trizeps4_defconfig viper_defconfig xcep_defconfig zeus_defconfig - manual make menuconfig to ensure : - all pxa implementation were selected - all drivers were transformed into modules rather than builtin => as a consequence this single kernel will rely on an initramfs => as kernel size matters on pxa, each machine can take the subset of modules required for it to work - all missed configurations are selected verified by : => grep -i pxa .config | grep "is not set" => this should only show the left on purpose options (either not selectable or sharpsl exception below) - CONFIG_PXA_SHARPSL was disabled This breaks the boot very early on any non Sharp platform, see head-sharpsl.S This defconfig was tested as booting up to the login phase on : - lubbock (pxa25x) - mainstone (pxa27x) - zylonite (pxa3xx) The completion of this work will require to : - parse manually all the arch/arm/mach-pxa/*c files, look for all platform devices added, and verify they are all in pxa_defconfig - do the same to ensure all pxa specific drivers (leds, gpio, ...) are included Signed-off-by: Robert Jarzmik Signed-off-by: Arnd Bergmann arch/arm/configs/pxa_defconfig | 783 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 783 insertions(+) commit 3c81e4e60a627afb7ac7b8dc855a88b02d9f0cca Merge: 03b9ee4 e9c478a Author: Arnd Bergmann Date: Fri Jan 8 11:43:57 2016 +0100 Merge tag 'meson-for-4.5/dts' of https://github.com/carlocaione/linux-meson into next/dt Merge "Amlogic DT changes for 4.5" from Carlo Caione: This pull request includes the Amlogic Meson8b DTS changes for v4.5 * tag 'meson-for-4.5/dts' of https://github.com/carlocaione/linux-meson: ARM: dts: meson8b: Add watchdog node Documentation: watchdog: Add new bindings for meson8b ARM: meson: Add status LED for Odroid-C1 commit 76833559eb9d0c8f8e4481ec82216609a91956c7 Author: Srinivas Pandruvada Date: Mon Dec 28 07:01:31 2015 -0800 HID: sensor-hub: Add quirk for Lenovo Yoga 900 with ITE Chips This needs same quirk as applied to other YOGA sensor hubs. Refer to commit 21589ebda681 ("HID: sensor-hub: Add in quirk for Lenovo Yogas with ITE") Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-sensor-hub.c | 3 +++ 2 files changed, 4 insertions(+) commit 84f6ea1d86bfe578d2690db1631b9863a904a0df Author: Kristian Evensen Date: Wed Jan 6 15:08:53 2016 +0100 HID: Add new PID for Microchip Pick16F1454 There seems to be a new version of the Microchip Pick16F1454 with a different PID (0xf2f7). This device should also be ignored by the HID driver. The PID was observed with the second version of the Yepkit Ykush USB hub. Signed-off-by: Kristian Evensen Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + 2 files changed, 2 insertions(+) commit 56028154caafab34063324916095618b2cd30c73 Author: Jesse Brandeburg Date: Wed Dec 9 15:50:22 2015 -0800 i40e: remove forever unused ID Somehow an ID that has never been productized is in the code. There are no plans to use it, so just get rid of it. Change-ID: I59117d48ea9ee0360b0fe33833ac8092f8a24b4c Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 1 - drivers/net/ethernet/intel/i40e/i40e_devids.h | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - drivers/net/ethernet/intel/i40evf/i40e_common.c | 1 - drivers/net/ethernet/intel/i40evf/i40e_devids.h | 1 - 5 files changed, 5 deletions(-) commit 857942fd1aa15edf7356a4a4bad5369c8e70a633 Author: Anjali Singhai Jain Date: Wed Dec 9 15:50:21 2015 -0800 i40e: Fix Rx hash reported to the stack by our driver If the driver calls skb_set_hash even with a zero hash, that indicates to the stack that the hash calculation is offloaded in hardware. So the Stack doesn't do a SW hash which is required for load balancing if the user decides to turn of rx-hashing on our device. This patch fixes the path so that we do not call skb_set_hash if the feature is disabled. Change-ID: Ic4debfa4ff91b5a72e447348a75768ed7a2d3e1b Signed-off-by: Anjali Singhai Jain Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 54 ++++++++++++++------------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 54 ++++++++++++++------------- 2 files changed, 58 insertions(+), 50 deletions(-) commit 0bbfe28ad0fdc11dddae5fe6f6e4e91b7be06395 Author: Jason Gerecke Date: Wed Jan 6 13:25:53 2016 -0800 HID: wacom: Use correct report to query pen ID from INTUOSHT2 devices Unlike other tablets which are compatible with the wacom_intuos_irq handler, INTUOSHT2 devices provide pen ID with report ID 8 instead of 5. To ensure wacom_intuos_schedule_prox_event works as intended for these tablets, we must be sure it uses the correct report ID in this case. Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 6 +++++- drivers/hid/wacom_wac.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit b499ffb0a22c6cd3762b44fd6489f7384f40437d Author: Sowmini Varadhan Date: Mon Dec 7 15:06:34 2015 -0500 i40e: Look up MAC address in Open Firmware or IDPROM This is the i40e equivalent of commit c762dff24c06 ("ixgbe: Look up MAC address in Open Firmware or IDPROM"). As with that fix, attempt to look up the MAC address in Open Firmware on systems that support it, and use IDPROM on SPARC if no OF address is found. In the case of the i40e there is an assumption that the default mac address has already been set up as the primary mac filter on probe, so if this filter is obtained from the Open Firmware or IDPROM, an explicit write is needed via i40e_aq_mac_address_write() and i40e_aq_add_macvlan() invocation. The I40E_FLAG_PF_MAC flag in the platform-private i40e_pf structure tracks whether a platform-specific mac address was found, in which case calls to i40e_aq_mac_address_write() and i40e_aq_add_macvlan() will be triggered. Reviewed-by: Martin K. Petersen Signed-off-by: Sowmini Varadhan Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 90 +++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) commit efd8e39acc51cafe7dbc656ba63eea9034238ee7 Author: Mitch Williams Date: Tue Dec 22 15:34:43 2015 -0800 i40e: allow zero MAC address for VFs Allow the user to specify a zero MAC address for VFs. This removes the existing MAC address and allows the VF to use a random address. Libvirt does this normally when removing a VF from a VM. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2d166c304065c57925278a69309f15a6a65eff97 Author: Mitch Williams Date: Tue Dec 22 15:34:42 2015 -0800 i40e: change log messages and error returns When VFs are being reset, there is a brief window of time when they cannot be configured because they don't have a VSI to configure. If a script is quick, it can fall through that window. To avoid defenestration, log a useful error message and return -EAGAIN. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 42e0ed0d454c6ad7be67f2c18828391ecfdc9a62 Author: Hante Meuleman Date: Tue Jan 5 11:05:50 2016 +0100 brcmfmac: Do not handle link downs for ibss. Sometimes on module reload and reconnect to ibss a deauth from other station can be received. This is treated as a link down but for ibss this is wrong. It will close the interface and no data is possible. Ignore the firmware generated link down events in ibss mode, as ibss is always teared down by cfg80211. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 5ce96c0808ac8ad82f70b156ceb77ec2008c82e3 Author: Arend van Spriel Date: Tue Jan 5 11:05:49 2016 +0100 brcmfmac: use jiffies for timeout in btcoex The btcoex uses a timeout which was in milliseconds and got converted to jiffies upon using timer api. Instead, convert it to jiffies and treat it as such further. Reviewed-by: Hante Meuleman Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 63ce3d5db09324b56b739bfde5704799b0d6fd89 Author: Arend van Spriel Date: Tue Jan 5 11:05:48 2016 +0100 brcmfmac: use msecs_to_jiffies() in macro definitions Instead to having macro definition for millisecond timeout have the definition directly in jiffies. This makes the unit of the value immediately clear and may result in code that is bit more compact. Reviewed-by: Hante Meuleman Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 2 ++ .../net/wireless/broadcom/brcm80211/brcmfmac/core.c | 4 ++-- .../net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 18 +++++++++--------- .../net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 7 +++---- .../net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 18 ++++++++---------- .../net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 5 ++--- 9 files changed, 31 insertions(+), 33 deletions(-) commit 4011fc49969019eb5e20824285831d873e885f77 Author: Arend van Spriel Date: Tue Jan 5 11:05:47 2016 +0100 brcmfmac: change brcmf_sdio_wd_timer() prototype The function brcmf_sdio_wd_timer() has wdtick parameter. However, it is only called with two values and as such the parameter is replaced with boolean value indicating the timer should be active or not. Reviewed-by: Hante Meuleman Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 33 ++++++++-------------- .../wireless/broadcom/brcm80211/brcmfmac/sdio.h | 2 +- 2 files changed, 13 insertions(+), 22 deletions(-) commit 5419f7f17d5b70a9b65ec849da69bb5f7253b863 Author: Hante Meuleman Date: Tue Jan 5 11:05:46 2016 +0100 brcmfmac: Reshuffle functions to avoid forward declarations Function prototype forward declarations are to be avoided. This patch shuffles some of the functions so the forward declarations can be removed. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 1090 ++++++++++---------- 1 file changed, 537 insertions(+), 553 deletions(-) commit 3021ad9a4f009265e6063e617fb91306980af16c Author: Hante Meuleman Date: Tue Jan 5 11:05:45 2016 +0100 brcmfmac: Add wowl net detect support With wowl net detect it becomes possible to scan for specific ssids and wakeup once found. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 142 +++++++++++++++++++-- .../broadcom/brcm80211/brcmfmac/cfg80211.h | 27 +++- .../broadcom/brcm80211/brcmfmac/fwil_types.h | 2 + 3 files changed, 155 insertions(+), 16 deletions(-) commit ff1cab374ad98f4b9f408525ca9c08992b4ed784 Author: Geert Uytterhoeven Date: Tue Jan 5 19:36:37 2016 +0100 serial: sh-sci: Remove cpufreq notifier to fix crash/deadlock The BSP team noticed that there is spin/mutex lock issue on sh-sci when CPUFREQ is used. The issue is that the notifier function may call mutex_lock() while the spinlock is held, which can lead to a BUG(). This may happen if CPUFREQ is changed while another CPU calls clk_get_rate(). Taking the spinlock was added to the notifier function in commit e552de2413edad1a ("sh-sci: add platform device private data"), to protect the list of serial ports against modification during traversal. At that time the Common Clock Framework didn't exist yet, and clk_get_rate() just returned clk->rate without taking a mutex. Note that since commit d535a2305facf9b4 ("serial: sh-sci: Require a device per port mapping."), there's no longer a list of serial ports to traverse, and taking the spinlock became superfluous. To fix the issue, just remove the cpufreq notifier: 1. The notifier doesn't work correctly: all it does is update stored clock rates; it does not update the divider in the hardware. The divider will only be updated when calling sci_set_termios(). I believe this was broken back in 2004, when the old drivers/char/sh-sci.c driver (where the notifier did update the divider) was replaced by drivers/serial/sh-sci.c (where the notifier just updated port->uartclk). Cfr. full-history-linux commits 6f8deaef2e9675d9 ("[PATCH] sh: port sh-sci driver to the new API") and 3f73fe878dc9210a ("[PATCH] Remove old sh-sci driver"). 2. On modern SoCs, the sh-sci parent clock rate is no longer related to the CPU clock rate anyway, so using a cpufreq notifier is futile. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) commit f658f21c65d1d8a8c93d1a6505e86c285bb7897e Merge: c93a599 192d367 Author: Greg Kroah-Hartman Date: Thu Jan 7 21:04:46 2016 -0800 Merge branch 'scif-clk-sck-brg-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into tty-next Geert writes: Summary: - Clean up the naming of clocks in the sh-sci driver and its DT bindings, - Add support for the optional external clock on (H)SCI(F), where this pin can serve as a clock input, - Add support for the optional clock sources for the Baud Rate Generator for External Clock (BRG), as found on some SCIF variants and on HSCIF. commit d63c7dd5bcb9441af0526d370c43a65ca2c980d9 Author: Insu Yun Date: Wed Jan 6 12:44:01 2016 -0500 ipr: Fix out-of-bounds null overwrite Return value of snprintf is not bound by size value, 2nd argument. (https://www.kernel.org/doc/htmldocs/kernel-api/API-snprintf.html). Return value is number of printed chars, can be larger than 2nd argument. Therefore, it can write null byte out of bounds ofbuffer. Since snprintf puts null, it does not need to put additional null byte. Signed-off-by: Insu Yun Reviewed-by: Shane Seymour Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9055082fb100cc66e20c048251d05159f5f2cfba Author: Mike Christie Date: Thu Jan 7 16:34:05 2016 -0600 scsi: add Synology to 1024 sector blacklist Another iscsi target that cannot handle large IOs, but does not tell us a limit. The Synology iSCSI targets report: Block limits VPD page (SBC): Write same no zero (WSNZ): 0 Maximum compare and write length: 0 blocks Optimal transfer length granularity: 0 blocks Maximum transfer length: 0 blocks Optimal transfer length: 0 blocks Maximum prefetch length: 0 blocks Maximum unmap LBA count: 0 Maximum unmap block descriptor count: 0 Optimal unmap granularity: 0 Unmap granularity alignment valid: 0 Unmap granularity alignment: 0 Maximum write same length: 0x0 blocks and the size of the command it can handle seems to depend on how much memory it can allocate at the time. This results in IO errors when handling large IOs. This patch just has us use the old 1024 default sectors for this target by adding it to the scsi blacklist. We do not have good contacs with this vendors, so I have not been able to try and fix on their side. I have posted this a long while back, but it was not merged. This version just fixes it up for merge/patch failures in the original version. Reported-by: Ancoron Luciferis Reported-by: Michael Meyers Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen Cc: # 4.1+ drivers/scsi/scsi_devinfo.c | 1 + 1 file changed, 1 insertion(+) commit 7f3697e24dc3820b10f445a4a7d914fc356012d1 Author: Jeff Layton Date: Thu Jan 7 16:38:10 2016 -0500 locks: fix unlock when fcntl_setlk races with a close Dmitry reported that he was able to reproduce the WARN_ON_ONCE that fires in locks_free_lock_context when the flc_posix list isn't empty. The problem turns out to be that we're basically rebuilding the file_lock from scratch in fcntl_setlk when we discover that the setlk has raced with a close. If the l_whence field is SEEK_CUR or SEEK_END, then we may end up with fl_start and fl_end values that differ from when the lock was initially set, if the file position or length of the file has changed in the interim. Fix this by just reusing the same lock request structure, and simply override fl_type value with F_UNLCK as appropriate. That ensures that we really are unlocking the lock that was initially set. While we're there, make sure that we do pop a WARN_ON_ONCE if the removal ever fails. Also return -EBADF in this event, since that's what we would have returned if the close had happened earlier. Cc: Alexander Viro Cc: Fixes: c293621bbf67 (stale POSIX lock handling) Reported-by: Dmitry Vyukov Signed-off-by: Jeff Layton Acked-by: "J. Bruce Fields" fs/locks.c | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) commit 35f8679f577ae5673a778598bcbe7b45cbec8923 Author: Dmitry Torokhov Date: Thu Jan 7 15:06:51 2016 -0800 Input: omap-keypad - remove dead check Commit da1f026b532ce944d74461497dc6d8c16456466e ("Keyboard: omap-keypad: use matrix_keypad.h") switched the driver to use matrix keypad infrastructure, which made array of keycodes to be unsigned short, and caused the test for negativity never trigger. This leads to the following static checker warning: drivers/input/keyboard/omap-keypad.c:158 omap_kp_tasklet() warn: 'keycodes[]' is never negative. Given that we did not care about this check for a few years already let's simply remove it. Reported-by: Dan Carpenter Acked-by: Aaro Koskinen Acked-by: Tony Lindgren Signed-off-by: Dmitry Torokhov drivers/input/keyboard/omap-keypad.c | 8 -------- 1 file changed, 8 deletions(-) commit 3b7474ec0d7150044f91e3af460067f79d466522 Author: Dave Gerlach Date: Thu Jan 7 11:13:34 2016 -0800 Input: ti_am335x_tsc - fix HWPEN interrupt handling Remove write to REG_IRQCLR and REG_IRQWAKEUP in interrupt handler for IRQENB_HW_PEN as the resume handler should and does clear REG_IRQWAKEUP. IRQENB_HW_PEN bit is set in irqclr so that all interrupts get cleared later so let IRQENB_HW_PEN be cleared by that. Without this patch wakeup events from TSC_ADC do not work because pending interrupts in TSC_ADC were causing HW_PEN interrupt, needed for wake from suspend modes, to get disabled immediately by IRQ handler after being enabled and preventing wake from happening. Signed-off-by: Dave Gerlach Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ti_am335x_tsc.c | 2 -- 1 file changed, 2 deletions(-) commit ed6dc538e5a36a331b6256d54f435c80f6715460 Author: Tomas Winkler Date: Thu Jan 7 14:46:38 2016 +0200 mei: fix fasync return value on error fasync should return a negative value on error and not poll mask POLLERR. Cc: # 4.3+ Cc: Al Viro Reported-by: Al Viro Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e35438196c6a1d8b206471d51e80c380e80e047b Author: Dave Chinner Date: Fri Jan 8 11:28:49 2016 +1100 xfs: bmapbt checking on debug kernels too expensive For large sparse or fragmented files, checking every single entry in the bmapbt on every operation is prohibitively expensive. Especially as such checks rarely discover problems during normal operations on high extent coutn files. Our regression tests don't tend to exercise files with hundreds of thousands to millions of extents, so mostly this isn't noticed. However, trying to run things like xfs_mdrestore of large filesystem dumps on a debug kernel quickly becomes impossible as the CPU is completely burnt up repeatedly walking the sparse file bmapbt that is generated for every allocation that is made. Hence, if the file has more than 10,000 extents, just don't bother with walking the tree to check it exhaustively. The btree code has checks that ensure that the newly inserted/removed/modified record is correctly ordered, so the entrie tree walk in thses cases has limited additional value. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 121e213eabad66c0453904d76e3eda193958acbd Author: Dave Chinner Date: Fri Jan 8 11:28:35 2016 +1100 xfs: add tracepoints to readpage calls This allows us to see page cache driven readahead in action as it passes through XFS. This helps to understand buffered read throughput problems such as readahead IO IO sizes being too small for the underlying device to reach max throughput. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Signed-off-by: Dave Chinner fs/xfs/xfs_aops.c | 2 ++ fs/xfs/xfs_trace.h | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit e3345db85068ddb937fc0ba40dfc39c293dad977 Author: Tomeu Vizoso Date: Thu Jan 7 16:46:15 2016 +0100 USB / PM: Allow USB devices to remain runtime-suspended when sleeping Have dev_pm_ops.prepare return 1 for USB devices and ports so that USB devices can remain runtime-suspended when the system goes to a sleep state, if their wakeup state is correct and they have runtime PM enabled. Signed-off-by: Tomeu Vizoso Reviewed-by: Ulf Hansson Acked-by: Alan Stern Signed-off-by: Rafael J. Wysocki drivers/usb/core/port.c | 6 ++++++ drivers/usb/core/usb.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit aa8e54b559479d0cb7eb632ba443b8cacd20cd4b Author: Tomeu Vizoso Date: Thu Jan 7 16:46:14 2016 +0100 PM / sleep: Go direct_complete if driver has no callbacks If a suitable prepare callback cannot be found for a given device and its driver has no PM callbacks at all, assume that it can go direct to complete when the system goes to sleep. The reason for this is that there's lots of devices in a system that do no PM at all and there's no reason for them to prevent their ancestors to do direct_complete if they can support it. Signed-off-by: Tomeu Vizoso Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/dd.c | 3 +++ drivers/base/power/common.c | 3 +++ drivers/base/power/domain.c | 2 ++ drivers/base/power/main.c | 35 +++++++++++++++++++++++++++++++++++ drivers/base/power/power.h | 3 +++ include/linux/pm.h | 1 + 6 files changed, 47 insertions(+) commit 989561de9b5112999475b406557d9c7e9e59c041 Author: Tomeu Vizoso Date: Thu Jan 7 16:46:13 2016 +0100 PM / Domains: add setter for dev.pm_domain Adds a function that sets the pointer to dev_pm_domain in struct device and that warns if the device has already finished probing. The reason why we want to enforce that is because in the general case that can cause problems and also that we can simplify code quite a bit if we can always assume that. This patch also changes all current code that directly sets the dev.pm_domain pointer. Signed-off-by: Tomeu Vizoso Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki arch/arm/mach-omap2/omap_device.c | 7 ++++--- drivers/acpi/acpi_lpss.c | 5 ++++- drivers/acpi/device_pm.c | 5 +++-- drivers/base/power/clock_ops.c | 5 +++-- drivers/base/power/common.c | 21 +++++++++++++++++++++ drivers/base/power/domain.c | 6 ++++-- drivers/gpu/vga/vga_switcheroo.c | 11 ++++++----- drivers/misc/mei/pci-me.c | 5 +++-- drivers/misc/mei/pci-txe.c | 5 +++-- include/linux/pm_domain.h | 3 +++ 10 files changed, 54 insertions(+), 19 deletions(-) commit 6b9cb42752dafba3761dde0002ca58ca518b6311 Author: Tomeu Vizoso Date: Thu Jan 7 16:46:12 2016 +0100 device core: add device_is_bound() Adds a function that tells whether a device is already bound to a driver. This is needed to warn when there is an attempt to change the PM domain of a device that has finished probing already. The reason why we want to enforce that is because in the general case that can cause problems and also that we can simplify code quite a bit if we can always assume that. Signed-off-by: Tomeu Vizoso Reviewed-by: Ulf Hansson Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki drivers/base/dd.c | 18 ++++++++++++++++-- include/linux/device.h | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) commit c4e4d631feb3be4ddf885e647127fddebb450334 Merge: 4295733 d35818a Author: Rafael J. Wysocki Date: Fri Jan 8 01:11:49 2016 +0100 Merge branch 'acpi-soc' into pm-core commit d35818a9153e7f230fd65dc935e001a1b9bc08ff Author: Andy Shevchenko Date: Thu Jan 7 12:49:31 2016 +0200 PM / clk: don't leave clocks enabled when driver not bound There is a new notification BUS_NOTIFY_DRIVER_NOT_BOUND that is issued when driver fails during binding. In such case pm_clk_notify(), when PM_CLK=n, leaves clocks enabled. Undo operations that have been done in BUS_NOTIFY_BIND_DRIVER case. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/base/power/clock_ops.c | 1 + 1 file changed, 1 insertion(+) commit abaee091a18c19ccd86feb1c8374585d82e96777 Merge: a2746fb 3f8d6f2 Author: James Bottomley Date: Thu Jan 7 15:51:13 2016 -0800 Merge branch 'jejb-scsi' into misc commit daaadd2283eb8bcae3b866592a9a1c807cc60605 Merge: 210c7c1 13331a5 Author: Trond Myklebust Date: Thu Jan 7 18:45:36 2016 -0500 Merge branch 'bugfixes' * bugfixes: SUNRPC: Fixup socket wait for memory SUNRPC: Fix a missing break in rpc_anyaddr() pNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh() NFS: Fix attribute cache revalidation NFS: Ensure we revalidate attributes before using execute_ok() NFS: Flush reclaim writes using FLUSH_COND_STABLE NFS: Background flush should not be low priority NFSv4.1/pnfs: Fixup an lo->plh_block_lgets imbalance in layoutreturn NFSv4: Don't perform cached access checks before we've OPENed the file NFS: Allow the combination pNFS and labeled NFS NFS42: handle layoutstats stateid error nfs: Fix race in __update_open_stateid() nfs: fix missing assignment in nfs4_sequence_done tracepoint commit 210c7c1750fdf769647d1d526c9ea34c412c9eee Author: Benjamin Coddington Date: Wed Jan 6 10:40:18 2016 -0500 NFS: Use wait_on_atomic_t() for unlock after readahead The use of wait_on_atomic_t() for waiting on I/O to complete before unlocking allows us to git rid of the NFS_IO_INPROGRESS flag, and thus the nfs_iocounter's flags member, and finally the nfs_iocounter altogether. The count of I/O is moved to the lock context, and the counter increment/decrement functions become simple enough to open-code. Signed-off-by: Benjamin Coddington [Trond: Fix up conflict with existing function nfs_wait_atomic_killable()] Signed-off-by: Trond Myklebust fs/nfs/file.c | 2 +- fs/nfs/inode.c | 18 ++++++++++++------ fs/nfs/internal.h | 9 ++------- fs/nfs/pagelist.c | 48 +++++++----------------------------------------- fs/nfs/write.c | 8 -------- include/linux/nfs_fs.h | 8 +------- 6 files changed, 23 insertions(+), 70 deletions(-) commit c93a59938c11f447ff2964ab3c317311778edf66 Author: Peter Ujfalusi Date: Fri Dec 18 15:00:49 2015 +0200 serial: 8250: of: Fix the driver and actually compile the 8250_of The 8250_of never compiled since in the Kconfig we have SERIAL_OF_PLATFORM but in the makefile we expect to have SERIAL_8250_OF... When the 8250_of.c is actually compiled we will have two errors: missing linux/nwpserial.h and 8250/8250.h. Fix those as well at the same time when enable the compilation of the driver. Signed-off-by: Peter Ujfalusi Fixes: afd7f88f1577 ("serial: 8250: move of_serial code to 8250 directory") Reported-by: Guenter Roeck CC: Arnd Bergmann Acked-by: Arnd Bergmann Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 3 +-- drivers/tty/serial/8250/Makefile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit de7ee9a20c7f617cbc5091e84855afcdeb19ba60 Author: Bart Van Assche Date: Tue Jan 5 14:47:58 2016 +0100 tcm_fc: Wait for command completion before freeing a session This patch avoids that the following kernel crash can occur with later patches in this patch series: general protection fault: 0000 [#1] SMP CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.3.0-rc1-debug+ #1 Workqueue: tmr-fileio target_tmr_work [target_core_mod] Call Trace: [] lock_acquire+0x65/0x90 [] _raw_spin_lock_irqsave+0x4b/0x60 [] target_release_cmd_kref+0x2a/0xa0 [target_core_mod] [] target_put_sess_cmd+0x28/0x50 [target_core_mod] [] core_tmr_lun_reset+0x390/0x640 [target_core_mod] [] target_tmr_work+0x80/0xd0 [target_core_mod] [] process_one_work+0x19d/0x430 [] worker_thread+0x10f/0x460 [] kthread+0xea/0x100 [] ret_from_fork+0x3f/0x70 Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Andy Grover Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_sess.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit f0a8afecb29ad0005e7e946228a0ef5422058b85 Author: Bart Van Assche Date: Tue Jan 5 14:47:17 2016 +0100 target: Fix a memory leak in target_dev_lba_map_store() strsep() modifies its first argument. Make the pointer passed to kfree() match the return value of kmalloc(). Fixes: 229d4f112fd6 (commit "target_core_alua: Referrals configfs integration") Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5261d86c5ce5726f097ed5e4ea28c40684ebf8e4 Author: Bart Van Assche Date: Tue Jan 5 14:46:39 2016 +0100 target: Support aborting tasks with a 64-bit tag Avoid truncating the tag argument of target_submit_tmr() to a 32-bit number if the caller passes a 64-bit number. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Andy Grover Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 2 +- include/target/target_core_fabric.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 10c17c682691271777809373d9daaedd5810409e Author: Bart Van Assche Date: Tue Jan 5 14:46:03 2016 +0100 usb/gadget: Remove set-but-not-used variables Avoid that building with W=1 triggers compiler warnings about set-but-not-used variables. Signed-off-by: Bart Van Assche Cc: Felipe Balbi Cc: Andy Grover Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/usb/gadget/function/f_tcm.c | 16 ---------------- 1 file changed, 16 deletions(-) commit dba5ccc7a67713fccb7726057d8df826672a7257 Author: Bart Van Assche Date: Tue Jan 5 14:45:03 2016 +0100 target: Remove an unused variable The num_node_acls member in struct se_portal_group is modified by several functions but is never read. Hence remove it. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Andy Grover Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/target/target_core_tpg.c | 3 --- drivers/target/target_core_transport.c | 1 - include/target/target_core_base.h | 2 -- 3 files changed, 6 deletions(-) commit 9b3118ce8a942706f65cf5de82a6de967a9fbe74 Author: Bart Van Assche Date: Tue Jan 5 14:44:21 2016 +0100 target: Fix indentation in target_core_configfs.c Detected by smatch. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Andy Grover Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81ee28de860095cc0c063b92eea53cb97771f796 Author: Sheng Yang Date: Mon Dec 28 11:57:39 2015 -0800 target/user: Allow user to set block size before enabling device The capability of setting hw_block_size was added along with 9c1cd1b68 "target/user: Only support full command pass-through", though default setting override the user specified value during the enabling of device, which called by target_configure_device() to set block_size matching hw_block_size, result in user not able to set different block size other than default 512. This patch would use existing hw_block_size value if already set, otherwise it would be set to default value(512). Update: Fix the coding style issue. (Drop unnecessary re-export of dev->dev_attrib.block_size - nab) Signed-off-by: Sheng Yang Cc: Andy Grover Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 373a4cd7378220d3c5a69fd369b1d78fee3207b2 Author: Nicholas Bellinger Date: Wed Jan 6 10:25:43 2016 -0800 iser-target: Fix non negative ERR_PTR isert_device_get usage As reported by Dan, isert_create_device_ib_res() failure within isert_device_get() can potentially return a postive value, resulting in ERR_PTR() triggering a NULL pointer dereference. Caught by the static checker: drivers/infiniband/ulp/isert/ib_isert.c:423 isert_device_get() error: passing non negative 1 to ERR_PTR Reported-by: Dan Carpenter Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/isert/ib_isert.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 091b70623e2b9caee1c27190c3a5614b3563a672 Author: Andy Grover Date: Mon Dec 21 18:48:05 2015 -0800 target/fcoe: Add tag support to tcm_fc Add the 'tag' attribute to FC node ACLs. This is not used by kernel code, but gives userspace a place to store a tag string. This is used to provide support for initiator groups in targetcli. Just copy iscsi's implementation for tcm_fc. A few other fabrics that support acls also need this, to be submitted separately after the holidays. Signed-off-by: Andy Grover Signed-off-by: Nicholas Bellinger drivers/target/tcm_fc/tfc_conf.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 3bb67df5b5f880a1c9c1086308cf2b981d824da5 Author: Dilip Kumar Uppugandla Date: Thu Dec 17 14:57:11 2015 -0500 qla2xxx: Check for online flag instead of active reset when transmitting responses Driver has following initialization sequence for Target mode 1. Driver initialization starts 2. ISP Abort is scheduled when the target is enabled. qla2xxx [0000:04:00.0]-4807:25: ISP abort scheduled qla2xxx [0000:04:00.0]-00af:25: Performing ISP error recovery - ha=ffff880caa9e0000. 3. DPC thread starts the ISP Abort 4. While DPC is resetting the chip and initializing the firmware, we get async events from the firmware about P2P mode, LOOP UP and PORT UPDATE. 5. PRLI from a initiator is delivered to us followed by a PLOGI and then a SCSI command which creates a session. 6. If the SCSI command is a WRITE in this case, we issue XFR RDY and it gets dropped as can be seen with messages RESET-XFR because ISP Abort is still active qla2xxx [0000:04:00.0]-e902:25: RESET-XFR active/old-count/new-count = 1/1/1. 7. If the SCSI command is a READ, we issue RESPONSE and they get dropped as well because Abort is still active. qla2xxx [0000:04:00.0]-e901:25: RESET-RSP active/old-count/new-count = 1/1/1 8. Now eventually, ISP Abort finishes clearing the DPC flags. qla2xxx [0000:04:00.0]-8822:25: qla2x00_abort_isp succeeded. qla2xxx [0000:04:00.0]-4808:25: ISP abort end. 9. Since we dropped SCSI commands silently (without any responses sent to the initiator) initiator waits for a SCSI timeout (which is 60 seconds in our case), Sends an ABTS which fails since there no se_cmd found for the tag that ABTS is referencing as the commands were cleaned up in Step 6 and 7. 10. Initiator send an IO after the ABTS which succeed fine. To fix the above case, the following changes have been made: - To prevent target from dropping commands silently, use the online flag instead to check for an active chip reset. Once the port is online during a chip reset phase, we are good to process the commands. - Clean up qla2x00_restart_isp to not set the online flag and process ATIO as it is unnecessary. During a chip reset, interrupts are enabled only after setting the online flag to 1, so ATIO's won't be missed and hence no need to process ATIO's after setting the online flag. Signed-off-by: Dilip Kumar Uppugandla Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_init.c | 34 ++++++++++++++++++++-------------- drivers/scsi/qla2xxx/qla_target.c | 34 +++++++++++++++++----------------- 2 files changed, 37 insertions(+), 31 deletions(-) commit e7b42e335f129f0685ab94bcd34104163df38323 Author: Quinn Tran Date: Thu Dec 17 14:57:09 2015 -0500 qla2xxx: Set all queues to 4k set ATIO/Request/Response Queues and Default number of outstanding command to 4k. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 3 ++- drivers/scsi/qla2xxx/qla_os.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 481ce73342b190987c2553e8df0075c3df23632e Author: Quinn Tran Date: Thu Dec 17 14:57:08 2015 -0500 qla2xxx: Disable ZIO at start time. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 2f424b9b36ad7062e9ade41a9fb034d21a9e4e4b Author: Quinn Tran Date: Thu Dec 17 14:57:07 2015 -0500 qla2xxx: Move atioq to a different lock to reduce lock contention 99% of the time the ATIOQ has SCSI command. The other 1% of time is something else. Most of the time this interrupt does not need to hold the hardware_lock. We're moving the ATIO interrupt thread to a different lock to reduce lock contention. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 6 ++- drivers/scsi/qla2xxx/qla_isr.c | 44 +++++++++++++---- drivers/scsi/qla2xxx/qla_os.c | 2 + drivers/scsi/qla2xxx/qla_target.c | 99 +++++++++++++++++++++++++++++++++------ drivers/scsi/qla2xxx/qla_target.h | 4 +- 7 files changed, 129 insertions(+), 28 deletions(-) commit fb3269baf4ecc2ce6d17d4eb537080035bdf6d5b Author: Quinn Tran Date: Thu Dec 17 14:57:06 2015 -0500 qla2xxx: Add selective command queuing queue work element to specific process lessen cache miss Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_isr.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 13 ++++++++++++- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 ++-- drivers/target/target_core_transport.c | 5 ++++- include/target/target_core_base.h | 1 + 5 files changed, 20 insertions(+), 5 deletions(-) commit cdb898c52d1dfad4b4800b83a58b3fe5d352edde Author: Quinn Tran Date: Thu Dec 17 14:57:05 2015 -0500 qla2xxx: Add irq affinity notification Register to receive notification of when irq setting change occured. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 6 ++++ drivers/scsi/qla2xxx/qla_isr.c | 76 ++++++++++++++++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_target.c | 12 +++++++ 3 files changed, 93 insertions(+), 1 deletion(-) commit 7560151b6b3c1f4432c1c5b5b6496070d1f38484 Author: Quinn Tran Date: Thu Dec 17 14:57:04 2015 -0500 qla2xxx: Remove dependency on hardware_lock to reduce lock contention. Sessions management (add, deleted, modify) currently are serialized through the hardware_lock. Hardware_lock is a high traffic lock. This lock is accessed by both the transmit & receive sides. Sessions management is now moved off to another lock call sess_lock. This is done to reduce lock contention and increase traffic throughput. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_os.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 132 +++++++++++++++++++++++++------------ drivers/scsi/qla2xxx/tcm_qla2xxx.c | 28 ++++---- 4 files changed, 106 insertions(+), 56 deletions(-) commit 193b50b9d54a4fcb723a8005b29d8dd5518e3ae2 Author: Quinn Tran Date: Thu Dec 17 14:57:03 2015 -0500 qla2xxx: Replace QLA_TGT_STATE_ABORTED with a bit. Replace QLA_TGT_STATE_ABORTED state with a bit because the current state of the command is lost when an abort is requested by upper layer. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_target.c | 23 ++++++++++------------- drivers/scsi/qla2xxx/qla_target.h | 3 ++- 2 files changed, 12 insertions(+), 14 deletions(-) commit b7bd104e6f1c3be2bf881dc1ca7db40da3ee65fd Author: Alexei Potashnik Date: Thu Dec 17 14:57:02 2015 -0500 qla2xxx: Wait for all conflicts before ack'ing PLOGI Until now ack'ing of a new PLOGI has only been delayed if there was an existing session for the same WWN. Ack was released when the session deletion completed. If there was another WWN session with the same fc_id/loop_id pair (aka "conflicting session"), PLOGI was still ack'ed immediately. This potentially caused a problem when old session deletion logged fc_id/loop_id out of FW after new session has been established. Two work-arounds were attempted before: 1. Dropping PLOGIs until conflicting session goes away. 2. Detecting initiator being logged out of FW and issuing LOGO to force re-login. This patch introduces proper solution to the problem where PLOGI is held until either existing session with same WWN or any conflicting session goes away. Mechanism supports one session holding two PLOGI acks as well as one PLOGI ack being held by many sessions. Signed-off-by: Alexei Potashnik Acked-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_dbg.c | 4 +- drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_os.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 205 ++++++++++++++++++++++++++++++-------- drivers/scsi/qla2xxx/qla_target.h | 18 +++- 5 files changed, 180 insertions(+), 50 deletions(-) commit 71cdc07964651db51ddeea05245ac899357f0e71 Author: Alexei Potashnik Date: Thu Dec 17 14:57:01 2015 -0500 qla2xxx: Delete session if initiator is gone from FW 1. Initiator A is logged in with fc_id(1)/loop_id(1) 2. Initiator A re-logs in with fc_id(2)/loop_id(2) 3. Part of old session deletion async logoout for 1/1 is queued 4. Initiator B logs in with fc_id(1)/loop_id(1), starts passing data and creates session. 5. Async logo from 3 is processed by DPC and sent to FW Now initiator B has the session but is logged out from FW. This condition is detected first with CTIO error 29 at which point we should delete current session. During session deletion we will send LOGO to initiator to force re-login. Under rare circumstances initiator might be logged out of FW, not have driver session, but still think it's logged in. E.g. the above sequence plus session deletion due to re-config. Incoming commands will fail to create local session because initiator is not found in FW. In this case we also issue LOGO to initiator to force him re-login. Finally this patch fixes exchange leak when commands where received in logged out state. In this case loop_id must be set to FFFF when corresponding exchange is terminated. The patch modifies exchange termination to always use FFFF, since in certain scenarios it's impossible to tell whether command was received in logged in or logged out state. Signed-off-by: Alexei Potashnik Acked-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_os.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 108 ++++++++++++++++++++++++++++++++------ drivers/scsi/qla2xxx/qla_target.h | 9 ++++ 4 files changed, 104 insertions(+), 16 deletions(-) commit 6eb54715b54bb8324f3293e49635277652730e55 Author: Himanshu Madhani Date: Thu Dec 17 14:57:00 2015 -0500 qla2xxx: Added interface to send explicit LOGO. This patch adds interface to send explicit LOGO explicit LOGO using using ELS commands from driver. Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_attr.c | 36 ++++++++ drivers/scsi/qla2xxx/qla_dbg.c | 5 +- drivers/scsi/qla2xxx/qla_def.h | 19 +++- drivers/scsi/qla2xxx/qla_gbl.h | 2 + drivers/scsi/qla2xxx/qla_inline.h | 2 + drivers/scsi/qla2xxx/qla_iocb.c | 187 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_isr.c | 6 ++ 7 files changed, 253 insertions(+), 4 deletions(-) commit 03e8c680d9b3b68ddae648a6e2c91c381e90066f Author: Quinn Tran Date: Thu Dec 17 14:56:59 2015 -0500 qla2xxx: Add FW resource count in DebugFS. DebugFS now will show fw_resource_count node. FW Resource count Original TGT exchg count[0] current TGT exchg count[0] original Initiator Exchange count[2048] Current Initiator Exchange count[2048] Original IOCB count[2078] Current IOCB count[2067] MAX VP count[254] MAX FCF count[0] Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_def.h | 13 +++++++--- drivers/scsi/qla2xxx/qla_dfs.c | 50 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_gbl.h | 3 +-- drivers/scsi/qla2xxx/qla_init.c | 12 ++++----- drivers/scsi/qla2xxx/qla_mbx.c | 28 +++++++++------------ drivers/scsi/qla2xxx/qla_target.c | 4 +-- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- 7 files changed, 81 insertions(+), 31 deletions(-) commit ce1025cd4b8eb7afe07c3625f2ad080d8bee7cc4 Author: Himanshu Madhani Date: Thu Dec 17 14:56:58 2015 -0500 qla2xxx: Enable Target counters in DebugFS. Following counters are added in target mode to help debugging efforts. Target Counters qla_core_sbt_cmd = 0 qla_core_ret_sta_ctio = 0 qla_core_ret_ctio = 0 core_qla_que_buf = 0 core_qla_snd_status = 0 core_qla_free_cmd = 0 num alloc iocb failed = 0 num term exchange sent = 0 num Q full sent = 0 Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_def.h | 15 ++++++++++ drivers/scsi/qla2xxx/qla_dfs.c | 56 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_iocb.c | 1 + drivers/scsi/qla2xxx/qla_target.c | 7 +++++ drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 +++ 6 files changed, 84 insertions(+), 1 deletion(-) commit 2f56a7f1b5d8cf3d8bc84cc08dda09c991b698a7 Author: Himanshu Madhani Date: Thu Dec 17 14:56:57 2015 -0500 qla2xxx: Enable Exchange offload support. This patch enables Exchange offload support in Qlogic ISP. To enable exchange offload with Qlogic ISP24XX/25XX/26XX, set module parameter ql2xexchoffld to any non-zero number. This will alow ISP firmware to store exchange data structures used by firmware to host memory provided by driver. ISP firmware can supports upto 32k total active exchanges. Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_dbg.c | 9 +-- drivers/scsi/qla2xxx/qla_def.h | 12 +++- drivers/scsi/qla2xxx/qla_gbl.h | 5 ++ drivers/scsi/qla2xxx/qla_init.c | 7 +++ drivers/scsi/qla2xxx/qla_mbx.c | 118 ++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_os.c | 78 ++++++++++++++++++++++++++ 6 files changed, 222 insertions(+), 7 deletions(-) commit b0d6cabd355ae9c13c53680cfe8b5ae58a84d2c1 Author: Himanshu Madhani Date: Thu Dec 17 14:56:56 2015 -0500 qla2xxx: Enable Extended Logins support This patch enables Extended Logins support in Qlogic ISP. To enable extended login with Qlogic ISP24XX/25XX/26XX, set module parameter ql2xexlogins to any non-zero number. This will alow ISP firmware to store port database structure information of remote login sessions to host memory provided by driver. ISP firmware supports upto 16k total logins. Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Nicholas Bellinger drivers/scsi/qla2xxx/qla_dbg.c | 9 ++- drivers/scsi/qla2xxx/qla_def.h | 13 ++++- drivers/scsi/qla2xxx/qla_gbl.h | 7 +++ drivers/scsi/qla2xxx/qla_init.c | 7 +++ drivers/scsi/qla2xxx/qla_mbx.c | 119 ++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_os.c | 76 +++++++++++++++++++++++++ 6 files changed, 224 insertions(+), 7 deletions(-) commit 1b1fe542b6f010cf6bc7e1c92805e1c0e133e007 Author: Brian Norris Date: Wed Dec 9 14:50:29 2015 -0800 selftests: firmware: add empty string and async tests Now that we've added a 'trigger_async_request' knob to test the request_firmware_nowait() API, let's use it. Also add tests for the empty ("") string, since there have been a couple errors in that handling already. Since we now have real ways that the sysfs write might fail, let's add the appropriate check on the 'echo' lines too. Signed-off-by: Brian Norris Acked-by: Kees Cook Signed-off-by: Shuah Khan tools/testing/selftests/firmware/fw_filesystem.sh | 29 ++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 9fb6066d0de0353622ee572e2b0e979bd62bb657 Author: Woojung.Huh@microchip.com Date: Tue Jan 5 17:29:59 2016 +0000 net: lan78xx: Fix to write to OTP(One Time Programmable) per magic number. This patch fixes a bug writing to EEPROM in lan78xx_ethtool_set_eeprom() when asked to write to OTP. Signed-off-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit 24759daa018f0fc8cccebc89d3dee0953e73785a Merge: 1235817 c505a38 Author: David S. Miller Date: Thu Jan 7 16:26:36 2016 -0500 Merge branch 'macb-usrio-cap' Neil Armstrong says: ==================== Add new capability and macb DT variant The first patch introduces a new capability bit to disable usage of the USRIO register on platform not implementing it thus avoiding some external imprecise aborts on ARM based platforms. The two last patchs adds a new macb variant compatible name using the capability, the NP4 SoC uses this particular hardware configuration. v1: http://lkml.kernel.org/r/1449485914-12883-1-git-send-email-narmstrong@baylibre.com v2: http://lkml.kernel.org/r/1449582726-6148-1-git-send-email-narmstrong@baylibre.com v3: http://lkml.kernel.org/r/1451898103-21868-1-git-send-email-narmstrong@baylibre.com v4: http://lkml.kernel.org/r/1451900573-22657-1-git-send-email-narmstrong@baylibre.com v5: switch SoC name to non-generic NP4 name ==================== Signed-off-by: David S. Miller commit c505a3820f6138d6a96fe729a599e3bd062fa6e6 Author: Neil Armstrong Date: Tue Jan 5 14:39:18 2016 +0100 dt-bindings: net: macb: Add NP4 macb variant Add NP4 macb SoC variant. Signed-off-by: Neil Armstrong Acked-by: Nicolas Ferre Acked-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/macb.txt | 1 + 1 file changed, 1 insertion(+) commit e611b5b851e60b028807644fb12911bba0eb601c Author: Neil Armstrong Date: Tue Jan 5 14:39:17 2016 +0100 net: macb: Add NP4 macb config using USRIO_DISABLED Declare a new NP4 SoC variant having USRIO_DISABLED as capability bit. Signed-off-by: Neil Armstrong Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ce721a70219720f4c574a7e97f912c71a3510369 Author: Neil Armstrong Date: Tue Jan 5 14:39:16 2016 +0100 net: ethernet: cadence-macb: Add disabled usrio caps On some platforms, the macb integration does not use the USRIO register to configure the (R)MII port and clocks. When the register is not implemented and the MACB error signal is connected to the bus error, reading or writing to the USRIO register can trigger some Imprecise External Aborts on ARM platforms. Signed-off-by: Neil Armstrong Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 27 +++++++++++++++------------ drivers/net/ethernet/cadence/macb.h | 1 + 2 files changed, 16 insertions(+), 12 deletions(-) commit 8cdc7c5b00d945a3c823fc4277af304abb9cb43d Author: Filipe Manana Date: Wed Jan 6 22:42:35 2016 +0000 Btrfs: fix fitrim discarding device area reserved for boot loader's use As of the 4.3 kernel release, the fitrim ioctl can now discard any region of a disk that is not allocated to any chunk/block group, including the first megabyte which is used for our primary superblock and by the boot loader (grub for example). Fix this by not allowing to trim/discard any region in the device starting with an offset not greater than min(alloc_start_mount_option, 1Mb), just as it was not possible before 4.3. A reproducer test case for xfstests follows. seq=`basename $0` seqres=$RESULT_DIR/$seq echo "QA output created by $seq" tmp=/tmp/$$ status=1 # failure is the default! trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { cd / rm -f $tmp.* } # get standard environment, filters and checks . ./common/rc . ./common/filter # real QA test starts here _need_to_be_root _supported_fs btrfs _supported_os Linux _require_scratch rm -f $seqres.full _scratch_mkfs >>$seqres.full 2>&1 # Write to the [0, 64Kb[ and [68Kb, 1Mb[ ranges of the device. These ranges are # reserved for a boot loader to use (GRUB for example) and btrfs should never # use them - neither for allocating metadata/data nor should trim/discard them. # The range [64Kb, 68Kb[ is used for the primary superblock of the filesystem. $XFS_IO_PROG -c "pwrite -S 0xfd 0 64K" $SCRATCH_DEV | _filter_xfs_io $XFS_IO_PROG -c "pwrite -S 0xfd 68K 956K" $SCRATCH_DEV | _filter_xfs_io # Now mount the filesystem and perform a fitrim against it. _scratch_mount _require_batched_discard $SCRATCH_MNT $FSTRIM_PROG $SCRATCH_MNT # Now unmount the filesystem and verify the content of the ranges was not # modified (no trim/discard happened on them). _scratch_unmount echo "Content of the ranges [0, 64Kb] and [68Kb, 1Mb[ after fitrim:" od -t x1 -N $((64 * 1024)) $SCRATCH_DEV od -t x1 -j $((68 * 1024)) -N $((956 * 1024)) $SCRATCH_DEV status=0 exit Reported-by: Vincent Petry Reported-by: Andrei Borzenkov Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109341 Fixes: 499f377f49f0 (btrfs: iterate over unused chunk space in FITRIM) Cc: stable@vger.kernel.org # 4.3+ Signed-off-by: Filipe Manana fs/btrfs/volumes.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b9e24d30f66bafae9a3949250740f69239126e9f Merge: 954e953 d7b53fd Author: Arnd Bergmann Date: Thu Jan 7 22:11:36 2016 +0100 Merge Rockchip pmdomain fix into next/defconfig Commit e330eb86ba ("ARM: multi_v7_defconfig: enable Rockchip io-domain driver") turns on a driver that was broken on 4.4-rc3 and fixed in 4.4-rc4. This backmerges in the bugfix from mainline to keep the defconfig branch testable by itself. * commit 'd7b53fd9e37a': drm/rockchip: vop: Correct enabled clocks during setup drm/i915: Don't override output type for DDI HDMI drm/i915: Don't compare has_drrs strictly in pipe config drm/i915: Mark uneven memory banks on gen4 desktop as unknown swizzling commit aa8a7219d75a0bcbdfcf5c2b8b26573936baf369 Merge: 236c52c 62d7476 Author: Kalle Valo Date: Thu Jan 7 23:04:07 2016 +0200 Merge tag 'iwlwifi-next-for-kalle-2016-01-07_2' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * bug fixes and improvements for firmware debug system (Golan and myself) * fixes for D0i3 (Eliad) * prevent muliple stations with the same MAC address * advertise support for Rx A-MSDU in A-MPDU * scan related fixes * support -20.ucode * fix WoWLAN for iwldvm * preparations towards multiple Rx queues * platform power improvements for GO mode when no clients are associated commit 5156dca34a3e1e1edac2d0dabf43d8632909b7aa Author: Qiu Peiyang Date: Fri Dec 25 14:46:00 2015 +0800 ftrace: Fix the race between ftrace and insmod We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call ftrace_run_update_code=>ftrace_arch_code_modify_prepare =>set_all_modules_text_rw, to change all modules as RW. Since the new module is at MODULE_STATE_UNFORMED, the text attribute is not changed. Then, the 2nd thread goes ahead to change codes. However, load_module continues to call complete_formation=>set_section_ro_nx, then 2nd thread would fail when probing the module's TEXT. The patch fixes it by using notifier to delay the enabling of ftrace records to the time when module is at state MODULE_STATE_COMING. Link: http://lkml.kernel.org/r/567CE628.3000609@intel.com Signed-off-by: Qiu Peiyang Signed-off-by: Zhang Yanmin Signed-off-by: Steven Rostedt kernel/trace/ftrace.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 236c52cac41a9168525bf7c22accdd12f8069a35 Merge: 7683fe0 9d5db23 Author: Kalle Valo Date: Thu Jan 7 22:54:46 2016 +0200 Merge ath-next from ath.git No major changes to list. commit 715780ae4bb76d6fd2f20eb78e2a9ba9769a6cdc Author: Brian Norris Date: Wed Dec 9 14:50:28 2015 -0800 firmware: actually return NULL on failed request_firmware_nowait() The kerneldoc for request_firmware_nowait() says that it may call the provided cont() callback with @fw == NULL, if the firmware request fails. However, this is not the case when called with an empty string (""). This case is short-circuited by the 'name[0] == '\0'' check introduced in commit 471b095dfe0d ("firmware_class: make sure fw requests contain a name"), so _request_firmware() never gets to set the fw to NULL. Noticed while using the new 'trigger_async_request' testing hook: # printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request [10553.726178] test_firmware: loading '' [10553.729859] test_firmware: loaded: 995209091 # printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request [10733.676184] test_firmware: loading '' [10733.679855] Unable to handle kernel NULL pointer dereference at virtual address 00000004 [10733.687951] pgd = ec188000 [10733.690655] [00000004] *pgd=00000000 [10733.694240] Internal error: Oops: 5 [#1] SMP ARM [10733.698847] Modules linked in: btmrvl_sdio btmrvl bluetooth sbs_battery nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables asix usbnet mwifiex_sdio mwifiex cfg80211 jitterentropy_rng drbg joydev snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device ppp_async ppp_generic slhc tun [10733.725670] CPU: 0 PID: 6600 Comm: bash Not tainted 4.4.0-rc4-00351-g63d0877 #178 [10733.733137] Hardware name: Rockchip (Device Tree) [10733.737831] task: ed24f6c0 ti: ee322000 task.ti: ee322000 [10733.743222] PC is at do_raw_spin_lock+0x18/0x1a0 [10733.747831] LR is at _raw_spin_lock+0x18/0x1c [10733.752180] pc : [] lr : [] psr: a00d0013 [10733.752180] sp : ee323df8 ip : ee323e20 fp : ee323e1c [10733.763634] r10: 00000051 r9 : b6f18000 r8 : ee323f80 [10733.768847] r7 : c089cebc r6 : 00000001 r5 : 00000000 r4 : ec0e6000 [10733.775360] r3 : dead4ead r2 : c06bd140 r1 : eef913b4 r0 : 00000000 [10733.781874] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [10733.788995] Control: 10c5387d Table: 2c18806a DAC: 00000051 [10733.794728] Process bash (pid: 6600, stack limit = 0xee322218) [10733.800549] Stack: (0xee323df8 to 0xee324000) [10733.804896] 3de0: ec0e6000 00000000 [10733.813059] 3e00: 00000001 c089cebc ee323f80 b6f18000 ee323e2c ee323e20 c054c204 c0065394 [10733.821221] 3e20: ee323e44 ee323e30 c02fec60 c054c1f8 ec0e7ec0 ec3fcfc0 ee323e5c ee323e48 [10733.829384] 3e40: c02fed08 c02fec48 c07dbf74 eeb05a00 ee323e8c ee323e60 c0253828 c02fecac [10733.837547] 3e60: 00000001 c0116950 ee323eac ee323e78 00000001 ec3fce00 ed2d9700 ed2d970c [10733.845710] 3e80: ee323e9c ee323e90 c02e873c c02537d4 ee323eac ee323ea0 c017bd40 c02e8720 [10733.853873] 3ea0: ee323ee4 ee323eb0 c017b250 c017bd00 00000000 00000000 f3e47a54 ec128b00 [10733.862035] 3ec0: c017b10c ee323f80 00000001 c000f504 ee322000 00000000 ee323f4c ee323ee8 [10733.870197] 3ee0: c011b71c c017b118 ee323fb0 c011bc90 becfa8d9 00000001 ec128b00 00000001 [10733.878359] 3f00: b6f18000 ee323f80 ee323f4c ee323f18 c011bc90 c0063950 ee323f3c ee323f28 [10733.886522] 3f20: c0063950 c0549138 00000001 ec128b00 00000001 ec128b00 b6f18000 ee323f80 [10733.894684] 3f40: ee323f7c ee323f50 c011bed8 c011b6ec c0135fb8 c0135f24 ec128b00 ec128b00 [10733.902847] 3f60: 00000001 b6f18000 c000f504 ee322000 ee323fa4 ee323f80 c011c664 c011be24 [10733.911009] 3f80: 00000000 00000000 00000001 b6f18000 b6e79be0 00000004 00000000 ee323fa8 [10733.919172] 3fa0: c000f340 c011c618 00000001 b6f18000 00000001 b6f18000 00000001 00000000 [10733.927334] 3fc0: 00000001 b6f18000 b6e79be0 00000004 00000001 00000001 8068a3f1 b6e79c84 [10733.935496] 3fe0: 00000000 becfa7dc b6de194d b6e20246 400d0030 00000001 7a4536e8 49bda390 [10733.943664] [] (do_raw_spin_lock) from [] (_raw_spin_lock+0x18/0x1c) [10733.951743] [] (_raw_spin_lock) from [] (fw_free_buf+0x24/0x64) [10733.959388] [] (fw_free_buf) from [] (release_firmware+0x68/0x74) [10733.967207] [] (release_firmware) from [] (trigger_async_request_store+0x60/0x124) [10733.976501] [] (trigger_async_request_store) from [] (dev_attr_store+0x28/0x34) [10733.985533] [] (dev_attr_store) from [] (sysfs_kf_write+0x4c/0x58) [10733.993437] [] (sysfs_kf_write) from [] (kernfs_fop_write+0x144/0x1a8) [10734.001689] [] (kernfs_fop_write) from [] (__vfs_write+0x3c/0xe4) After this patch: # printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request [ 32.126322] test_firmware: loading '' [ 32.129995] test_firmware: failed to async load firmware -bash: printf: write error: No such device Fixes: 471b095dfe0d ("firmware_class: make sure fw requests contain a name") Signed-off-by: Brian Norris Acked-by: Ming Lei Acked-by: Kees Cook Signed-off-by: Shuah Khan drivers/base/firmware_class.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit eb910947c82f93cee6ee00a59a4ed86f12cf6e7f Author: Brian Norris Date: Wed Dec 9 14:50:27 2015 -0800 test: firmware_class: add asynchronous request trigger We might want to test for bugs like that found in commit f9692b2699bd ("firmware: fix possible use after free on name on asynchronous request"), where the asynchronous request API had race conditions. Let's add a simple file that will launch the async request, then wait until it's complete and report the status. It's not a true async test (we're using a mutex + wait_for_completion(), so we can't get more than one going at the same time), but it does help make sure the basic API is sane, and it can catch some class of bugs. Signed-off-by: Brian Norris Cc: Luis R. Rodriguez Acked-by: Kees Cook Signed-off-by: Shuah Khan lib/test_firmware.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit be4a1326d12cce8df1f57017bf4112eaab437a38 Author: Brian Norris Date: Wed Dec 9 14:50:26 2015 -0800 test: firmware_class: use kstrndup() where appropriate We're essentially just doing an open-coded kstrndup(). The only differences are with what happens after the first '\0' character, but request_firmware() doesn't care about that. Suggested-by: Kees Cook Signed-off-by: Brian Norris Signed-off-by: Shuah Khan lib/test_firmware.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 47e0bbb7fa985a0f1b5794a8653fae4f8f49de77 Author: Brian Norris Date: Wed Dec 9 14:50:25 2015 -0800 test: firmware_class: report errors properly on failure request_firmware() failures currently won't get reported at all (the error code is discarded). What's more, we get confusing messages, like: # echo -n notafile > /sys/devices/virtual/misc/test_firmware/trigger_request [ 8280.311856] test_firmware: loading 'notafile' [ 8280.317042] test_firmware: load of 'notafile' failed: -2 [ 8280.322445] test_firmware: loaded: 0 # echo $? 0 Report the failures via write() errors, and don't say we "loaded" anything. Signed-off-by: Brian Norris Acked-by: Kees Cook Signed-off-by: Shuah Khan lib/test_firmware.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit b5bb6d3068eabb075ee7db09c73374f6db73ff4a Author: Kees Cook Date: Thu Dec 10 14:50:25 2015 -0800 selftests/seccomp: fix 32-bit build warnings The casting was done incorrectly for 32-bit builds. Fixed to use uintptr_t. Reported-by: Eric Adams Signed-off-by: Kees Cook Signed-off-by: Shuah Khan tools/testing/selftests/seccomp/test_harness.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b7ffffbb46f205e7727a18bcc7a46c3c2b534f7c Author: Steven Rostedt (Red Hat) Date: Thu Jan 7 15:40:01 2016 -0500 ftrace: Add infrastructure for delayed enabling of module functions Qiu Peiyang pointed out that there's a race when enabling function tracing and loading a module. In order to make the modifications of converting nops in the prologue of functions into callbacks, the text needs to be converted from read-only to read-write. When enabling function tracing, the text permission is updated, the functions are modified, and then they are put back. When loading a module, the updates to convert function calls to mcount is done before the module text is set to read-only. But after it is done, the module text is visible by the function tracer. Thus we have the following race: CPU 0 CPU 1 ----- ----- start function tracing set text to read-write load_module add functions to ftrace set module text read-only update all functions to callbacks modify module functions too < Can't it's read-only > When this happens, ftrace detects the issue and disables itself till the next reboot. To fix this, a new DISABLED flag is added for ftrace records, which all module functions get when they are added. Then later, after the module code is all set, the records will have the DISABLED flag cleared, and they will be enabled if any callback wants all functions to be traced. Note, this doesn't add the delay to later. It simply changes the ftrace_module_init() to do both the setting of DISABLED records, and then immediately calls the enable code. This helps with testing this new code as it has the same behavior as previously. Another change will come after this to have the ftrace_module_enable() called after the text is set to read-only. Cc: Qiu Peiyang Signed-off-by: Steven Rostedt include/linux/ftrace.h | 6 +- kernel/trace/ftrace.c | 161 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 110 insertions(+), 57 deletions(-) commit cdf88b4f45142f7c85a934f05b55a6c08e1d2414 Author: Yuan Sun Date: Thu Jan 7 14:54:02 2016 +0800 add breakpoints/.gitignore Signed-off-by: Yuan Sun Signed-off-by: Shuah Khan tools/testing/selftests/breakpoints/.gitignore | 1 + 1 file changed, 1 insertion(+) commit f4cbbcc28476cc6cbb3903fd794d62cc0710bd77 Author: Yuan Sun Date: Thu Jan 7 14:54:01 2016 +0800 add ptrace/.gitignore Signed-off-by: Yuan Sun Signed-off-by: Shuah Khan tools/testing/selftests/ptrace/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 886187c4a12b5a75c146f8477d96e6b308cd0fe6 Author: Yuan Sun Date: Thu Jan 7 14:54:00 2016 +0800 update .gitignore in selftests/timers Signed-off-by: Yuan Sun Signed-off-by: Shuah Khan tools/testing/selftests/timers/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 27f87a8775d264eaeb9b0c7ec11ae4d7a9d8b2ac Author: Yuan Sun Date: Thu Jan 7 14:53:59 2016 +0800 update .gitignore in selftests/vm Signed-off-by: Yuan Sun Signed-off-by: Shuah Khan tools/testing/selftests/vm/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) commit c66b651ce60bb82d8f6fe8ca35e70f323e3a260c Author: Brian Norris Date: Thu Jan 7 11:06:46 2016 -0800 mtd: nandsim: use nand_get_controller_data() Commit d699ed250c07 ("mtd: nand: make use of nand_set/get_controller_data() helpers") overlooked some uses of nand_chip::priv. Signed-off-by: Brian Norris Reviewed-by: Boris Brezillon drivers/mtd/nand/nandsim.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit f118902490aa1c3a361e485dd38a7b28cd130d71 Author: Brian Norris Date: Thu Jan 7 10:02:59 2016 -0800 mtd: jz4780_nand: remove useless mtd->priv = chip assignment As of commit 2d3b77bac34b ("mtd: nand: update mtd_to_nand()"), this assignment isn't necessary, since struct mtd_info is embedded in struct nand_chip. Signed-off-by: Brian Norris Cc: Harvey Hunt Cc: Alex Smith Reviewed-by: Boris Brezillon drivers/mtd/nand/jz4780_nand.c | 1 - 1 file changed, 1 deletion(-) commit a831e67913e356be63d5bb0509fc1af3c4e6ceb4 Author: Arnaldo Carvalho de Melo Date: Thu Jan 7 16:59:27 2016 -0300 perf tests: Give a bit more information on the CQM test failure path Before: $ perf test -v cqm 48: Test intel cqm nmi context read : --- start --- test child forked, pid 1681 parse_events failed test child finished with -2 ---- end ---- Test intel cqm nmi context read: Skip $ After: $ perf test -v cqm 48: Test intel cqm nmi context read : --- start --- test child forked, pid 1681 parse_events failed, is "intel_cqm/llc_occupancy/" available? test child finished with -2 ---- end ---- Test intel cqm nmi context read: Skip $ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Matt Fleming Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-eidpiv5x4nkbsx37xwikbnir@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/intel-cqm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 239849dde350c9f7356974ca4f62171f50a2c86e Author: Arnaldo Carvalho de Melo Date: Thu Jan 7 16:51:58 2016 -0300 perf tests: No need to set attr.sample_freq for tracking !PERF_RECORD_SAMPLE We were asking for a 4kHz sample_freq, making the test fail needlessly when the system reduced /proc/sys/kernel/perf_event_max_sample_rate below that. Before: # perf test -vv dummy 23: Test using a dummy software event to keep tracking : --- start --- test child forked, pid 32421 ------------------------------------------------------------ perf_event_attr: type 1 size 112 config 0x9 { sample_period, sample_freq } 4000 sample_type IP|TID|ID|PERIOD sys_perf_event_open failed, error -22 Unable to open dummy and cycles event test child finished with -2 ---- end ---- Test using a dummy software event to keep tracking: Skip # [root@zoo ~]# cat /proc/sys/kernel/perf_event_max_sample_rate 1000 After: [root@zoo ~]# perf test dummy 23: Test using a dummy software event to keep tracking : Ok Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-487iquegrs2379e5n0pi0tcp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/keep-tracking.c | 1 - 1 file changed, 1 deletion(-) commit 372b212263998ae8e3b2f80ce52af3168d749158 Author: Arnaldo Carvalho de Melo Date: Thu Jan 7 16:47:11 2016 -0300 perf python: Add missing files to binding link list Fixing this problem, introduced recently: $ perf test python 16: Try 'import perf' in python, checking link problems : FAILED! In verbose mode we find out what is missing: $ perf test -v python 16: Try 'import perf' in python, checking link problems : --- start --- test child forked, pid 24894 Traceback (most recent call last): File "", line 1, in ImportError: /tmp/build/perf/python/perf.so: undefined symbol: find_next_bit test child finished with -1 ---- end ---- Try 'import perf' in python, checking link problems: FAILED! $ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: f77b57ad4fc4 ("perf cpu_map: Add cpu_map__new_event function") Link: http://lkml.kernel.org/n/tip-rajx0zkz6czdrnvvwf0jp76p@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/python-ext-sources | 2 ++ 1 file changed, 2 insertions(+) commit 123581775336e91538e45cc00606692e1c410a66 Merge: 9e0efaf 711fdba Author: David S. Miller Date: Thu Jan 7 14:31:28 2016 -0500 Merge branch 'mdio-devices' Andrew Lunn says: ==================== Support MDIO devices The discussions about changing the way DSA probes switches resulted in the wish to have switches attached to an MDIO bus to be represented as an MDIO device. However the current code only supports PHYs on MDIO busses. This patchset remedies this problem. It consists of a number of cleanups, abstraction for accessing structure members, and refactoring, as well as adding the concept of a generic MDIO device and MDIO driver. v2: Added Reviewed-by from Florian Made phydev_name() an inline function Added phy_attached_info/phy_attached_print() for information about the attached phy. Removed now redundant irq setup from of_mdio.c Dropped hunks from PHYMII ioctl which prevented access to any address DSA carrier off before phy setup ==================== Signed-off-by: David S. Miller commit 711fdba37a3dd7ee487e28767f9f0e67144cbf80 Author: Andrew Lunn Date: Wed Jan 6 20:11:27 2016 +0100 mdio: Abstract device_remove() and device_free() Make device_free and device_remove operations in the mdio device structure, so the core code does not need to differentiate between phy devices and generic mdio devices. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 23 +++++++++-------------- drivers/net/phy/mdio_device.c | 2 ++ drivers/net/phy/phy_device.c | 18 ++++++++++++++++++ include/linux/mdio.h | 4 ++++ 4 files changed, 33 insertions(+), 14 deletions(-) commit a9049e0c513c4521dbfaa302af8ed08b3366b41f Author: Andrew Lunn Date: Wed Jan 6 20:11:26 2016 +0100 mdio: Add support for mdio drivers. Not all devices on an MDIO bus are PHYs. Meaning not all MDIO drivers are PHY drivers. Add support for generic MDIO drivers. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Makefile | 2 +- drivers/net/phy/mdio_bus.c | 13 +++- drivers/net/phy/mdio_device.c | 169 ++++++++++++++++++++++++++++++++++++++++++ drivers/net/phy/phy_device.c | 27 ++++--- drivers/of/of_mdio.c | 33 +++++++++ include/linux/mdio.h | 50 +++++++++++++ include/linux/phy.h | 9 ++- 7 files changed, 286 insertions(+), 17 deletions(-) commit f89df3f381f1e1247ddccdf178f203c06fddf5ce Author: Andrew Lunn Date: Wed Jan 6 20:11:25 2016 +0100 mdio_bus: Add comment to mdiobus_scan() and __mdiobus_register() Make it clear that mdiobus_scan () will only find devices which have a vendor/product ID in registers 2 and 3. These are typically PHY devices. Other sort of MDIO devices, such as switches, are not expected to be found during the scan. Similarly, __mdiobus_register(), which calls mdiobus_scan() will only find PHY devices, and other sorts of MDIO devices are expected to be instantiated from device tree. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit f03bc4ae552f30faa9bbee2d72bd1ee34667011a Author: Andrew Lunn Date: Wed Jan 6 20:11:24 2016 +0100 mdio_bus: Generalise of_mdiobus_link_phydev() This function should work with any sort of MDIO device which can be probed on the bus, not just PHY devices. So generalise it. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit e76a4957c5ee5cf69cea89d450c29c536e77ce9e Author: Andrew Lunn Date: Wed Jan 6 20:11:23 2016 +0100 phy: Move phy specific bus match into phy_device Matching a driver to a device has both generic parts, and parts which are specific to PHY devices. Move the PHY specific parts into phy_device. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 38 ++++++++++++-------------------------- drivers/net/phy/phy_device.c | 28 ++++++++++++++++++++++++++++ include/linux/mdio.h | 1 + 3 files changed, 41 insertions(+), 26 deletions(-) commit be01da72b1b832b89fbdf59ae6f1b60e53ca2987 Author: Andrew Lunn Date: Wed Jan 6 20:11:22 2016 +0100 phy: Centralize setting driver module owner Rather than have each driver set the driver owner field, do it once in the core code. This will also help with later changes, when the device structure will move. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/amd.c | 1 - drivers/net/phy/aquantia.c | 4 ---- drivers/net/phy/at803x.c | 9 --------- drivers/net/phy/bcm63xx.c | 2 -- drivers/net/phy/bcm7xxx.c | 6 ------ drivers/net/phy/bcm87xx.c | 2 -- drivers/net/phy/broadcom.c | 12 ------------ drivers/net/phy/cicada.c | 2 -- drivers/net/phy/davicom.c | 4 ---- drivers/net/phy/dp83640.c | 3 +-- drivers/net/phy/dp83848.c | 2 -- drivers/net/phy/dp83867.c | 2 -- drivers/net/phy/et1011c.c | 1 - drivers/net/phy/icplus.c | 3 --- drivers/net/phy/lxt.c | 4 ---- drivers/net/phy/marvell.c | 13 ------------- drivers/net/phy/micrel.c | 13 ------------- drivers/net/phy/microchip.c | 2 -- drivers/net/phy/national.c | 1 - drivers/net/phy/phy_device.c | 13 +++++++------ drivers/net/phy/qsemi.c | 1 - drivers/net/phy/realtek.c | 5 ----- drivers/net/phy/smsc.c | 10 ---------- drivers/net/phy/ste10Xp.c | 2 -- drivers/net/phy/teranetics.c | 1 - drivers/net/phy/vitesse.c | 8 -------- include/linux/phy.h | 7 ++++--- 27 files changed, 12 insertions(+), 121 deletions(-) commit bc87922ff59d364a33e9bce0febdef21a7fbd2af Author: Andrew Lunn Date: Wed Jan 6 20:11:21 2016 +0100 phy: Move PHY PM operations into phy_device The MDIO PM operations are really PHY device PM operations. So move them into phy_device. This will be needed when we support devices on the mdio bus which are not PHYs. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 83 ++++---------------------------- drivers/net/phy/phy_device.c | 110 +++++++++++++++++++++++++++++++++++++++++++ include/linux/mdio.h | 2 +- 3 files changed, 121 insertions(+), 74 deletions(-) commit 0071f56e46dadb88dc3ad1f8d9cf9c3ae014735d Author: Andrew Lunn Date: Wed Jan 6 20:11:20 2016 +0100 dsa: Register netdev before phy When the phy is connected, an info message is printed. If the netdev it is attached to has not been registered yet, the name 'uninitialised' in the output. By registering the netdev first, then connecting they phy, we can avoid this. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/slave.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5cf11beef2c4333b511ff9cef5285320616d938b Author: Andrew Lunn Date: Wed Jan 6 20:11:19 2016 +0100 phy_device: Move phy attributes into phy_device The mdio_bus exports three attributes: - PHY ID is the unique 32-bits identifier for a MDIO device implementing standard MII registers MII_PHYSID1/2, which is not guaranteed to be the case for non-standard compliant devices (e.g: Ethernet switches) - PHY interface describes the data-path of the PHY/MDIO device, which is not strictly a PHY thing, but is required and needed for PHY devices to function, a MDIO device could be a control device exclusively - PHY has fixups describes what the PHY driver may have done, so completely PHY specific These are all phy attributes, not generic mdio attributes. So move the attributes into the phy device code. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 42 ------------------------------------------ drivers/net/phy/phy_device.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 42 deletions(-) commit 7f854420fbfe9d49afe2ffb1df052cfe8e215541 Author: Andrew Lunn Date: Wed Jan 6 20:11:18 2016 +0100 phy: Add API for {un}registering an mdio device to a bus. Rather than have drivers directly manipulate the mii_bus structure, provide and API for registering and unregistering devices on an MDIO bus, and performing lookups. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/amd/au1000_eth.c | 9 +++-- drivers/net/ethernet/broadcom/b44.c | 2 +- drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 +- drivers/net/ethernet/broadcom/tg3.c | 30 +++++++-------- drivers/net/ethernet/ethoc.c | 4 +- drivers/net/ethernet/faraday/ftgmac100.c | 2 +- drivers/net/ethernet/freescale/fec_main.c | 7 +--- drivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c | 2 +- drivers/net/ethernet/smsc/smsc9420.c | 3 +- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +- drivers/net/ethernet/ti/davinci_mdio.c | 2 +- drivers/net/phy/mdio_bus.c | 46 ++++++++++++++++++++++- drivers/net/phy/phy_device.c | 21 +++++------ drivers/of/of_mdio.c | 2 +- include/linux/mdio.h | 8 ++++ include/linux/phy.h | 2 +- net/dsa/slave.c | 3 +- 17 files changed, 98 insertions(+), 49 deletions(-) commit 801a8ef54e8b21eb6699aaa88681259dafb1d1b5 Author: Andrew Lunn Date: Wed Jan 6 20:11:17 2016 +0100 of: phy: Only register a phy device for phys We will soon support devices other than phys on the mdio bus. Look at a child's compatibility string to determine if it is a phy, before registering a phy device. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/of/of_mdio.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit e5a03bfd873c29eb786655ef2e95e53ed242b404 Author: Andrew Lunn Date: Wed Jan 6 20:11:16 2016 +0100 phy: Add an mdio_device structure Not all devices attached to an MDIO bus are phys. So add an mdio_device structure to represent the generic parts of an mdio device, and place this structure into the phy_device. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/agere/et131x.c | 30 ++++++------ drivers/net/ethernet/altera/altera_tse_main.c | 2 +- drivers/net/ethernet/broadcom/b44.c | 2 +- drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 +- drivers/net/ethernet/broadcom/sb1250-mac.c | 4 +- drivers/net/ethernet/freescale/fman/fman_dtsec.c | 6 +-- drivers/net/ethernet/freescale/fman/fman_memac.c | 6 +-- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 +- drivers/net/ethernet/freescale/gianfar.c | 4 +- drivers/net/ethernet/freescale/ucc_geth.c | 4 +- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 2 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/smsc/smsc911x.c | 11 +++-- drivers/net/ethernet/smsc/smsc9420.c | 3 +- drivers/net/ethernet/ti/cpsw.c | 3 +- drivers/net/ethernet/ti/davinci_mdio.c | 2 +- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +- drivers/net/phy/at803x.c | 2 +- drivers/net/phy/bcm87xx.c | 4 +- drivers/net/phy/dp83640.c | 22 +++++---- drivers/net/phy/dp83867.c | 4 +- drivers/net/phy/fixed_phy.c | 10 ++-- drivers/net/phy/icplus.c | 18 +++---- drivers/net/phy/marvell.c | 7 +-- drivers/net/phy/mdio_bus.c | 12 ++--- drivers/net/phy/micrel.c | 12 ++--- drivers/net/phy/microchip.c | 4 +- drivers/net/phy/phy.c | 25 +++++----- drivers/net/phy/phy_device.c | 62 ++++++++++++------------ drivers/net/phy/smsc.c | 2 +- drivers/of/of_mdio.c | 6 +-- include/linux/mdio.h | 9 ++++ include/linux/phy.h | 26 +++++----- net/dsa/dsa.c | 2 +- 35 files changed, 165 insertions(+), 151 deletions(-) commit e7f4dc3536a40097f95103ddf98dd55b3a980f5b Author: Andrew Lunn Date: Wed Jan 6 20:11:15 2016 +0100 mdio: Move allocation of interrupts into core Have mdio_alloc() create the array of interrupt numbers, and initialize it to POLLING. This is what most MDIO drivers want, so allowing code to be removed from the drivers. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller arch/powerpc/platforms/82xx/ep8248e.c | 10 +--------- arch/powerpc/platforms/pasemi/gpio_mdio.c | 3 --- drivers/net/ethernet/8390/ax88796.c | 15 ++------------- drivers/net/ethernet/adi/bfin_mac.c | 11 +---------- drivers/net/ethernet/aeroflex/greth.c | 5 ----- drivers/net/ethernet/aeroflex/greth.h | 1 - drivers/net/ethernet/agere/et131x.c | 13 +------------ drivers/net/ethernet/altera/altera_tse_main.c | 13 +------------ drivers/net/ethernet/amd/au1000_eth.c | 7 ------- drivers/net/ethernet/broadcom/b44.c | 14 +------------- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 --------- drivers/net/ethernet/broadcom/bgmac.c | 15 ++------------- drivers/net/ethernet/broadcom/genet/bcmmii.c | 10 ---------- drivers/net/ethernet/broadcom/sb1250-mac.c | 4 ---- drivers/net/ethernet/broadcom/tg3.c | 4 ---- drivers/net/ethernet/broadcom/tg3.h | 1 - drivers/net/ethernet/cadence/macb.c | 14 +------------- drivers/net/ethernet/dnet.c | 12 +----------- drivers/net/ethernet/ethoc.c | 14 +------------- drivers/net/ethernet/faraday/ftgmac100.c | 6 ------ drivers/net/ethernet/freescale/fec_main.c | 16 ++-------------- drivers/net/ethernet/freescale/fec_mpc52xx_phy.c | 4 ---- drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | 10 +--------- drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 10 +--------- drivers/net/ethernet/freescale/fsl_pq_mdio.c | 2 -- drivers/net/ethernet/hisilicon/hns_mdio.c | 5 ----- drivers/net/ethernet/lantiq_etop.c | 14 +------------- drivers/net/ethernet/marvell/mvmdio.c | 10 +--------- drivers/net/ethernet/nxp/lpc_eth.c | 13 +------------ drivers/net/ethernet/rdc/r6040.c | 14 +------------- drivers/net/ethernet/renesas/sh_eth.c | 12 +----------- drivers/net/ethernet/smsc/smsc911x.c | 6 ++---- drivers/net/ethernet/smsc/smsc9420.c | 6 +----- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 14 ++++---------- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 15 ++------------- drivers/net/ethernet/ti/cpmac.c | 3 --- drivers/net/ethernet/toshiba/tc35815.c | 14 +------------- drivers/net/ethernet/xilinx/ll_temac.h | 1 - drivers/net/ethernet/xilinx/ll_temac_mdio.c | 2 -- drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 -- drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 2 -- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 4 ---- drivers/net/phy/fixed_phy.c | 4 +--- drivers/net/phy/mdio-bcm-unimac.c | 11 +---------- drivers/net/phy/mdio-gpio.c | 2 +- drivers/net/phy/mdio-moxart.c | 7 ------- drivers/net/phy/mdio-mux.c | 3 +-- drivers/net/phy/mdio-octeon.c | 2 -- drivers/net/phy/mdio-sun4i.c | 12 +----------- drivers/net/phy/mdio_bus.c | 5 +++++ drivers/net/usb/ax88172a.c | 14 ++------------ drivers/net/usb/lan78xx.c | 11 +---------- drivers/of/of_mdio.c | 7 +------ include/linux/phy.h | 6 +++--- 54 files changed, 48 insertions(+), 396 deletions(-) commit 35d2aeac9810ca717a72a4ff0d8a20d349e73e55 Author: Andrew Lunn Date: Wed Jan 6 20:11:14 2016 +0100 phy: mdio-octeon: Use devm_mdiobus_alloc_size() Rather than use devm_kzalloc(), use the mdio helper function. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio-octeon.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 2220943a21e26d97d7fd8f83c004b947326b469d Author: Andrew Lunn Date: Wed Jan 6 20:11:13 2016 +0100 phy: Centralise print about attached phy Many Ethernet drivers contain the same netdev_info() print statement about the attached phy. Move it into the phy device code. Additionally add a varargs function which can be used to append additional information. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/adi/bfin_mac.c | 6 ++---- drivers/net/ethernet/agere/et131x.c | 4 +--- drivers/net/ethernet/amd/au1000_eth.c | 4 +--- drivers/net/ethernet/broadcom/b44.c | 3 +-- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 +-- drivers/net/ethernet/broadcom/sb1250-mac.c | 7 +++---- drivers/net/ethernet/broadcom/tg3.c | 10 +++------- drivers/net/ethernet/cadence/macb.c | 3 +-- drivers/net/ethernet/dnet.c | 4 +--- drivers/net/ethernet/freescale/fec_main.c | 4 +--- drivers/net/ethernet/lantiq_etop.c | 4 +--- drivers/net/ethernet/nxp/lpc_eth.c | 5 ++--- drivers/net/ethernet/rdc/r6040.c | 4 +--- drivers/net/ethernet/renesas/ravb_main.c | 3 +-- drivers/net/ethernet/renesas/sh_eth.c | 3 +-- drivers/net/ethernet/smsc/smsc911x.c | 4 +--- drivers/net/ethernet/smsc/smsc9420.c | 9 ++------- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 12 +----------- drivers/net/ethernet/ti/cpsw.c | 4 ++-- drivers/net/ethernet/ti/davinci_emac.c | 5 +---- drivers/net/ethernet/toshiba/tc35815.c | 6 ++---- drivers/net/phy/phy_device.c | 27 +++++++++++++++++++++++++++ drivers/staging/netlogic/xlr_net.c | 3 +-- include/linux/phy.h | 4 ++++ net/dsa/slave.c | 5 ++--- 25 files changed, 64 insertions(+), 82 deletions(-) commit 053e7e169229adebbc27fc176c5369398e9f5eba Author: Andrew Lunn Date: Wed Jan 6 20:11:12 2016 +0100 phy: phy_{read|write}_mmd_indirect: get addr from phydev The address of the device can be determined from the phydev structure, rather than passing it as a parameter. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm-phy-lib.c | 8 ++++---- drivers/net/phy/dp83867.c | 6 +++--- drivers/net/phy/microchip.c | 5 ++--- drivers/net/phy/phy.c | 36 ++++++++++++++---------------------- include/linux/phy.h | 7 ++----- 5 files changed, 25 insertions(+), 37 deletions(-) commit 04521bf840482af30a6ed54835cefadcecdd56da Author: Andrew Lunn Date: Wed Jan 6 20:11:11 2016 +0100 net: dnet: Use phy_find_first() helper Replace the open coded search for the first phy with a call to the existing helper function. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/dnet.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 84eff6d194df442bee62c129f2f47efb0dbd0468 Author: Andrew Lunn Date: Wed Jan 6 20:11:10 2016 +0100 phy: add phydev_name() wrapper Add a phydev_name() function, to help with moving some structure members from phy_device. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/8390/ax88796.c | 2 +- drivers/net/ethernet/adi/bfin_mac.c | 4 ++-- drivers/net/ethernet/agere/et131x.c | 4 ++-- drivers/net/ethernet/amd/au1000_eth.c | 4 ++-- drivers/net/ethernet/broadcom/b44.c | 2 +- drivers/net/ethernet/broadcom/tg3.c | 4 ++-- drivers/net/ethernet/cadence/macb.c | 2 +- drivers/net/ethernet/dnet.c | 6 +++--- drivers/net/ethernet/faraday/ftgmac100.c | 2 +- drivers/net/ethernet/lantiq_etop.c | 4 ++-- drivers/net/ethernet/nxp/lpc_eth.c | 4 ++-- drivers/net/ethernet/rdc/r6040.c | 4 ++-- drivers/net/ethernet/renesas/ravb_main.c | 2 +- drivers/net/ethernet/renesas/sh_eth.c | 2 +- drivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c | 2 +- drivers/net/ethernet/smsc/smsc911x.c | 2 +- drivers/net/ethernet/smsc/smsc9420.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +- drivers/net/ethernet/ti/davinci_emac.c | 2 +- drivers/net/ethernet/ti/davinci_mdio.c | 2 +- drivers/net/ethernet/ti/netcp_ethss.c | 4 ++-- drivers/net/ethernet/toshiba/tc35815.c | 4 ++-- drivers/net/phy/bcm7xxx.c | 2 +- drivers/net/phy/phy_device.c | 2 +- drivers/staging/netlogic/xlr_net.c | 6 +++--- include/linux/phy.h | 5 +++++ 26 files changed, 44 insertions(+), 39 deletions(-) commit 72ba48be3ec8e70937ad97d4420ef7144617c64b Author: Andrew Lunn Date: Wed Jan 6 20:11:09 2016 +0100 phy: Add phydev_err() and phydev_dbg() macros In preparation for moving some of the phy_device structure members, add macros for printing errors and debug information. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 4 ++-- drivers/net/phy/bcm87xx.c | 5 +++-- drivers/net/phy/micrel.c | 16 +++++++++------- drivers/net/phy/phy.c | 5 +++-- include/linux/phy.h | 6 ++++++ 5 files changed, 23 insertions(+), 13 deletions(-) commit cd690e48f567642e1c1a2b67e592010e6456082a Author: Andrew Lunn Date: Wed Jan 6 20:11:08 2016 +0100 phy: Use phy_read() instead of mdiobus_read() Since we have a phydev, make use of it and the phy_read() function. This will help with later refactoring. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 104 ++++++++--------------- 1 file changed, 36 insertions(+), 68 deletions(-) commit bac83c653799d7ea3f6cc4d7396d75adc5e0f778 Author: Andrew Lunn Date: Wed Jan 6 20:11:07 2016 +0100 mdio: Move mdiobus_read/write operatings into mdio.h These are logically MDIO operations, not phy operations, so move them into the mdio header. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/mdio.h | 6 ++++++ include/linux/phy.h | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) commit ccaa953e9fc7ebb90fba4e4815966683bef4866f Author: Andrew Lunn Date: Wed Jan 6 20:11:06 2016 +0100 phy: Consistently use addr for address on an MII bus Within phy.h, an address on an MII bus has been called both addr and phy_id. phy_id is particularly confusion, since it also means the ID found in register 3, if the device on the bus is a phy. Consistently use addr. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/phy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f07dcb90e4a9ccab9663a50847f255c9b0e2ada1 Author: Boris BREZILLON Date: Thu Dec 10 09:00:42 2015 +0100 staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris drivers/staging/mt29f_spinand/mt29f_spinand.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d699ed250c07384840263bbbf69cf7b90b45470c Author: Boris BREZILLON Date: Thu Dec 10 09:00:41 2015 +0100 mtd: nand: make use of nand_set/get_controller_data() helpers New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon [Brian: fixed a few rebase conflicts] Signed-off-by: Brian Norris drivers/mtd/nand/ams-delta.c | 6 +-- drivers/mtd/nand/atmel_nand.c | 55 +++++++++++----------- drivers/mtd/nand/bcm47xxnflash/main.c | 2 +- drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c | 16 +++---- drivers/mtd/nand/bf5xx_nand.c | 2 +- drivers/mtd/nand/brcmnand/brcmnand.c | 30 ++++++------ drivers/mtd/nand/cafe_nand.c | 24 +++++----- drivers/mtd/nand/diskonchip.c | 70 ++++++++++++++-------------- drivers/mtd/nand/docg4.c | 40 ++++++++-------- drivers/mtd/nand/fsl_elbc_nand.c | 22 ++++----- drivers/mtd/nand/fsl_ifc_nand.c | 26 +++++------ drivers/mtd/nand/fsmc_nand.c | 2 +- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 28 +++++------ drivers/mtd/nand/hisi504_nand.c | 20 ++++---- drivers/mtd/nand/lpc32xx_mlc.c | 19 ++++---- drivers/mtd/nand/lpc32xx_slc.c | 20 ++++---- drivers/mtd/nand/mpc5121_nfc.c | 24 +++++----- drivers/mtd/nand/mxc_nand.c | 36 +++++++------- drivers/mtd/nand/nandsim.c | 4 +- drivers/mtd/nand/ndfc.c | 16 +++---- drivers/mtd/nand/orion_nand.c | 4 +- drivers/mtd/nand/pxa3xx_nand.c | 22 ++++----- drivers/mtd/nand/r852.c | 6 +-- drivers/mtd/nand/s3c2410.c | 4 +- drivers/mtd/nand/socrates_nand.c | 11 +++-- drivers/mtd/nand/txx9ndfmc.c | 8 ++-- 26 files changed, 260 insertions(+), 257 deletions(-) commit d9dccc68c5cae4ef7b4a617a93a87b11c6f0c53a Author: Boris BREZILLON Date: Thu Dec 10 09:00:40 2015 +0100 ARM: make use of nand_set/get_controller_data() helpers New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ae6cfe8d24681bea5a4a4b7a04915ac08c09ba5 Author: Dan Carpenter Date: Thu Jan 7 09:55:14 2016 -0800 Input: omap-keypad - set tasklet data earlier It feels like we should set the tasklet data before enabling it. Signed-off-by: Dan Carpenter Signed-off-by: Dmitry Torokhov drivers/input/keyboard/omap-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 415a249f88fd263bed0f7cca86ecde8c57aba9dc Author: Dmitry Torokhov Date: Wed Jan 6 14:44:02 2016 -0800 Input: rohm_bu21023 - fix handling of retrying firmware update Because of the wrong condition we'd never retry firmware update. Acked-by: Yoichi Yuasa Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/rohm_bu21023.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d6d167c2efcfe9539d9cffb1a1be9c92e39c2c0 Author: Mimi Zohar Date: Thu Jan 7 07:46:36 2016 -0500 KEYS: refcount bug fix This patch fixes the key_ref leak, removes the unnecessary KEY_FLAG_KEEP test before setting the flag, and cleans up the if/then brackets style introduced in commit: d3600bc KEYS: prevent keys from being removed from specified keyrings Reported-by: David Howells Signed-off-by: Mimi Zohar Acked-by: David Howells security/keys/key.c | 3 +-- security/keys/keyctl.c | 17 +++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) commit d39ddbd9ef70949bb78283a067e1b3366111dd90 Author: Boris BREZILLON Date: Thu Dec 10 09:00:39 2015 +0100 mtd: nand: add helpers to access ->priv Add two helpers to access the field reserved for private controller data. This makes it clearer what this field is reserved for and ease future refactoring. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris include/linux/mtd/nand.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1d1e8cdc823b9c0ed9b51dffef59b874b0aac808 Author: Thomas Petazzoni Date: Mon Dec 21 14:13:08 2015 +0100 PCI/MSI: Fix typos in Fix two comment typos in the header. Signed-off-by: Thomas Petazzoni Signed-off-by: Bjorn Helgaas include/linux/msi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b9140f39c2aaf76791197fbab0839c0e4af56e8 Author: Sasha Levin Date: Tue Dec 22 12:43:36 2015 -0500 power: test_power: correctly handle empty writes Writing 0 length data into test_power makes it access an invalid array location and kill the system. Fixes: f17ef9b2d ("power: Make test_power driver more dynamic.") Signed-off-by: Sasha Levin Signed-off-by: Sebastian Reichel drivers/power/test_power.c | 2 ++ 1 file changed, 2 insertions(+) commit ae02ab00aa3c282a362af8c4496496970747ddf4 Author: Alex Smith Date: Mon Jan 4 12:34:43 2016 +0000 mtd: nand: jz4780: driver for NAND devices on JZ4780 SoCs Add a driver for NAND devices connected to the NEMC on JZ4780 SoCs, as well as the hardware BCH controller. DMA is not currently implemented. While older 47xx SoCs also have a BCH controller, they are incompatible with the one in the 4780 due to differing register/bit positions, which would make implementing a common driver for them quite messy. Signed-off-by: Alex Smith Cc: Zubair Lutfullah Kakakhel Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Harvey Hunt Reviewed-by: Boris Brezillon [Brian: fixed a few small mistakes] Signed-off-by: Brian Norris drivers/mtd/nand/Kconfig | 7 + drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/jz4780_bch.c | 381 ++++++++++++++++++++++++++++++++++++ drivers/mtd/nand/jz4780_bch.h | 43 +++++ drivers/mtd/nand/jz4780_nand.c | 425 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 857 insertions(+) commit 62d7476d958ce06d7a10b02bdb30006870286fe2 Author: Emmanuel Grumbach Date: Tue Jan 5 15:25:43 2016 +0200 iwlwifi: pcie: properly configure the debug buffer size for 8000 8000 device family has a new debug engine that needs to be configured differently than 7000's. The debug engine's DMA works in chunks of memory and the size of the buffer really means the start of the last chunk. Since one chunk is 256-byte long, we should configure the device to write to buffer_size - 256. This fixes a situation were the device would write to memory it is not allowed to access. CC: [4.1+] Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 9fb7807ce7f21cbab2b13db0183f7f71a75add5e Author: Emmanuel Grumbach Date: Tue Jan 5 09:35:21 2016 +0200 iwlwifi: mvm: fix memory leaks in error paths upon fw error dump When iwl_mvm_fw_error_dump fails, it needs to clear the state in mvm, which includes: * clear IWL_MVM_STATUS_DUMPING_FW_LOG * set mvm->fw_dump_trig to NULL * free the description While at it, remove a NULL check in iwl_mvm_free_fw_dump_desc since kfree is NULL safe. Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit a80c7a696610c537fd6e61489be9da0a995fc880 Author: Emmanuel Grumbach Date: Tue Jan 5 09:14:08 2016 +0200 iwlwifi: mvm: constify the parameters of a few functions in fw-dbg.c The debug functions of fw-dbg.c don't really need to modify the trigger and the description they receive as a parameter. Constify the pointers. Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 8 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.h | 6 +++--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 +++--- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) commit be720d3fc049e14323f2ba637c053fe39d3e0157 Author: Johannes Berg Date: Tue Jan 5 16:16:31 2016 +0100 iwlwifi: mvm: check minimum temperature notification length This notification will be extended with extra data, so just check that it has a minimum length, not the exact length; we might later add handling for the extra fields added and have more code to handle both versions. Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0eb1c968f3c1519505d20b62f782b4f4daf4f525 Author: Eliad Peller Date: Thu Dec 31 15:19:32 2015 +0200 iwlwifi: mvm: initialize gtkdata->mvm correctly gtkdata->mvm wasn't set in iwl_mvm_d0i3_update_keys, resulting in kernel panic in some flows (when mvm is actually used...) Fixes: a3f7ba5c8825 ("iwlwifi: update key params on d0i3 entrance/exit") Signed-off-by: Eliad Peller Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 1 + 1 file changed, 1 insertion(+) commit f5e28eac1a890e5a950cacfa3a4942a6d69462e6 Author: Johannes Berg Date: Sun Dec 6 14:58:08 2015 +0200 iwlwifi: mvm: check PN for CCMP/GCMP in the driver As we're working on multi-queue RX, we want to parallelise checking the PN in order to avoid having to serialise the RX processing. It may seem that doing parallel PN checking is insecure, but it turns out to be OK because queue assignment is done based on the data in the frame (IP/TCP) and thus cannot be manipulated by an attacker, since the data is encrypted and must first have been decrypted successfully. There are some corner cases, in particular when the peer starts using fragmentation which redirects the packet to the default queue. However this redirection is remembered (for the STA, per TID) and thus cannot be exploited by an attacker either. Leave checking on the default queue (queue 0) to mac80211, since we get fragmented packets there and those are subject to stricter checks during reassembly. Signed-off-by: Johannes Berg Signed-off-by: Sara Sharon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 114 ++++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 46 +++++++++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 106 +++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 12 +++ 4 files changed, 245 insertions(+), 33 deletions(-) commit bd6f5bd70012569dc626f50f3272b9f516cf20f8 Author: Ayala Beker Date: Sun Dec 20 09:27:50 2015 +0200 iwlwifi: mvm: don't ask beacons when P2P GO vif and no assoc sta The commit below called iwl_mvm_mac_ctxt_changed() to handle a case that the vif is a P2P GO. However iwl_mvm_mac_ctxt_cmd_go() ignores the number of associated stations and asks the FW to pass beacons anyways. Fix this by checking ap_assoc_sta_count parameter, in iwl_mvm_mac_ctxt_cmd_go() as well, and ask the FW to pass beacons only when there's at least one associated station. Signed-off-by: Ayala Beker Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 44 ++++++++++------------- 1 file changed, 19 insertions(+), 25 deletions(-) commit 30433d3b9850140ceb801c5cc2013c7b408c33de Author: Johannes Berg Date: Thu Sep 24 18:14:55 2015 +0200 iwlwifi: mvm: prevent multiple stations with the same address As the device (and parts of the driver) cannot deal with having the same MAC address for two stations (on two virtual interfaces), add some explicit code to prevent this case. Note that in practice this cannot happen since the device doesn't support operating with two AP/GO interfaces at the same time either, and other scenarios for this are, while not impossible, not going to happen in practice. Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 + 1 file changed, 1 insertion(+) commit b6c7d7209dc1f128fb5b9e07ee0bb2f808f86bab Author: Emmanuel Grumbach Date: Thu Dec 24 08:48:46 2015 +0200 iwlwifi: mvm: remove useless WARN_ON and rely on cfg80211's combination We advertise one STATION vif only, so this just can't happen. Remove this useless WARN_ON. Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/power.c | 2 -- 1 file changed, 2 deletions(-) commit 909ddf0b812ecd5ff3a9d5a164134a3714101fdb Author: Johannes Berg Date: Mon Sep 21 14:09:17 2015 +0200 iwlwifi: mvm: support A-MSDU in A-MPDU Since A-MPDU deaggregation is done in hardware, and A-MSDU deaggregation is done in software, there's no reason not to support A-MSDU in A-MPDU; set the flag to support it. Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 + 1 file changed, 1 insertion(+) commit a977a1507ce133201ac2f11b3fbf102a73a77244 Author: Golan Ben-Ami Date: Wed Nov 25 11:44:57 2015 +0200 iwlwifi: mvm: add a non-trigger window to fw dbg triggers Allow the user to configure a non-trigger session - a window between triggers in which the driver won't collect fw debug data. This can be useful when the frequent collection of fw data has an impact on the performance, such as debugging tx flows. Signed-off-by: Golan Ben-Ami Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 5 ++++- drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.h | 24 ++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +++ 3 files changed, 31 insertions(+), 1 deletion(-) commit 976f15a8ef53144731f7e431c9498aff9392c9cb Author: Emmanuel Grumbach Date: Mon Dec 28 15:22:28 2015 +0200 iwlwifi: mvm: dump the radio registers when the firmware crashes Dumping the content of the radio registers greatly helps to debug PHY issues, which can lead to TFD queue hang. Signed-off-by: Emmanuel Grumbach .../net/wireless/intel/iwlwifi/iwl-fw-error-dump.h | 2 ++ drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 6 ++++ drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 40 ++++++++++++++++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) commit ca95ff3a9f9edea919a53a297a4cba178b6cdf5f Author: David Spinadel Date: Sun Jan 3 17:08:32 2016 +0200 iwlwifi: mvm: fix extended dwell time FW adds 10 msec for every dwell time in low band, so we need to set 10 msec less. Don't use extended dwell time when fragmented scan is needed because FW adds 3 msec per probe and it can easily exceed max out of channel time. Fixes: c3e230b167a9 ("iwlwifi: mvm: add extended dwell time") Signed-off-by: David Spinadel Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 488c28e110e18466c99ffb1e2342498b42d3344e Author: Oren Givon Date: Wed Nov 25 11:17:41 2015 +0200 iwlwifi: nvm: fix loading default NVM file Fix loading the default NVM file, in the case where the requested NVM file isn't found in the file system. Signed-off-by: Oren Givon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f370f5cffe7ae8b92026c8d6cb2738b4d3aeed9c Author: Emmanuel Grumbach Date: Tue Jan 5 16:30:04 2016 +0200 iwlwifi: mvm: bump max API to 20 7265D and up are now able to handle -20.ucode. Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ed0450cef00d2c76bcb8778721df947ba7ff4147 Author: Emmanuel Grumbach Date: Mon Jan 4 10:19:17 2016 +0200 iwlwifi: set max firmware version of 7265 to 17 Just like 7260, 7265 will not have firmware releases newer than iwlwifi-7265-17.ucode. 7265D is still supported in latest firmware releases. Fixes: 628a2918afe4 ("iwlwifi: separate firmware version for 7260 devices") Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ca87a5f58454711cc8cc550a7844efebd9bc001 Author: Emmanuel Grumbach Date: Sun Jan 3 22:23:40 2016 +0200 iwlwifi: mvm: reset mvm->scan_type when firmware is started If we don't reset the scan type when the firmware is started, we will think the firmware is still configured after the interface has been brought down. When we will bring it up again, we will not configure the scan type in firmware and it will crash with the following assert: 0x0000100A | ADVANCED_SYSASSERT Fixes: 355346ba3050 ("iwlwifi: mvm: configure scheduled scan according to traffic conditions") Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 6fa52430f0b3a45a31fb706084288884532e857c Author: Matti Gottlieb Date: Mon Jan 4 13:38:41 2016 +0200 iwlwifi: mvm: change mcc update API New functionality for testing that is not relevant for this driver has been added. This required an API change. Add new cmd & response versions for the MCC update cmd & response. Add new TLV indicating that the FW is using the new API. Signed-off-by: Matti Gottlieb Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 4 ++ drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 60 ++++++++++++++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 52 +++++++++++++++----- 3 files changed, 100 insertions(+), 16 deletions(-) commit 1e3c3c3529a7d0455b38f74d287d296cb9c786aa Author: Emmanuel Grumbach Date: Sun Dec 13 09:35:30 2015 +0200 iwlwifi: mvm: let the firmware choose the antenna for beacons The firmware knows better what antenna to choose. Old firmware still need the setting, so use a flag to know if the driver should choose the antenna or if the firmware can do it iself. Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) commit 006bda75d81fd27a583a3b310e9444fea2aa6ef2 Author: Oren Givon Date: Thu Dec 17 14:17:00 2015 +0200 iwlwifi: update and fix 7265 series PCI IDs Update and fix some 7265 PCI IDs entries. CC: [3.13+] Signed-off-by: Oren Givon Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a1cdb1c59c8c203de2731fc6910598ed19c97e41 Author: Emmanuel Grumbach Date: Sun Dec 20 08:45:40 2015 +0200 iwlwifi: dvm: fix WoWLAN My commit below introduced a mutex in the transport to prevent concurrent operations. To do so, it added a flag (is_down) to make sure the transport is in the right state. This uncoverred an bug that didn't cause any harm until now: iwldvm calls stop_device and then starts the firmware without calling start_hw in between. While this flow is fine from the device configuration point of view (register, etc...), it is now forbidden by the new is_down flag. This led to this error to appear: iwlwifi 0000:05:00.0: Can't start_fw since the HW hasn't been started and the suspend would fail. This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=109591 CC: [4.3+] Reported-by: Bogdan Bogush Fixes=fa9f3281cbb1 ("iwlwifi: pcie: lock start_hw / start_fw / stop_device") Signed-off-by: Emmanuel Grumbach Signed-off-by: Emmanuel Grumbach drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 3 +++ 1 file changed, 3 insertions(+) commit 2e4f81ee90e801017115afb7397198f65e512031 Author: Arnaldo Carvalho de Melo Date: Thu Jan 7 13:20:22 2016 -0300 perf test: No need for setting attr.sample_freq on the RECORD test We're not looking at PERF_RECORD_SAMPLE entries and now by default we use PERF_COUNT_SW_DUMMY, so just remove that setting. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-cly7cnotktv5rqao13pkorem@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/perf-record.c | 1 - 1 file changed, 1 deletion(-) commit 69ef8f475586974d3921c4799bfa75b8fef877a8 Author: Arnaldo Carvalho de Melo Date: Thu Jan 7 13:17:00 2016 -0300 perf test: Use "dummy" events in the PERF_RECORD_ test As we're test just the !PERF_RECORD_SAMPLE records. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-qp8radcz3il4q9wbnseh337d@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/perf-record.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5bae0250237f7a5ec4355f9920701de247b8db91 Author: Arnaldo Carvalho de Melo Date: Thu Jan 7 13:14:56 2016 -0300 perf evlist: Introduce perf_evlist__new_dummy constructor For case where all we need is an evlist with just an "dummy" evsel, like in some 'perf test' entries. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-q52le0pblm2k3ncvyilelr9z@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 28 ++++++++++++++++++++++++++++ tools/perf/util/evlist.h | 3 +++ 2 files changed, 31 insertions(+) commit 6201171e3b2c02992e62448636631a0dfe4e9d20 Author: wanghaibin Date: Thu Jan 7 20:38:59 2016 +0800 workqueue: simplify the apply_workqueue_attrs_locked() If the apply_wqattrs_prepare() returns NULL, it has already cleaned up the related resources, so it can return directly and avoid calling the clean up function again. This doesn't introduce any functional changes. Signed-off-by: wanghaibin Signed-off-by: Tejun Heo kernel/workqueue.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 218e0b575ffe6de1c93249871b25bbf570fe1cb5 Author: Marcus Weseloh Date: Tue Jan 5 21:46:20 2016 +0100 spi: sun4i: Prevent chip-select from being activated twice before a transfer The SPI core calls set_cs before a transfer, but the SUN4I_CTL_CS_MANUAL flag is only set in transfer_one. This leads to the following pattern on the chip-select line (with runtime power-management on every transfer, without it only on the first one): activate, deactivate, activate, transfer, deactivate Moving the configuration of the SUN4I_CTL_CS_MANUAL flag from transfer_one to set_cs removes the double activation. Signed-off-by: Marcus Weseloh Acked-by: Maxime Ripard Signed-off-by: Mark Brown drivers/spi/spi-sun4i.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 70dc6daff090afaab588e800fca3db59bfac694e Author: Dan Carpenter Date: Thu Jan 7 13:03:08 2016 +0300 regulator: core: remove some dead code Originally queue_delayed_work() used to negative error codes or 0 and 1 on success depending if the work was queued or not. It caused a lot of bugs where people treated all non-zero returns as failures so we changed it to return bool instead in d4283e937861 ('workqueue: make queueing functions return bool'). Now it never returns failure. Checking for negative values causes a static checker warning since it is impossible based on the bool type. Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown drivers/regulator/core.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 127d2868484b9769e08a8353e9e43023dcb8b9b3 Author: Geliang Tang Date: Fri Jan 1 22:59:11 2016 +0800 power: generic-adc-battery: use to_delayed_work Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Sebastian Reichel drivers/power/generic-adc-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88025632515adfb7fcfac15d087f155b719e78cd Author: Ivaylo Dimitrov Date: Fri Jan 1 13:03:29 2016 +0200 power: isp1704_charger: Fix isp1704_write() definition All calls to isp1704_write() are using parameter sequence of isp1704_write(isp, reg, val) but the function is defined as isp1704_write(isp, val, reg). Fix isp1704_write function definition so that the driver to be functional. Signed-off-by: Ivaylo Dimitrov Reviewed-by: Pali Rohár Signed-off-by: Sebastian Reichel drivers/power/isp1704_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 099867a16a0fa9fd5aafc32e3b1a6f8a90f17834 Author: H. Nikolaus Schaller Date: Thu Dec 17 11:12:54 2015 +0100 power: bq27xxx: fix register numbers of bq27500 bug: according to data sheet some register numbers are wrong. tested: no Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") Signed-off-by: H. Nikolaus Schaller Acked-by: Andrew F. Davis Signed-off-by: Sebastian Reichel drivers/power/bq27xxx_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 549d7b317c761dbf4ed0c2945aec3acc9ca7ae14 Author: H. Nikolaus Schaller Date: Thu Dec 17 11:12:53 2015 +0100 power: bq27xxx: fix reading for bq27000 and bq27010 bug: the driver reports funny capacity values: root@letux:/sys/class/power_supply/bq27000-battery# cat uevent POWER_SUPPLY_NAME=bq27000-battery POWER_SUPPLY_STATUS=Charging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_VOLTAGE_NOW=3702000 POWER_SUPPLY_CURRENT_NOW=-464635 POWER_SUPPLY_CAPACITY=1536 <- over 100% is magic POWER_SUPPLY_CAPACITY_LEVEL=Normal POWER_SUPPLY_TEMP=311 POWER_SUPPLY_TIME_TO_FULL_NOW=10440 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CHARGE_FULL=805450 POWER_SUPPLY_CHARGE_NOW=1068 POWER_SUPPLY_CHARGE_FULL_DESIGN=8844998 <- battery has just 1200 mAh POWER_SUPPLY_CYCLE_COUNT=21 POWER_SUPPLY_ENERGY_NOW=0 POWER_SUPPLY_POWER_AVG=0 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_MANUFACTURER=Texas Instruments reason: the state of charge and the design capacity register are single byte only. The design capacity returns the higer order byte. tested: GTA04 with Openmoko/FIC HF08x battery (using hdq) Fixes: d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") Signed-off-by: H. Nikolaus Schaller Acked-by: Andrew F. Davis Reviewed-by: Pali Rohár Signed-off-by: Sebastian Reichel drivers/power/bq27xxx_battery.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a02588a0efd6008f70ab69318ebacd79cbd3dc6b Author: Florian Fainelli Date: Wed Jan 6 10:55:23 2016 -0800 gpio: brcmstb: Allow building driver for BMIPS_GENERIC BMIPS_GENERIC (arch/mips/bmips) is the Kconfig symbol associated with Broadcom MIPS-based STB chips. Since this driver is perfectly usable on these platforms as well, allow using it. Signed-off-by: Florian Fainelli Acked-by: Gregory Fong Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce5a7e81390b9ae28f8dc82505afa96c1787d312 Author: Florian Fainelli Date: Wed Jan 6 10:55:22 2016 -0800 gpio: brcmstb: Set endian flags for big-endian MIPS Broadcom MIPS-based STB chips endianness is configured by boot strap, which also reverses all bus endianness (i.e., big-endian CPU + big endian bus ==> native endian I/O). Other architectures (e.g., ARM) either do not support big endian, or else leave I/O in little endian mode. Signed-off-by: Florian Fainelli Acked-by: Gregory Fong Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 780c43dd61a09ce7d9cdb1e7c33d3341ec471ff0 Author: Arnd Bergmann Date: Thu Jan 7 14:55:34 2016 +0100 gpio: moxart: fix build regression A cleanup patch replaced bgpio_chip with gpio_chip but missed two references to the bgpio_chip: drivers/gpio/gpio-moxart.c:60:19: error: use of undeclared identifier 'bgc'; did you mean 'gc'? gc->bgpio_data = bgc->read_reg(bgc->reg_set); drivers/gpio/gpio-moxart.c:35:20: note: 'gc' declared here drivers/gpio/gpio-moxart.c:60:33: error: use of undeclared identifier 'bgc'; did you mean 'gc'? gc->bgpio_data = bgc->read_reg(bgc->reg_set); This adds the missing change. Signed-off-by: Arnd Bergmann Fixes: 0f4630f3720e ("gpio: generic: factor into gpio_chip struct") Signed-off-by: Linus Walleij drivers/gpio/gpio-moxart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 691412b4438da1b77ff3078de0546023d244d841 Author: Kinglong Mee Date: Mon Jan 4 11:15:21 2016 +0800 nfsd: Fix nfsd leaks sunrpc module references Stefan Hajnoczi reports, nfsd leaks 3 references to the sunrpc module here: # echo -n "asdf 1234" >/proc/fs/nfsd/portlist bash: echo: write error: Protocol not supported Now stop nfsd and try unloading the kernel modules: # systemctl stop nfs-server # systemctl stop nfs # systemctl stop proc-fs-nfsd.mount # systemctl stop var-lib-nfs-rpc_pipefs.mount # rmmod nfsd # rmmod nfs_acl # rmmod lockd # rmmod auth_rpcgss # rmmod sunrpc rmmod: ERROR: Module sunrpc is in use # lsmod | grep rpc sunrpc 315392 3 It is caused by nfsd don't cleanup rpcb program for nfsd when destroying svc service after creating xprt fail. Reported-by: Stefan Hajnoczi Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfsd/nfssvc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2a297450dd188a5d4e5e428c189b2de54f9073ba Author: Julia Lawall Date: Wed Dec 23 22:25:13 2015 +0100 lockd: constify nlmsvc_binding structure The nlmsvc_binding structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 2 +- fs/nfsd/lockd.c | 2 +- include/linux/lockd/bind.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ea44463f376236a0541288cb8d575ab6b50370d2 Author: Geliang Tang Date: Fri Jan 1 22:06:29 2016 +0800 lockd: use to_delayed_work Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2e55f3ab45a0ef2e41548eae64e13b4bf39e5374 Author: Geliang Tang Date: Fri Jan 1 22:06:28 2016 +0800 nfsd: use to_delayed_work Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3daa020f9bf803c03c6b6c895921e2b09fcd494a Author: J. Bruce Fields Date: Wed Dec 23 15:08:08 2015 -0500 Revert "svcrdma: Do not send XDR roundup bytes for a write chunk" This reverts commit 6f18dc893981e4daab29221d6a9771f3ce2dd8c5. Just as one example, it appears this code could do the wrong thing in the case of a two-byte NFS READ that crosses a page boundary. Chuck says: "In that case, nfsd would pass down an xdr_buf that has one byte in a page, one byte in another page, and a two-byte XDR pad. The logic introduced by this optimization would be fooled, and neither the second byte nor the XDR pad would be written to the client." Cc: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_sendto.c | 7 ------- 1 file changed, 7 deletions(-) commit 525e1abc6b5a7d8bd9006de1da6e99722305ea2b Author: Andrzej Hajda Date: Mon Sep 21 15:33:44 2015 +0200 HSI: omap_ssi_port: fix handling of_get_named_gpio result The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi_port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6bf6ded3008a407ccab5ad72eb59ab71b97cc290 Author: Andrzej Hajda Date: Mon Sep 21 15:33:43 2015 +0200 HSI: omap_ssi: fix handling ida_simple_get result The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 03b9ee45bcebd1ea2811e7c90d13b6b69b0cce9b Author: Roman Volkov Date: Fri Jan 1 16:38:12 2016 +0300 dts: vt8500: Fix errors in SDHC node for WM8505 According to datasheet, the registers space of SDHC controller is 1Kb, not '0x1000', the correct value should be '0x400'. Bracket interrupt numbers individually per recommendations. Signed-off-by: Roman Volkov Signed-off-by: Arnd Bergmann arch/arm/boot/dts/wm8505.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f4ba0e6afac4b181471f5f12bd87294bd8807f6 Author: Arnaldo Carvalho de Melo Date: Thu Jan 7 09:54:56 2016 -0300 perf tests: No need to set attr.sample_freq in the perf time to TSC test We were asking for a 4kHz sample_freq, making the test fail needlessly when the system reduced /proc/sys/kernel/perf_event_max_sample_rate below that. In this test we only look at the PERF_SAMPLE_TIME fields in PERF_RECORD_ meta events, no need to set sample_freq. Thanks to Namhyung for suggesting that max_sample_rate could be the reason for the test failure, seeing the 'perf test -vv' output I sent. Before: # echo 1000 > /proc/sys/kernel/perf_event_max_sample_rate # perf test TSC 45: Test converting perf time to TSC : FAILED! After: # perf test TSC 45: Test converting perf time to TSC : Ok # cat /proc/sys/kernel/perf_event_max_sample_rate 1000 Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-lcob05qhawkuvsyuu9g1fld5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/perf-time-to-tsc.c | 1 - 1 file changed, 1 deletion(-) commit ee592d07716139ef7c3ea8049936cbc3aafbc533 Author: Sam Tygier Date: Wed Jan 6 08:46:12 2016 +0000 Btrfs: Check metadata redundancy on balance When converting a filesystem via balance check that metadata mode is at least as redundant as the data mode. For example give warning when: -dconvert=raid1 -mconvert=single Signed-off-by: Sam Tygier [ minor message reformatting ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ca8a51b3a979d57b082b14eda38602b7f52d81d1 Author: David Sterba Date: Sat Oct 10 17:59:53 2015 +0200 btrfs: statfs: report zero available if metadata are exhausted There is one ENOSPC case that's very confusing. There's Available greater than zero but no file operation succeds (besides removing files). This happens when the metadata are exhausted and there's no possibility to allocate another chunk. In this scenario it's normal that there's still some space in the data chunk and the calculation in df reflects that in the Avail value. To at least give some clue about the ENOSPC situation, let statfs report zero value in Avail, even if there's still data space available. Current: /dev/sdb1 4.0G 3.3G 719M 83% /mnt/test New: /dev/sdb1 4.0G 3.3G 0 100% /mnt/test We calculate the remaining metadata space minus global reserve. If this is (supposedly) smaller than zero, there's no space. But this does not hold in practice, the exhausted state happens where's still some positive delta. So we apply some guesswork and compare the delta to a 4M threshold. (Practically observed delta was 2M.) We probably cannot calculate the exact threshold value because this depends on the internal reservations requested by various operations, so some operations that consume a few metadata will succeed even if the Avail is zero. But this is better than the other way around. Signed-off-by: David Sterba fs/btrfs/super.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8546b570511f428838129c00e701eda481cd7c13 Author: David Sterba Date: Tue Nov 10 18:54:03 2015 +0100 btrfs: preallocate path for snapshot creation at ioctl time We can also preallocate btrfs_path that's used during pending snapshot creation and avoid another late ENOMEM failure. Signed-off-by: David Sterba fs/btrfs/ioctl.c | 4 +++- fs/btrfs/transaction.c | 9 ++++----- fs/btrfs/transaction.h | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) commit b0c0ea6338d5018e02d27c5315084fb1a5d099f6 Author: David Sterba Date: Tue Nov 10 18:54:00 2015 +0100 btrfs: allocate root item at snapshot ioctl time The actual snapshot creation is delayed until transaction commit. If we cannot get enough memory for the root item there, we have to fail the whole transaction commit which is bad. So we'll allocate the memory at the ioctl call and pass it along with the pending_snapshot struct. The potential ENOMEM will be returned to the caller of snapshot ioctl. Signed-off-by: David Sterba fs/btrfs/ioctl.c | 9 +++++++++ fs/btrfs/transaction.c | 9 +++------ fs/btrfs/transaction.h | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) commit a1ee736268448d74af25737568e383acb84c3c18 Author: David Sterba Date: Tue Nov 10 18:53:56 2015 +0100 btrfs: do an allocation earlier during snapshot creation We can allocate pending_snapshot earlier and do not have to do cleanup in case of failure. Signed-off-by: David Sterba fs/btrfs/ioctl.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 4fb72bf2e913ca3798afd9e226e2416918936e49 Author: David Sterba Date: Fri Nov 27 16:31:45 2015 +0100 btrfs: use smaller type for btrfs_path locks The values of btrfs_path::locks are 0 to 4, fit into a u8. Let's see: * overall size of btrfs_path drops down from 136 to 112 (-24 bytes), * better packing in a slab page +6 objects * the whole structure now fits to 2 cachelines * slight decrease in code size: text data bss dec hex filename 938731 43670 23144 1005545 f57e9 fs/btrfs/btrfs.ko.before 938203 43670 23144 1005017 f55d9 fs/btrfs/btrfs.ko.after (and the generated assembly does not change much) The main purpose is to decrease the size of the structure without affecting performance. The byte access is usually well behaving accross arches, the locks are not accessed frequently and sometimes just compared to zero. Note for further size reduction attempts: the slots could be made u16 but this might generate worse code on some arches (non-byte and non-int access). Also the range of operations on slots is wider compared to locks and the potential performance drop should be evaluated first. Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7853f15b2aeeb01c587168fc3f7f0ff76a3c9bfd Author: David Sterba Date: Fri Nov 27 16:31:42 2015 +0100 btrfs: use smaller type for btrfs_path lowest_level The level is 0..7, we can use smaller type. The size of btrfs_path is now 136 bytes from 144, which is +2 objects that fit into a 4k slab. Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dccabfad20880bc6c8be21b538df4293506b99f8 Author: David Sterba Date: Fri Nov 27 16:31:38 2015 +0100 btrfs: use smaller type for btrfs_path reada The possible values for reada are all positive and bounded, we can later save some bytes by storing it in u8. Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4058b54d1e442b6b3eca949f0d63d49ba2b020d Author: David Sterba Date: Fri Nov 27 16:31:35 2015 +0100 btrfs: cleanup, use enum values for btrfs_path reada Replace the integers by enums for better readability. The value 2 does not have any meaning since a717531942f488209dded30f6bc648167bcefa72 "Btrfs: do less aggressive btree readahead" (2009-01-22). Signed-off-by: David Sterba fs/btrfs/ctree.c | 9 ++++----- fs/btrfs/ctree.h | 1 + fs/btrfs/extent-tree.c | 12 ++++++------ fs/btrfs/file-item.c | 4 ++-- fs/btrfs/inode-map.c | 2 +- fs/btrfs/inode.c | 8 ++++---- fs/btrfs/ioctl.c | 2 +- fs/btrfs/relocation.c | 12 ++++++------ fs/btrfs/scrub.c | 2 +- fs/btrfs/volumes.c | 6 +++--- fs/btrfs/xattr.c | 2 +- 11 files changed, 30 insertions(+), 30 deletions(-) commit 4d4ab6d6bc05ba65169de9a5391e6ccbe09d8719 Author: David Sterba Date: Thu Nov 19 11:42:31 2015 +0100 btrfs: constify static arrays There are a few statically initialized arrays that can be made const. The remaining (like file_system_type, sysfs attributes or prop handlers) do not allow that due to type mismatch when passed to the APIs or because the structures are modified through other members. Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/inode.c | 2 +- fs/btrfs/ioctl.c | 2 +- fs/btrfs/super.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 20e5506baf3fd651e245bc970d8c11a734ee1b8a Author: David Sterba Date: Thu Nov 19 11:42:28 2015 +0100 btrfs: constify remaining structs with function pointers * struct extent_io_ops * struct btrfs_free_space_op Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/free-space-cache.h | 2 +- fs/btrfs/inode-map.c | 4 ++-- fs/btrfs/inode.c | 4 ++-- fs/btrfs/tests/free-space-tests.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) commit 28f0779a3fd6ef015303780f0b9a92b24728bc4b Author: David Sterba Date: Thu Nov 19 11:42:24 2015 +0100 btrfs tests: replace whole ops structure for free space tests Preparatory work for making btrfs_free_space_op constant. In test_steal_space_from_bitmap_to_extent, we substitute use_bitmap with own version thus preventing constification. We can rework it so we replace the whole structure with the correct function pointers. Signed-off-by: David Sterba fs/btrfs/tests/free-space-tests.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1dab1345d885819a3a0d5d08ce0b5c2e12c65343 Author: Nicholas Krause Date: Wed Dec 30 13:08:46 2015 -0500 kvm: x86: Check kvm_write_guest return value in kvm_write_wall_clock This makes sure the wall clock is updated only after an odd version value is successfully written to guest memory. Signed-off-by: Nicholas Krause Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c6e5f166373a20a433c38a34bd16f2b62bd0864c Author: Fan Zhang Date: Thu Jan 7 18:24:29 2016 +0800 KVM: s390: implement the RI support of guest This patch adds runtime instrumentation support for KVM guest. We need to setup a save area for the runtime instrumentation-controls control block(RICCB) and implement the necessary interfaces to live migrate the guest settings. We setup the sie control block in a way, that the runtime instrumentation instructions of a guest are handled by hardware. We also add a capability KVM_CAP_S390_RI to make this feature opt-in as it needs migration support. Signed-off-by: Fan Zhang Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 3 ++- arch/s390/include/uapi/asm/kvm.h | 3 +++ arch/s390/kvm/kvm-s390.c | 22 ++++++++++++++++++++++ include/uapi/linux/kvm.h | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) commit c57ee5faf4503b0cd586c3af663262a3d5599fc1 Author: Michael S. Tsirkin Date: Tue Jan 5 18:20:24 2016 +0200 kvm/s390: drop unpaired smp_mb smp_mb on vcpu destroy isn't paired with anything, violating pairing rules, and seems to be useless. Drop it. Signed-off-by: Michael S. Tsirkin Message-Id: <1452010811-25486-1-git-send-email-mst@redhat.com> Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 1 - 1 file changed, 1 deletion(-) commit a7ca42256d9fad572fb7f2c471514d7d3572b1db Author: Geliang Tang Date: Mon Dec 21 23:50:23 2015 +0800 btrfs: use list_for_each_entry* in backref.c Use list_for_each_entry*() to simplify the code. Signed-off-by: Geliang Tang Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 7ae1681e126919e7119cebebde1d42df8d7a49b9 Author: Geliang Tang Date: Fri Dec 18 22:17:00 2015 +0800 btrfs: use list_for_each_entry_safe in free-space-cache.c Use list_for_each_entry_safe() instead of list_for_each_safe() to simplify the code. Signed-off-by: Geliang Tang Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit b69f2bef484844ccd9038a850cdcf562afff9d08 Author: Geliang Tang Date: Fri Dec 18 22:16:59 2015 +0800 btrfs: use list_for_each_entry* in check-integrity.c Use list_for_each_entry*() instead of list_for_each*() to simplify the code. Signed-off-by: Geliang Tang Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 105 +++++++++++---------------------------------- 1 file changed, 26 insertions(+), 79 deletions(-) commit ee22184b53c823f6956314c2815d4068e3820737 Author: Byongho Lee Date: Tue Dec 15 01:42:10 2015 +0900 Btrfs: use linux/sizes.h to represent constants We use many constants to represent size and offset value. And to make code readable we use '256 * 1024 * 1024' instead of '268435456' to represent '256MB'. However we can make far more readable with 'SZ_256MB' which is defined in the 'linux/sizes.h'. So this patch replaces 'xxx * 1024 * 1024' kind of expression with single 'SZ_xxxMB' if 'xxx' is a power of 2 then 'xxx * SZ_1M' if 'xxx' is not a power of 2. And I haven't touched to '4096' & '8192' because it's more intuitive than 'SZ_4KB' & 'SZ_8KB'. Signed-off-by: Byongho Lee Signed-off-by: David Sterba fs/btrfs/ctree.c | 2 +- fs/btrfs/ctree.h | 5 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/disk-io.h | 4 +- fs/btrfs/extent-tree.c | 29 +++--- fs/btrfs/extent_io.c | 2 +- fs/btrfs/free-space-cache.c | 10 +- fs/btrfs/inode-map.c | 2 +- fs/btrfs/inode.c | 22 ++--- fs/btrfs/ioctl.c | 23 +++-- fs/btrfs/send.h | 4 +- fs/btrfs/super.c | 2 +- fs/btrfs/tests/extent-io-tests.c | 11 ++- fs/btrfs/tests/free-space-tests.c | 186 ++++++++++++++++---------------------- fs/btrfs/tests/inode-tests.c | 2 +- fs/btrfs/volumes.c | 16 ++-- fs/btrfs/volumes.h | 2 +- 17 files changed, 147 insertions(+), 177 deletions(-) commit 7928d672ffb06085d06fe3c27a93549d37e53ab3 Author: David Sterba Date: Mon Nov 30 11:02:31 2015 +0100 btrfs: cleanup, remove stray return statements Signed-off-by: David Sterba fs/btrfs/disk-io.c | 1 - fs/btrfs/inode.c | 1 - fs/btrfs/locking.c | 2 -- fs/btrfs/raid56.c | 2 -- fs/btrfs/scrub.c | 2 -- fs/btrfs/volumes.c | 1 - 6 files changed, 9 deletions(-) commit 352dd9c8d3b34e406584c95be45cbc4f1ec5a405 Author: Alexandru Moise <00moses.alexander00@gmail.com> Date: Sun Oct 25 20:15:06 2015 +0000 btrfs: zero out delayed node upon allocation It's slightly cleaner to zero-out the delayed node upon allocation than to do it by hand in btrfs_init_delayed_node() for a few members Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 575a75d6fabf6e1217204deca79aea26d6670a12 Author: Alexandru Moise <00moses.alexander00@gmail.com> Date: Sun Oct 25 19:35:44 2015 +0000 btrfs: pass proper enum type to start_transaction() Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/transaction.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 9780c4976f5518f805b32fc00ed045b636fe8fa8 Author: Alexandru Moise <00moses.alexander00@gmail.com> Date: Sun Oct 18 21:35:41 2015 +0000 btrfs: switch __btrfs_fs_incompat return type from int to bool Conform to __btrfs_fs_incompat() cast-to-bool (!!) by explicitly returning boolean not int. Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com> Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e40da0e58a208940bf3d1745f9bd8cf1e27904d4 Author: Byongho Lee Date: Tue May 19 23:46:45 2015 +0900 btrfs: remove unused inode argument from uncompress_inline() The inode argument is never used from the beginning, so remove it. Signed-off-by: Byongho Lee Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 100d57025cce6bf568a10660c0d884bcc64c580e Author: David Sterba Date: Tue Dec 8 14:39:32 2015 +0100 btrfs: don't use slab cache for struct btrfs_delalloc_work Although we prefer to use separate caches for various structs, it seems better not to do that for struct btrfs_delalloc_work. Objects of this type are allocated rarely, when transaction commit calls btrfs_start_delalloc_roots, requesting delayed iputs. The objects are temporary (with some IO involved) but still allocated and freed within __start_delalloc_inodes. Memory allocation failure is handled. The slab cache is empty most of the time (observed on several systems), so if we need to allocate a new slab object, the first one has to allocate a full page. In a potential case of low memory conditions this might fail with higher probability compared to using the generic slab caches. Signed-off-by: David Sterba fs/btrfs/inode.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 0de270fa83d5a45664e3f2428d432145037ac432 Author: David Sterba Date: Tue Dec 1 18:09:12 2015 +0100 btrfs: drop duplicate prefix from scrub workqueues The helper btrfs_alloc_workqueue will add the "btrfs-" prefix. Signed-off-by: David Sterba fs/btrfs/scrub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 93a3d46780b0f207f76608078eb965cf7b83902c Author: David Sterba Date: Mon Nov 30 17:27:09 2015 +0100 btrfs: verbose error when we find an unexpected item in sys_array Signed-off-by: David Sterba fs/btrfs/volumes.c | 3 +++ 1 file changed, 3 insertions(+) commit f5cdedd73fa71b74dcc42f2a11a5735d89ce7c4f Author: David Sterba Date: Mon Nov 30 17:27:06 2015 +0100 btrfs: handle invalid num_stripes in sys_array We can handle the special case of num_stripes == 0 directly inside btrfs_read_sys_array. The BUG_ON in btrfs_chunk_item_size is there to catch other unhandled cases where we fail to validate external data. A crafted or corrupted image crashes at mount time: BTRFS: device fsid 9006933e-2a9a-44f0-917f-514252aeec2c devid 1 transid 7 /dev/loop0 BTRFS info (device loop0): disk space caching is enabled BUG: failure at fs/btrfs/ctree.h:337/btrfs_chunk_item_size()! Kernel panic - not syncing: BUG! CPU: 0 PID: 313 Comm: mount Not tainted 4.2.5-00657-ge047887-dirty #25 Stack: 637af890 60062489 602aeb2e 604192ba 60387961 00000011 637af8a0 6038a835 637af9c0 6038776b 634ef32b 00000000 Call Trace: [<6001c86d>] show_stack+0xfe/0x15b [<6038a835>] dump_stack+0x2a/0x2c [<6038776b>] panic+0x13e/0x2b3 [<6020f099>] btrfs_read_sys_array+0x25d/0x2ff [<601cfbbe>] open_ctree+0x192d/0x27af [<6019c2c1>] btrfs_mount+0x8f5/0xb9a [<600bc9a7>] mount_fs+0x11/0xf3 [<600d5167>] vfs_kern_mount+0x75/0x11a [<6019bcb0>] btrfs_mount+0x2e4/0xb9a [<600bc9a7>] mount_fs+0x11/0xf3 [<600d5167>] vfs_kern_mount+0x75/0x11a [<600d710b>] do_mount+0xa35/0xbc9 [<600d7557>] SyS_mount+0x95/0xc8 [<6001e884>] handle_syscall+0x6b/0x8e Reported-by: Jiri Slaby Reported-by: Vegard Nossum CC: stable@vger.kernel.org # 3.19+ Signed-off-by: David Sterba fs/btrfs/volumes.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 35b3ad50baa4a5fc2ae616c0513d2987bfb52a85 Author: David Sterba Date: Mon Nov 30 16:51:29 2015 +0100 btrfs: better packing of btrfs_delayed_extent_op btrfs_delayed_extent_op can be packed in a better way, it's 40 bytes now and has 8 unused bytes. Reducing the level type to u8 makes it possible to squeeze it to the padding byte after key. The bitfields were switched to bool as there's space to store the full byte without increasing the whole structure, besides that the generated assembly is smaller. struct btrfs_delayed_extent_op { struct btrfs_disk_key key; /* 0 17 */ u8 level; /* 17 1 */ bool update_key; /* 18 1 */ bool update_flags; /* 19 1 */ bool is_data; /* 20 1 */ /* XXX 3 bytes hole, try to pack */ u64 flags_to_set; /* 24 8 */ /* size: 32, cachelines: 1, members: 6 */ /* sum members: 29, holes: 1, sum holes: 3 */ /* last cacheline: 32 bytes */ }; The final size is 32 bytes which gives +26 object per slab page. text data bss dec hex filename 938811 43670 23144 1005625 f5839 fs/btrfs/btrfs.ko.before 938747 43670 23144 1005561 f57f9 fs/btrfs/btrfs.ko.after Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 4 ++-- fs/btrfs/delayed-ref.h | 8 ++++---- fs/btrfs/extent-tree.c | 15 ++++++--------- fs/btrfs/extent-tree.h | 0 4 files changed, 12 insertions(+), 15 deletions(-) commit 8089fe62c6603860f6796ca80519b92391292f21 Author: David Sterba Date: Thu Nov 19 14:15:51 2015 +0100 btrfs: put delayed item hook into inode Inodes for delayed iput allocate a trivial helper structure, let's place the list hook directly into the inode and save a kmalloc (killing a __GFP_NOFAIL as a bonus) at the cost of increasing size of btrfs_inode. The inode can be put into the delayed_iputs list more than once and we have to keep the count. This means we can't use the list_splice to process a bunch of inodes because we'd lost track of the count if the inode is put into the delayed iputs again while it's processed. Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 4 ++++ fs/btrfs/inode.c | 56 ++++++++++++++++++++++---------------------------- 2 files changed, 29 insertions(+), 31 deletions(-) commit c5ca87819d7f10625b0940b356adb8ac0f1080d7 Author: Zhao Lei Date: Thu Nov 19 17:26:22 2015 +0800 btrfs: Support convert to -d dup for btrfs-convert Since we will add support for -d dup for non-mixed filesystem, kernel need to support converting to this raid-type. This patch remove limitation of above case. Tested by following script: (combination of dup conversion with fsck): export TEST_DEV='/dev/vdc' export TEST_DIR='/var/ltf/tester/mnt' do_dup_test() { local m_from="$1" local d_from="$2" local m_to="$3" local d_to="$4" echo "Convert from -m $m_from -d $d_from to -m $m_to -d $d_to" umount "$TEST_DIR" &>/dev/null ./mkfs.btrfs -f -m "$m_from" -d "$d_from" "$TEST_DEV" >/dev/null || return 1 mount "$TEST_DEV" "$TEST_DIR" || return 1 cp -a /sbin/* "$TEST_DIR" [[ "$m_from" != "$m_to" ]] && { ./btrfs balance start -f -mconvert="$m_to" "$TEST_DIR" || return 1 } [[ "$d_from" != "$d_to" ]] && { local opt=() [[ "$d_to" == single ]] && opt+=("-f") ./btrfs balance start "${opt[@]}" -dconvert="$d_to" "$TEST_DIR" || return 1 } umount "$TEST_DIR" || return 1 ./btrfsck "$TEST_DEV" || return 1 echo return 0 } test_all() { for m_from in single dup; do for d_from in single dup; do for m_to in single dup; do for d_to in single dup; do do_dup_test "$m_from" "$d_from" "$m_to" "$d_to" || return 1 done done done done } test_all Signed-off-by: Zhao Lei Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 8 -------- 1 file changed, 8 deletions(-) commit be7bd730841e69fe8f70120098596f648cd1f3ff Author: Josef Bacik Date: Thu Oct 22 15:05:09 2015 -0400 Btrfs: igrab inode in writepage We hit this panic on a few of our boxes this week where we have an ordered_extent with an NULL inode. We do an igrab() of the inode in writepages, but weren't doing it in writepage which can be called directly from the VM on dirty pages. If the inode has been unlinked then we could have I_FREEING set which means igrab() would return NULL and we get this panic. Fix this by trying to igrab in btrfs_writepage, and if it returns NULL then just redirty the page and return AOP_WRITEPAGE_ACTIVATE; so the VM knows it wasn't successful. Thanks, Signed-off-by: Josef Bacik Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit b2acdddfad13c38a1e8b927d83c3cf321f63601a Author: Anand Jain Date: Wed Oct 7 17:23:23 2015 +0800 Btrfs: add missing brelse when superblock checksum fails Looks like oversight, call brelse() when checksum fails. Further down the code, in the non error path, we do call brelse() and so we don't see brelse() in the goto error paths. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 1 + 1 file changed, 1 insertion(+) commit a4cdb556cae05cd3e7b602b3a44c01420c4e2258 Author: David Vrabel Date: Tue Dec 2 16:13:26 2014 +0000 xen/gntdev: add ioctl for grant copy Add IOCTL_GNTDEV_GRANT_COPY to allow applications to copy between user space buffers and grant references. This interface is similar to the GNTTABOP_copy hypercall ABI except the local buffers are provided using a virtual address (instead of a GFN and offset). To avoid userspace from having to page align its buffers the driver will use two or more ops if required. If the ioctl returns 0, the application must check the status of each segment with the segments status field. If the ioctl returns a -ve error code (EINVAL or EFAULT), the status of individual ops is undefined. Signed-off-by: David Vrabel Reviewed-by: Boris Ostrovsky drivers/xen/gntdev.c | 203 ++++++++++++++++++++++++++++++++++++++++++++++ include/uapi/xen/gntdev.h | 50 ++++++++++++ 2 files changed, 253 insertions(+) commit 9d5db23eecdb001ac26610d7a87ccdea566feee9 Author: Fengwei Yin Date: Sun Dec 20 21:20:41 2015 +0800 wcn36xx: split DMA mask register writing. Per comments from Bjorn Andersson , split DMA mask register writing as seperate patch in case we need bi-sect in the furture. Signed-off-by: Fengwei Yin Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/dxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ec7752fd9b9fe5924973390b784584e7481f52c Author: Fengwei Yin Date: Sun Dec 20 21:20:40 2015 +0800 wcn36xx: handle rx skb allocation failure to avoid system crash Lawrence reported that git clone could make system crash on a Qualcomm ARM soc based device (DragonBoard, 1G memory without swap) running 64bit Debian. It's turned out the crash is related with rx skb allocation failure. git could consume more than 600MB anonymous memory. And system is in extremely memory shortage case. But driver didn't handle the rx allocation failure case. This patch doesn't submit skb to upper layer if rx skb allocation fails. Instead, it reuse the old skb for rx DMA again. It's more like drop the packets if system is in memory shortage case. With this change, git clone is OOMed instead of system crash. Reported-by: King, Lawrence Signed-off-by: Fengwei Yin Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/dxe.c | 43 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit 19f2ce3f1114c5d59e5e4457ccdd15464070dc5f Author: Dan Carpenter Date: Sat Dec 19 13:59:19 2015 +0300 ath9k: fix ath9k_hw_nvram_check_version() There is a type bug so it always returns success. Fixes: 6fa658fd5ab2 ('ath9k: Simplify and fix eeprom endianness swapping') Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04a407f6b129b6e35de3250c313976a3a154476e Author: Loc Ho Date: Thu Dec 10 14:19:17 2015 -0700 i2c: dw: Add APM X-Gene ACPI I2C device support Enable APM X-Gene ACPI I2C device support by adding the corresponding ACPI ID. The platform ACPI APD corresponding change is required to provide the proper clock frequency input. Signed-off-by: Loc Ho Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/i2c/busses/i2c-designware-platdrv.c | 1 + 1 file changed, 1 insertion(+) commit b790eb20b8e4a5c913fc62c49562c821165b4fad Author: Loc Ho Date: Thu Dec 10 14:19:16 2015 -0700 ACPI / APD: Add APM X-Gene ACPI I2C device support Add APM X-Gene ACPI I2C device support by hooks into existent ACPI APD driver. To fully enable support, require another patch to add the X-Gene ACPI node into the DW I2C driver. Signed-off-by: Loc Ho Reviewed-by: Ken Xue Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit fa9e93b11c6716b115f485f03930fa5a5c529e14 Author: Andy Shevchenko Date: Mon Dec 21 22:31:09 2015 +0200 ACPI / LPSS: change 'does not have' to 'has' in comment The LPSS DMA device has neither _PS0 nor _PS3 method. Fix the wording in the comment line. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc0bb1fd5b0d72fba589b46be05c945171f9d6f3 Author: Andy Shevchenko Date: Fri Dec 4 23:49:25 2015 +0200 Revert "dmaengine: dw: platform: provide platform data for Intel" Since we have a work around to prevent a system hangup we don't need to provide a platform data explicitly anymore. This reverts commit 175267b389f781748e2bbb6c737e76b5c9bc4c88. Signed-off-by: Andy Shevchenko Acked-by: Vinod Koul Signed-off-by: Rafael J. Wysocki drivers/dma/dw/platform.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 02a21b79acdb48b312f1351fd7cc728e66e81149 Author: Andy Shevchenko Date: Fri Dec 4 23:49:24 2015 +0200 dmaengine: dw: return immediately from IRQ when DMA isn't in use There is no need to bother the hardware when all channels are idle. We have not to get any interrupts. Signed-off-by: Andy Shevchenko Acked-by: Vinod Koul Signed-off-by: Rafael J. Wysocki drivers/dma/dw/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3214658855c01a0dd62f02feb2ce79846524c6a0 Author: Andy Shevchenko Date: Fri Dec 4 23:49:23 2015 +0200 dmaengine: dw: platform: power on device on shutdown We have to call dw_dma_disable() to stop any ongoing transfer. On some platforms we can't do that since DMA device is powered off. Moreover we have no possibility at that point to check if the platform is affected or not. That's why we call pm_runtime_get_sync() / pm_runtime_put() unconditionally. On the other hand we can't use pm_runtime_suspended() because runtime PM framework is not fully used by the driver. Signed-off-by: Andy Shevchenko Acked-by: Vinod Koul Signed-off-by: Rafael J. Wysocki drivers/dma/dw/platform.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit eebb3e8d8aaf28f4bcaf12fd3645350bfd2f0b36 Author: Andy Shevchenko Date: Sat Dec 12 02:45:06 2015 +0100 ACPI / LPSS: override power state for LPSS DMA device This is a third approach to workaround long standing issue with LPSS on BayTrail. First one [1] was reverted since it didn't resolve the issue comprehensively. Second one [2] was rejected by internal review. The LPSS DMA controller does not have neither _PS0 nor _PS3 method. Moreover it can be powered off automatically whenever the last LPSS device goes down. In case of no power any access to the DMA controller will hang the system. The behaviour is reproduced on some HP laptops based on Intel BayTrail [3,4] as well as on ASuS T100TA transformer. Power on the LPSS island through the registers accessible in a specific way. [1] http://www.spinics.net/lists/linux-acpi/msg53963.html [2] https://bugzilla.redhat.com/attachment.cgi?id=1066779&action=diff [3] https://bugzilla.redhat.com/show_bug.cgi?id=1184273 [4] http://www.spinics.net/lists/dmaengine/msg01514.html Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki arch/x86/Kconfig | 3 +- arch/x86/include/asm/iosf_mbi.h | 2 + drivers/acpi/acpi_lpss.c | 153 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 150 insertions(+), 8 deletions(-) commit 50e81e2f0b0a9fdb9e5bd515270680c7c281ce1f Author: Pawel Kulakowski Date: Fri Dec 18 10:48:57 2015 +0100 ath9k: Enable support for cloned SKBS Ath9k driver does not modify tx skbs, so SUPPORTS_CLONED_SKBS flag can be set. Enabling this flag significant reduce number of copy operation during TCP Tx. This is especially noticeable on platforms with slower CPU (lower CPU usage brings profits in better TCP Tx troughput results). Tested on MIPS with 560 MHz clock Without CLONED_SKBS flag: TCP Tx 145 Mb/s (iperf result) __copy_user_common consumes 12.9% of CPU (result from perf tool) 0% CPU Idle With CLONED_SKBS flag: TCP Tx 170 Mb/s (iperf result) __copy_user_common consumes 1.8% of CPU (result from perf tool) 12% CPU Idle Signed-off-by: Pawel Kulakowski Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/init.c | 1 + 1 file changed, 1 insertion(+) commit ea3ade75db690dc47c78a77d71dfd7c2df3bb15d Author: Lior David Date: Wed Dec 16 17:51:46 2015 +0200 wil6210: support for platform specific crash recovery Added a simple interface for platform to perform crash recovery. When firmware crashes, wil driver can notify the platform which can trigger a crash recovery process. During the process the platform can request a ram dump from the wil driver as well as control when firmware recovery will start. This interface allows the platform to implement a more advanced crash recovery, for example to reset dependent subsystems in proper order, or to provide its own notifications during the recovery process. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/interrupt.c | 8 +++-- drivers/net/wireless/ath/wil6210/pcie_bus.c | 30 ++++++++++++++++-- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + drivers/net/wireless/ath/wil6210/wil_crash_dump.c | 3 +- drivers/net/wireless/ath/wil6210/wil_platform.c | 3 +- drivers/net/wireless/ath/wil6210/wil_platform.h | 38 +++++++++++++++++++++-- 6 files changed, 73 insertions(+), 10 deletions(-) commit dea16eddb4753129dbcd8dc8d1a58ff0cc4ea38c Author: Hamad Kadmany Date: Wed Dec 16 17:51:45 2015 +0200 wil6210: fix kernel OOPS when stopping interface during Rx traffic When network interface is stopping, some resources may be already released by the network stack, and Rx frames cause kernel OOPS (observed one is in netfilter code) Proper solution is to drop packets pending in reorder buffer. Signed-off-by: Hamad Kadmany Signed-off-by: Vladimir Kondratiev Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/rx_reorder.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e33a99e227e430a788467e5a85dc29f6df16b983 Author: Peter Oh Date: Thu Dec 31 15:26:20 2015 +0200 ath10k: set SM power save disabled to default value Use SMPS disabled as default because FW does not indicate any support of SMPS. This change will help STAs out that don’t support SMPS from sticking on 1SS, since they don’t have method to change it back to multiple chains. This change also should not affect power consumption of STAs supporting SMPS, because they are capable to switch the mode to dynamic or static either at the end of frame sequence or by using SMPS action frame. Signed-off-by: Peter Oh Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bc8474549e94efddb5d5791af0a015d13115b67b Author: Joerg Roedel Date: Thu Jan 7 12:16:51 2016 +0100 iommu/vt-d: Fix up error handling in alloc_iommu Only check for error when iommu->iommu_dev has been assigned and only assign drhd->iommu when the function can't fail anymore. Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 592033790e8276f7038efb480871598648464a01 Author: Nicholas Krause Date: Mon Jan 4 18:27:57 2016 -0500 iommu/vt-d: Check the return value of iommu_device_create() This adds the proper check to alloc_iommu to make sure that the call to iommu_device_create has completed successfully and if not return the error code to the caller after freeing up resources allocated previously. Signed-off-by: Nicholas Krause Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1fb260bc003d7c6196fc0ee3a169a2f6495d17fe Author: Dan Carpenter Date: Thu Jan 7 12:36:06 2016 +0300 iommu/amd: Remove an unneeded condition get_device_id() returns an unsigned short device id. It never fails and it never returns a negative so we can remove this condition. Signed-off-by: Dan Carpenter Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit c33246d793b5bb9d8be7c67918136c310185c23d Author: Lucas Stach Date: Wed Jan 6 14:36:40 2016 +0100 drm/etnaviv: fix workaround for GC500 The hardware description macros define the mask and shifts the wrong way around for the intended use, leading to the condition never being true and the chip revision ending up with the wrong value. Reported-by: Dan Carpenter Signed-off-by: Lucas Stach Acked-by: Christian Gmeiner drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 14da0a91bf4ac2a90d64446ddaa39a4869530f8c Author: Biao Huang Date: Mon Dec 28 15:09:03 2015 +0800 pinctrl: mediatek: Modify pinctrl bindings for mt2701 Signed-off-by: Biao Huang Acked-by: Rob Herring Reviewed-by: Mathias Brugger Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0af2593b2ad125880a78d1bba966e450cc2330df Author: David Matlack Date: Wed Dec 30 08:26:17 2015 -0800 kvm: x86: fix comment about {mmu,nested_mmu}.gva_to_gpa The comment had the meaning of mmu.gva_to_gpa and nested_mmu.gva_to_gpa swapped. Fix that, and also add some details describing how each translation works. Signed-off-by: David Matlack Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit def840ede34ea1fa47494c62fba06479af2abbc1 Merge: 7749266 c7da6fa Author: Paolo Bonzini Date: Thu Jan 7 11:00:57 2016 +0100 Merge tag 'kvm-arm-for-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-next KVM/ARM changes for Linux v4.5 - Complete rewrite of the arm64 world switch in C, hopefully paving the way for more sharing with the 32bit code, better maintainability and easier integration of new features. Also smaller and slightly faster in some cases... - Support for 16bit VM identifiers - Various cleanups commit 4afaee3c2b7fb49d3ec1bcd89c7b960b5ae646b3 Author: Stephen Boyd Date: Wed Jan 6 17:12:49 2016 -0800 Revert "pinctrl: qcom: make PMIC drivers bool" This reverts commit bda7c4c2b9767ce2af4394754498662d62079af5. These drivers build as modules now that we use platform_irq_count() instead of of_irq_count(). Cc: Rob Herring Cc: Andy Gross Signed-off-by: Stephen Boyd Signed-off-by: Linus Walleij drivers/pinctrl/qcom/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a5ea13f025e7bf3bb280a22f5fe63b7159358932 Author: Stephen Boyd Date: Wed Jan 6 17:37:41 2016 -0800 pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() of_irq_count() is not an exported symbol (and it shouldn't be used by platform drivers anyway) so use platform_irq_count() instead. This allows us to make the qcom pinctrl drivers modular again. Cc: Rob Herring Cc: Andy Gross Cc: Bjorn Andersson Signed-off-by: Stephen Boyd Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 4 +++- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 4 +++- drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 9 ++++++--- drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 9 ++++++--- 4 files changed, 18 insertions(+), 8 deletions(-) commit 4b83555d5098e73cf2c5ca7f86c17ca0ba3b968e Author: Stephen Boyd Date: Wed Jan 6 17:12:47 2016 -0800 driver-core: platform: Add platform_irq_count() A recent patch added calls to of_irq_count() in the qcom pinctrl drivers and that caused module build failures because of_irq_count() is not an exported symbol. We shouldn't export of_irq_count() to modules because it's an internal OF API that shouldn't be used by drivers. Platform drivers should use platform device APIs instead. Therefore, add a platform_irq_count() API that mirrors the of_irq_count() API so that platform drivers can stay DT agnostic. Cc: Andy Gross Acked-by: Rob Herring Acked-by: Greg Kroah-Hartman Signed-off-by: Linus Walleij drivers/base/platform.c | 20 ++++++++++++++++++++ include/linux/platform_device.h | 1 + 2 files changed, 21 insertions(+) commit 7683fe016c010a20b5f2d88b7d8dad198506f5f7 Author: Jia-Ju Bai Date: Mon Jan 4 15:55:38 2016 +0800 rt2x00pci: Disable memory-write-invalidate when the driver exits The driver calls pci_set_mwi to enable memory-write-invalidate when it is initialized, but does not call pci_clear_mwi when it is removed. Many other drivers calls pci_clear_mwi when pci_set_mwi is called, such as r8169, 8139cp and e1000. This patch adds pci_clear_mwi in error handling and removal procedure, which can fix the problem. Signed-off-by: Jia-Ju Bai Acked-by: Helmut Schaa Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 8ba83d4daab9b71dd27da3765f34d1ffa1fee2ec Author: Arend van Spriel Date: Sat Jan 2 09:41:42 2016 +0100 brcmfmac: introduce module parameter to force successful probe The module parameter can be used to ensure the probe succeeds thus claiming the device and allowing post-mortem debugging in case of firmware crash. It is only available when select CONFIG_BRCMDBG. Reviewed-by: Hante Meuleman Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 11 ++++++++++- drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h | 13 +++++++++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 ++ 3 files changed, 25 insertions(+), 1 deletion(-) commit 7d34b05605676736c6695ccdcec547055d07468f Author: Hante Meuleman Date: Sat Jan 2 09:41:41 2016 +0100 brcmfmac: Move all module parameters to one place Module parameters are defined in several files. Move them in one place and make them device specific or global. This makes it easier to override device specific settings by external data like platform data in the future. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 12 ++--- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 13 ++--- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 63 ++++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/common.h | 43 +++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/core.c | 22 ++++---- .../wireless/broadcom/brcm80211/brcmfmac/core.h | 5 +- .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 13 ++--- .../broadcom/brcm80211/brcmfmac/firmware.c | 16 +++--- .../broadcom/brcm80211/brcmfmac/fwsignal.c | 9 ++-- 9 files changed, 144 insertions(+), 52 deletions(-) commit 6a98d64a27de16f88b97a493577a5fb9d18ec000 Author: Hante Meuleman Date: Sat Jan 2 09:41:40 2016 +0100 brcmfmac: Fix warn trace on module unload while in ibss mode When the driver is being unloaded a situation can occur where the wirelesss core (cfg80211) wants to remove the ibss, but the state of brcmfmac has already been set to down. When an error is returned in that situation then that will result in a stack trace on removal of the wiphy object. This is avoided by returning 0 when device is down on a leave_ibss call. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ec64241c9fd2873979cf9c05eeaaa4cabe12032a Author: Arend van Spriel Date: Sat Jan 2 09:41:39 2016 +0100 brcmfmac: obtain feature info using 'cap' firmware command Several features in the driver directly map to a firmware feature listed in response of the 'cap' firmware command. For those features this response will be examined instead of attempting individual firmware commands. Reviewed-by: Hante Meuleman Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Reviewed-by: Mathy Vanhoef Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 53 +++++++++++++--------- 1 file changed, 31 insertions(+), 22 deletions(-) commit 48ed16e86b282309afa1b911271cb39fbcfb9f06 Author: Hante Meuleman Date: Sat Jan 2 09:41:38 2016 +0100 brcmfmac: Add support for scheduled scan mac randomization Scheduled scan be requested to use mac randomization. This patch checks the flags and enables the randomization if desired. Reviewed-by: Arend Van Spriel Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 54 +++++++++++++++++++--- .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 10 ++++ .../wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +- .../broadcom/brcm80211/brcmfmac/fwil_types.h | 17 +++++++ 4 files changed, 77 insertions(+), 8 deletions(-) commit 3f5893d1b30a92f3fac1587750b2402c40d66651 Author: Hante Meuleman Date: Sat Jan 2 09:41:37 2016 +0100 brcmfmac: Add get_station support for IBSS When get_station is requested for IBSS then an error will be printed and no information will be returned. This patch adds IBSS specific get station information function. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 51 ++++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/fwil.h | 1 + .../broadcom/brcm80211/brcmfmac/fwil_types.h | 17 ++++++++ 3 files changed, 69 insertions(+) commit 44129ed04b2b01c3ce9421bd3f530bd6d558e8cd Author: Franky Lin Date: Sat Jan 2 09:41:36 2016 +0100 brcmfmac: add arp offload ip address table configuration support Obtain ipv4 address through inetaddr notification for ARP offload host ip table configuration. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Hante Meuleman Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/core.c | 108 +++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/core.h | 2 + 2 files changed, 110 insertions(+) commit f7b7caa488eb209f1c63cc98104407c62753e406 Author: Alexey Khoroshilov Date: Sat Jan 2 02:12:38 2016 +0300 ipw2x00: add checks for dma mapping errors ipw2100_alloc_skb() and ipw2100_tx_send_data() do not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Kalle Valo drivers/net/wireless/intel/ipw2x00/ipw2100.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit ee548d4b1036aaba290a4eec68ba11590ad9cc73 Author: Amitkumar Karwar Date: Thu Dec 31 06:24:15 2015 -0800 mwifiex: reduce cloned skb queue size Driver supports Tx status ack feature. When hostapd/ wpa_supplicant asks for ack status of an EAPOL/ACTION frame, driver maintains a cloned skb for the packet until TX_STATUS event is received from firmware. Cloned skb queue gets flushed when connection is terminated or driver is unloaded. Let's reduce the queue size to avoid unnecessarily keeping memory allocated when environment is busy. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91442431c3f90d69e73f776847058d1ab2efdad1 Author: Xinming Hu Date: Thu Dec 31 06:24:14 2015 -0800 mwifiex: increase priority for critical message This patch increase the priority for some critical messages. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 6 +++--- drivers/net/wireless/marvell/mwifiex/sdio.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit fdb1e28e05c9d1d6d9c3226e5443ad12e2032e00 Author: Xinming Hu Date: Thu Dec 31 06:24:12 2015 -0800 mwifiex: fix missing debug messages Some critical messages are missed until "adapter->dev" gets initialized in mwifiex_register_dev(). We will use pr_* print message instead of mwifiex_dbg at those places to resolve the problem. Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 50f85e220f6f51798429a3cc74e7c76d27513bef Author: Insu Yun Date: Wed Dec 30 11:01:44 2015 -0500 mwifiex: correctly handling kzalloc Since kzalloc can be failed in memory pressure, it needs to be handled, otherwise NULL dereference could be happened Signed-off-by: Insu Yun Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sdio.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9ec855cc9e17fe111e1f868027a75ac7ae849997 Author: Julia Lawall Date: Wed Dec 30 12:20:49 2015 +0100 iwlegacy: 4965-mac: constify il_sensitivity_ranges structure The il_sensitivity_ranges is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de06c1db255fb70301651a0255c6147e0036ea01 Author: Guenter Roeck Date: Wed Jan 6 16:20:10 2016 -0800 gpio: xilinx: Do not use gpiochip_get_data() in xgpio_save_regs() Commit 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") replaces the use of container_of() with gpiochip_get_data(). Unfortunately, the data pointer is not yet set by the time xgpio_save_regs() is called, causing a system hang. Fixes: 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") Signed-off-by: Guenter Roeck Signed-off-by: Linus Walleij drivers/gpio/gpio-xilinx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 13bbdd370f67aef3351ad7bbc2fb624e3c23f905 Author: Sven Eckelmann Date: Sun Nov 29 01:48:57 2015 +0100 batman-adv: Fix invalid read while copying bat_iv.bcast_own batadv_iv_ogm_orig_del_if removes a part of the bcast_own which previously belonged to the now removed interface. This is done by copying all data which comes before the removed interface and then appending all the data which comes after the removed interface. The address calculation for the position of the data which comes after the removed interface assumed that the bat_iv.bcast_own is a pointer to a single byte datatype. But it is a pointer to unsigned long and thus the calculated position was wrong off factor sizeof(unsigned long). Fixes: 83a8342678a0 ("more basic routing code added (forwarding packets / bitarray added)") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli net/batman-adv/bat_iv_ogm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d6bd05794f18673097ec5e62e577754649a5c632 Author: Marc Gonzalez Date: Wed Jan 6 10:27:43 2016 +0100 ARM: tango: Fix UP build issues Move SMP setup to platsmp.c for consistency with other platforms. Signed-off-by: Marc Gonzalez Signed-off-by: Olof Johansson arch/arm/mach-tango/Makefile | 4 +++- arch/arm/mach-tango/platsmp.c | 16 ++++++++++++++++ arch/arm/mach-tango/setup.c | 14 -------------- 3 files changed, 19 insertions(+), 15 deletions(-) commit 954e953c279f387df7a821a524420b32429254a7 Author: Linus Walleij Date: Tue Jan 5 09:59:20 2016 +0100 ARM: versatile: select some defaults in defconfig This updates the Versatile defconfig to: - Use NO_HZ_IDLE and HIGH_RES_TIMERS - Enable the I2C driver - Enable the SPI driver - Enable the RTC driver for DS1338 as found on the Versatile boards - Compile in the MMCI MMC driver, which is good if you want to mount a root FS on the MMC card without having to first load this module from an initramfs Patch tested on the Versatile AB, QEMU for Versatile AB and QEMU for Versatile PB. Cc: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/versatile_defconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 233919c97e9cc8fd9c3767da2abe0214c9575424 Author: Krzysztof Kozlowski Date: Wed Dec 23 19:37:17 2015 +0900 ARM: multi_v7_defconfig: Enable fan, sensors and audio for Odroid XU3 For Odroid XU3-family enable the: - PWM fan (to control the CPU fan using thermal subsystem), - TI INA231 sensors (provide power measurements of big.LITTLE cores, DRAM and GPU), - Samsung sound (for Odroid XU3 and Snow as well). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9962b3d4f0788e8637211d7b999dcea60430df18 Author: Shawn Guo Date: Wed Dec 23 10:22:57 2015 +0800 ARM: dts: imx6q: clean up unused ipu2grp The pinctrl group ipu2grp is a leftover from the previous iomuxc DT cleanup. It's not used by anyone now. More importantly, it's getting in the way of saving the unnecessary pinfunc container node from the board dts files that include imx6q.dtsi. Let's clean it up. Signed-off-by: Shawn Guo Tested-by: Michael Trimarchi Signed-off-by: Olof Johansson arch/arm/boot/dts/imx6q.dtsi | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit ce96cb7386a57b270648f9ba6003065329a26bd3 Merge: 326ea45 94af7a3 Author: Olof Johansson Date: Thu Jan 7 06:05:59 2016 +0100 Merge tag 'samsung-clk-exynos4-4.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Add a Security SubSystem (SSS) clock for Exynos4, needed by exynos-rng driver (Pseudo Random Number Generator). * tag 'samsung-clk-exynos4-4.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: exynos4: Add SSS gate clock commit 3b78fae793c027140cfe635ef216bf60aa6498f4 Author: Timur Tabi Date: Mon Jan 4 15:37:42 2016 -0600 tty: amba-pl011: use iotype instead of access_32b to track 32-bit I/O Instead of defining a new field in the uart_amba_port structure, use the existing iotype field of the uart_port structure, which is intended for this purpose. If we need to use 32-bit register access, we set iotype to UPIO_MEM32, otherwise we set it to UPIO_MEM. For early console, specify the "mmio32" option on the kernel command-line. Example: earlycon=pl011,mmio32,0x3ced1000 Signed-off-by: Timur Tabi Signed-off-by: Greg Kroah-Hartman Documentation/kernel-parameters.txt | 5 ++++- drivers/tty/serial/amba-pl011.c | 16 +++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) commit cdf091ca2c3d6875e5f0fca28de4a6ca2f5273e6 Author: Russell King Date: Mon Jan 4 15:37:41 2016 -0600 tty: amba-pl011: fix earlycon register offsets The REG_x macros are indices into a table, not register offsets. Since earlycon does not have access to the vendor data, we can currently only support standard ARM PL011 devices. Signed-off-by: Russell King Tested-by: Huang Shijie Signed-off-by: Timur Tabi Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9e0efaf6b41bf22c2eb81258fc2a6f1538a643e5 Merge: c7f5d10 51cb67c Author: David S. Miller Date: Wed Jan 6 22:54:18 2016 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit de1475cc53b2d6442443dcf5d66ed0fc50ed3c7e Author: Fan Li Date: Mon Jan 4 15:56:50 2016 +0800 f2fs: read isize while holding i_mutex in fiemap make sure the isize we read doesn't change during the process. Signed-off-by: Fan li Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 957efb0c2144cc5ff1795f43bf2d2ca430eaa227 Author: Jaegeuk Kim Date: Sat Jan 2 09:23:27 2016 -0800 Revert "f2fs: check the node block address of newly allocated nid" Original issue is fixed by: f2fs: cover more area with nat_tree_lock This reverts commit 24928634f81b1592e83b37dcd89ed45c28f12feb. fs/f2fs/node.c | 9 --------- 1 file changed, 9 deletions(-) commit a51311938e14c17f5a94d30baac9d7bec71f5858 Author: Jaegeuk Kim Date: Sat Jan 2 09:19:41 2016 -0800 f2fs: cover more area with nat_tree_lock There was a subtle bug on nat cache management which incurs wrong nid allocation or wrong block addresses when try_to_free_nats is triggered heavily. This patch enlarges the previous coverage of nat_tree_lock to avoid data race. Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 48bf35de3133996fbac2be16430cd4ea00fa8d38 Author: Boris BREZILLON Date: Wed Dec 30 20:41:29 2015 +0100 mtd: nand: jz4740: remove custom 'erased check' implementation The jz4740 driver is manually checking for 'erased pages' while correcting ECC bytes. This logic can now done by the core infrastructure, and can thus be removed from this driver. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/nand/jz4740_nand.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit cc01e6075c7f5fee72746bb0ec763b84a46c3778 Author: Boris BREZILLON Date: Wed Dec 30 20:39:52 2015 +0100 mtd: nand: diskonchip: remove custom 'erased check' implementation The diskonchip driver is manually checking for 'erased pages' while correcting ECC bytes. This logic can now done by the core infrastructure, and can thus be removed from this driver. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/nand/diskonchip.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) commit bc29c95d2e51305ec611f29cc703c2fa0d2086de Author: Boris BREZILLON Date: Wed Dec 30 20:32:05 2015 +0100 mtd: nand: davinci: remove custom 'erased check' implementation The davinci driver is manually checking for 'erased pages' while correcting ECC bytes. This logic can now done by the core infrastructure, and can thus be removed from this driver. Signed-off-by: Boris Brezillon Tested-by: Franklin S Cooper Jr. Signed-off-by: Brian Norris drivers/mtd/nand/davinci_nand.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 40cbe6eee97b706f27bcc4c6aa1018bbe4f1e577 Author: Boris BREZILLON Date: Wed Dec 30 20:32:04 2015 +0100 mtd: nand: use nand_check_erased_ecc_chunk in default ECC read functions The default NAND read functions are relying on the underlying controller driver to correct bitflips, but some of those controllers cannot properly fix bitflips in erased pages. Check for bitflips in erased pages in default core functions if the driver delegated the this check by setting the NAND_ECC_GENERIC_ERASED_CHECK flag. Signed-off-by: Boris Brezillon Tested-by: Franklin S Cooper Jr. Signed-off-by: Brian Norris drivers/mtd/nand/nand_base.c | 53 ++++++++++++++++++++++++++++++++++++++------ include/linux/mtd/nand.h | 10 +++++++++ 2 files changed, 56 insertions(+), 7 deletions(-) commit 6e9411923b8f4c0e568cbae0f35b7ee4eb989914 Author: Boris BREZILLON Date: Wed Dec 30 20:32:03 2015 +0100 mtd: nand: return consistent error codes in ecc.correct() implementations The error code returned by the ecc.correct() are not consistent over the all implementations. Document the expected behavior in include/linux/mtd/nand.h and fix offending implementations. [Brian: this looks like a bugfix for the ECC reporting in the bf5xx_nand driver, but we haven't seen any testing results for it] Signed-off-by: Boris Brezillon Tested-by: Franklin S Cooper Jr. Signed-off-by: Brian Norris drivers/mtd/nand/atmel_nand.c | 2 +- drivers/mtd/nand/bf5xx_nand.c | 20 ++++++++++++++------ drivers/mtd/nand/davinci_nand.c | 6 +++--- drivers/mtd/nand/jz4740_nand.c | 4 ++-- drivers/mtd/nand/mxc_nand.c | 4 ++-- drivers/mtd/nand/nand_bch.c | 2 +- drivers/mtd/nand/nand_ecc.c | 2 +- drivers/mtd/nand/omap2.c | 6 +++--- drivers/mtd/nand/r852.c | 4 ++-- include/linux/mtd/nand.h | 8 +++++++- include/linux/mtd/nand_bch.h | 2 +- 11 files changed, 37 insertions(+), 23 deletions(-) commit c6084cbce435fbf800f47026896137b3bae483c3 Author: Ondrej Zary Date: Sun Jan 3 16:06:19 2016 +1100 ncr5380: Add support for HP C2502 HP C2502 cards (based on 53C400A chips) use different magic numbers for software-based I/O address configuration than other cards. The configuration is also extended to allow setting the IRQ. Move the configuration to a new function magic_configure() and move magic the magic numbers into an array. Add new magic numbers for these HP cards and hp_c2502 module parameter to use them, e.g.: modprobe g_NCR5380 ncr_irq=7 ncr_addr=0x280 hp_c2502=1 Tested with HP C2502 and DTCT-436P. Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/g_NCR5380.c | 74 +++++++++++++++++++++++++++++++++++++----------- drivers/scsi/g_NCR5380.h | 1 + 2 files changed, 59 insertions(+), 16 deletions(-) commit 42fc6370c95df507b925b11372e8baa17eb0da41 Author: Ondrej Zary Date: Sun Jan 3 16:06:18 2016 +1100 ncr5380: Fix wait for 53C80 registers registers after PDMA The check for 53C80 registers accessibility was commented out because it was broken (inverted). Fix and enable it. Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/g_NCR5380.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) commit aeb51152bb55451f7a3ddb8c1ec4d4bc19d4a195 Author: Ondrej Zary Date: Sun Jan 3 16:06:17 2016 +1100 ncr5380: Enable PDMA for DTC chips Add I/O register mapping for DTC chips and enable PDMA mode. These chips have 16-bit wide HOST BUFFER register and it must be read by 16-bit accesses (we lose data otherwise). Large PIO transfers crash at least the DTCT-436P chip (all reads result in 0xFF) so this patch actually makes it work. The chip also crashes when we bang on the C400 host status register too heavily after PDMA write - a small udelay is needed. Tested on DTCT-436P and verified that it does not break 53C400A. Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/g_NCR5380.c | 38 +++++++++++++++++++++++++++++++------- drivers/scsi/g_NCR5380.h | 3 ++- 2 files changed, 33 insertions(+), 8 deletions(-) commit cecf3beef0ef311b5b375b6307fd5dc3f5dc3edb Author: Ondrej Zary Date: Sun Jan 3 16:06:16 2016 +1100 ncr5380: Enable PDMA for NCR53C400A Add I/O register mapping for NCR53C400A and enable PDMA mode to improve performance and fix non-working IRQ. Tested with HP C2502 (and user-space enabler). Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/g_NCR5380.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 12150797d064e2936154a8c01be24ce1b0115cfe Author: Ondrej Zary Date: Sun Jan 3 16:06:15 2016 +1100 ncr5380: Use runtime register mapping Convert compile-time C400_ register mapping to runtime mapping. This removes the weird negative register offsets and allows adding additional mappings. While at it, convert read/write loops into insb/outsb. Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.h | 13 +------ drivers/scsi/g_NCR5380.c | 88 ++++++++++++++++++++++-------------------------- drivers/scsi/g_NCR5380.h | 12 ++++--- 3 files changed, 49 insertions(+), 64 deletions(-) commit f03946210d67be9a33ad63f6a0eed7cdf8c28334 Author: Ondrej Zary Date: Sun Jan 3 16:06:14 2016 +1100 ncr5380: Fix pseudo DMA transfers on 53C400 Pseudo-DMA (PDMA) has been broken for ages, resulting in hangs on 53C400-based cards. According to 53C400 datasheet, PDMA transfer length must be a multiple of 128. Check if that's true and use PIO if it's not. This makes PDMA work on 53C400 (Canon FG2-5202). Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/g_NCR5380.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3d07d22b3d475ba9b0adfe083c537ee1ada034c8 Author: Finn Thain Date: Sun Jan 3 16:06:13 2016 +1100 ncr5380: Cleanup whitespace and parentheses Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 30 +++++++++++++++++++----------- drivers/scsi/atari_NCR5380.c | 26 +++++++++++++------------- 2 files changed, 32 insertions(+), 24 deletions(-) commit ac15c3bcbd5b989762487949963e2498da292803 Author: Finn Thain Date: Sun Jan 3 16:06:12 2016 +1100 atari_NCR5380: Merge changes from NCR5380.c In the past, atari_NCR5380.c was overlooked by those working on NCR5380.c and this caused needless divergence. All of the changes in this patch were taken from NCR5380.c. This removes some unimportant discrepancies between the two core driver forks so that 'diff' can be used to reveal the important ones, to facilitate reunification. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/atari_NCR5380.c | 84 +++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 32 deletions(-) commit 0d2cf867e44278ec1a0ba4419d9718336d308acb Author: Finn Thain Date: Sun Jan 3 16:06:11 2016 +1100 ncr5380: Merge changes from atari_NCR5380.c In the past, NCR5380.c was overlooked by those working on atari_NCR5380.c and this caused needless divergence. All of the changes in this patch were taken from atari_NCR5380.c. This removes some unimportant discrepancies between the two core driver forks so that 'diff' can be used to reveal the important ones, to facilitate reunification. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 155 +++++++++++++++++++++++++++---------------------- 1 file changed, 87 insertions(+), 68 deletions(-) commit 594d4ba36c0a03967da37ee6e7675ede1a67abb4 Author: Finn Thain Date: Sun Jan 3 16:06:10 2016 +1100 ncr5380: Fix whitespace in comments using regexp Hanging indentation was a poor choice for the text inside comments. It has been used in the wrong places and done badly elsewhere. There is little consistency within any file. One fork of the core driver uses tabs for this indentation while the other uses spaces. Better to use flush-left alignment throughout. This patch is the result of the following substitution. It replaces tabs and spaces at the start of a comment line with a single space. perl -i -pe 's,^(\t*[/ ]\*)[ \t]+,$1 ,' drivers/scsi/{atari_,}NCR5380.c This removes some unimportant discrepancies between the two core driver forks so that the important ones become obvious, to facilitate reunification. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 204 +++++++++++++++++++++---------------------- drivers/scsi/atari_NCR5380.c | 106 +++++++++++----------- 2 files changed, 155 insertions(+), 155 deletions(-) commit aff0cf9a7e098ecf1651f6f3a8cb0fbe272d6cf4 Author: Finn Thain Date: Sun Jan 3 16:06:09 2016 +1100 ncr5380: Fix trailing whitespace using regexp This patch is the result of the following substitution. It removes any tabs and spaces at the end of a line. perl -i -pe 's,[\t ]+$,,' drivers/scsi/{atari_,}NCR5380.c This removes some unimportant discrepancies between the two core driver forks so that the important ones become obvious, to facilitate reunification. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 372 ++++++++++++++++++++++++------------------------- 1 file changed, 186 insertions(+), 186 deletions(-) commit c16df32e5f4c5c0bd8c8f6ade82141f2debddc3c Author: Finn Thain Date: Sun Jan 3 16:06:08 2016 +1100 ncr5380: Cleanup comments The CVS revision log is not nearly as useful as the history/history.git repo, so remove it. Roman's commentary at the top of his driver repeats the same information elsewhere in the file so remove it. Also remove some other redundant or obsolete comments. Both the driver and the datasheets confusingly refer to a DMA access for a SCSI WRITE command as a "DMA write". Similarly a SCSI READ command is called a "DMA read". This is the opposite of the usual convention. Thankfully, the chip documentation and driver code also use "DMA send" and "DMA receive", so adopt this terminology. This removes some unimportant discrepancies between the two core driver forks so that 'diff' can be used to reveal the important ones, to facilitate reunification. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 170 ++++++++++--------------------------------- drivers/scsi/atari_NCR5380.c | 109 ++++----------------------- 2 files changed, 54 insertions(+), 225 deletions(-) commit 0a4e36125451165847c6d4e7d5633d92e53f5c69 Author: Finn Thain Date: Sun Jan 3 16:06:07 2016 +1100 ncr5380: Fix soft lockups Because of the rudimentary design of the chip, it is necessary to poll the SCSI bus signals during PIO and this tends to hog the CPU. The driver will accept new commands while others execute, and this causes a soft lockup because the workqueue item will not terminate until the issue queue is emptied. When exercising dmx3191d using sequential IO from dd, the driver is sent 512 KiB WRITE commands and 128 KiB READs. For a PIO transfer, the rate is is only about 300 KiB/s, so these are long-running commands. And although PDMA may run at several MiB/s, interrupts are disabled for the duration of the transfer. Fix the unresponsiveness and soft lockup issues by calling cond_resched() after each command is completed and by limiting max_sectors for drivers that don't implement real DMA. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 6 ++++-- drivers/scsi/arm/cumana_1.c | 1 + drivers/scsi/arm/oak.c | 1 + drivers/scsi/atari_NCR5380.c | 6 ++++-- drivers/scsi/dmx3191d.c | 1 + drivers/scsi/dtc.c | 1 + drivers/scsi/g_NCR5380.c | 1 + drivers/scsi/mac_scsi.c | 1 + drivers/scsi/pas16.c | 1 + drivers/scsi/t128.c | 1 + 10 files changed, 16 insertions(+), 4 deletions(-) commit cd46140a9a2f8fe0208262dc5f4d1fba15c93063 Author: Finn Thain Date: Sun Jan 3 16:06:06 2016 +1100 atari_scsi, sun3_scsi: Remove global Scsi_Host pointer This refactoring removes two global Scsi_Host pointers. This improves consistency with other ncr5380 drivers. Adopting the same conventions as the other drivers makes them easier to read. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/atari_NCR5380.c | 5 +-- drivers/scsi/atari_scsi.c | 29 +++++++++--------- drivers/scsi/sun3_scsi.c | 72 +++++++++++--------------------------------- 3 files changed, 36 insertions(+), 70 deletions(-) commit b746545f8bb0c4280c247353d61ac93620f5ef17 Author: Finn Thain Date: Sun Jan 3 16:06:05 2016 +1100 atari_NCR5380: Eliminate HOSTNO macro Keep the two core driver forks in sync. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 71 +++++++++++++++--------------- drivers/scsi/atari_NCR5380.c | 102 ++++++++++++++++++++----------------------- 2 files changed, 84 insertions(+), 89 deletions(-) commit 6a6ff4ac0d2d2a706d2a55a35e42e7a77397e45a Author: Finn Thain Date: Sun Jan 3 16:06:04 2016 +1100 atari_NCR5380: Remove HOSTNO macro from printk() and seq_printf() calls Remove the HOSTNO macro that is peculiar to atari_NCR5380.c and contributes to the problem of divergence of the NCR5380 core drivers. Keep NCR5380.c in sync. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 17 +++++++++-------- drivers/scsi/atari_NCR5380.c | 23 +++++++++-------------- 2 files changed, 18 insertions(+), 22 deletions(-) commit 62717f537e1b325665711166c33cd2d06fd6a5cd Author: Finn Thain Date: Sun Jan 3 16:06:03 2016 +1100 ncr5380: Implement new eh_bus_reset_handler NCR5380.c lacks a sane eh_bus_reset_handler. The atari_NCR5380.c code is much better but it should not throw out the issue queue (that would be a host reset) and it neglects to set the result code for commands that it throws out. Fix these bugs and keep the two core drivers in sync. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 50 +++++++++++++++++++++++++++++++++++++++++++- drivers/scsi/atari_NCR5380.c | 39 ++++++++++++++++++++-------------- 2 files changed, 72 insertions(+), 17 deletions(-) commit 707d62b37fbb1de74da6e5cf263bcd8223ae3cf7 Author: Finn Thain Date: Sun Jan 3 16:06:02 2016 +1100 ncr5380: Fix EH during arbitration and selection During arbitration and selection, the relevant command is invisible to exception handlers and can be found only in a pointer on the stack of a different thread. When eh_abort_handler can't find a given command, it can't decide whether that command was completed already or is still in arbitration or selection phase. But it must return either SUCCESS (e.g. command completed earlier) or FAILED (could not abort the nexus, try bus reset). The solution is to make sure all commands belonging to the LLD are always visible to exception handlers. Add another scsi_cmnd pointer to the hostdata struct to track the command in arbitration or selection phase. Replace 'retain_dma_irq' with the new 'selecting' pointer, to bring atari_NCR5380.c into line with NCR5380.c. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 76 ++++++++++++++++++++++++++++++---------- drivers/scsi/NCR5380.h | 4 +-- drivers/scsi/atari_NCR5380.c | 82 ++++++++++++++++++++++++++++++++------------ 3 files changed, 119 insertions(+), 43 deletions(-) commit 8b00c3d5d40da0477fceffadcfbc2c09f24104d0 Author: Finn Thain Date: Sun Jan 3 16:06:01 2016 +1100 ncr5380: Implement new eh_abort_handler Introduce a new eh_abort_handler implementation. This one attempts to follow all of the rules relating to EH handlers. There is still a known bug: during selection, a command becomes invisible to the EH handlers because it only appears in a pointer on the stack of a different thread. This bug is addressed in a subsequent patch. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 163 +++++++++++++++++++++++++++++++++++++----- drivers/scsi/atari_NCR5380.c | 165 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 290 insertions(+), 38 deletions(-) commit f27db8eb98a19e0f1b5748f8aad9fb4a98301eb0 Author: Finn Thain Date: Sun Jan 3 16:06:00 2016 +1100 ncr5380: Fix autosense bugs NCR5380_information_transfer() may re-queue a command for autosense, after calling scsi_eh_prep_cmnd(). This creates several possibilities: 1. Reselection may intervene before the re-queued command gets processed. If the reconnected command then undergoes autosense, this causes the scsi_eh_save data from the previous command to be overwritten. 2. After NCR5380_information_transfer() calls scsi_eh_prep_cmnd(), a new REQUEST SENSE command may arrive. This would be queued ahead of any command already undergoing autosense, which means the scsi_eh_save data might be restored to the wrong command. 3. After NCR5380_information_transfer() calls scsi_eh_prep_cmnd(), eh_abort_handler() may abort the command. But the scsi_eh_save data is not discarded, which means the scsi_eh_save data might be incorrectly restored to the next REQUEST SENSE command issued. This patch adds a new autosense list so that commands that are re-queued because of a CHECK CONDITION result can be kept apart from the REQUEST SENSE commands that arrive via queuecommand. This patch also adds a function dedicated to dequeueing and preparing the next command for processing. By refactoring the main loop in this way, scsi_eh_save takes place when an autosense command is dequeued rather than when re-queued. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 194 ++++++++++++++++++++--------------- drivers/scsi/NCR5380.h | 2 + drivers/scsi/atari_NCR5380.c | 239 ++++++++++++++++++++++++------------------- 3 files changed, 249 insertions(+), 186 deletions(-) commit 677e01947e4a34ad97e9867af20435b8281c38e0 Author: Finn Thain Date: Sun Jan 3 16:05:59 2016 +1100 ncr5380: Refactor command completion Implement a 'complete_cmd' function to complete commands. This is needed by the following patch; the new function provides a site for the logic needed to correctly handle REQUEST SENSE commands. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 31 ++++++++++++++++++++++------- drivers/scsi/atari_NCR5380.c | 46 +++++++++++++++++++++++++++++--------------- 2 files changed, 55 insertions(+), 22 deletions(-) commit 32b26a104237c1ba3575a6c8d47e46060cc416fb Author: Finn Thain Date: Sun Jan 3 16:05:58 2016 +1100 ncr5380: Use standard list data structure The NCR5380 drivers have a home-spun linked list implementation for scsi_cmnd structs that uses cmd->host_scribble as a 'next' pointer. Adopt the standard list_head data structure and list operations instead. Remove the eh_abort_handler rather than convert it. Doing the conversion would only be churn because the existing EH handlers don't work and get replaced in a subsequent patch. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 214 ++++++-------------------------- drivers/scsi/NCR5380.h | 16 ++- drivers/scsi/arm/cumana_1.c | 1 + drivers/scsi/arm/oak.c | 1 + drivers/scsi/atari_NCR5380.c | 287 +++++++------------------------------------ drivers/scsi/atari_scsi.c | 1 + drivers/scsi/dmx3191d.c | 1 + drivers/scsi/dtc.c | 1 + drivers/scsi/g_NCR5380.c | 1 + drivers/scsi/mac_scsi.c | 1 + drivers/scsi/pas16.c | 1 + drivers/scsi/sun3_scsi.c | 1 + drivers/scsi/t128.c | 1 + 13 files changed, 106 insertions(+), 421 deletions(-) commit 5299b3caf525c5a6cdebbe162733c8ff1692c4d0 Author: Finn Thain Date: Sun Jan 3 16:05:57 2016 +1100 ncr5380: Remove redundant volatile qualifiers The hostdata struct is now protected by a spin lock so the volatile qualifiers are redundant. Remove them. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.h | 12 ++++++------ drivers/scsi/atari_NCR5380.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 9903fa914aece320599e74b39ae6cf1bebe1a796 Author: Finn Thain Date: Sun Jan 3 16:05:56 2016 +1100 ncr5380: Remove LIST and REMOVE macros Printing command pointers can be useful when debugging queues. Other than that, the LIST and REMOVE macros are just clutter. These macros are redundant now that NDEBUG_QUEUES causes pointers to be printed, so remove them. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 19 ------------------- drivers/scsi/atari_NCR5380.c | 32 -------------------------------- 2 files changed, 51 deletions(-) commit 0d3d9a423cd9a4007908a7ec36bf1261e4e5b773 Author: Finn Thain Date: Sun Jan 3 16:05:55 2016 +1100 ncr5380: Use dsprintk() for queue debugging Print the command pointers in the log messages for debugging queue data structures. The LIST and REMOVE macros can then be removed. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 36 ++++++++++++++++++++++++------------ drivers/scsi/atari_NCR5380.c | 43 +++++++++++++++++++++++-------------------- 2 files changed, 47 insertions(+), 32 deletions(-) commit e8a601444297e336a7c4355f07b4bb386962894c Author: Finn Thain Date: Sun Jan 3 16:05:54 2016 +1100 ncr5380: Use shost_priv helper Make use of the shost_priv() helper. Remove HOSTDATA and SETUP_HOSTDATA macros because they harm readability. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 23 ++++++++++------------- drivers/scsi/atari_NCR5380.c | 20 +++++++------------- 2 files changed, 17 insertions(+), 26 deletions(-) commit dbb6b350695186b340e621f5edf4c31420f9ab23 Author: Finn Thain Date: Sun Jan 3 16:05:53 2016 +1100 ncr5380: Remove H_NO macro and introduce dsprintk Replace all H_NO and some HOSTNO macros (both peculiar to atari_NCR5380.c) with a new dsprintk macro that's more useful and more consistent. The new macro avoids a lot of boilerplate in new code in subsequent patches. Keep NCR5380.c in sync. Remaining HOSTNO macros are removed as side-effects of subsequent patches. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 9 +++++--- drivers/scsi/NCR5380.h | 5 ++++ drivers/scsi/atari_NCR5380.c | 54 ++++++++++++++++++++++---------------------- 3 files changed, 38 insertions(+), 30 deletions(-) commit e5c3fddfaa066e440315e713ddf8b60e9ac48cf7 Author: Finn Thain Date: Sun Jan 3 16:05:52 2016 +1100 ncr5380: Remove command list debug code Some NCR5380 hosts offer a .show_info method to access the contents of the various command list data structures from a procfs file. When NDEBUG is set, the same information is sent to the console during EH. The two core drivers, atari_NCR5380.c and NCR5380.c differ here. Because it is just for debugging, the easiest way to fix the discrepancy is simply remove this code. The only remaining users of NCR5380_show_info() and NCR5380_write_info() are drivers that define PSEUDO_DMA. The others have no use for the .show_info method, so don't initialize it. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 70 +++------------------------------ drivers/scsi/arm/oak.c | 2 - drivers/scsi/atari_NCR5380.c | 94 ++------------------------------------------ drivers/scsi/atari_scsi.c | 2 - drivers/scsi/g_NCR5380.c | 1 - drivers/scsi/sun3_scsi.c | 2 - 6 files changed, 9 insertions(+), 162 deletions(-) commit 11d2f63b9cf5665ce9dc425236b326dd327c4aa3 Author: Finn Thain Date: Sun Jan 3 16:05:51 2016 +1100 ncr5380: Change instance->host_lock to hostdata->lock NCR5380.c presently uses the instance->host_lock spin lock. Convert this to a new spin lock that protects the NCR5380_hostdata struct. atari_NCR5380.c previously used local_irq_save/restore() rather than a spin lock. Convert this to hostdata->lock in irq mode. For SMP platforms, the interrupt handler now also acquires the spin lock. This brings all locking in the two core drivers into agreement. Adding this locking also means that a bunch of volatile qualifiers can be removed from the members of the NCR5380_hostdata struct. This is done in a subsequent patch. Proper locking will allow the abort handler to locate a command being aborted. This is presently impossible if the abort handler is invoked when the command has been moved from a queue to a pointer on the stack. (If eh_abort_handler can't determine whether a command has been completed or is still being processed then it can't decide whether to return success or failure.) The hostdata spin lock is now held when calling NCR5380_select() and NCR5380_information_transfer(). Where possible, the lock is dropped for polling and PIO transfers. Clean up the now-redundant SELECT_ENABLE_REG writes, that used to provide limited mutual exclusion between information_transfer() and reselect(). Accessing hostdata->connected without data races means taking the lock; cleanup these accesses. The new spin lock falls away for m68k and other UP builds, so this should have little impact there. In the SMP case the new lock should be uncontested even when the SCSI bus is contested. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 82 ++++++++++++++++---------- drivers/scsi/NCR5380.h | 1 + drivers/scsi/atari_NCR5380.c | 135 ++++++++++++++++++------------------------- 3 files changed, 109 insertions(+), 109 deletions(-) commit be3f4121aa352d8fef77a57df4b5e106d7f9a917 Author: Finn Thain Date: Sun Jan 3 16:05:50 2016 +1100 ncr5380: Remove redundant ICR_ARBITRATION_LOST test and eliminate FLAG_DTC3181E Remove FLAG_DTC3181E. It was used to suppress a final Arbitration Lost (SEL asserted) test that isn't actually needed. The test was suppressed because it causes problems for DTC436 and DTC536 chips. It takes place after the host wins arbitration, so SEL has been asserted. These chips can't seem to tell whether it was the host or another bus device that did so. This questionable final test appears in a flow chart in an early NCR5380 datasheet. It was removed from later documents like the DP5380 datasheet. By the time this final test takes place, the driver has already tested the Arbitration Lost bit several times. The first test happens 3 us after BUS FREE (or longer due to register access delays). The protocol requires that a device stop signalling within 1.8 us after BUS FREE unless it won arbitration, in which case it must assert SEL, which is detected 1.2 us later by the first Arbitration Lost test. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 14 +------------- drivers/scsi/NCR5380.h | 1 - drivers/scsi/atari_NCR5380.c | 9 --------- drivers/scsi/dmx3191d.c | 2 +- drivers/scsi/g_NCR5380.c | 2 +- 5 files changed, 3 insertions(+), 25 deletions(-) commit e42d01518d006c4557e202bc9e8fdc41972fb49f Author: Finn Thain Date: Sun Jan 3 16:05:49 2016 +1100 atari_NCR5380: Fix queue_size limit When a target reports a QUEUE_FULL condition it causes the driver to update the 'queue_size' limit with the number of currently allocated tags. At least, that's what's supposed to happen, according to the comments. Unfortunately the terms in the assignment are swapped. Fix this and cleanup some obsolete comments. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/atari_NCR5380.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit aa2e2cb1dde0e72e039f94210fb17e73661a6351 Author: Finn Thain Date: Sun Jan 3 16:05:48 2016 +1100 ncr5380: Fix and cleanup scsi_host_template initializers Add missing .module initializer. Use distinct .proc_name values for the g_NCR5380 and g_NCR5380_mmio modules. Remove pointless CAN_QUEUE and CMD_PER_LUN override macros. Cleanup whitespace and code style. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/atari_scsi.c | 2 +- drivers/scsi/dmx3191d.c | 1 + drivers/scsi/dtc.c | 32 ++++++++++++++++---------------- drivers/scsi/dtc.h | 8 -------- drivers/scsi/g_NCR5380.c | 26 +++++++++++++------------- drivers/scsi/g_NCR5380.h | 10 ++-------- drivers/scsi/mac_scsi.c | 28 ++++++++++++++-------------- drivers/scsi/pas16.c | 32 ++++++++++++++++---------------- drivers/scsi/pas16.h | 8 -------- drivers/scsi/sun3_scsi.c | 6 +++--- drivers/scsi/t128.c | 32 ++++++++++++++++---------------- drivers/scsi/t128.h | 8 -------- 12 files changed, 82 insertions(+), 111 deletions(-) commit bf1a0c6f8f2c1959082f1b55b907dde100c87501 Author: Finn Thain Date: Sun Jan 3 16:05:47 2016 +1100 ncr5380: Fix NDEBUG_NO_DATAOUT flag NDEBUG_NO_DATAOUT should not disable DATA IN phases too. Fix this. (This bug has long been fixed in atari_NCR5380.c.) Signed-off-by: Finn Thain Tested-by: Ondrej Zary Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 161c0059a2a80aefe7000d9ab7ce5c36e5463b5f Author: Finn Thain Date: Sun Jan 3 16:05:46 2016 +1100 ncr5380: Cleanup #include directives Remove unused includes (stat.h, signal.h, proc_fs.h) and move includes needed by the core drivers into the common header (delay.h etc). Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 2 -- drivers/scsi/NCR5380.h | 4 ++++ drivers/scsi/arm/cumana_1.c | 4 ---- drivers/scsi/arm/oak.c | 2 -- drivers/scsi/atari_NCR5380.c | 5 ----- drivers/scsi/atari_scsi.c | 1 - drivers/scsi/dmx3191d.c | 5 ----- drivers/scsi/dtc.c | 4 +--- drivers/scsi/g_NCR5380.c | 6 ++---- drivers/scsi/mac_scsi.c | 1 - drivers/scsi/pas16.c | 4 ---- drivers/scsi/t128.c | 3 --- 12 files changed, 7 insertions(+), 34 deletions(-) commit e0783ed3660aecb83af580cdace583980b22809b Author: Finn Thain Date: Sun Jan 3 16:05:45 2016 +1100 ncr5380: Fix off-by-one bug in extended_msg[] bounds check Fix the array bounds check when transferring an extended message from the target. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 3 ++- drivers/scsi/atari_NCR5380.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 72064a783b0c24dc4325295ffba949c115aff6d2 Author: Finn Thain Date: Sun Jan 3 16:05:44 2016 +1100 ncr5380: Standardize reselection handling Bring the two NCR5380_reselect() implementations into agreement. Replace infinite loops in atari_NCR5380.c with timeouts, as per NCR5380.c. Remove 'abort' flag in NCR5380.c as per atari_NCR5380.c -- if reselection fails, there may be no MESSAGE IN phase so don't attempt data transfer. During selection, don't interfere with the chip registers after a reselection interrupt intervenes. Clean up some trivial issues with code style, comments and printk. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 115 ++++++++++++++++++++++++------------------- drivers/scsi/atari_NCR5380.c | 50 +++++++++++-------- 2 files changed, 93 insertions(+), 72 deletions(-) commit 9db6024e55ee9b53c411d618e2a9476f6a130151 Author: Finn Thain Date: Sun Jan 3 16:05:43 2016 +1100 ncr5380: Replace READ_OVERRUNS macro with FLAG_NO_DMA_FIXUPS The workarounds for chip errata appear twice, in slightly different forms. One is used when defined(REAL_DMA) || defined(REAL_DMA_POLL), the other when defined(PSEUDO_DMA). In the PDMA case, the workarounds have been made conditional on FLAG_NO_DMA_FIXUPS. Do the same for the DMA case, to eliminate the READ_OVERRUNS macro. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 55181be8ced18697e48f75d53028b9ee36522dba Author: Finn Thain Date: Sun Jan 3 16:05:42 2016 +1100 ncr5380: Replace redundant flags with FLAG_NO_DMA_FIXUP The flags DMA_WORKS_RIGHT, FLAG_NCR53C400 and FLAG_HAS_LAST_BYTE_SENT all mean the same thing, i.e. the chip is not a 538[01]. (More recent devices such as the 53C80 have a 'Last Byte Sent' bit in the Target Command Register as well as other fixes for End-of-DMA errata.) These flags have no additional meanings since previous cleanup patches eliminated the NCR53C400 macro, moved g_NCR5380-specific code out of the core driver and standardized interrupt handling. Use the FLAG_NO_DMA_FIXUP flag to suppress End-of-DMA errata workarounds, for those cards and drivers that make use of the TCR_LAST_BYTE_SENT bit. Remove the old flags. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 68 ++++++++++++++++-------------------------------- drivers/scsi/NCR5380.h | 4 +-- drivers/scsi/dtc.c | 4 +-- drivers/scsi/g_NCR5380.c | 2 +- 4 files changed, 25 insertions(+), 53 deletions(-) commit b32ade124494fc16eb19521ac310cbd5cb48dda8 Author: Finn Thain Date: Sun Jan 3 16:05:41 2016 +1100 ncr5380: Introduce NCR5380_poll_politely2 SCSI bus protocol sometimes requires monitoring two related conditions simultaneously. Enhance NCR5380_poll_politely() for this purpose, and put it to use in the arbitration algorithm. It will also find use in pseudo DMA. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 66 +++++++++++++++++++++++++------------------- drivers/scsi/atari_NCR5380.c | 62 ++++++++++++++++++++++++----------------- 2 files changed, 75 insertions(+), 53 deletions(-) commit cd400825c95d4b883232614255c4f35c53bf3582 Author: Finn Thain Date: Sun Jan 3 16:05:40 2016 +1100 ncr5380: Standardize interrupt handling Because interrupt handling is crucial to the core driver(s), all wrapper drivers need to agree on this code. This patch removes discrepancies. NCR5380_intr() in NCR5380.c has the following pointless loop that differs from the code in atari_NCR5380.c. done = 1; do { /* ... */ } while (!done); The 'done' flag gets cleared when a reconnected command is to be processed from the work queue. But in NCR5380.c, the flag is also used to cause the interrupt conditions to be re-examined. Perhaps this was because NCR5380_reselect() was expected to cause another interrupt, or perhaps the remaining present interrupt conditions need to be handled after the NCR5380_reselect() call? Actually, both possibilities are bogus, as is the loop itself. It seems have been overlooked in the hit-and-miss removal of scsi host instance list iteration many years ago; see history/history.git commit 491447e1fcff ("[PATCH] next NCR5380 updates") and commit 69e1a9482e57 ("[PATCH] fix up NCR5380 private data"). See also my earlier patch, "Always retry arbitration and selection". The datasheet says, "IRQ can be reset simply by reading the Reset Parity/Interrupt Register". So don't treat the chip IRQ like a level-triggered interrupt. Of the conditions that set the IRQ flag, some are level-triggered and some are edge-triggered, which means IRQ itself must be edge-triggered. Some interrupt conditions are latched and some are not. Before clearing the chip IRQ flag, clear all state that may cause it to be raised. That means clearing the DMA Mode and Busy Monitor bits in the Mode Register and clearing the host ID in the Select Enable register. Also clean up some printk's and some comments. Keep atari_NCR5380.c and NCR5380.c in agreement. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 185 ++++++++++++++++++++++++------------------- drivers/scsi/atari_NCR5380.c | 154 ++++++++++++++++++----------------- drivers/scsi/dtc.c | 8 -- drivers/scsi/g_NCR5380.c | 2 - 4 files changed, 178 insertions(+), 171 deletions(-) commit d1af9c7f4a69824440d2d755ddc3b861712ef024 Author: Finn Thain Date: Sun Jan 3 16:05:39 2016 +1100 ncr5380: Remove UNSAFE macro Configuring core drivers using macros like this one prevents re-unifying the core driver forks, and prevents implementing the core driver as a library or a platform driver. The UNSAFE macro in particular is a poor workaround for the problem of interrupt latency. Releasing the locks complicates things because then we would have to handle the possibility of EH handler invocation during a PDMA transfer. The comments say that instead of using this macro, "you're going to be better off twiddling with transfersize". I agree. Remove this stuff. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 15 --------------- drivers/scsi/dtc.c | 2 -- drivers/scsi/pas16.c | 1 - 3 files changed, 18 deletions(-) commit 010e89d18c4e66ab69d64bab439eba988d16fcc9 Author: Finn Thain Date: Sun Jan 3 16:05:38 2016 +1100 ncr5380: Standardize work queueing algorithm The complex main_running/queue_main mechanism is peculiar to atari_NCR5380.c. It isn't SMP safe and offers little value given that the work queue already offers concurrency management. Remove this complexity to bring atari_NCR5380.c closer to NCR5380.c. It is not a good idea to call the information transfer state machine from queuecommand because, according to Documentation/scsi/scsi_mid_low_api.txt that could happen in soft irq context. Fix this. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.h | 1 - drivers/scsi/atari_NCR5380.c | 80 ++++---------------------------------------- 2 files changed, 6 insertions(+), 75 deletions(-) commit 8d8601a757688386e914b922cc267a9244e0fdc9 Author: Finn Thain Date: Sun Jan 3 16:05:37 2016 +1100 ncr5380: Use work_struct instead of delayed_work Each host instance now has it's own work queue so the main() work item can sleep when necessary. That means we can use a simple work item rather than a delayed work item. This brings NCR5380.c closer to atari_NCR5380.c. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 12 +++++------- drivers/scsi/NCR5380.h | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) commit 401e79fe8d9f0151ad99e6fd7c1bd2e178c84d25 Author: Finn Thain Date: Sun Jan 3 16:05:36 2016 +1100 ncr5380: Dont wait for BUS FREE after disconnect When there is a queued command and no connected command, NCR5380_select() is called and arbitration begins. The chip waits for BUS FREE once the MR_ARBITRATE bit in the mode register is enabled. That means there is no need to wait for BUS FREE after disconnecting. There is presently no polling for BUS FREE after sending an ABORT or other message that might lead to disconnection. It only happens after COMMAND COMPLETE or DISCONNECT messages, which seems inconsistent. Remove the polling for !BSY in the COMMAND COMPLETE and DISCONNECT cases. BTW, the comments say "avoid nasty timeouts" and perhaps BUS FREE polling was somehow helpful back in Linux v0.99.14u, when it was introduced. The relevant timeout is presently 1 second (for bus arbitration). Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 7 ------- drivers/scsi/atari_NCR5380.c | 11 ----------- 2 files changed, 18 deletions(-) commit 55500d9b08295e3b6016b53879dea1cb7787f1b0 Author: Finn Thain Date: Sun Jan 3 16:05:35 2016 +1100 atari_NCR5380: Use arbitration timeout Allow target selection to fail with a timeout instead of waiting in infinite loops. This gets rid of the unused NCR_TIMEOUT macro, it is more defensive and has proved helpful in debugging. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 44 ++++++++++++++++++---------------- drivers/scsi/atari_NCR5380.c | 57 +++++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 52 deletions(-) commit 80d3eb6df46603e0b7e9a7361fe5b98383182c7f Author: Finn Thain Date: Sun Jan 3 16:05:34 2016 +1100 atari_NCR5380: Set do_abort() timeouts Use timeouts in do_abort() in atari_NCR5380.c instead of infinite loops. Also fix the kernel-doc comment. Keep the two core driver forks in sync. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 26 +++++++++++++------------- drivers/scsi/atari_NCR5380.c | 34 +++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 26 deletions(-) commit f35d34744c85b2ea31a3fe624616c10229ff1fb3 Author: Finn Thain Date: Sun Jan 3 16:05:33 2016 +1100 ncr5380: Fix bus phase in do_abort() NCR5380_poll_politely() returns either 0 (success) or -ETIMEDOUT. However, in do_abort(), the return value is incorrectly taken to be the status register value. This means that the bus is put into DATA OUT phase instead of MESSAGE OUT. Fix this. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1cc160e1ba938d34581181517221913683031d29 Author: Finn Thain Date: Sun Jan 3 16:05:32 2016 +1100 ncr5380: Fix !REQ timeout in do_abort() NCR5380_poll_politely() never returns -1. That means do_abort() can fail to handle a timeout after waiting for the target to negate REQ. Fix this and cleanup other NCR5380_poll_politely() call sites. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 340b96126d8abf859aa8af2fed31ed11ef9f4600 Author: Finn Thain Date: Sun Jan 3 16:05:31 2016 +1100 ncr5380: Add missing break after case MESSAGE_REJECT MESSAGE REJECT does not imply DISCONNECT: the target is about to enter MESSAGE IN or MESSAGE OUT phase. This bug fix comes from atari_NCR5380.c. Unfortunately it never made it into the original NCR5380.c core driver. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 1 + 1 file changed, 1 insertion(+) commit 2f10e47ccf26301c7ca1127e2f6c3dfce45ff634 Author: Hannes Reinecke Date: Sun Jan 3 16:05:30 2016 +1100 ncr5380: Remove references to linked commands Some old drivers partially implemented support for linked commands using a "proposed" next_link pointer in struct scsi_cmnd that never actually existed. Remove this code. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 42 ------------------------------- drivers/scsi/atari_NCR5380.c | 60 -------------------------------------------- 2 files changed, 102 deletions(-) commit 1bb40589ea377894478653beb4c92b1b1b8a0659 Author: Finn Thain Date: Sun Jan 3 16:05:29 2016 +1100 ncr5380: Drop DEF_SCSI_QCMD macro Remove the DEF_SCSI_QCMD macro (already removed from atari_NCR5380.c). The lock provided by DEF_SCSI_QCMD is only needed for queue data structures. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 30 +++++++++++++++--------------- drivers/scsi/atari_NCR5380.c | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) commit 9dafbd939a224b96868fd8db6909662a4cab5957 Author: Finn Thain Date: Sun Jan 3 16:05:28 2016 +1100 ncr5380: Add missing lock in eh_abort_handler The host spin lock needs to be acquired by NCR5380_abort() before it calls NCR5380_select(). This patch doesn't actually fix the EH issues in this driver but it does avoid this: BUG: spinlock already unlocked on CPU#0, kworker/u4:1/14 lock: 0xc0c0f834, .magic: dead4ead, .owner: /-1, .owner_cpu: -1 CPU: 0 PID: 14 Comm: kworker/u4:1 Not tainted 3.15.5 #5 Workqueue: scsi_tmf_4 scmd_eh_abort_handler Call Trace: [ef885d70] [c0008acc] show_stack+0x70/0x1bc (unreliable) [ef885db0] [c0492a00] dump_stack+0x84/0x684 [ef885dc0] [c006f314] spin_dump+0xd0/0xe8 [ef885dd0] [c006f460] do_raw_spin_unlock+0xd4/0xd8 [ef885df0] [c0491c8c] _raw_spin_unlock_irq+0x10/0x3c [ef885e00] [f381fe3c] NCR5380_select+0x3e4/0x6e8 [dmx3191d] [ef885e40] [f382026c] NCR5380_abort+0x12c/0x190 [dmx3191d] [ef885e60] [c02fec9c] scmd_eh_abort_handler+0x100/0x460 [ef885e80] [c0046470] process_one_work+0x16c/0x420 [ef885ea0] [c0046870] worker_thread+0x14c/0x430 [ef885ed0] [c004e4f4] kthread+0xd8/0xec [ef885f40] [c00124d4] ret_from_kernel_thread+0x5c/0x64 Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a2edc4a63b4f89016053fe5da3fdac3798f3e2ae Author: Finn Thain Date: Sun Jan 3 16:05:27 2016 +1100 ncr5380: Fix NCR5380_transfer_pio() result According to the SCSI-2 draft revision 10L, atari_NCR5380.c is correct when it says that the phase lines are valid up until ACK is negated following the transmission of the last byte in MESSAGE IN phase. This is true for all information transfer phases, from target to initiator. Sample the phase bits in STATUS_REG so that NCR5380_transfer_pio() can return the correct result. The return value is presently unused (perhaps because of bugs like this) but this change at least fixes the caller's phase variable, which is passed by reference. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 12 +++++++++--- drivers/scsi/atari_NCR5380.c | 11 ++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) commit 686f3990e6a9111f97f2d385f4d1c1a5b0628c15 Author: Finn Thain Date: Sun Jan 3 16:05:26 2016 +1100 ncr5380: Rework disconnect versus poll logic The atari_NCR5380.c and NCR5380.c core drivers differ in their handling of target disconnection. This is partly because atari_NCR5380.c had all of the polling and sleeping removed to become entirely interrupt-driven, and it is partly because of damage done to NCR5380.c after atari_NCR5380.c was forked. See commit 37cd23b44929 ("Linux 2.1.105") in history/history.git. The polling changes that were made in v2.1.105 are questionable at best: if REQ is not already asserted when NCR5380_transfer_pio() is invoked, and if the expected phase is DATA IN or DATA OUT, the function will schedule main() to execute after USLEEP_SLEEP jiffies and then return. The problems here are the expected REQ timing and the sleep interval*. Avoid this issue by using NCR5380_poll_politely() instead of scheduling main(). The atari_NCR5380.c core driver requires the use of the chip interrupt and always permits target disconnection. It sets the cmd->device->disconnect flag when a device disconnects, but never tests this flag. The NCR5380.c core driver permits disconnection only when instance->irq != NO_IRQ. It sets the cmd->device->disconnect flag when a device disconnects and it tests this flag in a couple of places: 1. During NCR5380_information_transfer(), following COMMAND OUT phase, if !cmd->device->disconnect, the initiator will take a guess as to whether or not the target will then choose to go to MESSAGE IN phase and disconnect. If the driver guesses "yes", it will schedule main() to execute after USLEEP_SLEEP jiffies and then return there. Unfortunately the driver may guess "yes" even after it has denied the target the disconnection privilege. When the target does not disconnect, the sleep can be beneficial, assuming the sleep interval is appropriate (mostly it is not*). And even if the driver guesses "yes" correctly, and the target would then disconnect, the driver still has to go through the MESSAGE IN phase in order to get to BUS FREE phase. The main loop can do nothing useful until BUS FREE, and sleeping just delays the phase transition. 2. If !cmd->device->disconnect and REQ is not already asserted when NCR5380_information_transfer() is invoked, the function polls for REQ for USLEEP_POLL jiffies. If REQ is not asserted, it then schedules main() to execute after USLEEP_SLEEP jiffies and returns. The idea is apparently to yeild the CPU while waiting for REQ. This is conditional upon !cmd->device->disconnect, but there seems to be no rhyme or reason for that. For example, the flag may be unset because disconnection privilege was denied because the driver has no IRQ. Or the flag may be unset because the device has never needed to disconnect before. Or if the flag is set, disconnection may have no relevance to the present bus phase. Another deficiency of the existing algorithm is as follows. When the driver has no IRQ, it prevents disconnection, and generally polls and sleeps more than it would normally. Now, if the driver is going to poll anyway, why not allow the target to disconnect? That way the driver can do something useful with the bus instead of polling unproductively! Avoid this pointless latency, complexity and guesswork by using NCR5380_poll_politely() instead of scheduling main(). * For g_NCR5380, the time intervals for USLEEP_SLEEP and USLEEP_POLL are 200 ms and 10 ms, respectively. They are 20 ms and 200 ms respectively for the other NCR5380 drivers. There doesn't seem to be any reason for this discrepancy. The timing seems to have no relation to the type of adapter. Bizarrely, the timing in g_NCR5380 seems to relate only to one particular type of target device. This patch attempts to solve the problem for all NCR5380 drivers and all target devices. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 137 +++---------------------------------------- drivers/scsi/NCR5380.h | 11 ---- drivers/scsi/atari_NCR5380.c | 24 +++----- drivers/scsi/g_NCR5380.c | 4 -- 4 files changed, 15 insertions(+), 161 deletions(-) commit ff3d4578840fd96a50558edf02ca0178b9ebb652 Author: Finn Thain Date: Sun Jan 3 16:05:25 2016 +1100 ncr5380: Implement NCR5380_dma_xfer_len and remove LIMIT_TRANSFERSIZE macro Follow the example of the atari_NCR5380.c core driver and adopt the NCR5380_dma_xfer_len() hook. Implement NCR5380_dma_xfer_len() for dtc.c and g_NCR5380.c to take care of the limitations of these cards. Keep the default for drivers using PSEUDO_DMA. Eliminate the unused macro LIMIT_TRANSFERSIZE. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 34 ++++++---------------------------- drivers/scsi/arm/cumana_1.c | 3 +++ drivers/scsi/arm/oak.c | 2 ++ drivers/scsi/atari_NCR5380.c | 8 +++++--- drivers/scsi/dtc.c | 14 ++++++++++++++ drivers/scsi/dtc.h | 3 +++ drivers/scsi/g_NCR5380.c | 15 +++++++++++++++ drivers/scsi/g_NCR5380.h | 3 +++ drivers/scsi/mac_scsi.c | 1 + drivers/scsi/pas16.h | 2 ++ drivers/scsi/t128.h | 2 ++ 11 files changed, 56 insertions(+), 31 deletions(-) commit 1d3db59d59861481349437231c263b6c7a0eef78 Author: Finn Thain Date: Sun Jan 3 16:05:24 2016 +1100 ncr5380: Always retry arbitration and selection If NCR5380_select() returns -1, it means arbitration was lost or selection failed and should be retried. If the main loop simply terminates when there are still commands on the issue queue, they will remain queued until they expire. Fix this by clearing the 'done' flag after selection failure or lost arbitration. The "else break" clause in NCR5380_main() that gets removed here appears to be a vestige of a long-gone loop that iterated over host instances. See commit 491447e1fcff ("[PATCH] next NCR5380 updates") in history/history.git. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 3 +-- drivers/scsi/atari_NCR5380.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) commit ae753a3387504daa11b8779a00d37923f971c6d0 Author: Finn Thain Date: Sun Jan 3 16:05:23 2016 +1100 ncr5380: Eliminate selecting state Linux v2.1.105 changed the algorithm for polling for the BSY signal in NCR5380_select() and NCR5380_main(). Presently, this code has a bug. Back then, NCR5380_set_timer(hostdata, 1) meant reschedule main() after sleeping for 10 ms. Repeated 25 times this provided the recommended 250 ms selection time-out delay. This got broken when HZ became configurable. We could fix this but there's no need to reschedule the main loop. This BSY polling presently happens when the NCR5380_main() work queue item calls NCR5380_select(), which in turn schedules NCR5380_main(), which calls NCR5380_select() again, and so on. This algorithm is a deviation from the simpler one in atari_NCR5380.c. The extra complexity and state is pointless. There's no reason to stop selection half-way and return to to the main loop when the main loop can do nothing useful until selection completes. So just poll for BSY. We can sleep while polling now that we have a suitable workqueue. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 74 +++++++++----------------------------------- drivers/scsi/NCR5380.h | 2 -- drivers/scsi/atari_NCR5380.c | 49 +++++++++-------------------- 3 files changed, 29 insertions(+), 96 deletions(-) commit 2f854b82b001b5d05b4e1c81acb947f7bd9cee9f Author: Finn Thain Date: Sun Jan 3 16:05:22 2016 +1100 ncr5380: Sleep when polling, if possible When in process context, sleep during polling if doing so won't add significant latency. In interrupt context or if the lock is held, poll briefly then give up. Keep both core drivers in sync. Calibrate busy-wait iterations to allow for variation in chip register access times between different 5380 hardware implementations. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 84 +++++++++++++++++++++++++++----------------- drivers/scsi/NCR5380.h | 1 + drivers/scsi/atari_NCR5380.c | 62 +++++++++++++++++++++----------- 3 files changed, 94 insertions(+), 53 deletions(-) commit 0ad0eff98fec3c940ec199047ff580abaaa5bb1a Author: Finn Thain Date: Sun Jan 3 16:05:21 2016 +1100 ncr5380: Introduce unbound workqueue Allocate a work queue that will permit busy waiting and sleeping. This means NCR5380_init() can potentially fail, so add this error path. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 15 +++++++++++---- drivers/scsi/NCR5380.h | 1 + drivers/scsi/arm/cumana_1.c | 8 ++++++-- drivers/scsi/arm/oak.c | 8 ++++++-- drivers/scsi/atari_NCR5380.c | 8 +++++++- drivers/scsi/atari_scsi.c | 5 ++++- drivers/scsi/dmx3191d.c | 17 +++++++++++------ drivers/scsi/dtc.c | 11 +++++++++-- drivers/scsi/g_NCR5380.c | 31 +++++++++++++++---------------- drivers/scsi/mac_scsi.c | 5 ++++- drivers/scsi/pas16.c | 10 ++++++++-- drivers/scsi/sun3_scsi.c | 5 ++++- drivers/scsi/t128.c | 13 ++++++++++--- 13 files changed, 96 insertions(+), 41 deletions(-) commit e52bbd5ccf53d2a73e524adb26b6d8a4f810ccb4 Author: Finn Thain Date: Sun Jan 3 16:05:20 2016 +1100 ncr5380: Cleanup bogus {request,release}_region() calls Commit 8b801ead3d7a ("[ARM] rpc: update Acorn SCSI drivers to modern ecard interfaces") neglected to remove a request_region() call in cumana_1.c. Commit eda32612f7b2 ("[PATCH] give all LLDD driver a ->release method") in history/history.git added some pointless release_region() calls in dtc.c, pas16.c and t128.c. Fix these issues. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/arm/cumana_1.c | 6 ------ drivers/scsi/dtc.c | 2 -- drivers/scsi/pas16.c | 2 -- drivers/scsi/t128.c | 2 -- 4 files changed, 12 deletions(-) commit 4d029e9ae9c382b149b16632f49970d8b215e2da Author: Finn Thain Date: Sun Jan 3 16:05:19 2016 +1100 ncr5380: Eliminate USLEEP_WAITLONG delay Linux 2.1.105 introduced the USLEEP_WAITLONG delay, apparently "needed for Mustek scanners". It is intended to stall the issue queue for 5 seconds. There are a number of problems with this. 1. Only g_NCR5380 enables the delay, which implies that the other five drivers using the NCR5380.c core driver remain incompatible with Mustek scanners. 2. The delay is not implemented by atari_NCR5380.c, which is problematic for re-unifying the two core driver forks. 3. The delay is implemented using NCR5380_set_timer() which makes it unreliable. A new command queued by the mid-layer cancels the delay. 4. The delay is applied indiscriminately in several situations in which NCR5380_select() returns -1. These are-- reselection by the target, failure of the target to assert BSY, and failure of the target to assert REQ. It's clear from the comments that USLEEP_WAITLONG is not relevant to the reselection case. And reportedly, these scanners do not disconnect. 5. atari_NCR5380.c was forked before Linux 2.1.105, so it was spared some of the damage done to NCR5380.c. In this case, the atari_NCR5380.c core driver was more standard-compliant and may not have needed any workaround like the USLEEP_WAITLONG kludge. The compliance issue was addressed in the previous patch. If these scanners still don't work, we need a better solution. Retrying selection until EH aborts a command offers equivalent robustness. Bugs in the existing driver prevent EH working correctly but this is addressed in a subsequent patch. Remove USLEEP_WAITLONG. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 19 +++++-------------- drivers/scsi/g_NCR5380.c | 1 - 2 files changed, 5 insertions(+), 15 deletions(-) commit cf13b0837d7da2f3dce96e1f364fade13c8648ba Author: Finn Thain Date: Sun Jan 3 16:05:18 2016 +1100 ncr5380: Keep BSY asserted when entering SELECTION phase NCR5380.c is not compliant with the SCSI-2 standard (at least, not with the draft revision 10L that I have to refer to). The selection algorithm in atari_NCR5380.c is correct, so use that. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 8 +++++++- drivers/scsi/atari_NCR5380.c | 7 ++++--- 2 files changed, 11 insertions(+), 4 deletions(-) commit 1f1b0c74dfaf6264d239823ed5aeb8dcdd62838c Author: Finn Thain Date: Sun Jan 3 16:05:17 2016 +1100 ncr5380: Proceed with next command after NCR5380_select() calls scsi_done If a target disappears from the SCSI bus, NCR5380_select() may subsequently fail with a time-out. In this situation, scsi_done is called and NCR5380_select() returns 0. Both hostdata->connected and hostdata->selecting are NULL and the main loop should proceed with the next command in the issue queue. Clarify this logic. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 8 ++++++-- drivers/scsi/atari_NCR5380.c | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) commit ac9399d09544525ff4713ab942cb44a7cea29a84 Author: Finn Thain Date: Sun Jan 3 16:05:16 2016 +1100 ncr5380: Always escalate bad target time-out in NCR5380_select() Remove the restart_select and targets_present variables introduced in Linux v1.1.38. The former was used only for a questionable debug printk and the latter "so we can call a select failure a retryable condition". Well, retrying select failure in general is a different problem to a target that doesn't assert BSY. We need to handle these two cases differently; the latter case can be left to the SCSI ML. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 13 ------------- drivers/scsi/NCR5380.h | 6 ------ drivers/scsi/atari_NCR5380.c | 13 ------------- 3 files changed, 32 deletions(-) commit 6323876f5539e808a293395b1960427c62d2436d Author: Finn Thain Date: Sun Jan 3 16:05:15 2016 +1100 ncr5380: Use return instead of goto in NCR5380_select() The "failed" label in NCR5380_select() is not helpful. Some failures return 0, others -1. Use return instead of goto to improve clarity and brevity, like atari_NCR5380.c does. Fix the relevant comments. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 30 ++++++++---------------------- drivers/scsi/atari_NCR5380.c | 6 +++--- 2 files changed, 11 insertions(+), 25 deletions(-) commit 206cc031ad591f2759ba4e82d35fbb2050a2648b Author: Finn Thain Date: Sun Jan 3 16:05:14 2016 +1100 ncr5380: Remove redundant register writes Remove the duplicate write to the Select Enable Register that appeared in v1.1.38. Also remove the redundant write to Initiator Command Register prior to calling do_abort(). Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 2 -- drivers/scsi/atari_NCR5380.c | 3 --- 2 files changed, 5 deletions(-) commit 9b68d3415b0838a80f9a32dbedd385bf5d83bef8 Author: Finn Thain Date: Sun Jan 3 16:05:13 2016 +1100 ncr5380: Remove unused hostdata->aborted flag The aborted flag was introduced in v1.1.38 but never used. Remove it. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 2 -- drivers/scsi/NCR5380.h | 1 - drivers/scsi/atari_NCR5380.c | 2 -- 3 files changed, 5 deletions(-) commit 3be1b3ea6de93b6b58c37dc3fafcf3ec228880ed Author: Finn Thain Date: Sun Jan 3 16:05:12 2016 +1100 ncr5380: Simplify bus reset handlers Make use of do_reset() in the bus reset handler in atari_NCR5380.c. The version in NCR5380.c already does so. Keep them in sync. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 20 +++++++++++--------- drivers/scsi/atari_NCR5380.c | 30 ++++++++++++------------------ 2 files changed, 23 insertions(+), 27 deletions(-) commit 9c3f0e2b52ada30fe72beec27b83e91e12566609 Author: Finn Thain Date: Sun Jan 3 16:05:11 2016 +1100 atari_NCR5380: Remove RESET_BOOT, CONFIG_ATARI_SCSI_TOSHIBA_DELAY and CONFIG_ATARI_SCSI_RESET_BOOT The atari_NCR5380.c core driver now takes care of bus reset upon driver initialization if required (same as NCR5380.c). Move the Toshiba CD-ROM support into the core driver, enabled with a host flag, so that all NCR5380 drivers can make use of it. Drop the RESET_BOOT macros and the ATARI_SCSI_RESET_BOOT and ATARI_SCSI_TOSHIBA_DELAY Kconfig symbols, which are now redundant. Remove the atari_scsi_reset_boot(), mac_scsi_reset_boot() and sun3_scsi_reset_boot() routines. None of this duplicated code is needed now that all drivers can use NCR5380_maybe_reset_bus(). This brings atari_scsi, mac_scsi and sun3_scsi into line with all of the other NCR5380 drivers. The bus reset may raise an interrupt. That would be new behaviour for atari_scsi only when CONFIG_ATARI_SCSI_RESET_BOOT=n. The ST DMA interrupt is not assigned to atari_scsi at this stage, so CONFIG_ATARI_SCSI_RESET_BOOT=y may well be problematic already. Regardless, do_reset() now raises and clears the interrupt within local_irq_save/restore which should avoid problems. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 17 ------------ drivers/scsi/NCR5380.c | 17 ++++++++++-- drivers/scsi/NCR5380.h | 1 + drivers/scsi/atari_NCR5380.c | 22 ++++++++++----- drivers/scsi/atari_scsi.c | 60 ++++++---------------------------------- drivers/scsi/mac_scsi.c | 65 +++++++------------------------------------- drivers/scsi/sun3_scsi.c | 47 +------------------------------- 7 files changed, 51 insertions(+), 178 deletions(-) commit 636b1ec8575a60fb305ad6e3ede5e79d287754b6 Author: Finn Thain Date: Sun Jan 3 16:05:10 2016 +1100 atari_NCR5380: Reset bus on driver initialization if required Merge the bus reset code from NCR5380.c into atari_NCR5380.c. This allows for removal of a lot of duplicated code conditional on the RESET_BOOT macro (in the next patch). The atari_NCR5380.c fork lacks the do_reset() and NCR5380_poll_politely() routines from NCR5380.c, so introduce them. They are indispensible. Keep the two implementations in sync. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 33 ++++++++----- drivers/scsi/atari_NCR5380.c | 113 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 12 deletions(-) commit 4d8c08c71ea261a31855e4919fa8b875cd507ef3 Author: Finn Thain Date: Sun Jan 3 16:05:09 2016 +1100 ncr5380: Move NCR53C400-specific code Move board-specific code like this, NCR5380_write(C400_CONTROL_STATUS_REG, CSR_BASE); from the core driver to the board driver. Eliminate the NCR53C400 macro from the core driver. Removal of all macros like this one will be necessary in order to have one core driver that can support all kinds of boards. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 18 ------------------ drivers/scsi/g_NCR5380.c | 21 ++++++++++++++++----- drivers/scsi/g_NCR5380.h | 6 ++---- 3 files changed, 18 insertions(+), 27 deletions(-) commit b6488f97d3b5b602a066956e58a1ba282456d79b Author: Finn Thain Date: Sun Jan 3 16:05:08 2016 +1100 ncr5380: Split NCR5380_init() into two functions This patch splits the NCR5380_init() function into two parts, similar to the scheme used with atari_NCR5380.c. This avoids two problems. Firstly, NCR5380_init() may perform a bus reset, which would cause the chip to assert IRQ. The chip is unable to mask its bus reset interrupt. Drivers can't call request_irq() before calling NCR5380_init(), because initialization must happen before the interrupt handler executes. If driver initialization causes an interrupt it may be problematic on some platforms. To avoid that, first move the bus reset code into NCR5380_maybe_reset_bus(). Secondly, NCR5380_init() contains some board-specific interrupt setup code for the NCR53C400 that does not belong in the core driver. In moving this code, better not re-order interrupt initialization and bus reset. Again, the solution is to move the bus reset code into NCR5380_maybe_reset_bus(). Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 34 ++++++++++++++++++++-------------- drivers/scsi/NCR5380.h | 1 + drivers/scsi/arm/cumana_1.c | 2 ++ drivers/scsi/arm/oak.c | 2 ++ drivers/scsi/dmx3191d.c | 2 ++ drivers/scsi/dtc.c | 2 ++ drivers/scsi/g_NCR5380.c | 2 ++ drivers/scsi/pas16.c | 2 ++ drivers/scsi/t128.c | 2 ++ 9 files changed, 35 insertions(+), 14 deletions(-) commit b01ec34895720348dab7eae6bfb28a5799130bce Author: Finn Thain Date: Sun Jan 3 16:05:07 2016 +1100 ncr5380: Remove NCR5380_instance_name macro This macro makes the code cryptic. Remove it. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 2 +- drivers/scsi/g_NCR5380.c | 7 ++++--- drivers/scsi/g_NCR5380.h | 2 -- 3 files changed, 5 insertions(+), 6 deletions(-) commit 54d8fe4425c9d3fdf8473c1833c6807b61c6e70e Author: Finn Thain Date: Sun Jan 3 16:05:06 2016 +1100 ncr5380: Remove NCR5380_local_declare and NCR5380_setup macros The NCR5380_local_declare and NCR5380_setup macros exist to define and initialize a particular local variable, to provide the address of the chip registers needed for the driver's implementation of its NCR5380_read/write register access macros. In cumana_1 and macscsi, these macros generate pointless code like this, struct Scsi_Host *_instance; _instance = instance; In pas16, the use of NCR5380_read/write in pas16_hw_detect() requires that the io_port local variable has been defined and initialized, but the NCR5380_local_declare and NCR5380_setup macros can't be used for that purpose because the Scsi_Host struct has not yet been instantiated. Moreover, these macros were removed from atari_NCR5380.c long ago and now they constitute yet another discrepancy between the two core driver forks. Remove these "optimizations". Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 60 +++++++-------------------------------------- drivers/scsi/arm/cumana_1.c | 6 ++--- drivers/scsi/arm/oak.c | 9 ++++--- drivers/scsi/dmx3191d.c | 6 ++--- drivers/scsi/dtc.c | 14 ++++------- drivers/scsi/dtc.h | 9 ++----- drivers/scsi/g_NCR5380.c | 27 ++++++++++---------- drivers/scsi/g_NCR5380.h | 30 +++++++++-------------- drivers/scsi/mac_scsi.c | 15 ++---------- drivers/scsi/pas16.c | 16 ++++++------ drivers/scsi/pas16.h | 11 ++------- drivers/scsi/t128.c | 26 ++++++++++---------- drivers/scsi/t128.h | 9 ++----- 13 files changed, 77 insertions(+), 161 deletions(-) commit c0965e6371fa50fdf5cc2291915de97412fb1ec9 Author: Finn Thain Date: Sun Jan 3 16:05:05 2016 +1100 ncr5380: Remove more pointless macros ASM macro is never defined. rtrc in pas16.c is not used. NCR5380_map_config, do_NCR5380_intr, do_t128_intr and do_pas16_intr are unused. NCR_NOT_SET harms readability. Remove them. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.h | 3 --- drivers/scsi/g_NCR5380.c | 29 ++++++++++++++--------------- drivers/scsi/g_NCR5380.h | 5 ----- drivers/scsi/pas16.c | 16 ---------------- drivers/scsi/pas16.h | 5 ----- drivers/scsi/t128.h | 4 ---- 6 files changed, 14 insertions(+), 48 deletions(-) commit 2f7dba9f7d8f8ece8f224bf26e9b2a06da2ed15c Author: Finn Thain Date: Sun Jan 3 16:05:04 2016 +1100 ncr5380: Eliminate PDEBUG*, TDEBUG* and DTCDEBUG* macros Replace {P,T,DTC}DEBUG_INIT with NDEBUG_INIT. Remove dead debugging code, including code that's conditional upon *DEBUG_TRANSFER. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/dtc.c | 18 ++++++------------ drivers/scsi/dtc.h | 27 --------------------------- drivers/scsi/pas16.c | 21 +++++++-------------- drivers/scsi/pas16.h | 16 ---------------- drivers/scsi/t128.c | 18 ++++++------------ drivers/scsi/t128.h | 16 ---------------- 6 files changed, 19 insertions(+), 97 deletions(-) commit d5f7e65df0d41982b1e9cbba9df04003ebb2178d Author: Finn Thain Date: Sun Jan 3 16:05:03 2016 +1100 ncr5380: Remove redundant static variable initializers Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 2 +- drivers/scsi/dtc.c | 4 ++-- drivers/scsi/g_NCR5380.c | 4 ++-- drivers/scsi/pas16.c | 10 +++++----- drivers/scsi/sun3_scsi.c | 8 ++++---- drivers/scsi/t128.c | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) commit 6225a16a071c8636e9f6257183bb501479ad23c2 Author: Finn Thain Date: Sun Jan 3 16:05:02 2016 +1100 atari_scsi: Fix SCSI host ID setting The NVRAM location of this byte is 16, as documented in http://toshyp.atari.org/en/004009.html This was confirmed by Michael Schmitz, by setting the SCSI host ID under EmuTOS and then checking the value in /proc/driver/nvram and /dev/nvram under Linux. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/atari_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad74e46cb3ba9e706f91f3f71baf816d2d8e45db Author: Kuninori Morimoto Date: Tue Dec 15 01:19:53 2015 +0000 thermal: trip_point_temp_store() calls thermal_zone_device_update() trip_point_temp_store() updates trip temperature. It should call thermal_zone_device_update() immediately. Signed-off-by: Kuninori Morimoto Signed-off-by: Eduardo Valentin drivers/thermal/thermal_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5440c40b900fa561add48a7e70e9c892f0551387 Author: Kuninori Morimoto Date: Tue Dec 15 01:18:13 2015 +0000 thermal: rcar: rcar_thermal_get_temp() return error if strange temp Signed-off-by: Kuninori Morimoto Signed-off-by: Eduardo Valentin drivers/thermal/rcar_thermal.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ffbcdf8a759c6dde71c6c4f646a552f7637bcca7 Author: Kuninori Morimoto Date: Tue Dec 15 01:17:56 2015 +0000 thermal: rcar: check irq possibility in rcar_thermal_irq_xxx() Current rcar thermal driver sometimes checks irq possibility when it calls rcar_thermal_irq_enable/disable(), but sometimes not. This patch checks it inside rcar_thermal_irq_enable/disable(). Signed-off-by: Kuninori Morimoto Signed-off-by: Eduardo Valentin drivers/thermal/rcar_thermal.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a1ade5653804b8eb9d14c5ba964da6d5c2f4cd30 Author: Kuninori Morimoto Date: Tue Dec 15 01:17:40 2015 +0000 thermal: rcar: check every rcar_thermal_update_temp() return value Every rcar_thermal_update_temp() return value will be checked. And also, rcar_thermal_get_temp() always call rcar_thermal_update_temp() by this patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Eduardo Valentin drivers/thermal/rcar_thermal.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit ca1e4558fcca68a5ac2a4e0f7834f788f9f4ac8f Author: Kuninori Morimoto Date: Tue Dec 15 01:17:07 2015 +0000 thermal: rcar: move rcar_thermal_dt_ids to upside This patch is prepare for of-thermal support. Signed-off-by: Kuninori Morimoto Signed-off-by: Eduardo Valentin drivers/thermal/rcar_thermal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b0d70338bca22cb14367042a9d5cead116e7f2d9 Author: Caesar Wang Date: Thu Dec 3 16:48:43 2015 +0800 thermal: rockchip: Support the RK3399 SoCs in thermal driver The RK3399 SoCs have two Temperature Sensors, channel 0 is for CPU. channel 1 is for GPU. Signed-off-by: Caesar Wang Signed-off-by: Eduardo Valentin drivers/thermal/rockchip_thermal.c | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 7b02a5e782fa151a610c455ac06e5a998e9cb3f3 Author: Caesar Wang Date: Thu Dec 3 16:48:42 2015 +0800 thermal: rockchip: Support the RK3228 SoCs in thermal driver The RK3228 SoCs has one Temperature Sensor, channel 0 is for CPU. Signed-off-by: Caesar Wang Signed-off-by: Eduardo Valentin drivers/thermal/rockchip_thermal.c | 81 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 4be02530fc76b4b01372dc03ab098674bf059f0b Author: Caesar Wang Date: Thu Dec 3 16:48:41 2015 +0800 dt-bindings: rockchip-thermal: Support the RK3228/RK3399 SoCs compatible This patchset attempts to new compatible for thermal founding on RK3228/RK3399 SoCs. Signed-off-by: Caesar Wang Acked-by: Rob Herring Signed-off-by: Eduardo Valentin Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 2 ++ 1 file changed, 2 insertions(+) commit 13c1cfda1a6cb0325029ce8bbb8d6483244d5c92 Author: Caesar Wang Date: Thu Dec 3 16:48:39 2015 +0800 thermal: rockchip: fix a trivial typo This patchset trys to dictate unified format for driver. Signed-off-by: Caesar Wang Signed-off-by: Eduardo Valentin drivers/thermal/rockchip_thermal.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 1c2e54e1ed6f0a87ae628c520768a53dc60bc2f4 Author: Mike Snitzer Date: Wed Jan 6 14:13:40 2016 -0500 dm thin: bump thin and thin-pool target versions Commit 3d5f6733 ("dm thin metadata: speed up discard of partially mapped volumes"), or some other dm-thinp change during the Linux 4.5 development window, really should've bumped these target versions. Signed-off-by: Mike Snitzer drivers/md/dm-thin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2746fb16e41b7c8f02aa4d2605ecce97abbebbd Author: Manoj Kumar Date: Mon Dec 14 15:07:43 2015 -0600 cxlflash: Enable device id for future IBM CXL adapter This drop enables a future card with a device id of 0x0600 to be recognized by the cxlflash driver. As per the design, the Accelerator Function Unit (AFU) for this new IBM CXL Flash Adapter retains the same host interface as the previous generation. For the early prototypes of the new card, the driver with this change behaves exactly as the driver prior to this behaved with the earlier generation card. Therefore, no card specific programming has been added. These card specific changes can be staged in later if needed. Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Andrew Donnellan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 3 +++ drivers/scsi/cxlflash/main.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit b45cdbaf9f7f0486847c52f60747fb108724652a Author: Manoj Kumar Date: Mon Dec 14 15:07:23 2015 -0600 cxlflash: Resolve oops in wait_port_offline If an async error interrupt is generated, and the error requires the FC link to be reset, it cannot be performed in the interrupt context. So a work element is scheduled to complete the link reset in a process context. If either an EEH event or an escalation occurs in between when the interrupt is generated and the scheduled work is started, the MMIO space may no longer be available. This will cause an oops in the worker thread. [ 606.806583] NIP kthread_data+0x28/0x40 [ 606.806633] LR wq_worker_sleeping+0x30/0x100 [ 606.806694] Call Trace: [ 606.806721] 0x50 (unreliable) [ 606.806796] wq_worker_sleeping+0x30/0x100 [ 606.806884] __schedule+0x69c/0x8a0 [ 606.806959] schedule+0x44/0xc0 [ 606.807034] do_exit+0x770/0xb90 [ 606.807109] die+0x300/0x460 [ 606.807185] bad_page_fault+0xd8/0x150 [ 606.807259] handle_page_fault+0x2c/0x30 [ 606.807338] wait_port_offline.constprop.12+0x60/0x130 [cxlflash] To prevent the problem space area from being unmapped, when there is pending work, a mapcount (using the kref mechanism) is held. The mapcount is released only when the work is completed. The last reference release is tied to the unmapping service. Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c | 27 ++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) commit ee91e332a6e6e9b939f60f6e1bd72fb2def5290d Author: Manoj Kumar Date: Mon Dec 14 15:07:02 2015 -0600 cxlflash: Fix to resolve cmd leak after host reset After a few iterations of resetting the card, either during EEH recovery, or a host_reset the following is seen in the logs. cxlflash 0008:00: cxlflash_queuecommand: could not get a free command At every reset of the card, the commands that are outstanding are being leaked. No effort is being made to reap these commands. A few more resets later, the above error message floods the logs and the card is rendered totally unusable as no free commands are available. Iterated through the 'cmd' queue and printed out the 'free' counter and found that on each reset certain commands were in-use and stayed in-use through subsequent resets. To resolve this issue, when the card is reset, reap all the commands that are active/outstanding. Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Andrew Donnellan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 85599218914dadad3347eaa4337e71f09f39e78f Author: Uma Krishnan Date: Mon Dec 14 15:06:33 2015 -0600 cxlflash: Removed driver date print Having a date for the driver requires it to be updated quite often. Removing the date which is not necessary. Also made use of the existing symbol to print the driver name. Signed-off-by: Uma Krishnan Reviewed-by: Andrew Donnellan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 3 +-- drivers/scsi/cxlflash/main.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit d5e26bb1d812ba74f29b6bcbc88c3dbfb3eed824 Author: Matthew R. Ochs Date: Mon Dec 14 14:55:44 2015 -0600 cxlflash: Fix to avoid virtual LUN failover failure Applications which use virtual LUN's that are backed by a physical LUN over both adapter ports may experience an I/O failure in the event of a link loss (e.g. cable pull). Virtual LUNs may be accessed through one or both ports of the adapter. This access is encoded in the translation entries that comprise the virtual LUN and used by the AFU for load-balancing I/O and handling failover scenarios. In a link loss scenario, even though the AFU is able to maintain connectivity to the LUN, it is up to the application to retry the failed I/O. When applications are unaware of the virtual LUN's underlying topology, they are unable to make a sound decision of when to retry an I/O and therefore are forced to make their reaction to a failed I/O absolute. The result is either a failure to retry I/O or increased latency for scenarios where a retry is pointless. To remedy this scenario, provide feedback back to the application on virtual LUN creation as to which ports the LUN may be accessed. LUN's spanning both ports are candidates for a retry in a presence of an I/O failure. Signed-off-by: Matthew R. Ochs Acked-by: Manoj Kumar Reviewed-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/vlun.c | 2 ++ include/uapi/scsi/cxlflash_ioctl.h | 10 ++++++++++ 2 files changed, 12 insertions(+) commit a9be294ecb3b9dc82b15625631b153f871181d16 Author: Manoj Kumar Date: Mon Dec 14 14:55:09 2015 -0600 cxlflash: Fix to escalate LINK_RESET also on port 1 The original fix to escalate a 'login timed out' error to a LINK_RESET was only made for one of the two ports on the card. This fix resolves the same issue for the second port (port 1). Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efbc57c0e6a92083fce03927736f5d389182935b Merge: 4b1af85 57c80e8 Author: Dmitry Torokhov Date: Wed Jan 6 17:31:06 2016 -0800 Merge branch 'goodix' into next Merge several improvements to Goodix touchscreen driver: - power management support - configuration upload - axis swapping and inversion commit 6f357de854a6dfb9ce0d5d65f3971cf3d0a4af6f Author: Alex Smith Date: Mon Jan 4 12:34:42 2016 +0000 doc: dt: mtd: new binding for jz4780-{nand,bch} Add DT bindings for NAND devices connected to the NEMC on JZ4780 SoCs, as well as the hardware BCH controller, used by the jz4780_{nand,bch} drivers. Signed-off-by: Alex Smith Cc: Zubair Lutfullah Kakakhel Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Harvey Hunt Acked-by: Rob Herring Reviewed-by: Boris Brezillon Signed-off-by: Brian Norris .../bindings/mtd/ingenic,jz4780-nand.txt | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 33853ebd746f0e6aa262745376fde5d4995e0a87 Author: Insu Yun Date: Tue Dec 29 13:45:09 2015 -0500 mtd: cfi_cmdset_0001: fixing memory leak and handling failed kmalloc kmalloc needs to be handled when failing in memory pressure. Also, it has memory leak in error routine. Signed-off-by: Insu Yun Signed-off-by: Brian Norris drivers/mtd/chips/cfi_cmdset_0001.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 32321e950d8a237d7e8f3a9b76220007dfa87544 Author: Ezequiel García Date: Mon Dec 28 17:54:51 2015 -0300 mtd: spi-nor: wait until lock/unlock operations are ready On Micron and Numonyx devices, the status register write command (WRSR), raises a work-in-progress bit (WIP) on the status register. The datasheets for these devices specify that while the status register write is in progress, the status register WIP bit can still be read to check the end of the operation. This commit adds a wait_till_ready call on lock/unlock operations, which is required for Micron and Numonyx but should be harmless for others. This is needed to prevent applications from issuing erase or program operations before the unlock operation is completed. Reported-by: Stas Sergeev Signed-off-by: Ezequiel Garcia Signed-off-by: Brian Norris drivers/mtd/spi-nor/spi-nor.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 65d5b109d1ff0d173e1896081f38951eff21978e Merge: 800e07b a574795 5c5fb40 3bc2b23 a37b3ea Author: Bjorn Helgaas Date: Wed Jan 6 18:09:23 2016 -0600 Merge branches 'pci/host-generic', 'pci/host-imx6', 'pci/host-iproc' and 'pci/host-rcar' into next * pci/host-generic: PCI: generic,versatile: Remove unused pci_sys_data structures * pci/host-imx6: PCI: imx6: Add support for active-low reset GPIO PCI: imx6: Use gpio_set_value_cansleep() * pci/host-iproc: PCI: iproc: Add iProc PCIe MSI support PCI: iproc: Add iProc PCIe MSI device tree binding PCI: iproc: Add PAXC interface support PCI: iproc: Update iProc PCIe device tree binding PCI: iproc: Do not use 0x in front of %pap PCI: iproc: Hide CONFIG_PCIE_IPROC * pci/host-rcar: PCI: rcar: Add gen2 fallback compatibility string for pcie-rcar PCI: rcar: Add gen2 fallback compatibility string for pci-rcar-gen2 PCI: rcar: Add support for R-Car H3 to pcie-rcar Revert "PCI: rcar: Build pcie-rcar.c only on ARM" PCI: rcar: Convert to DT resource parsing API PCI: rcar: Allow DT to override default window settings commit 4b1af853646ca893fa686701d1605998fffcc82c Author: Pali Rohár Date: Wed Jan 6 15:58:56 2016 -0800 Input: ALPS - report v3 pinnacle trackstick device only if is present This patch moves v3 pinnacle code for trackstick detection from alps_hw_init_v3() to alps_set_protocol() so ALPS_DUALPOINT flag can be cleared before registering trackstick input device in kernel. Signed-off-by: Pali Rohár Acked-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit dae928ec3c29e7e16723c9c4c1299e00f4e9e949 Author: Pali Rohár Date: Wed Jan 6 15:50:08 2016 -0800 Input: ALPS - detect trackstick presence for v7 protocol This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models: Dell Latitude E5250/5250, E5450/5450, E5550/5550 Detection code and base reg for alps v3 rushmore and v7 devices is exacly same. Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device. Signed-off-by: Pali Rohár Reviewed-by: Hans de Goede Tested-by: Alex Hung Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 3bc2b2348835f6edd33c383a2fbcf15fe3dac3b2 Author: Ray Jui Date: Wed Jan 6 18:04:35 2016 -0600 PCI: iproc: Add iProc PCIe MSI support Add PCIe MSI support for both PAXB and PAXC interfaces on all iProc-based platforms. The iProc PCIe MSI support deploys an event queue-based implementation. Each event queue is serviced by a GIC interrupt and can support up to 64 MSI vectors. Host memory is allocated for the event queues, and each event queue consists of 64 word-sized entries. MSI data is written to the lower 16-bit of each entry, whereas the upper 16-bit of the entry is reserved for the controller for internal processing. Each event queue is tracked by a head pointer and tail pointer. Head pointer indicates the next entry in the event queue to be processed by the driver and is updated by the driver after processing is done. The controller uses the tail pointer as the next MSI data insertion point. The controller ensures MSI data is flushed to host memory before updating the tail pointer and then triggering the interrupt. MSI IRQ affinity is supported by evenly distributing the interrupts to each CPU core. MSI vector is moved from one GIC interrupt to another in order to steer to the target CPU. Therefore, the actual number of supported MSI vectors is: M * 64 / N where M denotes the number of GIC interrupts (event queues), and N denotes the number of CPU cores. This iProc event queue-based MSI support should not be used with newer platforms with integrated MSI support in the GIC (e.g., giv2m or gicv3-its). [bhelgaas: fold in Kconfig fixes from Arnd Bergmann ] Signed-off-by: Ray Jui Signed-off-by: Bjorn Helgaas Reviewed-by: Anup Patel Reviewed-by: Vikram Prakash Reviewed-by: Scott Branden Reviewed-by: Marc Zyngier drivers/pci/host/Kconfig | 10 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-iproc-bcma.c | 1 + drivers/pci/host/pcie-iproc-msi.c | 675 +++++++++++++++++++++++++++++++++ drivers/pci/host/pcie-iproc-platform.c | 1 + drivers/pci/host/pcie-iproc.c | 26 ++ drivers/pci/host/pcie-iproc.h | 23 +- 7 files changed, 735 insertions(+), 2 deletions(-) commit 274d8cbde1bc3bdfb31c5d6a58113dff5cee4f87 Author: NeilBrown Date: Mon Jan 4 16:16:58 2016 +1100 md: Remove 'ready' field from mddev. This field is always set in tandem with ->pers, and when it is tested ->pers is also tested. So ->ready is not needed. It was needed once, but code rearrangement and locking changes have removed that needed. Signed-off-by: NeilBrown drivers/md/md.c | 5 +---- drivers/md/md.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) commit bb9ef71646606e51adfebdc94231fbbc862dbe28 Author: Guoqing Jiang Date: Mon Dec 28 10:46:38 2015 +0800 md: remove unnecesary md_new_event_inintr md_new_event had removed sysfs_notify since 'commit 72a23c211e45 ("Make sure all changes to md/sync_action are notified.")', so we can use md_new_event and delete md_new_event_inintr. Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown drivers/md/md.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 6e75632ac34d2f63ab586880f7e9747bd9b708a6 Author: Nicholas Mc Guire Date: Thu Dec 31 16:21:22 2015 +0100 mtd: tests: consolidate kmalloc/memset 0 call to kzalloc This is an API consolidation only. The use of kmalloc + memset to 0 is equivalent to kzalloc. Signed-off-by: Nicholas Mc Guire Signed-off-by: Brian Norris drivers/mtd/tests/pagetest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 43584c1d42acf54464907773b0b8b7596d7b0a29 Author: Geliang Tang Date: Fri Jan 1 22:06:27 2016 +0800 jffs2: use to_delayed_work Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Brian Norris fs/jffs2/wbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dced14675818bc9627febcc3159ffc1a0d88199d Author: Linus Walleij Date: Tue Dec 8 16:39:20 2015 +0100 leds: pca9532: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Riku Voipio Cc: Richard Purdie Cc: linux-leds@vger.kernel.org Acked-by: Jacek Anaszewski Signed-off-by: Linus Walleij drivers/leds/leds-pca9532.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2a6643437083c4dc28169a706099cd22769be1f5 Author: Linus Walleij Date: Tue Dec 8 16:42:58 2015 +0100 leds: tca6507: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Riku Voipio Cc: Richard Purdie Cc: linux-leds@vger.kernel.org Acked-by: Jacek Anaszewski Signed-off-by: Linus Walleij drivers/leds/leds-tca6507.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 84530920de3c6ccb92c6661da784f6cdb66d3304 Author: Stephane Eranian Date: Wed Jan 6 19:50:01 2016 +0100 perf pmu: fix alias->snapshot missing initialization bug This patch fixes a bug in __perf_pmu__new_alias() whereby the alias->snapshot field was not initialized to false. This led to random alias->snapshot value for an alias and was breaking some measurements such as: $ perf stat -a -e uncore_imc/data_reads/ -I 1000 sleep 100 Because the event ended up being treated as snapshot mode, when it is not. Signed-off-by: Stephane Eranian Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452106201-13073-1-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 1 + 1 file changed, 1 insertion(+) commit b8a1962d17b4e3cfdd7b7dc9ebd94affbcb4c1c5 Author: Jiri Olsa Date: Wed Jan 6 11:49:57 2016 +0100 perf script: Add stat-cpi.py script Adding stat-cpi.py as an example of how to do stat scripting. It computes the CPI metrics from cycles and instructions events. The CPI is based performance metric showing the Cycles Per Instructions ratio, which helps to identify cycles-hungry code. Following stat record/report/script combinations could be used: - get CPI for given workload $ perf stat -e cycles,instructions record ls SNIP Performance counter stats for 'ls': 2,904,431 cycles 3,346,878 instructions # 1.15 insns per cycle 0.001782686 seconds time elapsed $ perf script -s ./scripts/python/stat-cpi.py 0.001783: cpu -1, thread -1 -> cpi 0.867803 (2904431/3346878) $ perf stat -e cycles,instructions record ls | perf script -s ./scripts/python/stat-cpi.py SNIP 0.001730: cpu -1, thread -1 -> cpi 0.869026 (2928292/3369627) - get CPI systemwide: $ perf stat -e cycles,instructions -a -I 1000 record sleep 3 # time counts unit events 1.000158618 594,274,711 cycles (100.00%) 1.000158618 441,898,250 instructions 2.000350973 567,649,705 cycles (100.00%) 2.000350973 432,669,206 instructions 3.000559210 561,940,430 cycles (100.00%) 3.000559210 420,403,465 instructions 3.000670798 780,105 cycles (100.00%) 3.000670798 326,516 instructions $ perf script -s ./scripts/python/stat-cpi.py 1.000159: cpu -1, thread -1 -> cpi 1.344823 (594274711/441898250) 2.000351: cpu -1, thread -1 -> cpi 1.311972 (567649705/432669206) 3.000559: cpu -1, thread -1 -> cpi 1.336669 (561940430/420403465) 3.000671: cpu -1, thread -1 -> cpi 2.389178 (780105/326516) $ perf stat -e cycles,instructions -a -I 1000 record sleep 3 | perf script -s ./scripts/python/stat-cpi.py 1.000202: cpu -1, thread -1 -> cpi 1.035091 (940778881/908885530) 2.000392: cpu -1, thread -1 -> cpi 1.442600 (627493992/434974455) 3.000545: cpu -1, thread -1 -> cpi 1.353612 (741463930/547766890) 3.000622: cpu -1, thread -1 -> cpi 2.642110 (784083/296764) Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452077397-31958-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/stat-cpi.py | 77 +++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 36e33c53f4b693d96fb8dd4529fe14306d4e3e76 Author: Jiri Olsa Date: Wed Jan 6 11:49:56 2016 +0100 perf script: Display stat events by default If no script is specified for stat data, display stat events in raw form. $ perf stat record ls SNIP Performance counter stats for 'ls': 0.851585 task-clock (msec) # 0.717 CPUs utilized 0 context-switches # 0.000 K/sec 0 cpu-migrations # 0.000 K/sec 114 page-faults # 0.134 M/sec 2,620,918 cycles # 3.078 GHz stalled-cycles-frontend stalled-cycles-backend 2,714,111 instructions # 1.04 insns per cycle 542,434 branches # 636.970 M/sec 15,946 branch-misses # 2.94% of all branches 0.001186954 seconds time elapsed $ perf script CPU THREAD VAL ENA RUN TIME EVENT -1 26185 851585 851585 851585 1186954 task-clock -1 26185 0 851585 851585 1186954 context-switches -1 26185 0 851585 851585 1186954 cpu-migrations -1 26185 114 851585 851585 1186954 page-faults -1 26185 2620918 853340 853340 1186954 cycles -1 26185 0 0 0 1186954 stalled-cycles-frontend -1 26185 0 0 0 1186954 stalled-cycles-backend -1 26185 2714111 853340 853340 1186954 instructions -1 26185 542434 853340 853340 1186954 branches -1 26185 15946 853340 853340 1186954 branch-misses Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452077397-31958-3-git-send-email-jolsa@kernel.org [ Rename 'time' parameter to 'tstamp' to fix build on older distros ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 15d2b9956b41ffb5961b897bf61cdc09f722dfbf Author: Jiri Olsa Date: Wed Jan 6 11:49:55 2016 +0100 perf cpumap: Fix cpu conversion in cpu_map__from_entries We can't convert u16 cpu_map_entries::cpu[x] value directly to int, because it could hold -1, which would be converted as 65535. Adding special treatment for -1, which is not real cpu number, to be converted to (int -1). Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452077397-31958-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cpumap.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit aef90263561a87ae6d9c6a0f4071d825ce636eef Author: Jiri Olsa Date: Tue Jan 5 22:09:11 2016 +0100 perf script: Add python support for stat events Add support to get stat events data in perf python scripts. The python script shall implement the following new interface to process stat data: def stat___[](cpu, thread, time, val, ena, run): - is called for every stat event for given counter, if user monitors 'cycles,instructions:u" following callbacks should be defined: def stat__cycles(cpu, thread, time, val, ena, run): def stat__instructions_u(cpu, thread, time, val, ena, run): def stat__interval(time): - is called for every interval with its time, in non interval mode it's called after last stat event with total measured time in ns The rest of the current interface stays untouched.. Please check example CPI metrics script in following patch with command line examples in changelogs. Signed-off-by: Jiri Olsa Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452028152-26762-8-git-send-email-jolsa@kernel.org [ Rename 'time' parameters to 'tstamp', to fix the build in older distros ] Signed-off-by: Arnaldo Carvalho de Melo .../util/scripting-engines/trace-event-python.c | 115 +++++++++++++++++++-- 1 file changed, 109 insertions(+), 6 deletions(-) commit e099eba8c8df0f96e7cd6ddc5fc3151fe37be24e Author: Jiri Olsa Date: Tue Jan 5 22:09:09 2016 +0100 perf script: Add stat default handlers Implement struct scripting_ops::(process_stat|process_stat_interval) handlers - calling scripting handlers from stat events handlers. Signed-off-by: Jiri Olsa Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452028152-26762-6-git-send-email-jolsa@kernel.org [ Rename 'time' parameters to 'tstamp', to fix the build in older distros ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 8058a30ce174060a3c8156dc87b4d4ae39e8281b Author: Jiri Olsa Date: Tue Jan 5 22:09:08 2016 +0100 perf script: Add process_stat/process_stat_interval scripting interface Python and perl scripting code will define those callbacks and get stat data. Signed-off-by: Jiri Olsa Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452028152-26762-5-git-send-email-jolsa@kernel.org [ Rename 'time' parameters to 'tstamp', to fix the build in older distros ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/trace-event.h | 4 ++++ 1 file changed, 4 insertions(+) commit 91a2c3d54fd4b5be4e25acc1d8c1cc9a28319774 Author: Jiri Olsa Date: Tue Jan 5 22:09:07 2016 +0100 perf script: Process stat config event Adding processing of stat config event and initialize stat_config object. Signed-off-by: Jiri Olsa Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452028152-26762-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit cfc8874a485992491b865dde64965bb7c18c26b5 Author: Jiri Olsa Date: Tue Jan 5 22:09:06 2016 +0100 perf script: Process cpu/threads maps Adding processing of cpu/threads maps. Configuring session's evlist with these maps. Signed-off-by: Jiri Olsa Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452028152-26762-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 6db1a5c190d6abe416ea36aa28a6c53e0b3bbd5e Author: Jiri Olsa Date: Tue Jan 5 22:09:05 2016 +0100 perf stat record: Keep sample_type 0 for pipe session For pipe sessions we need to keep sample_type zero, because script's perf_evsel__check_attr is triggered by sample_type != 0, and the check would fail on stat session. I was tempted to keep it zero unconditionally, but the pipe session is sufficient. In perf.data session we are guarded by HEADER_STAT feature. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452028152-26762-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4c96bee03247c6eab27287fa66457a231b9fab79 Author: Namhyung Kim Date: Tue Jan 5 19:58:36 2016 +0900 perf report: Add documentation for dynamic sort keys Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1451991518-25673-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9735be24ec086fbccee321471cc21dedefa956a6 Author: Namhyung Kim Date: Tue Jan 5 19:58:35 2016 +0900 perf tools: Add all matching dynamic sort keys for field name When a perf.data file has multiple events, it's likely to be similar (tracepoint) events. In that case, they might have same field name so add all of them to sort keys instead of bailing out. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1451991518-25673-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 58683600dfe377c883eb8217b5a9bfcfe231b3ff Author: Jiri Olsa Date: Wed Dec 23 18:58:34 2015 +0100 perf build: Use FEATURE-DUMP in bpf subproject Using FEATURE-DUMP in bpf subproject for features detection in case bpf is built via perf. Keeping the current features detection otherwise. Signed-off-by: Jiri Olsa Tested-by: Wang Nan Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama Link: http://lkml.kernel.org/r/1450893514-9158-6-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/Makefile | 4 ++++ tools/perf/Makefile.perf | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 936d120d5f6406377e622da3167cafc811d053ea Author: Jiri Olsa Date: Wed Dec 23 18:58:33 2015 +0100 tools build feature: Use value assignment form for FEATURE-DUMP file Changing the contents of the FEATURE-DUMP file, so it looks like: feature-backtrace=1 feature-dwarf=0 feature-fortify-source=1 feature-sync-compare-and-swap=0 This way it could get included in sub projects, so they won't be forced to redo features detection. Also now storing the complete set of features. Signed-off-by: Jiri Olsa Tested-by: Wang Nan Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama Link: http://lkml.kernel.org/r/1450893514-9158-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit c6a5f88f335ec43d2850d62bc4924f719d265670 Author: Jiri Olsa Date: Wed Dec 23 18:58:32 2015 +0100 tools build feature: Introduce feature_assign macro The feature_assign macro generates feature value assignment for name, like: $(call feature_assign,dwarf) == feature-dwarf=1 This will be used more in following patches. Signed-off-by: Jiri Olsa Tested-by: Wang Nan Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama Link: http://lkml.kernel.org/r/1450893514-9158-4-git-send-email-jolsa@kernel.org [ Rename it to feature_assign, the original shorter name was misleading, to say the least ;-) ] Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 76ee2ff342743e57cb6dc059d0aba90e0c4c9bfc Author: Jiri Olsa Date: Wed Dec 23 18:58:31 2015 +0100 tools build feature: Move dwarf post unwind choice output into perf We decide what dwarf unwind to choose way after the Makefile.feature makefile is included. The $(dwarf-post-unwind) is not even set at that time. For the same reason it was never included in FEATURE-DUMP file. Moving it into perf VF=1 verbose display. $ make VF=1 BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ on ] ... ... LIBUNWIND_DIR: ... LIBDW_DIR: ... DWARF post unwind library: libunwind ... Signed-off-by: Jiri Olsa Tested-by: Wang Nan Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama Link: http://lkml.kernel.org/r/1450893514-9158-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 9 --------- tools/perf/config/Makefile | 4 ++++ 2 files changed, 4 insertions(+), 9 deletions(-) commit d0018b495c0429af3efc1b54f16d291a9fa8b4be Author: Jiri Olsa Date: Wed Dec 23 18:58:30 2015 +0100 tools build feature: Fix feature_check_display_code typo This function is cursed.. ;-) Signed-off-by: Jiri Olsa Tested-by: Wang Nan Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zefan Li Cc: pi3orama Link: http://lkml.kernel.org/r/1450893514-9158-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d49dadea78624353d1df660efb49f187bd5c5971 Author: Namhyung Kim Date: Wed Dec 23 02:07:10 2015 +0900 perf tools: Make 'trace' or 'trace_fields' sort key default for tracepoint events When an evlist contains tracepoint events only, use 'trace' sort key as default. If --raw-trace option was given, use 'trace_fields' instead. This will make users more convenient to see trace result. Suggested-and-Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-14-git-send-email-namhyung@kernel.org [ Check evlist in get_default_sort_order() fixing a segfault in 'perf test hists' reported by Jiri Olsa ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 30 +++++++++++++++++++++++++----- tools/perf/util/sort.h | 1 + 2 files changed, 26 insertions(+), 5 deletions(-) commit 2e422fd1e4b0a1c0ca11d360be2147c87911dd1a Author: Namhyung Kim Date: Wed Dec 23 02:07:09 2015 +0900 perf tools: Add 'trace_fields' dynamic sort key The 'trace_fields' sort key is similar as 'trace' sort key, but it shows each fields separately. Each event will get different columns as their fields. $ perf report -s trace_fields --stdio # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 20K of event 'kmem:kmalloc' # Event count (approx.): 20533 # # Overhead Command call_site ptr bytes_req bytes_alloc gfp_flags # ........ ....... .................. .................. ......... ........... ................... # 99.89% perf ffffffffa01d4396 0xffff8803ffb79720 96 96 GFP_NOFS|GFP_ZERO 0.06% sleep ffffffff8114e1cd 0xffff8803d228a000 4096 4096 GFP_KERNEL 0.03% perf ffffffff811d6ae6 0xffff8803f7678f00 240 256 GFP_KERNEL|GFP_ZERO 0.00% perf ffffffff812263c1 0xffff880406172380 128 128 GFP_KERNEL 0.00% perf ffffffff812264b9 0xffff8803ffac1600 504 512 GFP_KERNEL 0.00% perf ffffffff81226634 0xffff880401dc5280 28 32 GFP_KERNEL 0.00% sleep ffffffff81226da9 0xffff8803ffac3a00 392 512 GFP_KERNEL # Samples: 20K of event 'kmem:kfree' # Event count (approx.): 20597 # # Overhead call_site ptr # ........ .................. .................. # 99.58% ffffffffa01d85ad 0xffff8803ffb79720 0.07% ffffffff81443f5c 0xffff8803f7669400 0.02% ffffffff811d5753 0xffff8803f7678f00 0.01% ffffffff81443f5c 0xffff8803f766be00 0.01% ffffffff8114e359 0xffff8803d228a000 0.01% ffffffff81443f5c 0xffff8800d156dc00 0.01% ffffffff81443f5c 0xffff8803f7669400 0.01% ffffffff8114e359 0xffff8803d228a000 0.01% ffffffff8114e359 0xffff8803d228a000 0.01% ffffffff8114e359 0xffff8803d228a000 Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-13-git-send-email-namhyung@kernel.org [ Combined with "perf tools: Fix segfault when using -s trace_fields" ] Link: http://lkml.kernel.org/r/1451991518-25673-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 47 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 9 deletions(-) commit 361459f163fa1ec7ff4700ec876c3b7ff5f36cc6 Author: Namhyung Kim Date: Wed Dec 23 02:07:08 2015 +0900 perf tools: Skip dynamic fields not defined for current event When there are multiple events, each dynamic sort key is defined just for one event. In this case other events will always show "N/A" for those fields. But they are meaningless and consume precious screen width. Let's skip those undefined dynamic fields. $ perf record -e kmem:kmalloc,kmem:kfree -a sleep 1 $ perf report -s 'comm,kmalloc.*' --stdio # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 20K of event 'kmem:kmalloc' # Event count (approx.): 20533 # # Overhead Command call_site ptr bytes_req bytes_alloc gfp_flags # ........ ....... .................. .................. ......... ........... ................... # 99.89% perf ffffffffa01d4396 0xffff8803ffb79720 96 96 GFP_NOFS|GFP_ZERO 0.06% sleep ffffffff8114e1cd 0xffff8803d228a000 4096 4096 GFP_KERNEL 0.03% perf ffffffff811d6ae6 0xffff8803f7678f00 240 256 GFP_KERNEL|GFP_ZERO 0.00% perf ffffffff812263c1 0xffff880406172380 128 128 GFP_KERNEL 0.00% perf ffffffff812264b9 0xffff8803ffac1600 504 512 GFP_KERNEL 0.00% perf ffffffff81226634 0xffff880401dc5280 28 32 GFP_KERNEL 0.00% sleep ffffffff81226da9 0xffff8803ffac3a00 392 512 GFP_KERNEL # Samples: 20K of event 'kmem:kfree' # Event count (approx.): 20597 # # Overhead Command # ........ .............. # 99.63% perf 0.14% sleep 0.11% irq/36-iwlwifi 0.11% kworker/u16:0 0.01% Xorg 0.00% firefox Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-12-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 7 ++++--- tools/perf/ui/gtk/hists.c | 4 ++-- tools/perf/ui/hist.c | 2 +- tools/perf/ui/stdio/hist.c | 6 +++--- tools/perf/util/hist.c | 2 +- tools/perf/util/hist.h | 14 ++++++++++++-- tools/perf/util/sort.c | 20 ++++++++++++++------ 7 files changed, 37 insertions(+), 18 deletions(-) commit 3b099bf5898ac1bf44d822f0bc15a7517e6fa117 Author: Namhyung Kim Date: Wed Dec 23 02:07:07 2015 +0900 perf tools: Support '.*' dynamic sort key Support '*' character for field name to add all (non-common) fields as sort keys easily. $ perf report -s 'switch.*' --stdio ... # Overhead prev_comm prev_pid prev_prio prev_state next_comm next_pid next_prio # ........ ........... ......... ......... .......... ............ ........ ......... # 3.82% swapper/0 0 120 0 netctl-auto 18711 120 3.75% netctl-auto 18711 120 1 swapper/0 0 120 2.24% swapper/1 0 120 0 netctl-auto 18709 120 2.24% netctl-auto 18709 120 1 swapper/1 0 120 1.80% swapper/2 0 120 0 rcu_preempt 7 120 1.80% swapper/2 0 120 0 netctl-auto 18711 120 1.80% rcu_preempt 7 120 1 swapper/2 0 120 1.80% netctl-auto 18711 120 1 swapper/2 0 120 ... Suggested-and-acked-by: Jiri Olsa Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-11-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) commit 5d0cff93bb7aa85349230d4e29902b2648640c53 Author: Namhyung Kim Date: Wed Dec 23 02:07:06 2015 +0900 perf tools: Support shortcuts for events in dynamic sort keys The dynamic sort key requires event name but specifying full event name is rather inconvenient. This patch adds more ways to identify the event in a more compact way. 1. If session has just one event, event name can be omitted. 2. Events can be accessed by index preceded by a percent sign. 3. A part of the name can be used, if it's not ambiguous. The partial name should not contain ':' in it. 4. Full system + event name is still used, it should contain ':'. So in the below example all does same thing: $ perf record -e sched:sched_switch -a sleep 1 $ perf report -s next_pid,next_comm $ perf report -s %1.next_pid,%1.next_comm $ perf report -s switch.next_pid,switch.next_comm $ perf report -s sched:sched_switch.next_pid,sched:sched_switch.next_comm Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-10-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 107 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 87 insertions(+), 20 deletions(-) commit 053a3989e12fdf3be45c00ec1cb0ce09fba0ee4a Author: Namhyung Kim Date: Wed Dec 23 02:07:05 2015 +0900 perf report/top: Add --raw-trace option The --raw-trace option allows disabling pretty printing by the event's print_fmt or plugin. Besides that, each dynamic sort key now can receive a 'raw' suffix separated by '/' to ask for the raw trace of a specific field. $ perf report -s comm,kmem:kmalloc.gfp_flags ... # Overhead Command gfp_flags # ........ ....... ................... # 99.89% perf GFP_NOFS|GFP_ZERO 0.06% sleep GFP_KERNEL 0.03% perf GFP_KERNEL|GFP_ZERO 0.01% perf GFP_KERNEL Now $ perf report -s comm,kmem:kmalloc.gfp_flags --raw-trace or $ perf report -s comm,kmem:kmalloc.gfp_flags/raw ... # Overhead Command gfp_flags # ........ ....... .......... # 99.89% perf 32848 0.06% sleep 208 0.03% perf 32976 0.01% perf 208 Suggested-and-Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-9-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 3 +++ tools/perf/Documentation/perf-top.txt | 3 +++ tools/perf/builtin-report.c | 2 ++ tools/perf/builtin-top.c | 2 ++ tools/perf/util/sort.c | 32 +++++++++++++++++++++++++++++--- tools/perf/util/symbol.h | 3 ++- 6 files changed, 41 insertions(+), 4 deletions(-) commit a34bb6a08d6020bde0475bc901793771858a1112 Author: Namhyung Kim Date: Wed Dec 23 02:07:04 2015 +0900 perf tools: Add 'trace' sort key The 'trace' sort key is to show tracepoint event output using either print fmt or plugin. For example sched_switch event (using plugin) will show output like below: # perf record -e sched:sched_switch -a usleep 10 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.197 MB perf.data (69 samples) ] # $ perf report -s trace --stdio ... # Overhead Trace output # ........ ................................................... # 9.48% swapper/0:0 [120] R ==> transmission-gt:17773 [120] 9.48% transmission-gt:17773 [120] S ==> swapper/0:0 [120] 9.04% swapper/2:0 [120] R ==> transmission-gt:17773 [120] 8.92% transmission-gt:17773 [120] S ==> swapper/2:0 [120] 5.25% swapper/0:0 [120] R ==> kworker/0:1H:109 [100] 5.21% kworker/0:1H:109 [100] S ==> swapper/0:0 [120] 1.78% swapper/3:0 [120] R ==> transmission-gt:17773 [120] 1.78% transmission-gt:17773 [120] S ==> swapper/3:0 [120] 1.53% Xephyr:6524 [120] S ==> swapper/0:0 [120] 1.53% swapper/0:0 [120] R ==> Xephyr:6524 [120] 1.17% swapper/2:0 [120] R ==> irq/33-iwlwifi:233 [49] 1.13% irq/33-iwlwifi:233 [49] S ==> swapper/2:0 [120] Note that the 'trace' sort key works only for tracepoint events. If it's used to other type of events, just "N/A" will be printed. Suggested-and-acked-by: Jiri Olsa Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-8-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.h | 1 + tools/perf/util/sort.c | 76 +++++++++++++++++++++++++++++++++++++++----------- tools/perf/util/sort.h | 1 + 3 files changed, 62 insertions(+), 16 deletions(-) commit 60517d28fbd91629686dcf9a39aef4e068a3d5f6 Author: Namhyung Kim Date: Wed Dec 23 02:07:03 2015 +0900 perf tools: Try to show pretty printed output for dynamic sort keys Each tracepoint event has format string for print to improve readability. Try to parse the output and match the field name. If it finds one, use that for the result. If not, fallbacks to the original output. For example, sort on kmem:kmalloc.gfp_flags looks like below: (Note: libtraceevent plugins are not installed on my system. They might affect the output below) Before: # Overhead Command gfp_flags # ........ ....... .......... # 99.89% perf 32848 0.06% sleep 208 0.03% perf 32976 0.01% perf 208 After: # Overhead Command gfp_flags # ........ ....... ................... # 99.89% perf GFP_NOFS|GFP_ZERO 0.06% sleep GFP_KERNEL 0.03% perf GFP_KERNEL|GFP_ZERO 0.01% perf GFP_KERNEL Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-7-git-send-email-namhyung@kernel.org [ Fixed clash with earlier, updated patch in this patchkit ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 1 + tools/perf/util/sort.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++--- tools/perf/util/sort.h | 1 + 3 files changed, 102 insertions(+), 5 deletions(-) commit c7c2a5e40f17ab3b14716d4f08d03792a9b683e7 Author: Namhyung Kim Date: Wed Dec 23 02:07:02 2015 +0900 perf tools: Add dynamic sort key for tracepoint events The existing sort keys are less useful for tracepoint events in that they are always sampled at the same place, the function where the tracepoint is located. For example, a 'perf report' on sched:sched_switch event looks like the following: # Overhead Command Shared Object Symbol # ........ ............... ................ .............. # 47.22% swapper [kernel.vmlinux] [k] __schedule 21.67% transmission-gt [kernel.vmlinux] [k] __schedule 8.23% netctl-auto [kernel.vmlinux] [k] __schedule 5.53% kworker/0:1H [kernel.vmlinux] [k] __schedule 1.98% Xephyr [kernel.vmlinux] [k] __schedule 1.33% irq/33-iwlwifi [kernel.vmlinux] [k] __schedule 1.17% wpa_cli [kernel.vmlinux] [k] __schedule 1.13% rcu_preempt [kernel.vmlinux] [k] __schedule 0.85% ksoftirqd/0 [kernel.vmlinux] [k] __schedule 0.77% Timer [kernel.vmlinux] [k] __schedule In fact, tracepoints have meaningful information in their fields but there's no way to use in 'perf report' currently. The dynamic sort keys are introduced in this patc to overcome this limitation. The sched:sched_switch events have following fields: # sudo cat /sys/kernel/debug/tracing/events/sched/sched_switch/format name: sched_switch ID: 268 format: field:unsigned short common_type; offset:0; size:2; signed:0; field:unsigned char common_flags; offset:2; size:1; signed:0; field:unsigned char common_preempt_count; offset:3; size:1; signed:0; field:int common_pid; offset:4; size:4; signed:1; field:char prev_comm[16]; offset:8; size:16; signed:1; field:pid_t prev_pid; offset:24; size:4; signed:1; field:int prev_prio; offset:28; size:4; signed:1; field:long prev_state; offset:32; size:8; signed:1; field:char next_comm[16]; offset:40; size:16; signed:1; field:pid_t next_pid; offset:56; size:4; signed:1; field:int next_prio; offset:60; size:4; signed:1; print fmt: "prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d", REC->prev_comm, REC->prev_pid, REC->prev_prio, REC->prev_state & (2048-1) ? __print_flags(REC->prev_state & (2048-1), "|", { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, { 16, "Z" }, { 32, "X" }, { 64, "x" }, { 128, "K"}, { 256, "W" }, { 512, "P" }, { 1024, "N" }) : "R", REC->prev_state & 2048 ? "+" : "", REC->next_comm, REC->next_pid, REC->next_prio With dynamic sort keys, you can use as a sort key. Those dynamic keys are checked and created on demand. For instance, below is to sort by next_pid field output on the same data file: $ perf report -s comm,sched:sched_switch.next_pid --stdio ... # Overhead Command next_pid # ........ ............... .......... # 21.23% transmission-gt 0 20.86% swapper 17773 6.62% netctl-auto 0 5.25% swapper 109 5.21% kworker/0:1H 0 1.98% Xephyr 0 1.98% swapper 6524 1.98% swapper 27478 1.37% swapper 27476 1.17% swapper 233 Multiple dynamic sort keys are also supported: $ perf report -s comm,sched:sched_switch.next_pid,sched:sched_switch.next_comm --stdio ... # Overhead Command next_pid next_comm # ........ ............... .......... ................ # 20.86% swapper 17773 transmission-gt 9.64% transmission-gt 0 swapper/0 9.16% transmission-gt 0 swapper/2 5.25% swapper 109 kworker/0:1H 5.21% kworker/0:1H 0 swapper/0 2.14% netctl-auto 0 swapper/2 1.98% netctl-auto 0 swapper/0 1.98% swapper 6524 Xephyr 1.98% swapper 27478 netctl-auto 1.78% transmission-gt 0 swapper/3 1.53% Xephyr 0 swapper/0 1.29% netctl-auto 0 swapper/1 1.29% swapper 27476 netctl-auto 1.21% netctl-auto 0 swapper/3 1.17% swapper 233 irq/33-iwlwifi Note that pid 0 exists for each cpu so have comm of 'swapper/N'. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-6-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 213 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+) commit 40184c46a3055a97e2efa69da6f17c05bff4b776 Author: Namhyung Kim Date: Wed Dec 23 02:07:01 2015 +0900 perf tools: Pass evlist to setup_sorting() This is a preparation to support dynamic sort keys for tracepoint events. Dynamic sort keys can be created for specific fields in trace events so it needs the event information. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-5-git-send-email-namhyung@kernel.org [ Moving the evlist creation earlier in top was split to a previous patch ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-diff.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-top.c | 2 +- tools/perf/tests/hists_cumulate.c | 8 ++++---- tools/perf/tests/hists_filter.c | 2 +- tools/perf/tests/hists_link.c | 2 +- tools/perf/tests/hists_output.c | 10 +++++----- tools/perf/util/sort.c | 15 +++++++++------ tools/perf/util/sort.h | 5 +++-- 10 files changed, 27 insertions(+), 23 deletions(-) commit 54f8f40384ab940e15585afde5c278c8e7726214 Author: Namhyung Kim Date: Wed Dec 23 02:07:01 2015 +0900 perf top: Create the evlist sooner This is a preparation to support dynamic sort keys for tracepoint events. Dynamic sort keys can be created for specific fields in trace events so it needs the event information, so we need to pass the evlist to the sort routines, create it sooner so that the next patch can do that. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-5-git-send-email-namhyung@kernel.org [ Split from the patch passing the evlist to the sort routines ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit be45d40efec96558c489579bbf93465e90b10abe Author: Namhyung Kim Date: Wed Dec 23 22:08:41 2015 +0900 tools lib traceevent: Factor out and export print_event_field[s]() The print_event_field() and print_event_fields() functions print basic information of a given field or event without the print format. They'll be used by dynamic sort keys later. Committer note: Rename it to pevent_print_field[s]() to get proper namespacing, as discussed with Steven Rostedt. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Acked-by: Steven Rostedt Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1450876121-22494-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/traceevent/event-parse.c | 129 +++++++++++++++++++------------------ tools/lib/traceevent/event-parse.h | 4 ++ 2 files changed, 72 insertions(+), 61 deletions(-) commit 723928340c9d28d92dcaff8b8fbc9100a1cf9429 Author: Namhyung Kim Date: Thu Dec 24 11:16:17 2015 +0900 perf hist: Save raw_data/size for tracepoint events The raw_data and raw_size fields are to provide tracepoint specific information. They will be used by dynamic sort keys later. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450923377-18641-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 24 ++++++++++++++++++++++++ tools/perf/util/sort.h | 2 ++ 2 files changed, 26 insertions(+) commit fd36f3dd79331b9610664b867ff205465bf9ce68 Author: Namhyung Kim Date: Wed Dec 23 02:06:58 2015 +0900 perf hist: Pass struct sample to __hists__add_entry() This is a preparation to add more info into the hist_entry. Also it already passes too many argument, so passing sample directly will reduce the overhead of the function call. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/r/1450804030-29193-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 7 +++++-- tools/perf/builtin-diff.c | 11 +++++------ tools/perf/tests/hists_link.c | 6 +++--- tools/perf/util/hist.c | 31 +++++++++++++++++-------------- tools/perf/util/hist.h | 4 ++-- 5 files changed, 32 insertions(+), 27 deletions(-) commit 47513c2ff86e2afd345a9aea3c5626f71cf2f4e9 Author: Linus Walleij Date: Tue Dec 8 16:26:28 2015 +0100 hid: cp2112: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: linux-input@vger.kernel.org Acked-by: Jiri Kosina Signed-off-by: Linus Walleij drivers/hid/hid-cp2112.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 78d455a2e41fa3de9e1d2d3696cefcb7d6c9c5c4 Author: Linus Walleij Date: Tue Dec 8 16:17:02 2015 +0100 bcma: gpio: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Acked-by: Hauke Mehrtens Acked-by: Rafał Miłecki Signed-off-by: Linus Walleij drivers/bcma/driver_gpio.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 95bf0951e415cf71654184fd6e8c711782b1f22a Author: Linus Walleij Date: Tue Dec 8 13:48:02 2015 +0100 avr32: gpio: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Haavard Skinnemoen Acked-by: Hans-Christian Noren Egtvedt Signed-off-by: Linus Walleij arch/avr32/mach-at32ap/pio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 11680af7c8579fc37ac34bf16cb5ea49435054a4 Author: Linus Walleij Date: Tue Dec 8 23:20:57 2015 +0100 video: fbdev: via: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Florian Tobias Schandinat Acked-by: Tomi Valkeinen Signed-off-by: Linus Walleij drivers/video/fbdev/via/via-gpio.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit f7a8e38f07a17be90758559fe66fe7337096053f Author: Brian Norris Date: Tue Jan 5 10:39:45 2016 -0800 mtd: nand: assign reasonable default name for NAND drivers Commits such as commit 853f1c58c4b2 ("mtd: nand: omap2: show parent device structure in sysfs") attempt to rely on the core MTD code to set the MTD name based on the parent device. However, nand_base tries to set a different default name according to the flash name (e.g., extracted from the ONFI parameter page), which means NAND drivers will never make use of the MTD defaults. This is not the intention of commit 853f1c58c4b2. This results in problems when trying to use the cmdline partition parser, since the MTD name is different than expected. Let's fix this by providing a default NAND name, where possible. Note that this is not really a great default name in the long run, since this means that if there are multiple MTDs attached to the same controller device, they will have the same name. But that is an existing issue and requires future work on a better controller vs. flash chip abstraction to fix properly. Fixes: 853f1c58c4b2 ("mtd: nand: omap2: show parent device structure in sysfs") Reported-by: Heiko Schocher Signed-off-by: Brian Norris Reviewed-by: Boris Brezillon Tested-by: Heiko Schocher Cc: Heiko Schocher Cc: Frans Klaver Cc: drivers/mtd/nand/nand_base.c | 3 +++ 1 file changed, 3 insertions(+) commit 271dba4521aed0c37c063548f876b49f5cd64b2e Author: Filipe Manana Date: Tue Jan 5 16:24:05 2016 +0000 Btrfs: fix transaction handle leak on failure to create hard link If we failed to create a hard link we were not always releasing the the transaction handle we got before, resulting in a memory leak and preventing any other tasks from being able to commit the current transaction. Fix this by always releasing our transaction handle. Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/inode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8ff0ef996ca00028519c70e8d51d32bd37eb51dc Author: Grygorii Strashko Date: Thu Dec 10 21:18:20 2015 +0200 PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD On -RT and if kernel is booting with "threadirqs" cmd line parameter, PCIe/PCI (MSI) IRQ cascade handlers (like dra7xx_pcie_msi_irq_handler()) will be forced threaded and, as result, will generate warnings like this: WARNING: CPU: 1 PID: 82 at kernel/irq/handle.c:150 handle_irq_event_percpu+0x14c/0x174() irq 460 handler irq_default_primary_handler+0x0/0x14 enabled interrupts Backtrace: (warn_slowpath_common) from (warn_slowpath_fmt+0x38/0x40) (warn_slowpath_fmt) from (handle_irq_event_percpu+0x14c/0x174) (handle_irq_event_percpu) from (handle_irq_event+0x84/0xb8) (handle_irq_event) from (handle_simple_irq+0x90/0x118) (handle_simple_irq) from (generic_handle_irq+0x30/0x44) (generic_handle_irq) from (dra7xx_pcie_msi_irq_handler+0x7c/0x8c) (dra7xx_pcie_msi_irq_handler) from (irq_forced_thread_fn+0x28/0x5c) (irq_forced_thread_fn) from (irq_thread+0x128/0x204) This happens because all of them invoke generic_handle_irq() from the requested handler. generic_handle_irq() grabs raw_locks and thus needs to run in raw-IRQ context. This issue was originally reproduced on TI dra7-evem, but, as was identified during discussion [1], other hosts can also suffer from this issue. Fix all them at once by marking PCIe/PCI (MSI) IRQ cascade handlers IRQF_NO_THREAD explicitly. [1] http://lkml.kernel.org/r/1448027966-21610-1-git-send-email-grygorii.strashko@ti.com [bhelgaas: add stable tag, fix typos] Signed-off-by: Grygorii Strashko Signed-off-by: Bjorn Helgaas Acked-by: Lucas Stach (for imx6) CC: stable@vger.kernel.org CC: Kishon Vijay Abraham I CC: Jingoo Han CC: Kukjin Kim CC: Krzysztof Kozlowski CC: Richard Zhu CC: Thierry Reding CC: Stephen Warren CC: Alexandre Courbot CC: Simon Horman CC: Pratyush Anand CC: Michal Simek CC: "Sören Brinkmann" CC: Sebastian Andrzej Siewior drivers/pci/host/pci-dra7xx.c | 3 ++- drivers/pci/host/pci-exynos.c | 3 ++- drivers/pci/host/pci-imx6.c | 3 ++- drivers/pci/host/pci-tegra.c | 2 +- drivers/pci/host/pcie-rcar.c | 6 ++++-- drivers/pci/host/pcie-spear13xx.c | 3 ++- drivers/pci/host/pcie-xilinx.c | 3 ++- 7 files changed, 15 insertions(+), 8 deletions(-) commit b75d8063c09b5b4dc230dfbb2ddc1a50cf06b897 Author: Geliang Tang Date: Wed Nov 25 21:49:27 2015 +0800 target: use offset_in_page macro Use offset_in_page macro instead of (addr & ~PAGE_MASK). Signed-off-by: Geliang Tang Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 2 +- drivers/target/tcm_fc/tfc_io.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 234bdbc49d118431b1ebeee228bd1b3105f89e2a Author: Christophe Vu-Brugier Date: Wed Nov 18 09:22:58 2015 +0100 target: fix deprecated attribute names in dmesg The following message is displayed in dmesg when a deprecated attribute is set: "ignoring deprecated ##_name## attribute" This patch fixes the format to include the name of the deprecated attribute. Signed-off-by: Christophe Vu-Brugier Reviewed-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e6f41633cb79b55ead84b023c02035322c7827e7 Author: Jamie Pocas Date: Sun Nov 29 14:44:57 2015 -0800 target/sbc: Add LBPRZ attribute + control CDB emulation This change sets the LBPRZ flag in EVPD page b2h and READ CAPACITY (16) based on a new unmap_zeroes_data device attribute. This flag is set automatically for iblock based on underlying block device queue's discard_zeroes_data flag. Signed-off-by: Jamie Pocas Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 36 +++++++++++++++++++++++++++++++++++ drivers/target/target_core_device.c | 2 ++ drivers/target/target_core_iblock.c | 2 ++ drivers/target/target_core_sbc.c | 10 +++++++++- drivers/target/target_core_spc.c | 12 ++++++++++++ include/target/target_core_base.h | 3 +++ 6 files changed, 64 insertions(+), 1 deletion(-) commit ef8f46b549c2e425513ed568f18c827a37c08727 Author: Bart Van Assche Date: Thu Oct 22 15:56:25 2015 -0700 sbp-target: Remove a superfluous forward declaration Signed-off-by: Bart Van Assche Acked-by: Chris Boot Reviewed-by: Andy Grover Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger drivers/target/sbp/sbp_target.c | 2 -- 1 file changed, 2 deletions(-) commit 5a3425210ccee6a20e9b36f8a169b0e99bc6cbde Author: Bart Van Assche Date: Thu Oct 22 15:53:22 2015 -0700 iscsi-target: Fix indentation + spelling + unreachable code Modify indentation such that the 'smatch' tool no longer complains about incorrect indentation + unreachable code. Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Reviewed-by: Andy Grover Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 5 +---- drivers/target/iscsi/iscsi_target_erl1.c | 7 +++---- drivers/target/iscsi/iscsi_target_parameters.c | 2 +- drivers/target/iscsi/iscsi_target_tmr.c | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) commit 8bc403b78ffb774d8dc944abb0826c46c0dca09d Author: Geert Uytterhoeven Date: Mon Dec 21 11:33:52 2015 +0100 ARM: dts: silk: Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. Signed-off-by: Geert Uytterhoeven Acked-by: Brian Norris Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-silk.dts | 1 + 1 file changed, 1 insertion(+) commit e5e6f9b4891af3617a76f5220f1efaf365f837da Author: Geert Uytterhoeven Date: Mon Dec 21 11:33:51 2015 +0100 ARM: dts: gose: Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. Signed-off-by: Geert Uytterhoeven Acked-by: Brian Norris Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793-gose.dts | 1 + 1 file changed, 1 insertion(+) commit 947ef628414483b05eac32253f86ef7753fb4d4d Author: Geert Uytterhoeven Date: Mon Dec 21 11:33:50 2015 +0100 ARM: dts: porter: Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. Signed-off-by: Geert Uytterhoeven Acked-by: Brian Norris Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-porter.dts | 1 + 1 file changed, 1 insertion(+) commit f6531bb50847af70aa95665e83873c455d7bf06e Author: Geert Uytterhoeven Date: Mon Dec 21 11:33:49 2015 +0100 ARM: dts: koelsch: Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. Signed-off-by: Geert Uytterhoeven Acked-by: Brian Norris Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-koelsch.dts | 1 + 1 file changed, 1 insertion(+) commit b88ddbdd36859a4dc99bddd9b5730944187530c0 Author: Geert Uytterhoeven Date: Mon Dec 21 11:33:48 2015 +0100 ARM: dts: lager: Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. Signed-off-by: Geert Uytterhoeven Acked-by: Brian Norris Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790-lager.dts | 1 + 1 file changed, 1 insertion(+) commit b66c1ebae17bf78eb915f1d22a82e1183b0deb8e Author: Geert Uytterhoeven Date: Mon Dec 21 11:33:47 2015 +0100 ARM: dts: bockw: Add compatible property to "partitions" node As of commit e488ca9f8d4f62c2 ("doc: dt: mtd: partitions: add compatible property to "partitions" node"), the "partitions" subnode of an SPI FLASH device node must have a compatible property. The partitions are no longer detected if it is not present. Signed-off-by: Geert Uytterhoeven Acked-by: Brian Norris Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7778-bockw.dts | 1 + 1 file changed, 1 insertion(+) commit ac75d8be9bed40b54be4e98fe6a521322d6cd891 Author: Bart Van Assche Date: Thu Oct 22 15:52:01 2015 -0700 target: Fix spelling + remove set-but-not-used variables Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Reviewed-by: Andy Grover Reviewed-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/target_core_pr.c | 11 ++--------- drivers/target/target_core_tmr.c | 2 +- drivers/target/target_core_transport.c | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) commit 3460baa620685c20f5ee19afb6d99d26150c382c Author: Christoph Biedl Date: Wed Dec 23 16:51:57 2015 +0100 PCI: Fix minimum allocation address overwrite Commit 36e097a8a297 ("PCI: Split out bridge window override of minimum allocation address") claimed to do no functional changes but unfortunately did: The "min" variable is altered. At least the AVM A1 PCMCIA adapter was no longer detected, breaking ISDN operation. Use a local copy of "min" to restore the previous behaviour. [bhelgaas: avoid gcc "?:" extension for portability and readability] Fixes: 36e097a8a297 ("PCI: Split out bridge window override of minimum allocation address") Signed-off-by: Christoph Biedl Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v3.14+ drivers/pci/bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c7f5d105495a38ed09e70d825f75d9d7d5407264 Author: David S. Miller Date: Thu Nov 5 11:34:57 2015 -0500 net: Add eth_platform_get_mac_address() helper. A repeating pattern in drivers has become to use OF node information and, if not found, platform specific host information to extract the ethernet address for a given device. Currently this is done with a call to of_get_mac_address() and then some ifdef'd stuff for SPARC. Consolidate this into a portable routine, and provide the arch_get_platform_mac_address() weak function hook for all architectures to implement if they want. Signed-off-by: David S. Miller arch/sparc/kernel/idprom.c | 7 +++++++ include/linux/etherdevice.h | 3 +++ net/ethernet/eth.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) commit cdba756f5803a2f0a8bbc6605acc166dd817979e Author: Eric Dumazet Date: Wed Jan 6 06:53:50 2016 -0800 net: move ndo_features_check() close to ndo_start_xmit() TX fast path uses ndo_start_xmit(), ndo_features_check() and ndo_select_queue(). Move ndo_features_check() close to ndo_start_xmit() to increase data locality. All "struct net_device_ops" should now be using C99 initializers. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/netdevice.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 03996f2064a5c5b7c1bd942794d622179acf2d61 Author: K. Y. Srinivasan Date: Wed Dec 23 13:15:51 2015 -0800 storvsc: Tighten up the interrupt path On the interrupt path, we repeatedly establish the pointer to the storvsc_device. While the compiler does inline get_in_stor_device() (and other static functions) in the call chain in the interrupt path, the compiler is repeatedly inlining the call to get_in_stor_device() each time it is invoked. The return value of get_in_stor_device() can be cached in the interrupt path since there is higher level serialization in place to ensure correct handling when the module unload races with the processing of an incoming message from the host. Optimize this code path by caching the pointer to storvsc_device and passing it as an argument. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Tested-by: Alex Ng Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 59635018f9b7ae8b3e304d7a5da6f628b5a1dcf6 Author: K. Y. Srinivasan Date: Wed Dec 23 13:15:50 2015 -0800 storvsc: Refactor the code in storvsc_channel_init() The function storvsc_channel_init() repeatedly interacts with the host to extract various channel properties. Refactor this code to eliminate code repetition. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Tested-by: Alex Ng Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 126 +++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 80 deletions(-) commit dac582417bc449b1f7f572d3f1dd9d23eec15cc9 Author: K. Y. Srinivasan Date: Wed Dec 23 13:15:49 2015 -0800 storvsc: Properly support Fibre Channel devices For FC devices managed by this driver, atttach the appropriate transport template. This will allow us to create the appropriate sysfs files for these devices. With this we can publish the wwn for both the port and the node. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Tested-by: Alex Ng Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 181 +++++++++++++++++++++++++++++++++------------ 1 file changed, 134 insertions(+), 47 deletions(-) commit 83d1e8b9b51b06d79653293d0bf34ff2c61abe46 Author: K. Y. Srinivasan Date: Wed Dec 23 13:15:48 2015 -0800 storvsc: Fix a bug in the layout of the hv_fc_wwn_packet The hv_fc_wwn_packet is exchanged over vmbus. Make the definition in Linux match the Windows definition. Signed-off-by: K. Y. Srinivasan Reviewed-by: Johannes Thumshirn Reviewed-by: Long Li Reviewed-by: Hannes Reinecke Tested-by: Alex Ng Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9e02d8caaf90077bc47e054e4c3a41736245a9f8 Author: Dan Carpenter Date: Wed Jan 6 12:59:10 2016 +0300 fsl/fman: double free on probe failure "priv" is allocated with devm_kzalloc() so freeing it here with kfree() will lead to a double free. Fixes: 3933961682a3 ('fsl/fman: Add FMan MAC driver') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 1 - 1 file changed, 1 deletion(-) commit e06a03bdf8781d6a93a13d5bdf33d058ca498a86 Author: Dan Carpenter Date: Wed Jan 6 12:58:09 2016 +0300 fsl/fman: fix the pause_time test pause_time is unsigned so it can't be less than zero. The bug means that we allow invalid pause-times. Fixes: 57ba4c9b56d8 ('fsl/fman: Add FMan MAC support') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c56f5f1de3a6ab8ec985edbc358e1fd8d4e36a65 Author: Wilfried Weissmann Date: Sun Dec 27 20:21:19 2015 +0100 mvsas: Add SGPIO support to Marvell 94xx Add SGPIO support to Marvell 94xx. Signed-off-by: Wilfried Weissmann Reviewed-by: James Bottomley Signed-off-by: Martin K. Petersen drivers/scsi/mvsas/mv_94xx.c | 134 +++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/mvsas/mv_94xx.h | 71 +++++++++++++++++++++++ drivers/scsi/mvsas/mv_init.c | 2 + drivers/scsi/mvsas/mv_sas.c | 13 +++++ drivers/scsi/mvsas/mv_sas.h | 5 ++ 5 files changed, 225 insertions(+) commit 9d9938854efcf2f21381b930bc1324e95640e0c4 Merge: ca9ea7a 3f37b26 Author: Takashi Iwai Date: Wed Jan 6 20:58:13 2016 +0100 Merge branch 'for-linus' into for-next Conflicts: drivers/gpu/drm/i915/intel_display.c sound/soc/intel/skylake/skl.h commit 5f985d88bac34e7f3b4403118eab072902a0b392 Author: Tomas Henzl Date: Wed Dec 23 14:21:47 2015 +0100 mpt3sas: A correction in unmap_resources It might happen that we try to free an already freed pointer. Reported-by: Maurizio Lombardi Signed-off-by: Tomas Henzl Acked-by: Chaitra P B Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cca8f13b4fdaf3583e103ae7f96fda948839b265 Author: Don Brace Date: Tue Dec 22 10:36:48 2015 -0600 hpsa: Add box and bay information for enclosure devices Adding a new method to display enclosure device information. Reviewed-by: Justin Lindley Reviewed-by: Kevin Barnett Reviewed-by: Scott Teel Reviewed-by: Hannes Reinecke Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 107 ++++++++++++++++++++++++++++++++++++++++++++---- drivers/scsi/hpsa_cmd.h | 13 ++++++ 2 files changed, 113 insertions(+), 7 deletions(-) commit 09371d623c9c3dc6ed7f53ec8ab01d25f0c6c697 Author: Don Brace Date: Tue Dec 22 10:36:42 2015 -0600 hpsa: Change SAS transport devices to bus 0. SAS transport places devices on bus 0 but driver was setting the bus to 3. Reviewed-by: Justin Lindley Reviewed-by: Kevin Barnett Reviewed-by: Scott Teel Reviewed-by: Matthew R. Ochs Reviewed-by: Hannes Reinecke Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2708f2957ce70037d3eab8a45523d4445404ecb4 Author: Don Brace Date: Tue Dec 22 10:36:36 2015 -0600 hpsa: fix path_info_show Left off some changes from Rasmus Villemoes where he changed snprintf to scnprintf. Suggested-by: Rasmus Villemoes Reviewed-by: Justin Lindley Reviewed-by: Kevin Barnett Reviewed-by: Scott Teel Reviewed-by: Rasmus Villemoes Reviewed-by: Hannes Reinecke Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 719255d0e29463ddba2d01a72c1e74092793103a Author: Dan Carpenter Date: Wed Jan 6 12:56:30 2016 +0300 mlxsw: core: remove an unnecessary condition We checked "err" on the lines before so we know it's zero here. These cause a static checker warning because checking known things can indicate a bug. Maybe there is a missing assignment or we are checking the wrong variable. Signed-off-by: Dan Carpenter Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c406700cdf882b89cb036117414fcd8b0cc2656d Author: Jarod Wilson Date: Wed Jan 6 09:36:37 2016 -0500 ethernet/atheros/alx: sanitize buffer sizing and padding This is based on the work done by Przemek Rudy in bug 70761 at bugzilla.kernel.org, but with some work done to disentagle and clarify things a bit. Similar to Przemek's work and other drivers, we're adding a padding of 16 here, but we're also disentangling mtu size calculations from max buffer size calculations a bit, and adding ETH_HLEN to the value written into ALX_MTU. Hopefully, with a bit more consistency and clarity, things behave better here. Sadly, I can only test in my alx-driven E2200, which worked just fine before this patch. In comment #58 of bug 70761, Eugene A. Shatokhin reports that this patch does help considerably for a ROSA Linux user of his with an AR8162 network adapter when patched into a 4.1.x-based kernel, with several days of normal operation where wired network previously wasn't usable without setting MTU to 9000 as a work-around. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70761 CC: "Eugene A. Shatokhin" CC: Przemek Rudy CC: Jay Cliburn CC: Chris Snook CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/hw.c | 10 +++++----- drivers/net/ethernet/atheros/alx/hw.h | 9 ++++++--- drivers/net/ethernet/atheros/alx/main.c | 7 +++---- 3 files changed, 14 insertions(+), 12 deletions(-) commit f637941b14055d5479bb43fc776e88a52cad33c9 Merge: 00ce3a1 fc1273a Author: David S. Miller Date: Wed Jan 6 14:42:42 2016 -0500 Merge branch 'mlxsw-vlan_filtering-offload' Jiri Pirko says: ==================== mlxsw: add offload support for vlan_filtering option Elad says: This patch adds SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING port attribute. When a bridge is offloaded to hardware, the hardware can learn if the bridge is .1Q bridge (VLAN-aware) or not VLAN aware bridge. In order to toggle the mode a user can use sysfs: $ echo 1 > /sys/devices/virtual/net/br0/bridge/vlan_filtering or via iproute2: $ ip link set dev br0 type bridge vlan_filtering 1 --- v1->v2: small fix in patch #1 ==================== Signed-off-by: David S. Miller commit fc1273afb257663de034260f5b5fbbd8d79d6308 Author: Elad Raz Date: Wed Jan 6 13:01:11 2016 +0100 mlxsw: Remember untagged VLANs When a vlan is been configured, remeber the untagged mode of the vlan. When displaying the list of configured VLANs, show the untagged attribute. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 ++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 9 ++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) commit 26a4ea0f454c6714aeb2b1e295c1f8d76de94013 Author: Elad Raz Date: Wed Jan 6 13:01:10 2016 +0100 mlxsw: Disable vlan_filtering for non .1D bridge When a port is bridged, the bridge must be vlan aware bridge (.1Q) or the bridging should be on top of VLAN interfaces (.1D bridge). Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e4a13055077af25d310f61f2b52a9bdfaba45eb6 Author: Elad Raz Date: Wed Jan 6 13:01:09 2016 +0100 mlxsw: Renaming local variable names for consistency Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 29edf44f858a3f923c16f9f5b1aa790e44b8feb9 Author: Elad Raz Date: Wed Jan 6 13:01:08 2016 +0100 mlxsw: Fixing vlans init range Initialize VLANs 0..4095 (Remove init for VID 4096). Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 404cdbf0894a0707dd19179d2e21a3ab37f33f54 Author: Elad Raz Date: Wed Jan 6 13:01:07 2016 +0100 bridge: add vlan filtering change for new bridged device Notifying hardware about newly bridged port vlan-aware changes. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/bridge/br_vlan.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6b72a770202a0ad843312436dd50ed4690d7cc65 Author: Elad Raz Date: Wed Jan 6 13:01:06 2016 +0100 bridge: add vlan filtering change notification Notifying hardware about bridge vlan-aware changes. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/bridge/br_vlan.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 81435c33e062cbd4508da6f64655cb0967eeb65f Author: Elad Raz Date: Wed Jan 6 13:01:05 2016 +0100 switchdev: add bridge vlan_filtering attribute Adding vlan_filtering attribute to allow hardware vendor to support vlan-aware bridges. Vlan_filtering is a per-bridge attribute. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/switchdev.h | 2 ++ 1 file changed, 2 insertions(+) commit 08474cc1e6ea71237cab7e4a651a623c9dea1084 Author: Elad Raz Date: Wed Jan 6 13:01:04 2016 +0100 bridge: Propagate vlan add failure to user Disallow adding interfaces to a bridge when vlan filtering operation failed. Send the failure code to the user. Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/bridge/br_if.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit a1c6f05733c27ba7067c06c095f49e8732a5ae17 Author: Dmitry Monakhov Date: Mon Apr 13 16:31:37 2015 +0400 fs: use block_device name vsprintf helper Signed-off-by: Dmitry Monakhov Signed-off-by: Al Viro fs/btrfs/super.c | 4 +--- fs/buffer.c | 21 ++++++--------------- fs/ext2/xattr.c | 6 ++---- fs/ext4/page-io.c | 5 ++--- fs/ext4/xattr.c | 6 ++---- fs/f2fs/debug.c | 6 ++---- fs/gfs2/ops_fstype.c | 4 +--- fs/jbd2/transaction.c | 6 ++---- fs/minix/itree_v1.c | 9 ++++----- fs/minix/itree_v2.c | 9 ++++----- fs/nilfs2/super.c | 6 ++---- fs/reiserfs/journal.c | 24 ++++++++++-------------- fs/reiserfs/prints.c | 9 +++------ fs/reiserfs/procfs.c | 5 ++--- fs/squashfs/super.c | 7 +++---- fs/super.c | 4 +--- fs/xfs/xfs_buf.c | 8 ++------ 17 files changed, 49 insertions(+), 90 deletions(-) commit 1031bc589228ca35b3b6fb3dfe4656c0da5fbeb4 Author: Dmitry Monakhov Date: Mon Apr 13 16:31:35 2015 +0400 lib/vsprintf: add %*pg format specifier This allow to directly print block_device name. Currently one should use bdevname() with temporal char buffer. This is very ineffective because bloat stack usage for deep IO call-traces Example: %pg -> sda, sda1 or loop0p1 [AV: fixed a minor braino - position updates should not be dependent upon having reached the of buffer] Signed-off-by: Dmitry Monakhov Signed-off-by: Al Viro Documentation/printk-formats.txt | 6 ++++++ lib/vsprintf.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit 83a40ce993cda0757b102389e38446e79a2cc172 Author: Charles Keepax Date: Wed Jan 6 12:33:19 2016 +0000 ASoC: wm_adsp: Pull data through compressed read Data is read in blocks of up to one fragment is size from the circular buffer on the DSP and is re-packed to remove the padding byte that exists in the DSP memory map. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm5110.c | 1 + sound/soc/codecs/wm_adsp.c | 138 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/wm_adsp.h | 2 + 3 files changed, 141 insertions(+) commit 565ace464105cb9623cbf4eb9549d4b0c24166c9 Author: Charles Keepax Date: Wed Jan 6 12:33:18 2016 +0000 ASoC: wm_adsp: Add a handler for the compressed IRQ Here support is added for responding to DSP IRQs that are used to indicate data being available on the DSP. The idea is that we check the amount of data available upon receipt of an IRQ and on subsequent calls to the pointer callback we recheck once less than one fragment is available (to avoid excessive SPI traffic), if there is truely less than one fragment available we ack the last IRQ and wait for a new one. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm5110.c | 27 +++++++ sound/soc/codecs/wm_adsp.c | 188 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/wm_adsp.h | 3 + 3 files changed, 218 insertions(+) commit 424081f3c881ca3aef50cfa571e91863c10d952a Author: Dmitry Monakhov Date: Mon Apr 13 16:31:34 2015 +0400 fs: use gendisk->disk_name where possible gendisk with part==0 is obviously gendisk->disk_name. Signed-off-by: Dmitry Monakhov Signed-off-by: Al Viro fs/block_dev.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 24338722cfa23fdf4e08c6189a11f7e3a902d86a Author: Charles Keepax Date: Wed Jan 6 15:15:37 2016 +0000 ASoC: wm5110: Fix PGA clear when disabling DRE We don't want to use a bypassed write in wm5110_clear_pga_volume, we might disable the DRE whilst the CODEC is powered down. A normal regmap_write will always go to the hardware (when not on cache_only) even if the written value matches the cache. As using a normal write will still achieve the desired behaviour of bring the cache and hardware in sync, this patch updates the function to use a normal write, which avoids issues when the CODEC is powered down. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/wm5110.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 13331a551ab4df87f7a027d2cab392da96aba1de Author: Trond Myklebust Date: Wed Jan 6 08:57:06 2016 -0500 SUNRPC: Fixup socket wait for memory We're seeing hangs in the NFS client code, with loops of the form: RPC: 30317 xmit incomplete (267368 left of 524448) RPC: 30317 call_status (status -11) RPC: 30317 call_transmit (status 0) RPC: 30317 xprt_prepare_transmit RPC: 30317 xprt_transmit(524448) RPC: xs_tcp_send_request(267368) = -11 RPC: 30317 xmit incomplete (267368 left of 524448) RPC: 30317 call_status (status -11) RPC: 30317 call_transmit (status 0) RPC: 30317 xprt_prepare_transmit RPC: 30317 xprt_transmit(524448) Turns out commit ceb5d58b2170 ("net: fix sock_wake_async() rcu protection") moved SOCKWQ_ASYNC_NOSPACE out of sock->flags and into sk->sk_wq->flags, however it never tried to fix up the code in net/sunrpc. The new idiom is to use the flags in the RCU protected struct socket_wq. While we're at it, clear out the now redundant places where we set/clear SOCKWQ_ASYNC_NOSPACE and SOCK_NOSPACE. In principle, sk_stream_wait_memory() is supposed to set these for us, so we only need to clear them in the particular case of our ->write_space() callback. Fixes: ceb5d58b2170 ("net: fix sock_wake_async() rcu protection") Cc: Eric Dumazet Cc: stable@vger.kernel.org # 4.4 Signed-off-by: Trond Myklebust net/sunrpc/xprtsock.c | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) commit 2a803c4db615d85126c5c7afd5849a3cfde71422 Author: Mark Rutland Date: Wed Jan 6 11:05:27 2016 +0000 arm64: head.S: use memset to clear BSS Currently we use an open-coded memzero to clear the BSS. As it is a trivial implementation, it is sub-optimal. Our optimised memset doesn't use the stack, is position-independent, and for the memzero case can use of DC ZVA to clear large blocks efficiently. In __mmap_switched the MMU is on and there are no live caller-saved registers, so we can safely call an uninstrumented memset. This patch changes __mmap_switched to use memset when clearing the BSS. We use the __pi_memset alias so as to avoid any instrumentation in all kernel configurations. Cc: Catalin Marinas Cc: Marc Zyngier Reviewed-by: Ard Biesheuvel Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit b523e185bba36164ca48a190f5468c140d815414 Author: Ard Biesheuvel Date: Wed Dec 23 10:29:28 2015 +0100 efi: stub: define DISABLE_BRANCH_PROFILING for all architectures This moves the DISABLE_BRANCH_PROFILING define from the x86 specific to the general CFLAGS definition for the stub. This fixes build errors when building for arm64 with CONFIG_PROFILE_ALL_BRANCHES_ENABLED. Reviewed-by: Matt Fleming Reported-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon drivers/firmware/efi/libstub/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee03353bc04f8e460cc4e3da80d9721d9ecb89f1 Author: Mark Rutland Date: Tue Jan 5 17:33:34 2016 +0000 arm64: entry: remove pointless SPSR mode check In work_pending, we may skip work if the stacked SPSR value represents anything other than an EL0 context. We then immediately invoke the kernel_exit 0 macro as part of ret_to_user, assuming a return to EL0. This is somewhat confusing. We use work_pending as part of the ret_to_user/ret_fast_syscall state machine. We only use ret_fast_syscall in the return from an SVC issued from EL0. We use ret_to_user for return from EL0 exception handlers and also for return from ret_from_fork in the case the task was not a kernel thread (i.e. it is a user task). Thus in all cases the stacked SPSR value must represent an EL0 context, and the check is redundant. This patch removes it, along with the now unused no_work_pending label. Cc: Chris Metcalf Acked-by: Catalin Marinas Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/kernel/entry.S | 4 ---- 1 file changed, 4 deletions(-) commit 14de6c44d149c68df1800ded42bbab51485ef67a Author: Maarten Lankhorst Date: Mon Jan 4 12:53:20 2016 +0100 drm/atomic: Remove drm_atomic_connectors_for_crtc. Now that connector_mask is reliable there's no need for this function any more. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-6-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 30 ------------------------------ drivers/gpu/drm/drm_atomic_helper.c | 10 ++++------ drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- include/drm/drm_atomic.h | 4 ---- 4 files changed, 5 insertions(+), 41 deletions(-) commit 2aa974c92b9d0bb092a8f308d83dfe3c69041b01 Author: Maarten Lankhorst Date: Wed Jan 6 14:53:25 2016 +0100 drm/i915: Update connector_mask during readout, v2. drm/i915: Update connector_mask during readout, v2. The connector_mask may be used any time during the non-atomic .crtc_disable which is called before the full atomic state is set up and needs to be accurate for that reason. Changes since v1: - Update connector_mask in readout_hw_state and add a comment. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/568D1C55.8010001@linux.intel.com Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 8cf60cf238ce1bea38593321e6ea8561fc32e38d Author: Chin-Ran Lo Date: Wed Jan 6 06:34:38 2016 -0800 Bluetooth: btmrvl: don't send data to firmware while processing suspend Usually when driver sends data to firmware it receives TX_DONE (DN_LD_HOST_INT_STATUS) interrupt from firmware right away. It's also observed that some times the fireware could delay sending DN_LD_HOST_INT_STATUS interrupt. If driver sends data to firmware during suspend processing and the TX_DONE interrupt is delayed, it may come back at wrong time when SDIO host driver is in the middle of suspending. Block any data from stack while suspending. Also skip sending data that are already in driver tx_queue. Don't purge the skb queue on suspend to avoid intermittent music after system resumes from S3. Signed-off-by: Chin-Ran Lo Signed-off-by: Amitkumar Karwar Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_drv.h | 1 + drivers/bluetooth/btmrvl_main.c | 11 +++++++++-- drivers/bluetooth/btmrvl_sdio.c | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) commit d716892f0827dd29ae2488ab3005dfc84ff8fed0 Author: Chin-Ran Lo Date: Wed Jan 6 06:34:37 2016 -0800 Bluetooth: btmrvl: max out host sleep parameter 'gap' For gpio=0xff (wake up host through SDIO interface) case, gap=0xff means no delay (same as gap=0) for incoming data packet to be sent to host after host sleep is activated. Change it to the maximum delay to reduce the chance that RX interrupt could be delivered while host controller suspends. Signed-off-by: Chin-Ran Lo Signed-off-by: Amitkumar Karwar Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 787b306cf3296bdce5c8559206b237c1ae107484 Author: Johannes Berg Date: Wed Jan 6 14:38:40 2016 +0100 Bluetooth: avoid rebuilding hci_sock all the time Instead, allow using string formatting with send_monitor_note() and access init_utsname(). Signed-off-by: Johannes Berg Signed-off-by: Marcel Holtmann net/bluetooth/hci_sock.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit ccec5ee302d5cbd0273eb1c79bc935a8e3f873c6 Author: Mateusz Guzik Date: Wed Jan 6 06:41:53 2016 +0100 poll: plug an unused argument to do_poll Number of fds is already known based on passed list. No functional changes. Signed-off-by: Mateusz Guzik Signed-off-by: Al Viro fs/select.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8f1d57c172482c9a1568ec647fc5c2e64c6c6a57 Author: Al Viro Date: Sat Jan 2 15:06:19 2016 -0500 amdkfd: don't open-code memdup_user() Signed-off-by: Al Viro drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 33 +++++++------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) commit abb0f6a79fe8eba7982b73313b8623259d78c3f6 Author: Al Viro Date: Sat Jan 2 14:59:38 2016 -0500 cdrom: don't open-code memdup_user() Signed-off-by: Al Viro drivers/cdrom/cdrom.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 820351f05be93623c6e71b5d618f90f0deebc134 Author: Al Viro Date: Sat Jan 2 14:58:07 2016 -0500 rsxx: don't open-code memdup_user() Signed-off-by: Al Viro drivers/block/rsxx/core.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 8ed6010d50ee010961ccecb4507470b244928603 Author: Al Viro Date: Sat Jan 2 14:56:33 2016 -0500 mtip32xx: don't open-code memdup_user() [folded a fix by Dan Carpenter] Signed-off-by: Al Viro drivers/block/mtip32xx/mtip32xx.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit ed94add00e290e675c36cef6767d7d1f51a02f28 Author: Dan Carpenter Date: Mon Jan 4 16:10:24 2016 +0300 drm/etnaviv: unlock on error in etnaviv_gem_get_iova() We have to drop a lock before returning -ENOMEM here. Fixes: a8c21a5451d8 ('drm/etnaviv: add initial etnaviv DRM driver') Signed-off-by: Dan Carpenter Acked-by: Russell King drivers/gpu/drm/etnaviv/etnaviv_gem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3104fb3dd45bb47ff1382d1c079c251710ddcae3 Merge: ee9a7d2 984cf35 Author: Ingo Molnar Date: Wed Jan 6 11:41:48 2016 +0100 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU changes from Paul E. McKenney: - Adding transitivity uniformly to rcu_node structure ->lock acquisitions. (This is implemented by the first two commits on top of v4.4-rc2 due to the pervasive nature of this change.) - Documentation updates, including RCU requirements. - Expedited grace-period changes. - Miscellaneous fixes. - Linked-list fixes, courtesy of KTSAN. - Torture-test updates. - Late-breaking fix to sysrq-generated crash. Signed-off-by: Ingo Molnar commit 8012c983dd0cea8f5be5a02ca75fd8d437227a10 Author: Dan Carpenter Date: Wed Jan 6 12:38:41 2016 +0300 ASoC: rsnd: precedence error in rsnd_ssiu_init() The bitwise OR has higher precedence than ?: so the val2 was always set to 0x2. Fixes: b4c83b171557 ('ASoC: rsnd: add Multi channel support') Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown sound/soc/sh/rcar/ssiu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3b421cd07e4c0d4d6c0bbd55ca169c054fc081d Author: Sekhar Nori Date: Tue Dec 15 19:56:12 2015 +0530 irqchip/omap-intc: Add support for spurious irq handling Under some conditions, irq sorting procedure used by INTC can go wrong resulting in a spurious irq getting reported. If this condition is not handled, it results in endless stream of: unexpected IRQ trap at vector 00 messages from ack_bad_irq() Handle the spurious interrupt condition in omap-intc driver to prevent this. Measurements using kernel function profiler on AM335x EVM running at 720MHz show that after this patch omap_intc_handle_irq() takes about 37.4us against 34us before this patch. Signed-off-by: Sekhar Nori Acked-by: Tony Lindgren Cc: John Ogness Cc: Felipe Balbi Cc: Jason Cooper Cc: Marc Zyngier Link: http://lkml.kernel.org/r/9c78a6db02ac55f7af7371b417b6e414d2c3095b.1450188128.git.nsekhar@ti.com Cc: stable@vger.kernel.org Signed-off-by: Thomas Gleixner drivers/irqchip/irq-omap-intc.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 9cc2617de5b9222abb39cd02e90d57dfea99c6d7 Author: Vince Weaver Date: Wed Dec 9 11:34:45 2015 -0500 perf/x86/amd: Remove l1-dcache-stores event for AMD This is a long standing bug with the l1-dcache-stores generic event on AMD machines. My perf_event testsuite has been complaining about this for years and I'm finally getting around to trying to get it fixed. The data_cache_refills:system event does not make sense for l1-dcache-stores. Maybe this was a typo and it was meant to be for l1-dcache-store-misses? In any case, the values returned are nowhere near correct for l1-dcache-stores and in fact the umask values for the event have completely changed with fam15h so it makes even less sense than ever. So just remove it. Signed-off-by: Vince Weaver Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1512091134350.24311@vincent-weaver-1.umelst.maine.edu Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77af0037de0a280eeabc632890de871f062ea7be Author: Harish Chegondi Date: Mon Dec 7 14:32:32 2015 -0800 perf/x86/intel/uncore: Add Knights Landing uncore PMU support Knights Landing uncore performance monitoring (perfmon) is derived from Haswell-EP uncore perfmon with several differences. One notable difference is in PCI device IDs. Knights Landing uses common PCI device ID for multiple instances of an uncore PMU device type. In Haswell-EP, each instance of a PMU device type has a unique device ID. Knights Landing uncore components that have performance monitoring units are UBOX, CHA, EDC, MC, M2PCIe, IRP and PCU. Perfmon registers in EDC, MC, IRP, and M2PCIe reside in the PCIe configuration space. Perfmon registers in UBOX, CHA and PCU are accessed via the MSR interface. For more details, please refer to the public document: https://software.intel.com/sites/default/files/managed/15/8d/IntelXeonPhi%E2%84%A2x200ProcessorPerformanceMonitoringReferenceManual_Volume1_Registers_v0%206.pdf Signed-off-by: Harish Chegondi Signed-off-by: Peter Zijlstra (Intel) Cc: Andi Kleen Cc: Arnaldo Carvalho de Melo Cc: Harish Chegondi Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Lukasz Anaczkowski Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/8ac513981264c3eb10343a3f523f19cc5a2d12fe.1449470704.git.harish.chegondi@intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_uncore.c | 15 + arch/x86/kernel/cpu/perf_event_intel_uncore.h | 3 + arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c | 2 +- .../x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 480 +++++++++++++++++++++ 4 files changed, 499 insertions(+), 1 deletion(-) commit dae25530a44ad9e6523495ebc8b37bb0a1640490 Author: Harish Chegondi Date: Mon Dec 7 14:32:31 2015 -0800 perf/x86/intel/uncore: Remove hard coding of PMON box control MSR offset Call uncore_pci_box_ctl() function to get the PMON box control MSR offset instead of hard coding the offset. This would allow us to use this snbep_uncore_pci_init_box() function for other PCI PMON devices whose box control MSR offset is different from SNBEP_PCI_PMON_BOX_CTL. Signed-off-by: Harish Chegondi Signed-off-by: Peter Zijlstra (Intel) Cc: Andi Kleen Cc: Arnaldo Carvalho de Melo Cc: Harish Chegondi Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Lukasz Anaczkowski Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/872e8ef16cfc38e5ff3b45fac1094e6f1722e4ad.1449470704.git.harish.chegondi@intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1e7b93906249a7ccca730be03168ace15f95709e Author: Harish Chegondi Date: Mon Dec 7 14:28:18 2015 -0800 perf/x86/intel: Add perf core PMU support for Intel Knights Landing Knights Landing core is based on Silvermont core with several differences. Like Silvermont, Knights Landing has 8 pairs of LBR MSRs. However, the LBR MSRs addresses match those of the Xeon cores' first 8 pairs of LBR MSRs Unlike Silvermont, Knights Landing supports hyperthreading. Knights Landing offcore response events config register mask is different from that of the Silvermont. This patch was developed based on a patch from Andi Kleen. For more details, please refer to the public document: https://software.intel.com/sites/default/files/managed/15/8d/IntelXeonPhi%E2%84%A2x200ProcessorPerformanceMonitoringReferenceManual_Volume1_Registers_v0%206.pdf Signed-off-by: Harish Chegondi Signed-off-by: Peter Zijlstra (Intel) Cc: Andi Kleen Cc: Arnaldo Carvalho de Melo Cc: Harish Chegondi Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Lukasz Anaczkowski Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/d14593c7311f78c93c9cf6b006be843777c5ad5c.1449517401.git.harish.chegondi@intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event.h | 2 + arch/x86/kernel/cpu/perf_event_intel.c | 62 ++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/perf_event_intel_lbr.c | 14 +++++++ 3 files changed, 78 insertions(+) commit d6980ef32570e2a26e05b1183788f4b70f1f27d0 Author: Kan Liang Date: Thu Dec 3 16:00:11 2015 -0500 perf/x86/intel/uncore: Add Broadwell-EP uncore support The uncore subsystem for Broadwell-EP is similar to Haswell-EP. There are some differences in pci device IDs, box number and constraints. This patch extends the Broadwell-DE codes to support Broadwell-EP. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1449176411-9499-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 + .../x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 152 ++++++++++++++++++++- 2 files changed, 149 insertions(+), 5 deletions(-) commit d3bcd64bbc35076a80c56918c905ddb167d097d8 Author: Huang Rui Date: Fri Dec 4 18:07:41 2015 +0800 perf/x86/rapl: Use unified perf_event_sysfs_show instead of special interface Actually, rapl_sysfs_show is a duplicate of perf_event_sysfs_show. We prefer to use the unified interface. Signed-off-by: Huang Rui Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Dasaratharaman Chandramouli Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Robert Richter Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1449223661-2437-1-git-send-email-ray.huang@amd.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_rapl.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 673d188ba5b1cef6f9a41a5a18b490b2831c3ea5 Author: Stephane Eranian Date: Thu Dec 3 21:03:10 2015 +0100 perf/x86: Enable cycles:pp for Intel Atom This patch updates the PEBS support for Intel Atom to provide an alias for the cycles:pp event used by perf record/top by default nowadays. On Atom, only INST_RETIRED:ANY supports PEBS, so we use this event instead with a large cmask to count cycles. Given that Core2 has the same issue, we use the intel_pebs_aliases_core2() function for Atom as well. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: kan.liang@intel.com Link: http://lkml.kernel.org/r/1449172990-30183-3-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel.c | 1 + arch/x86/kernel/cpu/perf_event_intel_ds.c | 2 ++ 2 files changed, 3 insertions(+) commit 1424a09a9e1839285e948d4ea9fdfca26c9a2086 Author: Stephane Eranian Date: Thu Dec 3 23:33:18 2015 +0100 perf/x86: fix PEBS issues on Intel Atom/Core2 This patch fixes broken PEBS support on Intel Atom and Core2 due to wrong pointer arithmetic in intel_pmu_drain_pebs_core(). The get_next_pebs_record_by_bit() was called on PEBS format fmt0 which does not use the pebs_record_nhm layout. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: kan.liang@intel.com Fixes: 21509084f999 ("perf/x86/intel: Handle multiple records in the PEBS buffer") Link: http://lkml.kernel.org/r/1449182000-31524-3-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_ds.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 6fc2e83077b05a061afe9b24f2fdff7a0434eb67 Author: Stephane Eranian Date: Thu Dec 3 23:33:17 2015 +0100 perf/x86: Fix LBR related crashes on Intel Atom This patches fixes the LBR kernel crashes on Intel Atom. The kernel was assuming that if the CPU supports 64-bit format LBR, then it has an LBR_SELECT MSR. Atom uses 64-bit LBR format but does not have LBR_SELECT. That was causing NULL pointer dereferences in a couple of places. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: kan.liang@intel.com Fixes: 96f3eda67fcf ("perf/x86/intel: Fix static checker warning in lbr enable") Link: http://lkml.kernel.org/r/1449182000-31524-2-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_lbr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 61b87cae6361ea6af161c1ffa549898892707b19 Author: Stephane Eranian Date: Mon Dec 7 20:33:25 2015 +0100 perf/x86: Fix filter_events() bug with event mappings This patch fixes a bug in the filter_events() function. The patch fixes the bug whereby if some mappings did not exist, e.g., STALLED_CYCLES_FRONTEND, then any event after it in the attrs array would disappear from the published list of events in /sys/devices/cpu/events. This could be verified easily on any system post SNB (which do not publish STALLED_CYCLES_FRONTEND): $ ./perf stat -e cycles,ref-cycles true Performance counter stats for 'true': 1,217,348 cycles ref-cycles The problem is that in filter_events() there is an assumption that the argument (attrs) is organized in increasing continuous event indexes related to the event_map(). But if we remove the non-supported events by shifing the position in the array, then the lookup x86_pmu.event_map() needs to compensate for it, otherwise we are looking up the wrong index. This patch corrects this problem by compensating for the deleted events and with that ref-cycles reappears (here shown on Haswell): $ perf stat -e ref-cycles,cycles true Performance counter stats for 'true': 4,525,910 ref-cycles 1,064,920 cycles 0.002943888 seconds time elapsed Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: jolsa@kernel.org Cc: kan.liang@intel.com Fixes: 8300daa26755 ("perf/x86: Filter out undefined events from sysfs events attribute") Link: http://lkml.kernel.org/r/1449516805-6637-1-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 724697648eec540b2a7561089b1c87cb33e6a0eb Author: Andi Kleen Date: Fri Dec 4 03:50:52 2015 -0800 perf/x86: Use INST_RETIRED.PREC_DIST for cycles: ppp Add a new 'three-p' precise level, that uses INST_RETIRED.PREC_DIST as base. The basic mechanism of abusing the inverse cmask to get all cycles works the same as before. PREC_DIST is available on Sandy Bridge or later. It had some problems on Sandy Bridge, so we only use it on IvyBridge and later. I tested it on Broadwell and Skylake. PREC_DIST has special support for avoiding shadow effects, which can give better results compare to UOPS_RETIRED. The drawback is that PREC_DIST can only schedule on counter 1, but that is ok for cycle sampling, as there is normally no need to do multiple cycle sampling runs in parallel. It is still possible to run perf top in parallel, as that doesn't use precise mode. Also of course the multiplexing can still allow parallel operation. :pp stays with the previous event. Example: Sample a loop with 10 sqrt with old cycles:pp 0.14 │10: sqrtps %xmm1,%xmm0 <-------------- 9.13 │ sqrtps %xmm1,%xmm0 11.58 │ sqrtps %xmm1,%xmm0 11.51 │ sqrtps %xmm1,%xmm0 6.27 │ sqrtps %xmm1,%xmm0 10.38 │ sqrtps %xmm1,%xmm0 12.20 │ sqrtps %xmm1,%xmm0 12.74 │ sqrtps %xmm1,%xmm0 5.40 │ sqrtps %xmm1,%xmm0 10.14 │ sqrtps %xmm1,%xmm0 10.51 │ ↑ jmp 10 We expect all 10 sqrt to get roughly the sample number of samples. But you can see that the instruction directly after the JMP is systematically underestimated in the result, due to sampling shadow effects. With the new PREC_DIST based sampling this problem is gone and all instructions show up roughly evenly: 9.51 │10: sqrtps %xmm1,%xmm0 11.74 │ sqrtps %xmm1,%xmm0 11.84 │ sqrtps %xmm1,%xmm0 6.05 │ sqrtps %xmm1,%xmm0 10.46 │ sqrtps %xmm1,%xmm0 12.25 │ sqrtps %xmm1,%xmm0 12.18 │ sqrtps %xmm1,%xmm0 5.26 │ sqrtps %xmm1,%xmm0 10.13 │ sqrtps %xmm1,%xmm0 10.43 │ sqrtps %xmm1,%xmm0 0.16 │ ↑ jmp 10 Even with PREC_DIST there is still sampling skid and the result is not completely even, but systematic shadow effects are significantly reduced. The improvements are mainly expected to make a difference in high IPC code. With low IPC it should be similar. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: hpa@zytor.com Link: http://lkml.kernel.org/r/1448929689-13771-2-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event.c | 3 ++ arch/x86/kernel/cpu/perf_event.h | 3 +- arch/x86/kernel/cpu/perf_event_intel.c | 50 ++++++++++++++++++++++++++++--- arch/x86/kernel/cpu/perf_event_intel_ds.c | 6 ++++ 4 files changed, 57 insertions(+), 5 deletions(-) commit 442f5c74cbeaf54939980397ece59360c0a824e9 Author: Andi Kleen Date: Fri Dec 4 03:50:32 2015 -0800 perf/x86: Use INST_RETIRED.TOTAL_CYCLES_PS for cycles:pp for Skylake I added UOPS_RETIRED.ALL by mistake to the Skylake PEBS event list for cycles:pp. But the event is not documented for Skylake, and has some issues. The recommended replacement for cycles:pp is to use INST_RETIRED.ANY+pebs as a base, similar to what CPUs before Sandy Bridge did. This new event is called INST_RETIRED.TOTAL_CYCLES_PS. The event is not really new, but has been already used by perf before Sandy Bridge for the original cycles:p Note the SDM doesn't document that event either, but it's being documented in the latest version of the event list on: https://download.01.org/perfmon/SKL This patch does: - Remove UOPS_RETIRED.ALL from the Skylake PEBS event list - Add INST_RETIRED.ANY to the Skylake PEBS event list, and an table entry to allow cmask=16,inv=1 for cycles:pp - We don't need an extra entry for the base INST_RETIRED event, because it is already covered by the catch-all PEBS table entry. - Switch Skylake to use the Core2 PEBS alias (which is INST_RETIRED.TOTAL_CYCLES_PS) Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: hpa@zytor.com Link: http://lkml.kernel.org/r/1448929689-13771-1-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel.c | 2 +- arch/x86/kernel/cpu/perf_event_intel_ds.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 01330d7288e0050c5aaabc558059ff91589e67cd Author: Andi Kleen Date: Thu Dec 3 13:22:20 2015 -0800 perf/x86: Allow zero PEBS status with only single active event Normally we drop PEBS events with a zero status field. But when there is only a single PEBS event active we can assume the PEBS record is for that event. The PEBS buffer is always flushed when PEBS events are disabled, so there is no risk of mishandling state PEBS records this way. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1449177740-5422-2-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_ds.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 957ea1fdbcdb909e1540f06f06f1a9ce6e696efa Author: Andi Kleen Date: Thu Dec 3 13:22:19 2015 -0800 perf/x86: Remove warning for zero PEBS status The recent commit: 75f80859b130 ("perf/x86/intel/pebs: Robustify PEBS buffer drain") causes lots of warnings on different CPUs before Skylake when running PEBS intensive workloads. They can have a zero status field in the PEBS record when PEBS is racing with clearing of GLOBAl_STATUS. This also can cause hangs (it seems there are still problems with printk in NMI). Disable the warning, but still ignore the record. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1449177740-5422-1-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/perf_event_intel_ds.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7b648018f628eee73450b71dc68ebb3c3865465e Author: Peter Zijlstra Date: Thu Dec 3 18:35:21 2015 +0100 perf/core: Collapse more IPI loops This patch collapses the two 'hard' cases, which are perf_event_{dis,en}able(). I cannot seem to convince myself the current code is correct. So starting with perf_event_disable(); we don't strictly need to test for event->state == ACTIVE, ctx->is_active is enough. If the event is not scheduled while the ctx is, __perf_event_disable() still does the right thing. Its a little less efficient to IPI in that case, over-all simpler. For perf_event_enable(); the same goes, but I think that's actually broken in its current form. The current condition is: ctx->is_active && event->state == OFF, that means it doesn't do anything when !ctx->active && event->state == OFF. This is wrong, it should still mark the event INACTIVE in that case, otherwise we'll still not try and schedule the event once the context becomes active again. This patch implements the two function using the new event_function_call() and does away with the tricky event->state tests. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar kernel/events/core.c | 106 ++++++++++++++++----------------------------------- 1 file changed, 33 insertions(+), 73 deletions(-) commit 8b648436eb45c1f561164b24aafd35fb2bee9cfc Author: Thomas Petazzoni Date: Tue Dec 22 11:43:29 2015 +0100 dmaengine: mv_xor: add suspend/resume support This commit adds suspend/resume support to the mv_xor driver. The config and interrupt mask registers must be saved and restored, and upon resume, the MBus windows configuration must also be done again. Tested on Armada 388 GP, with a RAID 5 array, accessed before and after a suspend to RAM cycle. Based on work from Ofer Heifetz and Lior Amsalem. Signed-off-by: Thomas Petazzoni Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/dma/mv_xor.h | 1 + 2 files changed, 54 insertions(+) commit 81aafb3e0e16bcca060efa6b5e477e812e4154bc Author: Thomas Petazzoni Date: Tue Dec 22 11:43:28 2015 +0100 dmaengine: mv_xor: de-duplicate mv_chan_set_mode*() When commit 6f166312c6ea2 ("dmaengine: mv_xor: add support for a38x command in descriptor mode") added support for the descriptor mode available in Marvell Armada 38x and later SoCs, it added a new function mv_chan_set_mode_to_desc() which allows to configure a XOR channel to get the specific operation to be done from each individual DMA descriptor. However, this function was mainly a duplicate of the existing mv_chan_set_mode(), with just the operation being different. This commit re-organizes the code into a single mv_chan_set_mode() function, which takes the operation mode as argument, and the mv_xor_channel_add() function decides whether to use XOR_OPERATION_MODE_IN_DESC or XOR_OPERATION_MODE_XOR. Signed-off-by: Thomas Petazzoni Reviewed-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) commit 7cbafa09e1cdedac707104fff659f90966a02da5 Author: Thomas Petazzoni Date: Tue Dec 22 11:43:27 2015 +0100 dmaengine: mv_xor: remove mv_xor_chan->current_type field Since commit 3e4f52e2da9f6 ("dma: mv_xor: Simplify the DMA_MEMCPY operation"), this field is no longer used, so get rid of it. Signed-off-by: Thomas Petazzoni Reviewed-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 1 - drivers/dma/mv_xor.h | 1 - 2 files changed, 2 deletions(-) commit 9cc96b0a211fd54f4bf314e7ef6e207ac5bce0c7 Merge: d64fe8e 12ca6ad Author: Ingo Molnar Date: Wed Jan 6 11:07:04 2016 +0100 Merge branch 'perf/urgent' into perf/core, to pick up fixes before applying new changes Signed-off-by: Ingo Molnar commit 0905f04eb21fc1c2e690bed5d0418a061d56c225 Author: Yuyang Du Date: Thu Dec 17 07:34:27 2015 +0800 sched/fair: Fix new task's load avg removed from source CPU in wake_up_new_task() If a newly created task is selected to go to a different CPU in fork balance when it wakes up the first time, its load averages should not be removed from the source CPU since they are never added to it before. The same is also applicable to a never used group entity. Fix it in remove_entity_load_avg(): when entity's last_update_time is 0, simply return. This should precisely identify the case in question, because in other migrations, the last_update_time is set to 0 after remove_entity_load_avg(). Reported-by: Steve Muckle Signed-off-by: Yuyang Du [peterz: cfs_rq_last_update_time] Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/20151216233427.GJ28098@intel.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) commit 5a1078043f844074cbd53981432778a8d5dd56e9 Author: Jiri Olsa Date: Tue Dec 8 21:23:59 2015 +0100 sched/core: Move sched_entity::avg into separate cache line The sched_entity::avg collides with read-mostly sched_entity data. The perf c2c tool showed many read HITM accesses across many CPUs for sched_entity's cfs_rq and my_q, while having at the same time tons of stores for avg. After placing sched_entity::avg into separate cache line, the perf bench sched pipe showed around 20 seconds speedup. NOTE I cut out all perf events except for cycles and instructions from following output. Before: $ perf stat -r 5 perf bench sched pipe -l 10000000 # Running 'sched/pipe' benchmark: # Executed 10000000 pipe operations between two processes Total time: 270.348 [sec] 27.034805 usecs/op 36989 ops/sec ... 245,537,074,035 cycles # 1.433 GHz 187,264,548,519 instructions # 0.77 insns per cycle 272.653840535 seconds time elapsed ( +- 1.31% ) After: $ perf stat -r 5 perf bench sched pipe -l 10000000 # Running 'sched/pipe' benchmark: # Executed 10000000 pipe operations between two processes Total time: 251.076 [sec] 25.107678 usecs/op 39828 ops/sec ... 244,573,513,928 cycles # 1.572 GHz 187,409,641,157 instructions # 0.76 insns per cycle 251.679315188 seconds time elapsed ( +- 0.31% ) Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Don Zickus Cc: Joe Mario Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1449606239-28602-1-git-send-email-jolsa@kernel.org Signed-off-by: Ingo Molnar include/linux/sched.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 25ec02f2c14466a4549c5dcc044b628c2cc46fde Author: Jiri Olsa Date: Mon Dec 21 15:25:30 2015 +0100 x86/fpu: Properly align size in CHECK_MEMBER_AT_END_OF() macro The CHECK_MEMBER_AT_END_OF(TYPE, MEMBER) checks whether MEMBER is last member of TYPE by evaluating: offsetof(TYPE::MEMBER) + sizeof(TYPE::MEMBER) == sizeof(TYPE) and ensuring TYPE::MEMBER is the last member of the TYPE. This condition breaks on structs that are padded to be aligned. This patch ensures the TYPE alignment is taken into account. This bug was revealed after adding cacheline alignment into struct sched_entity, which broke task_struct::thread check: CHECK_MEMBER_AT_END_OF(struct task_struct, thread); Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Dave Hansen Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1450707930-3445-1-git-send-email-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/init.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 7d92de3a8285ab3dfd68aa3a99823acd5b190444 Author: Wanpeng Li Date: Thu Dec 3 17:42:10 2015 +0800 sched/deadline: Fix the earliest_dl.next logic earliest_dl.next should cache deadline of the earliest ready task that is also enqueued in the pushable rbtree, as pull algorithm uses this information to find candidates for migration: if the earliest_dl.next deadline of source rq is earlier than the earliest_dl.curr deadline of destination rq, the task from the source rq can be pulled. However, current implementation only guarantees that earliest_dl.next is the deadline of the next ready task instead of the next pushable task; which will result in potentially holding both rqs' lock and find nothing to migrate because of affinity constraints. In addition, current logic doesn't update the next candidate for pushing in pick_next_task_dl(), even if the running task is never eligible. This patch fixes both problems by updating earliest_dl.next when pushable dl task is enqueued/dequeued, similar to what we already do for RT. Tested-by: Luca Abeni Signed-off-by: Wanpeng Li Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1449135730-27202-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 59 ++++++------------------------------------------- 1 file changed, 7 insertions(+), 52 deletions(-) commit 567bee2803cb46caeb6011de5b738fde33dc3896 Merge: aa0b7ae 093e584 Author: Ingo Molnar Date: Wed Jan 6 11:02:29 2016 +0100 Merge branch 'sched/urgent' into sched/core, to pick up fixes before merging new patches Signed-off-by: Ingo Molnar commit 8705d603edd49f1cff165cd3b7998f4c7f098d27 Author: Andy Lutomirski Date: Tue Dec 29 20:12:18 2015 -0800 x86/vsdo: Fix build on PARAVIRT_CLOCK=y, KVM_GUEST=n arch/x86/built-in.o: In function `arch_setup_additional_pages': (.text+0x587): undefined reference to `pvclock_pvti_cpu0_va' KVM_GUEST selects PARAVIRT_CLOCK, so we can make pvclock_pvti_cpu0_va depend on KVM_GUEST. Signed-off-by: Andy Lutomirski Tested-by: Borislav Petkov Cc: Oleg Nesterov Cc: Kees Cook Link: http://lkml.kernel.org/r/444d38a9bcba832685740ea1401b569861d09a72.1451446564.git.luto@kernel.org Signed-off-by: Thomas Gleixner arch/x86/include/asm/pvclock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9406de3e4362c379966dd114221e8159d9da5f32 Merge: 2a2d0f6 0f73f3e Author: Vinod Koul Date: Wed Jan 6 15:19:18 2016 +0530 Merge branch 'topic/ti-xbar' into for-linus commit 2a2d0f6386c0ec6f990d485324a09391a421c57a Merge: c8b9dd2 05e866b Author: Vinod Koul Date: Wed Jan 6 15:19:05 2016 +0530 Merge branch 'topic/tegra' into for-linus commit c8b9dd2b9e74ecf2539fe09e106db4ad1cc6677b Merge: 62ddae37 aea08a5 Author: Vinod Koul Date: Wed Jan 6 15:18:56 2016 +0530 Merge branch 'topic/stm32' into for-linus commit 62ddae372f6eba4815f53aad1ade32d3e4950a7c Merge: a6eaf23 aeb8974 Author: Vinod Koul Date: Wed Jan 6 15:18:44 2016 +0530 Merge branch 'topic/ste' into for-linus commit a6eaf23b050b642ec5e673be56a72bd9efb4fd69 Merge: c81bc96 4d42e95 Author: Vinod Koul Date: Wed Jan 6 15:18:36 2016 +0530 Merge branch 'topic/rcar' into for-linus commit c81bc9605627ccb9d7074f9ba68b3ffee427dc95 Merge: e3c3736 1a7cf7b Author: Vinod Koul Date: Wed Jan 6 15:18:19 2016 +0530 Merge branch 'topic/omap' into for-linus commit e3c373616a6ac4e18548b224f703f8d4c79a0c46 Merge: 9fd5ca5 2bb129e Author: Vinod Koul Date: Wed Jan 6 15:18:11 2016 +0530 Merge branch 'topic/ioatdma' into for-linus commit 9fd5ca5f04e4c735f66badb2e65aef30e8672247 Merge: d3f1e93 390c49f Author: Vinod Koul Date: Wed Jan 6 15:18:05 2016 +0530 Merge branch 'topic/idma' into for-linus commit d3f1e93ce8e00be19711c35f0c67c54a58aea559 Merge: 7c7b680 b1d6ab1 Author: Vinod Koul Date: Wed Jan 6 15:17:47 2016 +0530 Merge branch 'topic/async' into for-linus commit 7c7b680fa6b0866af2c4876da261bbfe710315d6 Merge: 5eec943 020c62a Author: Vinod Koul Date: Wed Jan 6 15:17:32 2016 +0530 Merge branch 'topic/univ_api' into for-linus commit 5eec94388db40ce45bec028af2e2f62df751c887 Merge: 0c328de d3651b8 Author: Vinod Koul Date: Wed Jan 6 15:17:16 2016 +0530 Merge branch 'topic/desc_reuse' into for-linus commit ca9ea7a5ffda53ce9e9f3e14b9b104d85db47c7d Merge: 3643b46 c7b60a8 Author: Takashi Iwai Date: Wed Jan 6 10:20:41 2016 +0100 Merge branch 'for-linus' into for-next commit 3643b46c381eda180df1ec68cd2ec5c79afd61f3 Author: Julia Lawall Date: Mon Jan 4 17:50:47 2016 +0100 ALSA: emux: constify nrpn_conv_table structures The nrpn_conv_table structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai sound/synth/emux/emux_nrpn.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2eb65d67afbf9364b525b657f1475d1a2cbc27de Author: Takashi Sakamoto Date: Thu Dec 31 13:58:14 2015 +0900 ALSA: dice: expand timeout to wait for Dice notification Some users have reported that their Dice based models generate ETIMEDOUT when starting PCM playback. It means that current timeout (=100msec) is not enough for their models to transfer notifications. This commit expands the timeout up to 2 sec. As a result, in a worst case, any operations to start AMDTP streams takes 2 sec or more. Then, in userspace, snd_pcm_hw_params(), snd_pcm_prepare(), snd_pcm_recover(), snd_rawmidi_open(), snd_seq_connect_from() and snd_seq_connect_to() may take the time. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2875a92b8413b4d7eacf96802c9718aeeb0363f Author: Takashi Sakamoto Date: Thu Dec 31 13:58:13 2015 +0900 ALSA: dice: purge transaction initialization at timeout of Dice notification In previous commit, card registration is processed under situation with few bus reset. There's no need to add a workaround of transaction re-initialization at timeout. This commit purges the re-initialization. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-transaction.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) commit b59fb1900b4feedd2fa9256326e65b5632627465 Author: Takashi Sakamoto Date: Thu Dec 31 13:58:12 2015 +0900 ALSA: dice: postpone card registration Some models based on ASIC for Dice II series (STD, CP) change their hardware configurations after appearing on IEEE 1394 bus. This is due to interactions of boot loader (RedBoot), firmwares (eCos) and vendor's configurations. This causes current ALSA dice driver to get wrong information about the hardware's capability because its probe function runs just after detecting unit of the model. As long as I investigated, it takes a bit time (less than 1 second) to load the firmware after bootstrap. Just after loaded, the driver can get information about the unit. Then the hardware is initialized according to vendor's configurations. After, the got information becomes wrong. Between bootstrap, firmware loading and post configuration, some bus resets are observed. This commit offloads most processing of probe function into workqueue and schedules the workqueue after successive bus resets. This has an effect to get correct hardware information and avoid involvement to bus reset storm. For code simplicity, this change effects all of Dice-based models, i.e. Dice II, Dice Jr., Dice Mini and Dice III. I use a loose strategy to manage a race condition between the work and the bus reset. This is due to a specification of dice transaction. When bus reset occurs, registered address for the transaction is cleared. Drivers must re-register their own address again. While, this operation is required for the work because the work includes to wait for the transaction. This commit uses no lock primitives for the race condition. Instead, checking 'registered' member of 'struct snd_dice' avoid executing the work again. If sound card is not registered, the work can be scheduled again by bus reset handler. When .remove callback is executed, the sound card is going to be released. The work should not be pending or executed in the releasing. This commit uses cancel_delayed_work_sync() in .remove callback and wait till the pending work finished. After .remove callback, .update callback is not executed, therefore no works are scheduled again. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice.c | 159 ++++++++++++++++++++++++++++++++------------- sound/firewire/dice/dice.h | 3 + 2 files changed, 117 insertions(+), 45 deletions(-) commit 4a47a87defa0a67312932a3aaee3516dcf66659b Author: Takashi Sakamoto Date: Thu Dec 31 13:58:11 2015 +0900 ALSA: dice: split subaddress check from category check Before allocating an instance of sound card, ALSA dice driver checks chip_ID_hi in Bus information block of Config ROM, then also checks subaddresses. The former operation reads cache of Config ROM in Linux FireWire subsystem, while the latter operation sends read transaction. The latter can be merged into initialization of transaction system. This commit splits these two operations to reduce needless transactions in probe processing. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-transaction.c | 90 ++++++++++++++++++++++++++-------- sound/firewire/dice/dice.c | 72 +++------------------------ 2 files changed, 78 insertions(+), 84 deletions(-) commit 84e05408fcfefb9b28050f701e1e94fe9f86804b Author: Chris Zhong Date: Wed Jan 6 16:12:54 2016 +0800 drm: rockchip: Support Synopsys DW MIPI DSI Add support for Synopsys DesignWare MIPI DSI controller which is embedded in the rk3288 SoCs. Signed-off-by: Chris Zhong Acked-by: Mark Yao drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1194 +++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 + 4 files changed, 1208 insertions(+) commit 00ce3a15d811978fcb204a1a3f5f8c059096fa5e Author: Craig Gallek Date: Tue Jan 5 10:57:13 2016 -0500 soreuseport: change consume_skb to kfree_skb in error case Fixes: 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF") Suggested-by: Daniel Borkmann Signed-off-by: Craig Gallek Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/sock_reuseport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1134158ba3d656b8dbc79a23d482129a531ba0ae Author: Craig Gallek Date: Tue Jan 5 15:08:07 2016 -0500 soreuseport: pass skb to secondary UDP socket lookup This socket-lookup path did not pass along the skb in question in my original BPF-based socket selection patch. The skb in the udpN_lib_lookup2 path can be used for BPF-based socket selection just like it is in the 'traditional' udpN_lib_lookup path. udpN_lib_lookup2 kicks in when there are greater than 10 sockets in the same hlist slot. Coincidentally, I chose 10 sockets per reuseport group in my functional test, so the lookup2 path was not excersised. This adds an additional set of tests with 20 sockets. Fixes: 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF") Fixes: 3ca8e4029969 ("soreuseport: BPF selection functional test") Suggested-by: Eric Dumazet Signed-off-by: Craig Gallek Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/udp.c | 10 +++--- net/ipv6/udp.c | 10 +++--- tools/testing/selftests/net/reuseport_bpf.c | 47 +++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 8 deletions(-) commit a20d86e7f96422d375dfa9ac0fe96ca4ce2aa647 Author: Chris Zhong Date: Wed Jan 6 12:03:54 2016 +0800 Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver add device tree bindings for rk3288 specific Synopsys DW MIPI DSI driver Signed-off-by: Chris Zhong Acked-by: Rob Herring .../display/rockchip/dw_mipi_dsi_rockchip.txt | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit b59b8de3149736e5094cb786978a1ba8d6d55b34 Author: Chris Zhong Date: Wed Jan 6 12:03:53 2016 +0800 drm/rockchip: return a true clock rate to adjusted_mode Since the mipi dsi driver need to use the clock of vop to make the calculation of Blanking. But sometimes the clock driver can not set a accurate clock_rate for vop, get it by clk_round_rate before mode_set, so we can get the true value. Signed-off-by: Chris Zhong Acked-by: Mark Yao drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 +++++ 1 file changed, 5 insertions(+) commit f0138e2596f2994129451ee320ff8692cb7bc86b Author: Ido Schimmel Date: Tue Jan 5 11:36:40 2016 +0100 mlxsw: pci: Adjust value of CPU egress traffic class During initialization, when creating the send descriptor queues (SDQs), we specify the CPU egress traffic class of each SDQ. The maximum number of classes of this type is different in the two ASICs supported by this PCI driver. New firmware versions check this value is set correctly, which causes errors on the Spectrum ASIC, as its max exposed egress traffic class is lower than 7. Solve this by setting this field to 3, which is an acceptable value for both ASICs. Note that we currently do not expose the QoS capabilities of the ASICs, so setting this to an hardcoded value is OK for now. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56b87180cc59136e87a20c596566790cc88544b9 Merge: be78a69 49f2a47 Author: David S. Miller Date: Wed Jan 6 00:05:04 2016 -0500 Merge tag 'wireless-drivers-next-for-davem-2016-01-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== brcfmac * fix IBSS which got broken over time * new USB id for bcm43242 dongle * arp offload configuration through inet notifier ath9k * add random number generator support (CONFIG_ATH9K_HWRNG) iwlwifi * Make scan parameters low latency aware * Fix in the NL80211_FEATURE_FULL_AP_CLIENT_STATE state case * Fix enable injection mode (Chaya Rachel) * Various cleanups (Dan / Julia / myself) * Allow to stay more time on popular channels (David Spinadel) * Bug fixes for D0i3 (Eliad / Luca) * Fixes for GO uAPSD (myself) * Start of TSO support (myself) * Rate control bug fixes (Eyal / Gregory) * Start the work on 9000 devices (Johannes / Sara / Oren) * Start the work on a new Tx queue allocation model (Liad) * Debug infrastructure enhancements (Golan) mwifiex * add a debugfs file for chip reset * advertise SMS4 cipher suite * increase ap and station interface limit to 3 * enable MSI support on newer pcie devices (8897 onwards) rtlwifi * fix lots of module parameter usage ==================== Signed-off-by: David S. Miller commit be78a690f50f38882220ceecda403478d477122e Author: Arnd Bergmann Date: Fri Jan 1 23:27:57 2016 +0100 net: hns: avoid uninitialized variable warning: gcc fails to see that the use of the 'last_offset' variable in hns_nic_reuse_page() is used correctly and issues a bogus warning: drivers/net/ethernet/hisilicon/hns/hns_enet.c: In function 'hns_nic_reuse_page': drivers/net/ethernet/hisilicon/hns/hns_enet.c:541:6: warning: 'last_offset' may be used uninitialized in this function [-Wmaybe-uninitialized] This simplifies the function to make it more obvious what is going on to both readers and compilers, which makes the warning go away. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 47 +++++++++++++-------------- 1 file changed, 22 insertions(+), 25 deletions(-) commit a72a5e2d34ec2921c0d9a7545093087e4cb90d0a Author: Florian Westphal Date: Tue Jan 5 22:17:55 2016 +0100 inet: kill unused skb_free op The only user was removed in commit 029f7f3b8701cc7a ("netfilter: ipv6: nf_defrag: avoid/free clone operations"). Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/net/inet_frag.h | 1 - net/ieee802154/6lowpan/reassembly.c | 1 - net/ipv4/inet_fragment.c | 10 +--------- net/ipv4/ip_fragment.c | 1 - net/ipv6/reassembly.c | 1 - 5 files changed, 1 insertion(+), 13 deletions(-) commit e07ecd76d4db7bda1e9495395b2110a3fe28845a Author: Dan Williams Date: Tue Jan 5 18:37:23 2016 -0800 libnvdimm: fix namespace object confusion in is_uuid_busy() When btt devices were re-worked to be child devices of regions this routine was overlooked. It mistakenly attempts to_nd_namespace_pmem() or to_nd_namespace_blk() conversions on btt and pfn devices. By luck to date we have happened to be hitting valid memory leading to a uuid miscompare, but a recent change to struct nd_namespace_common causes: BUG: unable to handle kernel NULL pointer dereference at 0000000000000001 IP: [] memcmp+0xc/0x40 [..] Call Trace: [] is_uuid_busy+0xc1/0x2a0 [libnvdimm] [] ? to_nd_blk_region+0x50/0x50 [libnvdimm] [] device_for_each_child+0x50/0x90 Cc: Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 53 ++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/region_devs.c | 56 ----------------------------------------- 2 files changed, 53 insertions(+), 56 deletions(-) commit 5ff24d601092b222340b28466e263b1c4559407e Author: Viresh Kumar Date: Tue Jan 5 16:15:54 2016 +0530 PM / OPP: Use snprintf() instead of sprintf() sprintf() can access memory outside of the range of the character array, and is risky in some situations. The driver specified prop_name string can be longer than NAME_MAX here (only an attacker will do that though) and so blindly copying it into the character array of size NAME_MAX isn't safe. Instead we must use snprintf() here. Reported-by: Geert Uytterhoeven Signed-off-by: Viresh Kumar Acked-by: Geert Uytterhoeven Acked-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5036c3902054358ee293b8cecfea13342d8019e8 Author: Christoph Hellwig Date: Mon Dec 21 10:51:02 2015 +1100 raid5: allow r5l_io_unit allocations to fail And propagate the error up the stack so we can add the stripe to no_stripes_list and retry our log operation later. This avoids blocking raid5d due to reclaim, an it allows to get rid of the deadlock-prone GFP_NOFAIL allocation. shli: add missing mempool_destroy() Signed-off-by: Christoph Hellwig Signed-off-by: NeilBrown drivers/md/raid5-cache.c | 67 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 57 insertions(+), 10 deletions(-) commit e8deb6381051bf3ce9d817020e8ba972b405a070 Author: Christoph Hellwig Date: Mon Dec 21 10:51:02 2015 +1100 raid5-cache: use a mempool for the metadata block We only have a limited number in flight, so use a page based mempool. Signed-off-by: Christoph Hellwig Signed-off-by: NeilBrown drivers/md/raid5-cache.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit c38d29b33bb3b3c792f3cca8a973422bb1897ebf Author: Christoph Hellwig Date: Mon Dec 21 10:51:02 2015 +1100 raid5-cache: use a bio_set This allows us to make guaranteed forward progress. Signed-off-by: Christoph Hellwig Signed-off-by: NeilBrown drivers/md/raid5-cache.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit f6b6ec5cfac306c1eea66f074050864efcb11851 Author: Shaohua Li Date: Mon Dec 21 10:51:02 2015 +1100 raid5-cache: add journal hot add/remove support Add support for journal disk hot add/remove. Mostly trival checks in md part. The raid5 part is a little tricky. For hot-remove, we can't wait pending write as it's called from raid5d. The wait will cause deadlock. We simplily fail the hot-remove. A hot-remove retry can success eventually since if journal disk is faulty all pending write will be failed and finish. For hot-add, since an array supporting journal but without journal disk will be marked read-only, we are safe to hot add journal without stopping IO (should be read IO, while journal only handles write IO). Signed-off-by: Shaohua Li Signed-off-by: NeilBrown drivers/md/md.c | 42 ++++++++++++++++++++++++++++++------------ drivers/md/raid5-cache.c | 16 ++++++++++++---- drivers/md/raid5.c | 34 ++++++++++++++++++++++++++-------- 3 files changed, 68 insertions(+), 24 deletions(-) commit 9ebc6ef188a0656f3620835f9be7fe22c1644c1c Author: Deepa Dinamani Date: Mon Dec 21 10:51:01 2015 +1100 drivers: md: use ktime_get_real_seconds() get_seconds() API is not y2038 safe on 32 bit systems and the API is deprecated. Replace it with calls to ktime_get_real_seconds() API instead. Change mddev structure types to time64_t accordingly. 32 bit signed timestamps will overflow in the year 2038. Change the user interface mdu_array_info_s structure timestamps: ctime and utime values used in ioctls GET_ARRAY_INFO and SET_ARRAY_INFO to unsigned int. This will extend the field to last until the year 2106. The long term plan is to get rid of ctime and utime values in this structure as this information can be read from the on-disk meta data directly. Clamp the tim64_t timestamps to positive values with a max of U32_MAX when returning from GET_ARRAY_INFO ioctl to accommodate above changes in the data type of timestamps to unsigned int. v0.90 on disk meta data uses u32 for maintaining time stamps. So this will also last until year 2106. Assumption is that the usage of v0.90 will be deprecated by year 2106. Timestamp fields in the on disk meta data for v1.0 version already use 64 bit data types. Remove the truncation of the bits while writing to or reading from these from the disk. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Signed-off-by: NeilBrown drivers/md/md.c | 18 +++++++++--------- drivers/md/md.h | 2 +- include/uapi/linux/raid/md_u.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) commit 3312c951efaba55080958974047414576b9e5d63 Author: Arnd Bergmann Date: Mon Dec 21 10:51:01 2015 +1100 md: avoid warning for 32-bit sector_t When CONFIG_LBDAF is not set, sector_t is only 32-bits wide, which means we cannot have devices with more than 2TB, and the code that is trying to handle compatibility support for large devices in md version 0.90 is meaningless but also causes a compile-time warning: drivers/md/md.c: In function 'super_90_load': drivers/md/md.c:1029:19: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/md/md.c: In function 'super_90_rdev_size_change': drivers/md/md.c:1323:17: warning: large integer implicitly truncated to unsigned type [-Woverflow] This adds a check for CONFIG_LBDAF to avoid even getting into this code path, and also adds an explicit cast to let the compiler know it doesn't have to warn about the truncation. Signed-off-by: Arnd Bergmann Signed-off-by: NeilBrown drivers/md/md.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit ad66d445ee5a5f548142b880e1642c711fbcacd1 Author: Christoph Hellwig Date: Mon Dec 21 10:51:01 2015 +1100 raid5-cache: free meta_page earlier Once the I/O completed we don't need the meta page anymore. As the iounits can live on for a long time this reduces memory pressure a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Shaohua Li Signed-off-by: NeilBrown drivers/md/raid5-cache.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 3848c0bcb09c7b78e6f4ae9f8fc8d6d9aecbd35a Author: Christoph Hellwig Date: Mon Dec 21 10:51:01 2015 +1100 raid5-cache: simplify r5l_move_io_unit_list It's only used for one kind of move, so make that explicit. Also clean up the code a bit by using list_for_each_safe. Signed-off-by: Christoph Hellwig Reviewed-by: Shaohua Li Signed-off-by: NeilBrown drivers/md/raid5-cache.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit abf3508d8faa281e01a780e022a6f43d1731fe0b Author: Guoqing Jiang Date: Mon Dec 21 10:51:01 2015 +1100 md: update comment for md_allow_write MD_CHANGE_CLEAN had been replaced with MD_CHANGE_PENDING after commit 070dc6 ("md: resolve confusion of MD_CHANGE_CLEAN"), so make the change accordingly. Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e19508fa4df896b115f5321c21ce7669559b0863 Author: Guoqing Jiang Date: Mon Dec 21 10:51:01 2015 +1100 md-cluster: update comments for MD_CLUSTER_SEND_LOCKED_ALREADY 1. fix unbalanced parentheses. 2. add more description about that MD_CLUSTER_SEND_LOCKED_ALREADY will be cleared after set it in add_new_disk. Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown drivers/md/md-cluster.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 8b9277c81450de9d8081ff6571ac5986e6c83f49 Author: Guoqing Jiang Date: Mon Dec 21 10:51:00 2015 +1100 md-cluster: Protect communication with mutexes Communication can happen through multiple threads. It is possible that one thread steps over another threads sequence. So, we use mutexes to protect both the send and receive sequences. Send communication is locked through state bit, MD_CLUSTER_SEND_LOCK. Communication is locked with bit manipulation in order to allow "lock and hold" for the add operation. In case of an add operation, if the lock is held, MD_CLUSTER_SEND_LOCKED_ALREADY is set. When md_update_sb() calls metadata_update_start(), it checks (in a single statement to avoid races), if the communication is already locked. If yes, it merely returns zero, else it locks the token lockresource. Signed-off-by: Goldwyn Rodrigues Signed-off-by: NeilBrown drivers/md/md-cluster.c | 73 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 10 deletions(-) commit 15858fa5b00c1067a8a8e53ea32f4a65f8bebbb8 Author: Guoqing Jiang Date: Mon Dec 21 10:51:00 2015 +1100 md-cluster: Defer MD reloading to mddev->thread Reloading of superblock must be performed under reconfig_mutex. However, this cannot be done with md_reload_sb because it would deadlock with the message DLM lock. So, we defer it in md_check_recovery() which is executed by mddev->thread. This introduces a new flag, MD_RELOAD_SB, which if set, will reload the superblock. And good_device_nr is also added to 'struct mddev' which is used to get the num of the good device within cluster raid. Signed-off-by: Goldwyn Rodrigues Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown drivers/md/md-cluster.c | 4 +++- drivers/md/md.c | 4 ++++ drivers/md/md.h | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) commit d323ef0f1a3e6d408eabacf0e91e2d741ffe1165 Author: Guoqing Jiang Date: Mon Dec 21 10:51:00 2015 +1100 md-cluster: update the documentation Update design documentation based on recent development. original version comes from Neil. Signed-off-by: Goldwyn Rodrigues Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown Documentation/md-cluster.txt | 314 +++++++++++++++++++++++++++++++------------ 1 file changed, 228 insertions(+), 86 deletions(-) commit f6a2dc64ee74477c966f5220b1f560ed6308d010 Author: Guoqing Jiang Date: Mon Dec 21 10:51:00 2015 +1100 md-cluster: append some actions when change bitmap from clustered to none For clustered raid, we need to do extra actions when change bitmap to none. 1. check if all the bitmap lock could be get or not, if yes then we can continue the change since cluster raid is only active in current node. Otherwise return fail and unlock the related bitmap locks 2. set nodes to 0 and then leave cluster environment. 3. release other nodes's bitmap lock. Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown drivers/md/md-cluster.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/md/md-cluster.h | 2 ++ drivers/md/md.c | 13 +++++++++++ 3 files changed, 72 insertions(+) commit 09afd2a8d6ad2c40f3c1ae0b3f83784864cf4c15 Author: Goldwyn Rodrigues Date: Mon Dec 21 10:51:00 2015 +1100 md-cluster: Allow spare devices to be marked as faulty If a spare device was marked faulty, it would not be reflected in receiving nodes because it would mark it as activated and continue. Continue the operation, so it may be set as faulty. Signed-off-by: Goldwyn Rodrigues Signed-off-by: NeilBrown drivers/md/md.c | 1 - 1 file changed, 1 deletion(-) commit 54a88392cdd84b4a739ce3a986bfabfaff67d9d2 Author: Goldwyn Rodrigues Date: Mon Dec 21 10:51:00 2015 +1100 md-cluster: Fix the remove sequence with the new MD reload code The remove disk message does not need metadata_update_start(), but can be an independent message. Signed-off-by: Goldwyn Rodrigues Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown drivers/md/md-cluster.c | 2 +- drivers/md/md.c | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) commit 659b254fa7392e32b59a30d4b61fb12c4cd440ff Author: Guoqing Jiang Date: Mon Dec 21 10:50:59 2015 +1100 md-cluster: remove a disk asynchronously from cluster environment For cluster raid, if one disk couldn't be reach in one node, then other nodes would receive the REMOVE message for the disk. In receiving node, we can't call md_kick_rdev_from_array to remove the disk from array synchronously since the disk might still be busy in this node. So let's set a ClusterRemove flag on the disk, then let the thread to do the removal job eventually. Signed-off-by: Guoqing Jiang Signed-off-by: Goldwyn Rodrigues Signed-off-by: NeilBrown drivers/md/md-cluster.c | 7 +++++-- drivers/md/md.c | 12 ++++++++++++ drivers/md/md.h | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) commit ac277c6a8a39bc50f891a3477625330c276bd7f5 Author: Goldwyn Rodrigues Date: Mon Dec 21 10:50:59 2015 +1100 md-cluster: Avoid the resync ping-pong If a RESYNCING message with (0,0) has been sent before, do not send it again. This avoids a resync ping pong between the nodes. We read the bitmap lockresource's LVB to figure out the previous value of the RESYNCING message. Signed-off-by: Goldwyn Rodrigues Signed-off-by: NeilBrown drivers/md/md-cluster.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b46020aa3a8a0f9c7324fe0af4aec4227f947a10 Author: Roman Gushchin Date: Mon Dec 21 10:50:59 2015 +1100 md/raid5: remove redundant check in stripe_add_to_batch_list() The stripe_add_to_batch_list() function is called only if stripe_can_batch() returned true, so there is no need for double check. Signed-off-by: Roman Gushchin Cc: Neil Brown Cc: linux-raid@vger.kernel.org Signed-off-by: NeilBrown drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-) commit e576330033936d94a00068760a5744e27ce51a32 Merge: 887e9d3 a32d5b7 Author: Brian Norris Date: Tue Jan 5 16:04:40 2016 -0800 mtd: merge MTD development from v4.4 into for-v4.5 development Small conflict between some bugfixes for 4.4 and some refactoring for 4.5. Signed-off-by: Brian Norris commit 887e9d3a1f3e93a1c64294649c0dd301035a7892 Author: Stephen Rothwell Date: Mon Jan 4 10:32:54 2016 -0800 mtd: nand: fix for drop unnecessary partition parser data From Stephen: Hi Brian, After merging the l2-mtd tree, today's linux-next build (powerpc ppc44x_defconfig) failed like this: drivers/mtd/nand/ndfc.c: In function 'ndfc_chip_init': drivers/mtd/nand/ndfc.c:177:2: error: 'ppdata' undeclared (first use in this function) ppdata.of_node = flash_np; ^ Caused by commit a61ae81a1907 ("mtd: nand: drop unnecessary partition parser data") The flash node is already correctly assigned using the new helper (nand_set_flash_node()) so the correct fix is indeed to simply drop this line. Fixes: a61ae81a1907 ("mtd: nand: drop unnecessary partition parser data") Signed-off-by: Stephen Rothwell Signed-off-by: Brian Norris drivers/mtd/nand/ndfc.c | 1 - 1 file changed, 1 deletion(-) commit 116a489d78b30862a2dd04961d3ba98fe4704220 Author: Bjorn Helgaas Date: Tue Jan 5 15:48:11 2016 -0600 PCI: designware: Simplify control flow Return values immediately when possible to simplify the control flow. No functional change intended. Folded in unused variable removal as pointed out by Fabio Estevam , Arnd Bergmann , and Thierry Reding . Signed-off-by: Bjorn Helgaas Acked-by: Pratyush Anand drivers/pci/host/pcie-designware.c | 54 +++++++++++++------------------------- 1 file changed, 18 insertions(+), 36 deletions(-) commit 2fbf575867e5a181a3f3e5e29a2f0c205cca5fb3 Author: xypron.glpk@gmx.de Date: Tue Jan 5 10:12:49 2016 +0100 include/uapi/linux/sockios.h: mark SIOCRTMSG unused IOCTL SIOCRTMSG does nothing but return EINVAL. So comment it as unused. SIOCRTMSG is only used in: * net/ipv4/af_inet.c * include/uapi/linux/sockios.h inet_ioctl calls ip_rt_ioctl. ip_rt_ioctl only handles SIOCADDRT and SIOCDELRT and returns -EINVAL otherwise. Signed-off-by: Heinrich Schuchardt Signed-off-by: David S. Miller include/uapi/linux/sockios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82a823833f4e3769e82cdb4df1bc2234bc65b16c Author: Stanimir Varbanov Date: Fri Dec 18 14:38:57 2015 +0200 PCI: qcom: Add Qualcomm PCIe controller driver The PCIe driver reuses the Designware common code for host and MSI initialization, and also programs the Qualcomm application specific registers. [bhelgaas: remove COMPILE_TEST Kconfig dependency] Signed-off-by: Stanimir Varbanov Signed-off-by: Stanimir Varbanov Signed-off-by: Bjorn Helgaas MAINTAINERS | 7 + drivers/pci/host/Kconfig | 10 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pcie-qcom.c | 616 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 634 insertions(+) commit 845d5ca26647258fea84353152c2bde759dfab5d Author: Stanimir Varbanov Date: Fri Dec 18 14:38:56 2015 +0200 PCI: qcom: Document PCIe devicetree bindings Document Qualcomm PCIe driver devicetree bindings. Signed-off-by: Stanimir Varbanov Signed-off-by: Stanimir Varbanov Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../devicetree/bindings/pci/qcom,pcie.txt | 233 +++++++++++++++++++++ 1 file changed, 233 insertions(+) commit 93209d65c1d38f86ffb3f61a1214130b581a9709 Author: Michal Marek Date: Wed Oct 14 11:48:06 2015 +0200 tags: Unify emacs and exuberant rules The emacs rules were constantly lagging behind the exuberant ones. Use a single set of rules for both, to make the script easier to maintain. The language understood by both tools is basic regular expression with some limitations, which are documented in a comment. To be able to store the rules in an array and easily iterate over it, the script requires bash now. In the exuberant case, the change fixes some false matches in and also some too greedy matches in the arguments of the DECLARE_*/DEFINE_* macros. In the emacs case, several previously not working rules are matching now. Tested with these versions of the tools: Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert etags (GNU Emacs 24.5) Signed-off-by: Michal Marek scripts/tags.sh | 202 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 109 insertions(+), 93 deletions(-) commit a1ccdb63b5535dc3446b0a9efc6d97aca82c72ef Author: Michal Marek Date: Thu Oct 15 15:12:51 2015 +0200 tags: Drop the _PE rule We are not indexing the userspace tools, so the rules only match some false positives in the kernel code. Signed-off-by: Michal Marek scripts/tags.sh | 2 -- 1 file changed, 2 deletions(-) commit ab9ca615f5f4053417cba464015bf2d7334a2371 Author: Michal Marek Date: Thu Oct 15 11:14:02 2015 +0200 tags: Do not try to index defconfigs The defconfig files are in predictable locations, so there is no need to index them. Plus, the script was only looking for files named 'defconfig', which only works on a few architectures nowadays. Signed-off-by: Michal Marek scripts/tags.sh | 12 ------------ 1 file changed, 12 deletions(-) commit a281b8569e9eb4beb1651c92145271555ba05f0c Author: Michal Marek Date: Wed Oct 14 11:17:13 2015 +0200 tags: Process Kconfig files in a single pass Signed-off-by: Michal Marek scripts/tags.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c26206f23a19af299540880ccf80e5a7af0f7db6 Author: Michal Marek Date: Wed Oct 14 10:55:04 2015 +0200 tags: Fix erroneous pattern match in a comment Apparently, ctags applies the rules before deleting comments: ctags: Warning: include/linux/completion.h:22: null expansion of name pattern "\2" Work around this particular case by requiring the group to contain at least one character. Leave the other patters as they are, until a better solution is found. Signed-off-by: Michal Marek scripts/tags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e594a178123eb77a3238a73ca35fabc98dec3599 Author: Michal Marek Date: Wed Oct 14 10:35:23 2015 +0200 aic7xxx: Avoid name collision with Rename the local definition of LIST_HEAD to BSD_LIST_HEAD. This fixes a ctags error if we apply the C rules to header files as well: ctags: Warning: drivers/scsi/aic7xxx/aic79xx.h:1072: null expansion of name pattern "\3" ctags: Warning: drivers/scsi/aic7xxx/aic7xxx.h:919: null expansion of name pattern "\3" Signed-off-by: Michal Marek drivers/scsi/aic7xxx/aic79xx.h | 4 ++-- drivers/scsi/aic7xxx/aic79xx_osm.h | 5 ----- drivers/scsi/aic7xxx/aic7xxx.h | 2 +- drivers/scsi/aic7xxx/aic7xxx_osm.h | 5 ----- drivers/scsi/aic7xxx/queue.h | 2 +- 5 files changed, 4 insertions(+), 14 deletions(-) commit d2fb5aeda926307e4d95e3e824146aee9943de59 Author: Michal Marek Date: Wed Oct 14 09:45:52 2015 +0200 tags: Treat header files as C code This allows to apply the same patters to both source and header files. The effect is mostly visible in the case of DECLARE_BITMAP, but there are small gains all over the place. There is also lots of random changes in the diff, I believe this is simply because there are still lots of unexpanded macros in the code and the C and C++ parsers fail and recover at different points. Also, qconf.h is parsed as C, but that's a negligible regression. Signed-off-by: Michal Marek scripts/tags.sh | 66 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 541140d43046ccd4e7b511846d22b3d3ca7367f3 Author: Subhransu S. Prusty Date: Wed Dec 9 21:46:08 2015 +0530 ASoC: hdac_hdmi: Fix to check num nodes correctly commit 3c83ac23253c ("ASoC: hdac_hdmi: check error return") fixes the static checker warning reported by Dan Carpenter: sound/soc/codecs/hdac_hdmi.c:416 hdac_hdmi_parse_and_map_nid() warn: unsigned 'hdac->num_nodes' is never less than zero. But it doesn't fix the issue completely. It's also a failure if no sub nodes found for an afg node. So modify the return condition appropriately. Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e8db97f0e5205c0f6fd20c9a4f38cd871bc467f Author: Martin Sperl Date: Tue Dec 22 18:03:25 2015 +0000 spi: loopback-test: spi_check_rx_ranges can get always done The spi_check_rx_ranges can always get executed independent of if we have a real loopback situation. Signed-off-by: Martin Sperl Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 1633bf118bfbc641a7d3a4bbb0b2b20c9c60f8d7 Merge: 33c1529 3d8c38a Author: David S. Miller Date: Tue Jan 5 14:11:51 2016 -0500 Merge branch 'mlx5e-tstamp' Saeed Mahameed says: ==================== Introduce mlx5 ethernet timestamping This patch series introduces the support for ConnectX-4 timestamping and the PTP kernel interface. Changes from V2: net/mlx5_core: Introduce access function to read internal_timer - Remove one line function - Change function name net/mlx5e: Add HW timestamping (TS) support: - Data path performance optimization (caching tstamp struct in rq,sq) - Change read/write_lock_irqsave to read/write_lock - Move ioctl functions to en_clock file - Changed overflow start algorithm according to comments from Richard - Move timestamp init/cleanup to open/close ndos. In details: 1st patch prevents the driver from modifying skb->data and SKB CB in device xmit function. 2nd patch adds the needed low level helpers for: - Fetching the hardware clock (hardware internal timer) - Parsing CQEs timestamps - Device frequency capability 3rd patch adds new en_clock.c file that handles all needed timestamping operations: - Internal clock structure initialization and other helper functions - Added the needed ioctl for setting/getting the current timestamping configuration. - used this configuration in RX/TX data path to fill the SKB with the timestamp. 4th patch Introduces PTP (PHC) support. ==================== Signed-off-by: David S. Miller commit 3d8c38af149309feb2541b995b3a45df170d6da3 Author: Eran Ben Elisha Date: Tue Dec 29 14:58:32 2015 +0200 net/mlx5e: Add PTP Hardware Clock (PHC) support Add a PHC support to the mlx5_en driver. Use reader/writer spinlocks to protect the timecounter since every packet received needs to call timecounter_cycle2time() when timestamping is enabled. This can become a performance bottleneck with RSS and multiple receive queues if normal spinlocks are used. The driver has been tested with both Documentation/ptp/testptp and the linuxptp project (http://linuxptp.sourceforge.net/) on a Mellanox ConnectX-4 card. Signed-off-by: Eran Ben Elisha Cc: Richard Cochran Signed-off-by: Saeed Mahameed Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 + drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 + drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 100 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +- 4 files changed, 106 insertions(+), 1 deletion(-) commit ef9814deafd0c83a358d49e3709c3e16cc352118 Author: Eran Ben Elisha Date: Tue Dec 29 14:58:31 2015 +0200 net/mlx5e: Add HW timestamping (TS) support Add support for enable/disable HW timestamping for incoming and/or outgoing packets. To enable/disable HW timestamping appropriate ioctl should be used. Currently HWTSTAMP_FILTER_ALL/NONE and HWTSAMP_TX_ON/OFF only are supported. Make all relevant changes in RX/TX flows to consider TS request and plant HW timestamps into relevant structures. Add internal clock for converting hardware timestamp to nanoseconds. In addition, add a service task to catch internal clock overflow, to make sure timestamping is accurate. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 23 +++ drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 187 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 29 ++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 19 ++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 9 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 12 ++ 7 files changed, 279 insertions(+), 2 deletions(-) commit b0844444590e18704644f707ea88bff1b976b0e7 Author: Eran Ben Elisha Date: Tue Dec 29 14:58:30 2015 +0200 net/mlx5_core: Introduce access function to read internal timer A preparation step which adds support for reading the hardware internal timer and the hardware timestamping from the CQE. In addition, advertize device_frequency_khz HCA capability. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 13 +++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 + include/linux/mlx5/device.h | 20 +++++++++++++++++--- include/linux/mlx5/mlx5_ifc.h | 6 +++--- 4 files changed, 34 insertions(+), 6 deletions(-) commit 34802a42b3528b0e18ea4517c8b23e1214a09332 Author: Achiad Shochat Date: Tue Dec 29 14:58:29 2015 +0200 net/mlx5e: Do not modify the TX SKB If the SKB is cloned, or has an elevated users count, someone else can be looking at it at the same time. Signed-off-by: Achiad Shochat Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 73 +++++++++++++---------- 3 files changed, 49 insertions(+), 34 deletions(-) commit 6cb07abcc318be8dfbec5d19bc982536d64106a9 Merge: a8d9934 75fb0aa 6399aea 8da61f2 Author: Mark Brown Date: Tue Jan 5 19:07:18 2016 +0000 Merge remote-tracking branches 'regmap/topic/mmio', 'regmap/topic/rbtree' and 'regmap/topic/seq' into regmap-next commit a8d99344c9ebc2f12232473f92beac2f894b6ea5 Merge: 8798975 782035e 7a78479 Author: Mark Brown Date: Tue Jan 5 19:07:17 2016 +0000 Merge remote-tracking branches 'regmap/topic/64bit' and 'regmap/topic/irq-type' into regmap-next commit 8798975bb645c0a0927b6f5f4a5964607ef932c1 Merge: 6cca671 fcac023 Author: Mark Brown Date: Tue Jan 5 19:07:16 2016 +0000 Merge remote-tracking branch 'regmap/topic/core' into regmap-next commit 6cca67129d526505567696813e2625b1caaa7abd Merge: 1683098 167f706 Author: Mark Brown Date: Tue Jan 5 19:07:16 2016 +0000 Merge remote-tracking branch 'regmap/topic/cache' into regmap-next commit 339ec3ce54e5c7137287dc807555ae69934b2d2a Author: Martin Sperl Date: Tue Dec 22 18:03:22 2015 +0000 spi: loopback-test: rename method spi_test_fill_tx to spi_test_fill_pattern Rename method spi_test_fill_tx to spi_test_fill_pattern to better describe what it does. Signed-off-by: Martin Sperl Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e6520a3c8877d02c471135afb371e79b04409ab8 Author: Martin Sperl Date: Tue Dec 22 18:03:21 2015 +0000 spi: loopback-test: write rx pattern also when running without tx_buf Currently the rx_buf does not get set with the SPI_TEST_PATTERN_UNWRITTEN when tx_buf == NULL in the transfer. Reorder code so that it gets done also under this specific condition. Signed-off-by: Martin Sperl Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8da61f24cc4a4a66ecae69aa9b9aa8fd989a8969 Author: Mark Brown Date: Tue Oct 20 15:40:59 2015 +0100 regmap: debugfs: Use seq_file for the access map Unlike the registers file we don't have any substantial performance concerns rendering the entire file (it involves no device accesses) so just use seq_printf() to simplify the code. Signed-off-by: Mark Brown drivers/base/regmap/regmap-debugfs.c | 69 ++++++++++-------------------------- 1 file changed, 18 insertions(+), 51 deletions(-) commit f644eb62fe88a2414e5e5c1bd80e20c881f5d86a Author: Adam Thomson Date: Tue Jan 5 18:15:33 2016 +0000 ASoC: da7218: Correct BCLK inversion for DSP DAI format mode By default the device latches data on the falling edge of the BCLK in DSP mode, whereas the expectation for normal BCLK is to latch on the rising edge. This updates the driver to invert the BCLK configuration for DSP mode, to align with expected behaviour. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7218.c | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) commit ee1e4e3f0d50aebdc6dac2a2cd4ae203ed2a75c1 Merge: 55fc205 d801836 Author: Mark Brown Date: Tue Jan 5 18:06:29 2016 +0000 Merge branch 'fix/intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit 17209dfb35a228e597a387bfc83b68093b247f78 Author: Stanimir Varbanov Date: Fri Dec 18 14:38:55 2015 +0200 PCI: designware: Ensure ATU is enabled before IO/conf space accesses Read back the ATU CR2 register to ensure ATU programming is effective before any subsequent I/O or config space accesses. Without this, PCI device enumeration is unreliable. [bhelgaas: changelog, comment] Signed-off-by: Stanimir Varbanov Signed-off-by: Bjorn Helgaas Acked-by: Pratyush Anand drivers/pci/host/pcie-designware.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7a78479fd2acd25db7ecd1744d76f6841ec8a257 Author: Laxman Dewangan Date: Tue Dec 22 18:25:26 2015 +0530 regmap: irq: add support for configuration of trigger type Some of devices supports the trigger level for interrupt like rising/falling edge specially for GPIOs. The interrupt support of such devices may have uses the generic regmap irq framework for implementation. Add support to configure the trigger type device interrupt register via regmap-irq framework. The regmap-irq framework configures the trigger register only if the details of trigger type registers are provided. [Fixed use of terery operator for legibility -- broonie] Signed-off-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/base/regmap/regmap-irq.c | 100 +++++++++++++++++++++++++++++++++++++++ include/linux/regmap.h | 16 +++++++ 2 files changed, 116 insertions(+) commit 33c152972e625bd29f083dda75a37263f8b95a41 Merge: 6a5ef90 c79c066 Author: David S. Miller Date: Tue Jan 5 12:24:06 2016 -0500 Merge branch 'sctp-transport-rhashtable' Xin Long says: ==================== sctp: use transport hashtable to replace association's with rhashtable for telecom center, the usual case is that a server is connected by thousands of clients. but if the server with only one enpoint(udp style) use the same sport and dport to communicate with every clients, and every assoc in server will be hashed in the same chain of global assoc hashtable due to currently we choose dport and sport as the hash key. when a packet is received, sctp_rcv try to find the assoc with sport and dport, since that chain is too long to find it fast, it make the performance turn to very low, some test data is as follow: in server: $./ss [start a udp style server there] in client: $./cc [start 2500 sockets to connect server with same port and different ip, and use one of them to send data to server] ===== test on net-next -- perf top server: 55.73% [kernel] [k] sctp_assoc_is_match 6.80% [kernel] [k] sctp_assoc_lookup_paddr 4.81% [kernel] [k] sctp_v4_cmp_addr 3.12% [kernel] [k] _raw_spin_unlock_irqrestore 1.94% [kernel] [k] sctp_cmp_addr_exact client: 46.01% [kernel] [k] sctp_endpoint_lookup_assoc 5.55% libc-2.17.so [.] __libc_calloc 5.39% libc-2.17.so [.] _int_free 3.92% libc-2.17.so [.] _int_malloc 3.23% [kernel] [k] __memset -- spent time time is 487s, send pkt is 10000000 we need to change the way to calculate the hash key, to use lport + rport + paddr as the hash key can avoid this issue. besides, this patchset will use transport hashtable to replace association hashtable to lookup with rhashtable api. get transport first then get association by t->asoc. and also it will make tcp style work better. ===== test with this patchset: -- perf top server: 15.98% [kernel] [k] _raw_spin_unlock_irqrestore 9.92% [kernel] [k] __pv_queued_spin_lock_slowpath 7.22% [kernel] [k] copy_user_generic_string 2.38% libpthread-2.17.so [.] __recvmsg_nocancel 1.88% [kernel] [k] sctp_recvmsg client: 11.90% [kernel] [k] sctp_hash_cmp 8.52% [kernel] [k] rht_deferred_worker 4.94% [kernel] [k] __pv_queued_spin_lock_slowpath 3.95% [kernel] [k] sctp_bind_addr_match 2.49% [kernel] [k] __memset -- spent time time is 22s, send pkt is 10000000 ==================== Signed-off-by: David S. Miller commit c79c0666915418f9c0f01a6d0e93179416fb0c9e Author: Xin Long Date: Wed Dec 30 23:50:50 2015 +0800 sctp: remove the local_bh_disable/enable in sctp_endpoint_lookup_assoc sctp_endpoint_lookup_assoc is called in the protection of sock lock there is no need to call local_bh_disable in this function. so remove them. Signed-off-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/endpointola.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit b5eff7128366c4a7a9b502097a968ec9cae2bea2 Author: Xin Long Date: Wed Dec 30 23:50:49 2015 +0800 sctp: drop the old assoc hashtable of sctp transport hashtable will replace the association hashtable, so association hashtable is not used in sctp any more, so drop the codes about that. Signed-off-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 21 ---------------- include/net/sctp/structs.h | 5 ---- net/sctp/input.c | 61 ---------------------------------------------- net/sctp/protocol.c | 30 ++--------------------- net/sctp/sm_sideeffect.c | 2 -- net/sctp/socket.c | 6 +---- 6 files changed, 3 insertions(+), 122 deletions(-) commit 39f66a7dce3213fb0a0c6256929c816df27c7548 Author: Xin Long Date: Wed Dec 30 23:50:48 2015 +0800 sctp: apply rhashtable api to sctp procfs Traversal the transport rhashtable, get the association only once through the condition assoc->peer.primary_path != transport. Signed-off-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/proc.c | 316 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 173 insertions(+), 143 deletions(-) commit 4f0087812648b7611157ae22954acfaed820d24e Author: Xin Long Date: Wed Dec 30 23:50:47 2015 +0800 sctp: apply rhashtable api to send/recv path apply lookup apis to two functions, for __sctp_endpoint_lookup_assoc and __sctp_lookup_association, it's invoked in the protection of sock lock, it will be safe, but sctp_lookup_association need to call rcu_read_lock() and to detect the t->dead to protect it. Signed-off-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/associola.c | 5 +++++ net/sctp/endpointola.c | 35 ++++++++--------------------------- net/sctp/input.c | 39 ++++++++++----------------------------- net/sctp/protocol.c | 6 ++++++ 4 files changed, 29 insertions(+), 56 deletions(-) commit d6c0256a60e685214cc8cc2b886809f11efc0084 Author: Xin Long Date: Wed Dec 30 23:50:46 2015 +0800 sctp: add the rhashtable apis for sctp global transport hashtable tranport hashtbale will replace the association hashtable to do the lookup for transport, and then get association by t->assoc, rhashtable apis will be used because of it's resizable, scalable and using rcu. lport + rport + paddr will be the base hashkey to locate the chain, with net to protect one netns from another, then plus the laddr to compare to get the target. this patch will provider the lookup functions: - sctp_epaddr_lookup_transport - sctp_addrs_lookup_transport hash/unhash functions: - sctp_hash_transport - sctp_unhash_transport init/destroy functions: - sctp_transport_hashtable_init - sctp_transport_hashtable_destroy Signed-off-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 11 ++++ include/net/sctp/structs.h | 5 ++ net/sctp/input.c | 131 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+) commit 01a999e48995a35faaa513f811c335bce72917d6 Author: Jaehoon Chung Date: Thu Dec 24 18:41:03 2015 +0900 mmc: dw_mmc: remove the unused quirks Removed the unused quirks. These quirks don't used anywhere. Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 19 ------------------- include/linux/mmc/dw_mmc.h | 10 ++-------- 2 files changed, 2 insertions(+), 27 deletions(-) commit 923a231c871120c08a74a1fda397fed184334924 Author: Geliang Tang Date: Sun Dec 27 18:46:00 2015 +0800 mmc: sdhci-pci: use to_pci_dev() Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 12dd7fe2967a7e60e689e7e9a016b8288c8ea756 Author: Geliang Tang Date: Sun Dec 27 21:15:43 2015 +0800 mmc: cb710: use to_platform_device() Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Ulf Hansson drivers/mmc/host/cb710-mmc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1b84def8bf86ae9a39940c12a20ce9a2dfd66d56 Author: Lucas Stach Date: Tue Dec 22 19:41:04 2015 +0100 mmc: tegra: use correct accessor for misc ctrl register The misc control register is 32bit wide, the used readw/writew accessors only mainipulate the low 16bit of this register. It currently doesn't matter as all the bit changed are located in the lower half, but together with the u32 variable used to hold the contents of the register it is seriously confusing. Switch to 32bit accessors to avoid any future breakage. Signed-off-by: Lucas Stach Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ad2ed1dfcbed6f50923fc0afc24aac475bdc0b5 Author: Lucas Stach Date: Tue Dec 22 19:41:03 2015 +0100 mmc: tegra: enable UHS-I modes Keep the quirk bits, as Tegra30 and Tegra114 host have different levels of support for UHS-I modes and so need different spare bits to be set, but change the logic to be positive. Tegra210 needs a different tuning sequence than Tegra30+. Disable UHS modes until support for this is properly added. Signed-off-by: Lucas Stach Acked-by: Thierry Reding Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit b541eef125fa3ae0df84572459af4e7084cb6343 Author: Michal Suchanek Date: Wed Dec 2 10:38:21 2015 +0000 spi: fsl-espi: expose maximum transfer size limit The fsl-espi hardware can trasfer at most 64K data so report teh limitation. Based on patch by Heiner Kallweit CC: Heiner Kallweit Signed-off-by: Michal Suchanek Signed-off-by: Mark Brown drivers/spi/spi-fsl-espi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4acad4aae10d1fa79a075b38b5c73772c44f576c Author: Michal Suchanek Date: Wed Dec 2 10:38:21 2015 +0000 spi: expose master transfer size limitation. On some SPI controllers it is not feasible to transfer arbitrary amount of data at once. When the limit on transfer size is a few kilobytes at least it makes sense to use the SPI hardware rather than reverting to gpio driver. The protocol drivers need a way to check that they do not sent overly long messages, though. Signed-off-by: Michal Suchanek Signed-off-by: Mark Brown include/linux/spi/spi.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 3f80978397f447973d278198e8bbde82826cb9c1 Author: Sanyog Kale Date: Tue Jan 5 17:14:49 2016 +0530 ASoC: pcm: allow delayed suspending request by users If a device would like to use delayed suspending then PM recommendation is to set ‘power.use_autosuspend’ flag. To allow users to do so we need to change runtime calls in core to use autosuspend counterparts. For user who do not wish to use delayed suspend not setting the device's ‘power.use_autosuspend’ flag will result in non-delayed suspend even with these APIs which incidentally is also the default behaviour, so only users will be impacted who opt in for this. Signed-off-by: Sanyog Kale Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 4acfa36be618eb8ac3aa39f473e7550710216435 Author: Adam Thomson Date: Tue Jan 5 15:05:36 2016 +0000 ASoC: da7219: Correct BCLK inversion for DSP DAI format mode By default the device latches data on the falling edge of the BCLK in DSP mode, whereas the expectation for normal BCLK is to latch on the rising edge. This updates the driver to invert the BCLK configuration for DSP mode, to align with expected behaviour. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7219.c | 48 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) commit 78b781ca0d35191ebf8d8cad8beec810270f0f2e Author: Johan Hedberg Date: Tue Jan 5 13:19:32 2016 +0200 Bluetooth: Add support for Start Limited Discovery command This patch implements the mgmt Start Limited Discovery command. Most of existing Start Discovery code is reused since the only difference is the presence of a 'limited' flag as part of the discovery state. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann include/net/bluetooth/hci_core.h | 1 + include/net/bluetooth/mgmt.h | 2 ++ net/bluetooth/hci_request.c | 11 ++++++--- net/bluetooth/mgmt.c | 53 +++++++++++++++++++++++++++++++++------- 4 files changed, 55 insertions(+), 12 deletions(-) commit 0d3b7f64c84d53658daf28e2f9772e38acb9340d Author: Johan Hedberg Date: Tue Jan 5 13:19:31 2016 +0200 Bluetooth: Change eir_has_data_type() to more generic eir_get_data() To make the EIR parsing helper more general purpose, make it return the found data and its length rather than just saying whether the data was present or not. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann include/net/bluetooth/hci_core.h | 30 ++++++++++++++++++++---------- net/bluetooth/hci_event.c | 6 +++--- net/bluetooth/mgmt.c | 3 ++- 3 files changed, 25 insertions(+), 14 deletions(-) commit 39b5be9b4233a9f212b98242bddf008f379b5122 Author: Will Deacon Date: Tue Jan 5 15:36:59 2016 +0000 arm64: mm: move pgd_cache initialisation to pgtable_cache_init Initialising the suppport for EFI runtime services requires us to allocate a pgd off the back of an early_initcall. On systems where the PGD_SIZE is smaller than PAGE_SIZE (e.g. 64k pages and 48-bit VA), the pgd_cache isn't initialised at this stage, and we panic with a NULL dereference during boot: Unable to handle kernel NULL pointer dereference at virtual address 00000000 __create_mapping.isra.5+0x84/0x350 create_pgd_mapping+0x20/0x28 efi_create_mapping+0x5c/0x6c arm_enable_runtime_services+0x154/0x1e4 do_one_initcall+0x8c/0x190 kernel_init_freeable+0x84/0x1ec kernel_init+0x10/0xe0 ret_from_fork+0x10/0x50 This patch fixes the problem by initialising the pgd_cache earlier, in the pgtable_cache_init callback, which sounds suspiciously like what it was intended for. Reported-by: Dennis Chen Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 3 ++- arch/arm64/mm/pgd.c | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) commit ed89c005b0f5caf5a1a1aac22ac3418e1340fd18 Author: Yuan Sun Date: Tue Jan 5 20:26:43 2016 +0800 cgroup: Remove resource_counter.txt in Documentation/cgroup-legacy/00-INDEX. Signed-off-by: Yuan Sun Signed-off-by: Tejun Heo Documentation/cgroup-legacy/00-INDEX | 2 -- 1 file changed, 2 deletions(-) commit dc17340e3041511850ff6ec7299551284d6c0eb1 Author: Pali Rohár Date: Sat Dec 26 00:37:16 2015 +0100 Fix documentation for adp1653 DT Property names do not match real names needed by driver itself. This patch fix this problem. Signed-off-by: Pali Rohár Acked-by: Pavel Machek Signed-off-by: Rob Herring Documentation/devicetree/bindings/media/i2c/adp1653.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 414ee536dfb51373c6c4c74dd7a7a65abdf5af51 Author: Geert Uytterhoeven Date: Tue Dec 15 10:55:59 2015 +0100 ARM: psci: Fix indentation in DT bindings Fix bogus indentation of the PSCI compatible values, reformat. Signed-off-by: Geert Uytterhoeven Acked-by: Lorenzo Pieralisi Acked-by: Mark Rutland Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/psci.txt | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 8815b23aa0933653812e9c13c506f6f60fac474e Author: Chris Wilson Date: Tue Jan 5 09:42:31 2016 +0000 drm: Remove opencoded drm_gem_object_release_handle() drm_gem_handle_delete() contains its own version of drm_gem_object_release_handle(), so lets just call the release method instead. Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1451986951-3703-2-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Thierry Reding Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_gem.c | 55 +++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 31 deletions(-) commit 9649399e918f61788a6302a0f7d3c5ed34c2930c Author: Chris Wilson Date: Tue Jan 5 09:42:30 2016 +0000 drm: Do not set outparam on error during GEM handle allocation Good practice dictates that we do not leak stale information to our callers, and should avoid overwriting an outparam on an error path. Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1451986951-3703-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Thierry Reding Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_gem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit df7d678bea8ba8904bdb293c8e96aa9488f7dbee Author: Daniel Vetter Date: Mon Jan 4 07:53:36 2016 +0100 drm/docs: more leftovers from the big vtable documentation pile Another pile of vfuncs from the old gpu.tmpl xml documentation that I've forgotten to delete. I spotted a few more things to clarify/extend in the new kerneldoc while going through this once more. v2: Spelling fixes (Thierry). v3: More spelling fixes and use Thierry's proposal to clarify why drivers need to validate modes both in ->mode_fixup and ->mode_valid. Cc: Laurent Pinchart Cc: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Daniel Vetter Documentation/DocBook/gpu.tmpl | 188 ------------------------------- include/drm/drm_modeset_helper_vtables.h | 44 +++++++- 2 files changed, 41 insertions(+), 191 deletions(-) commit b80443c2211c7daaabd20fbbe9e7beb3fa3408e0 Author: Masahiro Yamada Date: Tue Jan 5 11:17:53 2016 +0900 of/platform: export of_default_bus_match_table Currently, drivers/bus/uniphier-system-bus.c is kept from being a module due to the unresolved reference to of_default_bus_match_table. Refer to commit 326ea45aa827 ("bus: uniphier: allow only built-in driver"). Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring drivers/of/platform.c | 1 + 1 file changed, 1 insertion(+) commit d2329fb576d2c7eb0824028d9c6d3d48fb90b11a Author: Grant Likely Date: Mon Jan 4 13:13:21 2016 +0100 of/unittest: Show broken behaviour in the platform bus Add a single resource to the test bus device to exercise the platform bus code a little more. This isn't strictly a devicetree test, but it is a corner case that the devicetree runs into. Until we've got platform device unittests, it can live here. It doesn't need to be an explicit text because the kernel will oops when it is wrong. Cc: Pantelis Antoniou Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: Ricardo Ribalda Delgado Signed-off-by: Grant Likely [wsa: added the comment provided by Grant, rebased, and tested] Signed-off-by: Wolfram Sang Signed-off-by: Rob Herring drivers/of/unittest.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 166814d8413df49bf21293aacc808b2782cbd9a8 Author: Jean Delvare Date: Tue Jan 5 14:23:47 2016 +0100 gpio: pch: Optimize pch_gpio_get() The double negation is costly and can be avoided by shifting the register value before masking the requested bit. Signed-off-by: Jean Delvare Cc: Linus Walleij Signed-off-by: Linus Walleij drivers/gpio/gpio-pch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83080a140874b6860b5191b375cfdad267eaa107 Author: Geliang Tang Date: Tue Jan 5 22:07:55 2016 +0800 regulator: core: use dev_to_rdev Use dev_to_rdev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Mark Brown drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d44c6114da8c9e83407397d06b5cd909a1cc9135 Author: Zidan Wang Date: Thu Dec 24 11:42:11 2015 +0800 ASoC: fsl_asrc: sound is wrong after suspend/resume The register ASRCFG is volatile, but some bits need to be recovered after suspend/resume. Signed-off-by: Zidan Wang Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 7 +++++++ sound/soc/fsl/fsl_asrc.h | 7 +++++++ 2 files changed, 14 insertions(+) commit 446f59acb70b70a425ea4105277a71eb615327cd Author: Linus Walleij Date: Tue Jan 5 14:10:17 2016 +0100 Revert "pinctrl: lantiq: Implement gpio_chip.to_irq" This reverts commit 3e640743fee6e6a82ead1f163737755b2a965712. This commit needs to go into the pinctrl tree to avoid clashes. drivers/pinctrl/pinctrl-xway.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 27cc78e3be3abb16ff77324624a6dfb410b3d338 Author: Linus Walleij Date: Thu Dec 10 19:02:26 2015 +0100 pinctrl: nsp-gpio: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 5c809c63ab508423225f5aea00f82308a427b0f9 Author: Linus Walleij Date: Tue Dec 8 22:50:08 2015 +0100 pinctrl: vt8500-wmt: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/vt8500/pinctrl-wmt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit dbf09b0aa9e75222dda7aa4f2fcd3eca107cf450 Author: Linus Walleij Date: Tue Dec 8 22:27:19 2015 +0100 pinctrl: exynos5440: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Kukjin Kim Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-exynos5440.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 80036f88db18b98bc20f7321dbd5f9947576a2b2 Author: Linus Walleij Date: Tue Dec 8 22:12:11 2015 +0100 pinctrl: at91-pio4: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Ludovic Desroches Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91-pio4.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 11aa679a6a0b20fe105a7a955a82153e255bae74 Author: Linus Walleij Date: Tue Dec 8 22:06:23 2015 +0100 pinctrl: mediatek: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Matthias Brugger Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cff4c7efbc2a1771af431edad6cf1df2a9d9dd46 Author: Linus Walleij Date: Tue Dec 8 10:31:35 2015 +0100 pinctrl: spear-plgpio: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: spear-devel@list.st.com Acked-by: Viresh Kumar Signed-off-by: Linus Walleij drivers/pinctrl/spear/pinctrl-plgpio.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 192d3507e2e65790f03ff43aeb1930ae097a8315 Author: Linus Walleij Date: Tue Dec 8 10:29:35 2015 +0100 pinctrl: sirf: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Barry Song Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-sirf.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 9420023a5327f29a37cf0a6198bd7d8d80f9634c Author: Linus Walleij Date: Tue Dec 8 10:27:16 2015 +0100 pinctrl: sirf-atlas7: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Barry Song Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-atlas7.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 7cb093c4bce3a145cc1586d4464cd362376c2cc6 Author: Linus Walleij Date: Tue Dec 8 10:24:54 2015 +0100 pinctrl: sh-pfc: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Geert Uytterhoeven Cc: Laurent Pinchart Signed-off-by: Linus Walleij drivers/pinctrl/sh-pfc/gpio.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 88057d6e4a2a9c221bf81cfd18f25d0ff956af9e Author: Linus Walleij Date: Tue Dec 8 22:40:43 2015 +0100 pinctrl: sunxi: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9f57f81c129f0f9456f78f00235f70ac5e21e0f5 Author: Linus Walleij Date: Tue Dec 8 10:18:50 2015 +0100 pinctrl: samsung: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Tomasz Figa Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 378596f99460ebd255dc3f5c1bc67a9ff09273f3 Author: Linus Walleij Date: Tue Dec 8 10:16:00 2015 +0100 pinctrl: ssbi-gpio: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ed47941a17993cc455b1009a9810b85faa02c23f Author: Linus Walleij Date: Tue Dec 8 10:13:53 2015 +0100 pinctrl: ssbi-mpp: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 064761d1566617018567ed4d18bbb82519c01506 Author: Linus Walleij Date: Tue Dec 8 09:53:39 2015 +0100 pinctrl: spmi-mpp: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Björn Andersson Cc: Ivan T. Ivanov Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit c52d9df14ba75af351a2be7cc49f9e055192af93 Author: Linus Walleij Date: Tue Dec 8 09:51:47 2015 +0100 pinctrl: spmi: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Ivan T. Ivanov Cc: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit fded3f40bf96d14a8c5bc3e4593e7cdc5709ab88 Author: Linus Walleij Date: Tue Dec 8 09:49:18 2015 +0100 pinctrl: msm: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Stephen Boyd Cc: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 2e862a7bd63f57fcaa4a3a4929f51c56289f1f80 Author: Linus Walleij Date: Tue Dec 8 09:45:18 2015 +0100 pinctrl: st: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Srinivas Kandagatla Cc: Patrice Chotard Acked-by: Maxime Coquelin Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-st.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 03bf81f1cb49a580d70b7514366760146c3da017 Author: Linus Walleij Date: Tue Dec 8 09:39:13 2015 +0100 pinctrl: rockchip: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 3d18fb5c87576493a00fe51f09b6e82a17168177 Author: Linus Walleij Date: Tue Dec 8 09:37:00 2015 +0100 pinctrl: pistachio: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Andrew Bresticker Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-pistachio.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 573718337f0359a935a276ce98996bbe062c926d Author: Linus Walleij Date: Tue Dec 8 09:35:14 2015 +0100 pinctrl: digicolor: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Baruch Siach Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-digicolor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 014c1b3de3bec90df119e718d3f9f131747609bf Author: Linus Walleij Date: Tue Dec 8 09:33:30 2015 +0100 pinctrl: u300: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-coh901.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit 370ea61134e9d13cef0dc671ce1fbc5a60756b59 Author: Linus Walleij Date: Tue Dec 8 09:27:45 2015 +0100 pinctrl: at91: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Jean-Christophe Plagniol-Villard Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit f5bc3568db62c483049ce688baa06ff68dfb0fbd Author: Linus Walleij Date: Tue Dec 8 09:24:32 2015 +0100 pinctrl: as3722: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Andrew Bresticker Cc: Mallikarjun Kasoju Acked-by: Laxman Dewangan Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-as3722.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 04d367231162560a51e875836a1f2ebf41780adf Author: Linus Walleij Date: Tue Dec 8 09:21:38 2015 +0100 pinctrl: amd: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Ken Xue Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit de3d851beab55f36c7a555e313331c61bbb91f0b Author: Linus Walleij Date: Tue Dec 8 08:33:09 2015 +0100 pinctrl: adi2: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Sonic Zhang Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-adi2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2b016d2793d7b23d9fdfc55f5afc8fc6e6fd30eb Author: Linus Walleij Date: Tue Dec 8 08:29:43 2015 +0100 pinctrl: abx500: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-abx500.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit 68ab0126001fb265c080b84e54b3c7c35e9d821d Author: Linus Walleij Date: Thu Dec 3 15:44:46 2015 +0100 pinctrl: nomadik: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/pinctrl-nomadik.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 827c93dae7275aaf7bfc2f1b41e1e6845751dda9 Author: Linus Walleij Date: Tue Dec 8 08:26:34 2015 +0100 pinctrl: meson: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Beniamino Galvani Cc: Carlo Caione Cc: Antoine Tenart Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit acfd4c633aa394ac0323bdb2be95f5b587c0ffbd Author: Linus Walleij Date: Tue Dec 8 00:18:59 2015 +0100 pinctrl: intel: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Mika Westerberg Acked-by: Heikki Krogerus Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 0587d3db005c0bd838bfa0734cc611b4837c0f9d Author: Linus Walleij Date: Tue Dec 8 00:16:03 2015 +0100 pinctrl: cherryview: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Mika Westerberg Acked-by: Heikki Krogerus Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit e19a5f795c1c5be562cfee1c578c97890a755abc Author: Linus Walleij Date: Tue Dec 8 22:01:00 2015 +0100 pinctrl: bcm2835: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Stephen Warren Acked-by: Eric Anholt Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm2835.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bf9a5c96c87cf113e8e56df183a5f7c9af4a4c89 Author: Linus Walleij Date: Tue Dec 8 00:03:44 2015 +0100 pinctrl: baytrail: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Mika Westerberg Acked-by: Heikki Krogerus Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-baytrail.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit c9f294ff6584782d20b4a766901a9cff7398bb20 Author: John Crispin Date: Mon Jan 4 22:27:57 2016 +0100 pinctrl: lantiq: 2 pins have the wrong mux list The latest vendor SDK contained this patch. Signed-off-by: John Crispin Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-xway.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55fc205600ff3b529631cfe03b58645e3844bd92 Author: Jorge Fernandez Monteagudo Date: Mon Jan 4 17:20:30 2016 -0600 ASoC: Intel: Atom: Add support for HP ElitePad 1000 G2 The BIOS for the HP ElitePad 1000 G2 uses an unexpected HID, (INTCCFFD), add it to the white list of knowns HIDs. Signed-off-by: Jorge Fernandez Monteagudo Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 1 + sound/soc/intel/atom/sst/sst_acpi.c | 3 ++- sound/soc/intel/boards/bytcr_rt5640.c | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) commit 7762ef42d804050ae0ad3b99a2e407f50e039a1c Author: Pierre-Louis Bossart Date: Mon Jan 4 17:20:29 2016 -0600 ASoC: Intel: Atom: add support for RT5642 The machine driver is not loaded when the BIOS uses the 10EC5642 _HID. Add it to the white list of known _HIDs, codec_name is already taken care of by previous commit Tested on Asus T100TAF. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 2 ++ sound/soc/intel/boards/bytcr_rt5640.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit caf94ed8629afb82d61a82ce76fb314145933a40 Author: Pierre-Louis Bossart Date: Mon Jan 4 17:20:28 2016 -0600 ASoC: Intel: bytcr_rt5640: fixup DAI codec_name with HID Codec name is hard-coded in machine driver, pass information from actual ACPI HID to help support BIOS variations Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 17 ++++++++++++----- sound/soc/intel/boards/bytcr_rt5640.c | 10 ++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) commit a032d2de0b5f17631844b34481c61cb799d0af6b Author: Srinivas Pandruvada Date: Wed Dec 30 17:45:19 2015 -0800 Documentation: cpufreq: intel_pstate: enhance documentation This is an attempt to make documentation more user friendly. Signed-off-by: Srinivas Pandruvada Reviewed-by: Doug Smythies Reviewed-by: Chen, Yu C Signed-off-by: Rafael J. Wysocki Documentation/cpu-freq/intel-pstate.txt | 241 ++++++++++++++++++++++++++------ 1 file changed, 199 insertions(+), 42 deletions(-) commit 2bd5bd15a51858866d792c678f0fe9280c4e8fa7 Author: Pierre-Louis Bossart Date: Mon Jan 4 17:20:24 2016 -0600 ASoC: Intel: add bytct-rt5651 machine driver based on bytcr-rt5640 with changes only on codec side Quirk logic is kept as placeholder. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 12 ++ sound/soc/intel/atom/sst/sst_acpi.c | 3 + sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bytcr_rt5651.c | 332 ++++++++++++++++++++++++++++++++++ 4 files changed, 349 insertions(+) commit dc901a3541717ca4963dd017eacf50a4c954609c Author: Pierre-Louis Bossart Date: Mon Jan 4 17:20:23 2016 -0600 ASoC: Intel: fix ACPI probe regression with Atom DPCM driver The commit 95f098014815b330838b1173d3d7bcea3b481242 "ASoC: Intel: Move apci find machine routines" introduced a regression in ACPI probe of the DPCM driver. Fix by conditionally compiling sst-acpi when the DPCM driver is not selected Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/common/Makefile | 5 +++++ 1 file changed, 5 insertions(+) commit 45288978859119c019eff93f0cb838a0de100bcc Author: Colin Ian King Date: Tue Jan 5 10:57:11 2016 +0000 ACPI, PCI, irq: remove redundant check for null string pointer source is decleared as a 4 byte char array in struct acpi_pci_routing_table so !prt->source is a redundant null string pointer check. Detected with smatch: drivers/acpi/pci_irq.c:134 do_prt_fixups() warn: this array is probably non-NULL. 'prt->source' Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_irq.c | 3 --- 1 file changed, 3 deletions(-) commit aecbd9b1bff6afbe349921b406b99d285b412820 Author: Adrien Schildknecht Date: Mon Jan 4 23:22:28 2016 +0100 ACPI / video: driver must be registered before checking for keypresses acpi_video_handles_brightness_key_presses() may use an uninitialized mutex. The error has been reported by lockdep: DEBUG_LOCKS_WARN_ON(l->magic != l). The function assumes that the video driver has been registered before being called. As explained in the comment of acpi_video_init(), the registration of the video class may be defered and thus may not take place in the init function of the module. Use completion mechanisms to make sure that acpi_video_handles_brightness_key_presses() wait for the completion of acpi_video_register() before using the mutex. Also get rid of register_count since task completion can replace it. Signed-off-by: Adrien Schildknecht Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 0ec66e2d74aadaaee7e218861ca86effcd029435 Author: Pierre-Louis Bossart Date: Mon Jan 4 17:20:27 2016 -0600 ASoC: Intel: bytcr-rt5640: enable ASRC Sound is noisy when using BCLK as reference, enable ASRC in rt5640 codec Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8937672cd120cc3a4842376f59a70a9a77b08d1d Merge: 51b2c42 bee3e02 Author: Mark Brown Date: Tue Jan 5 12:37:06 2016 +0000 Merge branch 'topic/rt5640' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit bee3e020247eb2573a85a0f558c4a13aba2b81fe Author: Jack Yu Date: Mon Jan 4 17:20:26 2016 -0600 ASoC: rt5640: add ASRC support Signed-off-by: Jack Yu Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5640.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/rt5640.h | 17 ++++++++ 2 files changed, 119 insertions(+) commit 9d0c1c3332b49570454bb11e55d3c6c7993163da Author: Geliang Tang Date: Fri Jan 1 20:29:00 2016 +0800 spi: zynq: use to_platform_device() Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang Reviewed-by: Moritz Fischer Signed-off-by: Mark Brown drivers/spi/spi-zynqmp-gqspi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9033a5f9ac83538502a2bddc62311b09d966799e Author: Geliang Tang Date: Fri Jan 1 20:28:59 2016 +0800 spi: cadence: use to_platform_device() Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang Reviewed-by: Moritz Fischer Signed-off-by: Mark Brown drivers/spi/spi-cadence.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 15b0f4d4b169dde8ecc4e162bcd6cd145cb09fed Author: Bard Liao Date: Tue Jan 5 14:22:11 2016 +0800 ASoC: rt5645: improve IRQ reaction time for HS button IRQ reaction time is not immediate when headset putton is pressed. This patch shortens the reaction time. Signed-off-by: John Lin Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 1 + 1 file changed, 1 insertion(+) commit f930896967fa3f9ab16a6f87267b92798308d48f Author: Ard Biesheuvel Date: Tue Jan 5 10:18:52 2016 +0100 arm64: module: avoid undefined shift behavior in reloc_data() Compilers may engage the improbability drive when encountering shifts by a distance that is a multiple of the size of the operand type. Since the required bounds check is very simple here, we can get rid of all the fuzzy masking, shifting and comparing, and use the documented bounds directly. Reported-by: David Binderman Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/module.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit b24a557527f97ad88619d5bd4c8017c635056d69 Author: Ard Biesheuvel Date: Tue Jan 5 10:18:51 2016 +0100 arm64: module: fix relocation of movz instruction with negative immediate The test whether a movz instruction with a signed immediate should be turned into a movn instruction (i.e., when the immediate is negative) is flawed, since the value of imm is always positive. Also, the subsequent bounds check is incorrect since the limit update never executes, due to the fact that the imm_type comparison will always be false for negative signed immediates. Let's fix this by performing the sign test on sval directly, and replacing the bounds check with a simple comparison against U16_MAX. Signed-off-by: Ard Biesheuvel [will: tidied up use of sval, renamed MOVK enum value to MOVKZ] Signed-off-by: Will Deacon arch/arm64/kernel/module.c | 51 ++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 33 deletions(-) commit 598bcc6ea6ec4032d2ace8b1b43d11b4708af072 Merge: 0bed4b7 e679660 Author: Russell King Date: Tue Jan 5 11:07:28 2016 +0000 Merge branches 'misc' and 'misc-rc6' into for-linus commit 1609bac8af31f4a21bf330583c8a447e6f3d6155 Author: Christoph Hellwig Date: Mon Jan 4 12:33:13 2016 +0100 configfs: add myself as co-maintainer, updated git tree Signed-off-by: Christoph Hellwig Signed-off-by: Joel Becker MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09dd5f9e240e738b4d5e2e602c3b66659babf068 Author: Linus Walleij Date: Mon Dec 7 15:31:58 2015 +0100 gpio: fix misleading comment We are not relying on container_of() now that we have gpiochip_get_data(). Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4eab22e748b550045b8a98be3b72f31e22557605 Author: Linus Walleij Date: Tue Dec 8 10:41:44 2015 +0100 gpio: convert remaining users to gpiochip_add_data() For completion, sweep the floor from all gpiochip_add() usage so we can remove that function and get rid of the function wrapper gpiochip_add(). Signed-off-by: Linus Walleij drivers/gpio/gpio-ich.c | 2 +- drivers/gpio/gpio-iop.c | 2 +- drivers/gpio/gpio-janz-ttl.c | 2 +- drivers/gpio/gpio-ks8695.c | 2 +- drivers/gpio/gpio-loongson.c | 2 +- drivers/gpio/gpio-sa1100.c | 2 +- drivers/gpio/gpio-tegra.c | 2 +- drivers/gpio/gpio-twl6040.c | 2 +- drivers/gpio/gpio-vr41xx.c | 2 +- drivers/gpio/gpio-xtensa.c | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) commit 31a8944752f8a91d8591148f60cd6dfb08c4e415 Author: Linus Walleij Date: Mon Dec 7 15:29:53 2015 +0100 gpio: zynq: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Michal Simek Cc: Sören Brinkmann Signed-off-by: Linus Walleij drivers/gpio/gpio-zynq.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 17758b0490e6ce100648f80cd611ef360a69432a Author: Linus Walleij Date: Mon Dec 7 15:27:49 2015 +0100 gpio: zx: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Jun Nie Signed-off-by: Linus Walleij drivers/gpio/gpio-zx.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 9a3ad668a081163ad5108a6f5d3a7ddaa0390098 Author: Linus Walleij Date: Mon Dec 7 15:26:02 2015 +0100 gpio: zevio: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Fabian Vogt Signed-off-by: Linus Walleij drivers/gpio/gpio-zevio.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit e730a5953af4c54a50fb7712af4dd9468dedcd22 Author: Linus Walleij Date: Mon Dec 7 15:22:31 2015 +0100 gpio: xlp: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Kamlakant Patel Signed-off-by: Linus Walleij drivers/gpio/gpio-xlp.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 097d88e94c44112327011f572c7fff82a44c1d54 Author: Linus Walleij Date: Mon Dec 7 15:20:17 2015 +0100 gpio: xilinx: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Michal Simek Cc: Sören Brinkmann Signed-off-by: Linus Walleij drivers/gpio/gpio-xilinx.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit ac9dc85eeaf2e8f19a1846979c4dc700d4fb54dc Author: Linus Walleij Date: Mon Dec 7 15:16:50 2015 +0100 gpio: xgene: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Feng Kan Signed-off-by: Linus Walleij drivers/gpio/gpio-xgene.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 765aa58778a5726a026a72773dda4d97036d3d1d Author: Linus Walleij Date: Mon Dec 7 15:15:30 2015 +0100 gpio: wm8994: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: patches@opensource.wolfsonmicro.com Cc: Mark Brown Acked-by: Charles Keepax Signed-off-by: Linus Walleij drivers/gpio/gpio-wm8994.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit dfcdf7214ec921d792d93a4f5602da2073043073 Author: Linus Walleij Date: Mon Dec 7 15:13:39 2015 +0100 gpio: wm8350: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: patches@opensource.wolfsonmicro.com Cc: Mark Brown Acked-by: Charles Keepax Signed-off-by: Linus Walleij drivers/gpio/gpio-wm8350.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 9b3c817b529e0bbe0d5a0a45e86e8647a729640c Author: Linus Walleij Date: Mon Dec 7 15:11:34 2015 +0100 gpio: wm831x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: patches@opensource.wolfsonmicro.com Cc: Mark Brown Acked-by: Charles Keepax Signed-off-by: Linus Walleij drivers/gpio/gpio-wm831x.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 9355879ea42b84914ab27064df6760b2a7db0883 Author: Linus Walleij Date: Mon Dec 7 15:09:57 2015 +0100 gpio: vx855: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-vx855.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2a873c8d623023ecfde33542729bfb682fcd0f12 Author: Linus Walleij Date: Mon Dec 7 15:08:00 2015 +0100 gpio: viperboard: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Lars Poeschel Signed-off-by: Linus Walleij drivers/gpio/gpio-viperboard.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit 65389b490089fa387052b5946a4dc2f637eaeb9a Author: Linus Walleij Date: Mon Dec 7 15:03:30 2015 +0100 gpio: vf610: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Stefan Agner Signed-off-by: Linus Walleij drivers/gpio/gpio-vf610.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 9af4f0ab8af889cebbfd4dd70d2aa469c4f161da Author: Linus Walleij Date: Mon Dec 7 15:01:14 2015 +0100 gpio: ucb1400: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-ucb1400.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 7020e7c513e91a2e18ab67935e657c4de17e9043 Author: Linus Walleij Date: Mon Dec 7 14:58:56 2015 +0100 gpio: tz1090: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: James Hogan Signed-off-by: Linus Walleij drivers/gpio/gpio-tz1090.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 059e3972d00760e7d6dda54789fbbe05acf186a1 Author: Linus Walleij Date: Mon Dec 7 14:57:25 2015 +0100 gpio: tz1090-pdc: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: James Hogan Signed-off-by: Linus Walleij drivers/gpio/gpio-tz1090-pdc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 231a8680b78260f5d9905beaf36741fcf9940a29 Author: Linus Walleij Date: Mon Dec 7 14:55:07 2015 +0100 gpio: twl4030: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Roger Quadros Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-twl4030.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 11ab89ac4d9f3fad9737e32f40f475fb9d301232 Author: Linus Walleij Date: Mon Dec 7 14:52:55 2015 +0100 gpio: ts5500: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Vivien Didelot Signed-off-by: Linus Walleij drivers/gpio/gpio-ts5500.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit ad8dd23c458fcc06c0b9045a6b7b8357f3e717b9 Author: Linus Walleij Date: Mon Dec 7 14:50:42 2015 +0100 gpio: tps65912: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Nicolas Saenz Julienne Cc: Margarita Olaya Signed-off-by: Linus Walleij drivers/gpio/gpio-tps65912.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit b7c17b1b97d3b5cbbcc0e902823b7ade5dbb4c4a Author: Linus Walleij Date: Mon Dec 7 14:48:49 2015 +0100 gpio: tps65910: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-By: Rhyland Klein Acked-by: Laxman Dewangan Signed-off-by: Linus Walleij drivers/gpio/gpio-tps65910.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 94a90370427fb927442c0a00180ddbaf08f577df Author: Linus Walleij Date: Mon Dec 7 14:46:45 2015 +0100 gpio: tps6586x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Laxman Dewangan Signed-off-by: Linus Walleij drivers/gpio/gpio-tps6586x.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 92a41e2f73879373a4ce2df4b2137d03ba1289ec Author: Linus Walleij Date: Mon Dec 7 14:43:28 2015 +0100 gpio: timberdale: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-timberdale.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b0d384733c05906b807cbb9a1b732ad12b521dbe Author: Linus Walleij Date: Thu Dec 3 15:37:29 2015 +0100 gpio: tc3589x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-tc3589x.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 0ca8c5c4af758b2a8d763b33508f99a3116c3c01 Author: Linus Walleij Date: Mon Dec 7 14:41:02 2015 +0100 gpio: tb10x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Christian Ruppert Signed-off-by: Linus Walleij drivers/gpio/gpio-tb10x.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit d27ad7a833443fe0c4247129ab97105f1d845cda Author: Linus Walleij Date: Mon Dec 7 14:38:36 2015 +0100 gpio: syscon: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Alexander Shiyan Signed-off-by: Linus Walleij drivers/gpio/gpio-syscon.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 5b90b8c217e92ce9f027af5aa2cb12bdbbd2127a Author: Linus Walleij Date: Mon Dec 7 14:36:31 2015 +0100 gpio: sx150x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Wei Chen Signed-off-by: Linus Walleij drivers/gpio/gpio-sx150x.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit c63b30b08971ad5894061841a2c7f012eea747c0 Author: Linus Walleij Date: Mon Dec 7 14:34:33 2015 +0100 gpio: stp-xway: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Martin Blumenstingl Signed-off-by: Linus Walleij drivers/gpio/gpio-stp-xway.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b03c04a0aab1715ca8c501d41f9175a9047ef79f Author: Linus Walleij Date: Mon Dec 7 14:32:13 2015 +0100 gpio: stmpe: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Bhupesh Sharma Signed-off-by: Linus Walleij drivers/gpio/gpio-stmpe.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 0b2c529a3b4d78d700c616e146411594a60cab18 Author: Linus Walleij Date: Mon Dec 7 14:29:48 2015 +0100 gpio: sta2x11: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Alessandro Rubini Signed-off-by: Linus Walleij drivers/gpio/gpio-sta2x11.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c0ad184adb74d30b9010ecdec955d63481f79101 Author: Linus Walleij Date: Mon Dec 7 14:26:58 2015 +0100 gpio: spear-spics: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Shiraz Hashim Signed-off-by: Linus Walleij drivers/gpio/gpio-spear-spics.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 8ca7f1fab866a0ce22c878cb824ba5f73c3e0556 Author: Linus Walleij Date: Mon Dec 7 14:24:24 2015 +0100 gpio: sch311x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Bruno Randolf Signed-off-by: Linus Walleij drivers/gpio/gpio-sch311x.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 737c8fccf1c5b2aae3c6d9a66dce17e35fc39b71 Author: Linus Walleij Date: Mon Dec 7 14:21:49 2015 +0100 gpio: sch: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Chang Rebecca Swee Fun Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpio-sch.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit ff4cd029c184f5dabdfe9e115bf657ebd6a2c0f3 Author: Linus Walleij Date: Mon Dec 7 14:19:19 2015 +0100 gpio: samsung: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Paul Bolle Cc: Kukjin Kim Acked-by: Tomasz Figa Signed-off-by: Linus Walleij drivers/gpio/gpio-samsung.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78132252cc4c6cecec25491a7bcfb6567bf29147 Author: Linus Walleij Date: Mon Dec 7 14:16:19 2015 +0100 gpio: rdc321x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-rdc321x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c7b6f457cb53bceece484f4c528d1c149995e6c7 Author: Linus Walleij Date: Mon Dec 7 14:12:45 2015 +0100 gpio: rcar: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Ulrich Hecht Cc: Geert Uytterhoeven Cc: Hisashi Nakamura Signed-off-by: Linus Walleij drivers/gpio/gpio-rcar.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit d660c68eb5b24051a4765d473765d9021a720975 Author: Linus Walleij Date: Mon Dec 7 14:08:12 2015 +0100 gpio: rc5t583: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Laxman Dewangan Signed-off-by: Linus Walleij drivers/gpio/gpio-rc5t583.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 81d0c31d11846f282f08ff81219ff6b7230a78b1 Author: Linus Walleij Date: Mon Dec 7 11:42:22 2015 +0100 gpio: pxa: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Daniel Mack Acked-by: Robert Jarzmik Signed-off-by: Linus Walleij drivers/gpio/gpio-pxa.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d81b37fcad764c7babd7dd858aeb1b9afd2df5cc Author: Linus Walleij Date: Mon Dec 7 11:37:33 2015 +0100 gpio: pl061: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Haojian Zhuang Signed-off-by: Linus Walleij drivers/gpio/gpio-pl061.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 510f48713711abed9a79aa405147687dd256d072 Author: Linus Walleij Date: Mon Dec 7 11:34:53 2015 +0100 gpio: pch: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Thierry Reding Cc: Daniel Krueger Reviewed-by: Jean Delvare Signed-off-by: Linus Walleij drivers/gpio/gpio-pch.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 597358e41070e03479a7724b16eb3c6c7ea50027 Author: Linus Walleij Date: Mon Dec 7 11:24:05 2015 +0100 gpio: pcf857x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Grygorii Strashko Cc: George Cherian Cc: Laurent Pinchart Signed-off-by: Linus Walleij drivers/gpio/gpio-pcf857x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 468e67f6eb7494e3c4d4d644f281d0ba0cc265c6 Author: Linus Walleij Date: Mon Dec 7 11:20:54 2015 +0100 gpio: pca953x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Grygorii Strashko Cc: Markus Pargmann Cc: Toby Smith Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 5b68cc2d5963e2241d36f07c5f5964d54fa7bc6f Author: Linus Walleij Date: Mon Dec 7 11:18:17 2015 +0100 gpio: palmas: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Andrew Chew Cc: Stephen Warren Acked-by: Laxman Dewangan Signed-off-by: Linus Walleij drivers/gpio/gpio-palmas.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit d99f7aec6e8b4ffe10d6df71d17d2c5cbef2ac65 Author: Linus Walleij Date: Mon Dec 7 11:16:00 2015 +0100 gpio: omap: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Grygorii Strashko Cc: Tony Lindgren Acked-by: Santosh Shilimkar Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit f5cc554e1cf17482781069b671090d3a35d5413b Author: Linus Walleij Date: Mon Dec 7 11:13:27 2015 +0100 gpio: octeon: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Reviewed-by: David Daney Signed-off-by: Linus Walleij drivers/gpio/gpio-octeon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bbe760041a05d51746f1b1cd658aaef91466bafc Author: Linus Walleij Date: Mon Dec 7 11:09:24 2015 +0100 gpio: mvebu: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Gregory CLEMENT Cc: Thomas Petazzoni Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit a772a26da7cf605ed33382d7822ebfac18c6b1ef Author: Linus Walleij Date: Mon Dec 7 10:37:39 2015 +0100 gpio: msic: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Mathias Nyman Signed-off-by: Linus Walleij drivers/gpio/gpio-msic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 709d71a17c3383eca79ce9142b8d4ddc0f8028d0 Author: Linus Walleij Date: Mon Dec 7 10:34:28 2015 +0100 gpio: mpc8xxx: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Uwe Kleine-König Acked-by: Alexander Stein Signed-off-by: Linus Walleij drivers/gpio/gpio-mpc8xxx.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 837c2705a3d5adca3ff5532d9cb6215803bea5f2 Author: Linus Walleij Date: Mon Dec 7 10:25:36 2015 +0100 gpio: mpc5200: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-mpc5200.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 6aa7dbfa28775189c53f6ac7f1bc4adf76c9d2ec Author: Linus Walleij Date: Mon Dec 7 10:19:29 2015 +0100 gpio: mm-lantiq: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Ricardo Ribalda Delgado Cc: John Crispin Signed-off-by: Linus Walleij drivers/gpio/gpio-mm-lantiq.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 47315578b9894140bef11e2b0fab55d2706e055c Author: Linus Walleij Date: Mon Dec 7 10:12:05 2015 +0100 gpio: ml-ioh: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Feng Tang Cc: Tomoya MORINAGA Signed-off-by: Linus Walleij drivers/gpio/gpio-ml-ioh.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9e03cf0b12f19ef5dd8f113350e26b6d425ebbcb Author: Linus Walleij Date: Mon Dec 7 10:09:36 2015 +0100 gpio: mcp: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Sonic Zhang Acked-by: Alexander Stein Signed-off-by: Linus Walleij drivers/gpio/gpio-mcp23s08.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit cf90c9e35be883d8ebcca3d4a2b1044a234f24d8 Author: Linus Walleij Date: Mon Dec 7 10:07:07 2015 +0100 gpio: mc9s08dz60: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: wu guoxing Signed-off-by: Linus Walleij drivers/gpio/gpio-mc9s08dz60.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 609f9692ccd7034aaf620a6cd4ec1b6fb9ba4c7b Author: Linus Walleij Date: Mon Dec 7 10:04:32 2015 +0100 gpio: mc33880: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-mc33880.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01f76b267bdfaae5ead2fff5de7c80c81ffff1b4 Author: Linus Walleij Date: Mon Dec 7 10:01:36 2015 +0100 gpio: mb86s7x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-By: Jassi Brar Signed-off-by: Linus Walleij drivers/gpio/gpio-mb86s7x.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 0788b6448067f51c53ef0514a82e3d89f91dfabd Author: Linus Walleij Date: Mon Dec 7 09:58:28 2015 +0100 gpio: max732x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Nicholas Krause Cc: Marek Vasut Cc: Semen Protsenko Signed-off-by: Linus Walleij drivers/gpio/gpio-max732x.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 5e45e019161977c70e236a043133cfa106cebbd9 Author: Linus Walleij Date: Mon Dec 7 09:27:05 2015 +0100 gpio: max730x: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Roland Stigge Signed-off-by: Linus Walleij drivers/gpio/gpio-max730x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f291e0063ba6c19ec3b60cce08293f78c0faf969 Author: Linus Walleij Date: Mon Dec 7 09:21:55 2015 +0100 gpio: lynxpoint: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Mathias Nyman Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpio-lynxpoint.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit a9bc97e43f56c0cf9a3f7528f0ed012fe352207c Author: Linus Walleij Date: Mon Dec 7 09:18:23 2015 +0100 gpio: lpc32xx: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Roland Stigge Acked-by: Vladimir Zapolskiy Signed-off-by: Linus Walleij drivers/gpio/gpio-lpc32xx.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit d3de31d467a13d50b4fc23407972cce61b2120a8 Author: Linus Walleij Date: Mon Dec 7 09:13:57 2015 +0100 gpio: lpc18xx: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Joachim Eastwood Signed-off-by: Linus Walleij drivers/gpio/gpio-lpc18xx.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit a2f33804657dbd347c4ae23c4e75dbfe950d89d4 Author: Linus Walleij Date: Mon Dec 7 09:10:13 2015 +0100 gpio: lp3943: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Milo Kim Signed-off-by: Linus Walleij drivers/gpio/gpio-lp3943.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 1f89bccd7fe4f27b05b6404f24a35dcc5426817d Author: Linus Walleij Date: Mon Dec 7 09:06:22 2015 +0100 gpio: kempld: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Brunner Michael Cc: Guenter Roeck Signed-off-by: Linus Walleij drivers/gpio/gpio-kempld.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 0a38fd94c20e6636c22630200a9cece122a89f0e Author: Linus Walleij Date: Mon Dec 7 09:03:09 2015 +0100 gpio: it87: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Diego Elio Pettenò Signed-off-by: Linus Walleij drivers/gpio/gpio-it87.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 5c77c0212b97693219ead6dcddf7e036421012d7 Author: Linus Walleij Date: Sun Dec 6 10:55:28 2015 +0100 gpio: intel-mid: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: David Cohen Signed-off-by: Linus Walleij drivers/gpio/gpio-intel-mid.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit f372d5f59cc4879eee3efe19e309f95c4078d748 Author: Linus Walleij Date: Sun Dec 6 10:51:13 2015 +0100 gpio: f7188: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Andreas Bofjall Cc: Simon Guinot Signed-off-by: Linus Walleij drivers/gpio/gpio-f7188x.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 6219e7bba9d52ea5d40cd50d0cfe6059c2630fab Author: Linus Walleij Date: Sun Dec 6 00:36:39 2015 +0100 gpio: em: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Geert Uytterhoeven Cc: Magnus Damm Signed-off-by: Linus Walleij drivers/gpio/gpio-em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1880657a15842d2e617789f98a7a68f61c870592 Author: Linus Walleij Date: Sun Dec 6 00:32:16 2015 +0100 gpio: dln2: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Octavian Purdila Cc: Daniel Baluta Signed-off-by: Linus Walleij drivers/gpio/gpio-dln2.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 72a1ca2cb9f415e01c2e6c1b84f172f188daf8d4 Author: Linus Walleij Date: Fri Dec 4 16:25:04 2015 +0100 gpio: davinci: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Grygorii Strashko Cc: Sekhar Nori Cc: Santosh Shilimkar Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 552dd7959c7d2c4f60ea4fc1f06985db76ec2beb Author: Linus Walleij Date: Fri Dec 4 16:21:53 2015 +0100 gpio: da9055: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Ashish Jangam Signed-off-by: Linus Walleij drivers/gpio/gpio-da9055.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 0f6082d2b811ec56c4f7ecdde80410e17cf04452 Author: Linus Walleij Date: Fri Dec 4 16:19:52 2015 +0100 gpio: da9052: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Ashish Jangam Signed-off-by: Linus Walleij drivers/gpio/gpio-da9052.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit c634fc19fe39f49a00d0e8e922a60ae24b8855b1 Author: Linus Walleij Date: Fri Dec 4 15:53:04 2015 +0100 gpio: cs5535: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Fabian Frederick Signed-off-by: Linus Walleij drivers/gpio/gpio-cs5535.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 435cc3d4286566c904c5ff63475ba9eb1e61e3e6 Author: Linus Walleij Date: Fri Dec 4 15:47:54 2015 +0100 gpio: crystalcove: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Shobhit Kumar Cc: Zhu, Lejun Signed-off-by: Linus Walleij drivers/gpio/gpio-crystalcove.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit e51b55236ca61a87bf8d1d61e8366726f7ea704c Author: Linus Walleij Date: Fri Dec 4 15:44:16 2015 +0100 gpio: bt8xx: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Michael Buesch Signed-off-by: Linus Walleij drivers/gpio/gpio-bt8xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ba4a74485a32c1a5ea04e9ce9318cd73ed746fe2 Author: Linus Walleij Date: Fri Dec 4 15:39:50 2015 +0100 gpio: bcm-kona: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Markus Mayer Cc: Tim Kryger Cc: Matt Porter Signed-off-by: Linus Walleij drivers/gpio/gpio-bcm-kona.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit b4e97a61255cde7e5b2f2484140547ba37c7292c Author: Linus Walleij Date: Fri Dec 4 15:36:14 2015 +0100 gpio: ath79: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: Alban Bedel Signed-off-by: Linus Walleij drivers/gpio/gpio-ath79.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 18992d4ee577838e0fa006bad46d83cafccffbb3 Author: Linus Walleij Date: Fri Dec 4 15:31:31 2015 +0100 gpio: arizona: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Richard Fitzgerald Cc: Mark Brown Reviewed-by: Richard Fitzgerald Signed-off-by: Linus Walleij drivers/gpio/gpio-arizona.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit fb7228879a5a6552c9cd91561ca7c9b565a102aa Author: Linus Walleij Date: Fri Dec 4 15:29:41 2015 +0100 gpio: amdpt: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: YD Tseng Signed-off-by: Linus Walleij drivers/gpio/gpio-amdpt.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 57683ec203a642e8fc8befac94c8341d237f5d54 Author: Linus Walleij Date: Fri Dec 4 15:26:35 2015 +0100 gpio: amd8111: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Dmitry Eremin-Solenikov Signed-off-by: Linus Walleij drivers/gpio/gpio-amd8111.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 397d0773a9044c8df1be87e53840ab374932d80c Author: Linus Walleij Date: Fri Dec 4 15:16:43 2015 +0100 gpio: altera: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Tien Hock Loh Signed-off-by: Linus Walleij drivers/gpio/gpio-altera.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit f69255ce67b6e6f496d165b48231075262c9a225 Author: Linus Walleij Date: Fri Dec 4 15:05:34 2015 +0100 gpio: adp5588: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Jean-Francois Dagenais Signed-off-by: Linus Walleij drivers/gpio/gpio-adp5588.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 5060e0e8934ca6685ea8bf185cbe0fa2118a946e Author: Linus Walleij Date: Fri Dec 4 15:01:50 2015 +0100 gpio: adp5520: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-adp5520.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1e69c4fe2a67a63e6b392338dd01627ee26f9ca3 Author: Linus Walleij Date: Fri Dec 4 14:56:15 2015 +0100 gpio: adnp: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Signed-off-by: Linus Walleij drivers/gpio/gpio-adnp.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit b2afc6f3522c8f49a420cb77f5a9c51fe1d50e33 Author: Linus Walleij Date: Thu Dec 3 18:20:29 2015 +0100 gpio: 74x164: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Alexander Shiyan Signed-off-by: Linus Walleij drivers/gpio/gpio-74x164.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit d602ae90a35e66c418189e917395408dd2e85e20 Author: Linus Walleij Date: Thu Dec 3 18:18:06 2015 +0100 gpio: 104-idio-16: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idio-16.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 1f36bec53f045c72707b40723d70d39ba1099122 Author: Linus Walleij Date: Thu Dec 3 15:31:48 2015 +0100 gpio: 104-idi-48: use gpiochip data pointer This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idi-48.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 0f4630f3720e7e6e921bf525c8357fea7ef3dbab Author: Linus Walleij Date: Fri Dec 4 14:02:58 2015 +0100 gpio: generic: factor into gpio_chip struct The separate struct bgpio_chip has been a pain to handle, both by being confusingly similar in name to struct gpio_chip and for being contained inside a struct so that struct gpio_chip is contained in a struct contained in a struct, making several steps of dereferencing necessary. Make things simpler: include the fields directly into , #ifdef:ed for CONFIG_GENERIC_GPIO, and get rid of the altogether. Prefix some of the member variables with bgpio_* and add proper kerneldoc while we're at it. Modify all users to handle the change and use a struct gpio_chip directly. And while we're at it: replace all container_of() dereferencing by gpiochip_get_data() and registering the gpio_chip with gpiochip_add_data(). Cc: arm@kernel.org Cc: Alexander Shiyan Cc: Shawn Guo Cc: Sascha Hauer Cc: Kukjin Kim Cc: Alexandre Courbot Cc: Brian Norris Cc: Florian Fainelli Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Nicolas Pitre Cc: Olof Johansson Cc: Vladimir Zapolskiy Cc: Rabin Vincent Cc: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Acked-by: Gregory Fong Acked-by: Liviu Dudau Acked-by: H Hartley Sweeten Acked-by: Tony Lindgren Acked-by: Krzysztof Kozlowski Acked-by: Lee Jones Signed-off-by: Linus Walleij arch/arm/mach-clps711x/board-autcpu12.c | 2 +- arch/arm/mach-clps711x/board-p720t.c | 2 +- arch/arm/mach-imx/mach-mx21ads.c | 2 +- arch/arm/mach-omap1/board-ams-delta.c | 2 +- arch/arm/mach-s3c64xx/mach-crag6410.c | 2 +- drivers/gpio/gpio-74xx-mmio.c | 37 ++-- drivers/gpio/gpio-brcmstb.c | 80 ++++----- drivers/gpio/gpio-clps711x.c | 28 +-- drivers/gpio/gpio-dwapb.c | 92 +++++----- drivers/gpio/gpio-ep93xx.c | 25 +-- drivers/gpio/gpio-etraxfs.c | 49 +++--- drivers/gpio/gpio-ge.c | 24 +-- drivers/gpio/gpio-generic.c | 292 +++++++++++++++----------------- drivers/gpio/gpio-grgpio.c | 73 ++++---- drivers/gpio/gpio-moxart.c | 29 ++-- drivers/gpio/gpio-mxc.c | 27 ++- drivers/gpio/gpio-mxs.c | 33 ++-- drivers/gpio/gpio-sodaville.c | 13 +- drivers/gpio/gpio-xgene-sb.c | 40 ++--- drivers/mfd/vexpress-sysreg.c | 8 +- include/linux/basic_mmio_gpio.h | 80 --------- include/linux/gpio/driver.h | 54 ++++++ 22 files changed, 442 insertions(+), 552 deletions(-) commit 3208b0f0c010b26e4d461a3bca59989d03ed9087 Author: Linus Walleij Date: Fri Dec 4 15:13:53 2015 +0100 gpio: of: provide optional of_mm_gpiochip_add_data() function In the same spirit as we add an optional void *data argument to the gpiochip_add_data() call, we need this also for of_mm_gpiochip_add(). Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 12 +++++++----- include/linux/of_gpio.h | 10 ++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) commit b08ea35a3296ee25c4cb53a977b752266dafa2c2 Author: Linus Walleij Date: Thu Dec 3 15:14:13 2015 +0100 gpio: add a data pointer to gpio_chip This adds a void * pointer to gpio_chip so that driver can assign and retrieve some states. This is done to get rid of container_of() calls for gpio_chips embedded inside state containers, so we can remove the need to have the gpio_chip or later (planned) struct gpio_device be dynamically allocated at registration time, so that its struct device can be properly reference counted and not bound to its parent device (e.g. a platform_device) but instead live on after unregistration if it is opened by e.g. a char device or sysfs. The data is added with the new function gpiochip_add_data() and for compatibility we add static inline wrapper function gpiochip_add() that will call gpiochip_add_data() with NULL as argument. The latter will be removed once we have exorcised gpiochip_add() from the kernel. gpiochip_get_data() is added as a static inline accessor for drivers to quickly get their data out. Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 10 ++++++---- include/linux/gpio/driver.h | 14 +++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) commit 41d107ad92b4b8abf103b62269c34da80320f212 Author: Dan Carpenter Date: Tue Jan 5 12:56:37 2016 +0300 gpio: pxa: checking IS_ERR() instead of NULL irq_domain_add_legacy() returns NULL on error, it doesn't return error pointers. Fixes: 384ca3c6a28d ('gpio: pxa: change the interrupt management') Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij drivers/gpio/gpio-pxa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aab24a897cfba9dd371f6aac45dbcdae0b23def6 Author: Vegard Nossum Date: Fri Jan 1 17:34:05 2016 +0100 kconfig: return 'false' instead of 'no' in bool function menu_is_visible() is a bool function and should use boolean return values. "no" is a tristate value which happens to also have a value of 0, but we should nevertheless use the right symbol for it. This is a very minor cleanup with no semantic change. Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility") Cc: Arnaud Lacombe Cc: Mauro Carvalho Chehab Signed-off-by: Vegard Nossum Signed-off-by: Michal Marek scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b63739efabc93d67d2b6812dd0cd41358fadf29 Author: Linus Walleij Date: Tue Jan 5 11:13:28 2016 +0100 gpio: generic: fix signedness bug found by cppcheck cppcheck reports this: (style) int result is returned as long value. If the return value is long to avoid loss of information, then you have loss of information. This can be fixed with (1UL << pin) but that is the same as using that already use 1UL so take this approach. Reported-by: David Binderman Signed-off-by: Linus Walleij drivers/gpio/gpio-generic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2039e6acaf94d83ec6b6d9f3d0bce7ea1f099918 Author: Toshi Kani Date: Tue Dec 22 17:54:24 2015 -0700 x86/mm/pat: Change free_memtype() to support shrinking case Using mremap() to shrink the map size of a VM_PFNMAP range causes the following error message, and leaves the pfn range allocated. x86/PAT: test:3493 freeing invalid memtype [mem 0x483200000-0x4863fffff] This is because rbt_memtype_erase(), called from free_memtype() with spin_lock held, only supports to free a whole memtype node in memtype_rbroot. Therefore, this patch changes rbt_memtype_erase() to support a request that shrinks the size of a memtype node for mremap(). memtype_rb_exact_match() is renamed to memtype_rb_match(), and is enhanced to support EXACT_MATCH and END_MATCH in @match_type. Since the memtype_rbroot tree allows overlapping ranges, rbt_memtype_erase() checks with EXACT_MATCH first, i.e. free a whole node for the munmap case. If no such entry is found, it then checks with END_MATCH, i.e. shrink the size of a node from the end for the mremap case. On the mremap case, rbt_memtype_erase() proceeds in two steps, 1) remove the node, and then 2) insert the updated node. This allows proper update of augmented values, subtree_max_end, in the tree. Signed-off-by: Toshi Kani Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Borislav Petkov Cc: stsp@list.ru Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/1450832064-10093-3-git-send-email-toshi.kani@hpe.com Signed-off-by: Thomas Gleixner arch/x86/mm/pat.c | 2 +- arch/x86/mm/pat_rbtree.c | 52 +++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 10 deletions(-) commit d9fe4fab11976e56b2e992980bf6ce948bdf02ac Author: Toshi Kani Date: Tue Dec 22 17:54:23 2015 -0700 x86/mm/pat: Add untrack_pfn_moved for mremap mremap() with MREMAP_FIXED on a VM_PFNMAP range causes the following WARN_ON_ONCE() message in untrack_pfn(). WARNING: CPU: 1 PID: 3493 at arch/x86/mm/pat.c:985 untrack_pfn+0xbd/0xd0() Call Trace: [] dump_stack+0x45/0x57 [] warn_slowpath_common+0x86/0xc0 [] warn_slowpath_null+0x1a/0x20 [] untrack_pfn+0xbd/0xd0 [] unmap_single_vma+0x80e/0x860 [] unmap_vmas+0x55/0xb0 [] unmap_region+0xac/0x120 [] do_munmap+0x28a/0x460 [] move_vma+0x1b3/0x2e0 [] SyS_mremap+0x3b3/0x510 [] entry_SYSCALL_64_fastpath+0x12/0x71 MREMAP_FIXED moves a pfnmap from old vma to new vma. untrack_pfn() is called with the old vma after its pfnmap page table has been removed, which causes follow_phys() to fail. The new vma has a new pfnmap to the same pfn & cache type with VM_PAT set. Therefore, we only need to clear VM_PAT from the old vma in this case. Add untrack_pfn_moved(), which clears VM_PAT from a given old vma. move_vma() is changed to call this function with the old vma when VM_PFNMAP is set. move_vma() then calls do_munmap(), and untrack_pfn() is a no-op since VM_PAT is cleared. Reported-by: Stas Sergeev Signed-off-by: Toshi Kani Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Borislav Petkov Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/1450832064-10093-2-git-send-email-toshi.kani@hpe.com Signed-off-by: Thomas Gleixner arch/x86/mm/pat.c | 10 ++++++++++ include/asm-generic/pgtable.h | 10 +++++++++- mm/mremap.c | 4 ++++ 3 files changed, 23 insertions(+), 1 deletion(-) commit 13e676be085341c1161c3daf535e98ec6d5d6e3c Author: Linus Walleij Date: Mon Dec 21 23:03:02 2015 +0100 fbdev: via-gpio: Be sure to clamp return value As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Florian Tobias Schandinat Acked-by: Tomi Valkeinen Signed-off-by: Linus Walleij drivers/video/fbdev/via/via-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33203f5b94338564bceed3e0ce33028f4732ae5c Author: Linus Walleij Date: Tue Jan 5 10:23:28 2016 +0100 pinctrl: qcom: fix up errorpath This fixes up: commit 464231fb1fb1360399a2eb11479c47e39facb030 "pinctrl: ssbi-gpio: Be sure to clamp return value" commit b9164f049339006fafe8a52396e0f1997552214a "gpio: ssbi-mpp: Be sure to clamp return value" as I managed to screw up some of the logic when clamping the return values. Cc: Björn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 4 ++-- drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4cba68507cf58db99752cf79198beb4a85a9f8ce Author: Daniel Vetter Date: Tue Dec 8 09:49:20 2015 +0100 drm/atomic-helper: Reject legacy flips on a disabled pipe We want this for consistency with existing page_flip semantics. Since this spurred quite a discussion on IRC also document why we reject event generation when the pipe is off: It's not that it's hard to implement, but userspace has a track recording which proves that it's way too easy to accidentally abuse and cause havoc. We want to make sure userspace doesn't get away with that. v2: Somehow thought we do reject events already, but that code only existed in my imagination ... Also suggestions from Thierry. Cc: Daniel Stone Cc: Ville Syrjälä Cc: Thierry Reding Reviewed-by: Daniel Stone Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1449564561-3896-4-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic.c | 16 ++++++++++++++++ drivers/gpu/drm/drm_atomic_helper.c | 9 +++++++++ include/drm/drm_crtc.h | 3 ++- 3 files changed, 27 insertions(+), 1 deletion(-) commit 4cd9fa529d77dde8f760adb3d934dfac6e169b1e Author: Maarten Lankhorst Date: Mon Jan 4 12:53:18 2016 +0100 drm/atomic: add connector mask to drm_crtc_state. It can be useful to iterate over connectors without grabbing connection_mutex. It can also be used to see how many connectors are on a crtc without iterating over the list. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-4-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 11 +++++++++++ include/drm/drm_crtc.h | 3 +++ 2 files changed, 14 insertions(+) commit 5459a2ad9da0c93161f31cfda5d39e23b64d50f8 Author: Maarten Lankhorst Date: Mon Jan 4 12:53:17 2016 +0100 drm/tegra: Use __drm_atomic_helper_reset_connector for subclassing connector state, v2. Changes since v1: - Do not reset if state allocation fails. Signed-off-by: Maarten Lankhorst Acked-by: Thierry Reding #irc Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-3-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter drivers/gpu/drm/tegra/dsi.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 4cd39917ddb2fb5691e05b13b13f1f2398343b3e Author: Maarten Lankhorst Date: Mon Jan 4 12:53:16 2016 +0100 drm/atomic: Add __drm_atomic_helper_connector_reset, v2. This is useful for drivers that subclass connector_state, like tegra. Changes since v1: - Docbook updates. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-2-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_atomic_helper.c | 30 ++++++++++++++++++++++++++---- include/drm/drm_atomic_helper.h | 2 ++ 2 files changed, 28 insertions(+), 4 deletions(-) commit 5350a031247680590724a1badc112d1217f721d6 Author: Maarten Lankhorst Date: Mon Jan 4 12:53:15 2016 +0100 drm/i915: Set connector_state->connector using the helper. The atomic helper sets connector_state->connector, which the i915 code didn't. This will become a problem when we start using it. Signed-off-by: Maarten Lankhorst Acked-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-1-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0f646425b94a01606450eb03b3a8f3b5e03ea9b8 Author: Chris Wilson Date: Mon Jan 4 10:11:01 2016 +0000 drm: Use a normal idr allocation for the obj->name Unlike the handle, the name table uses a sleeping mutex rather than a spinlock. The allocation is in a normal context, and we can use the simpler sleeping gfp_t, rather than have to take from the atomic reserves. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1451902261-25380-3-git-send-email-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_gem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 98a8883ad419128493b8cfab3982d58785deabda Author: Chris Wilson Date: Mon Jan 4 10:11:00 2016 +0000 drm: Only bump object-reference count when adding first handle We only need a single reference count for all handles (i.e. non-zero obj->handle_count) and so can trim a few atomic operations by only taking the reference on the first handle and dropping it after the last. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1451902261-25380-2-git-send-email-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_gem.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 6984128d01cf935820a0563f3a00c6623ba58109 Author: Chris Wilson Date: Mon Jan 4 10:10:59 2016 +0000 drm: Balance error path for GEM handle allocation The current error path for failure when establishing a handle for a GEM object is unbalance, e.g. we call object_close() without calling first object_open(). Use the typical onion structure to only undo what has been set up prior to the error. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_gem.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 7b8ad495d59280b634a7b546f4cdf58cf4d65f61 Author: Vaibhav Jain Date: Tue Nov 24 16:26:18 2015 +0530 cxl: Fix DSI misses when the context owning task exits Presently when a user-space process issues CXL_IOCTL_START_WORK ioctl we store the pid of the current task_struct and use it to get pointer to the mm_struct of the process, while processing page or segment faults from the capi card. However this causes issues when the thread that had originally issued the start-work ioctl exits in which case the stored pid is no more valid and the cxl driver is unable to handle faults as the mm_struct corresponding to process is no more accessible. This patch fixes this issue by using the mm_struct of the next alive task in the thread group. This is done by iterating over all the tasks in the thread group starting from thread group leader and calling get_task_mm on each one of them. When a valid mm_struct is obtained the pid of the associated task is stored in the context replacing the exiting one for handling future faults. The patch introduces a new function named get_mem_context that checks if the current task pointed to by ctx->pid is dead? If yes it performs the steps described above. Also a new variable cxl_context.glpid is introduced which stores the pid of the thread group leader associated with the context owning task. Reported-by: Matthew R. Ochs Reported-by: Frank Haverkamp Suggested-by: Ian Munsie Signed-off-by: Vaibhav Jain Acked-by: Ian Munsie Reviewed-by: Frederic Barrat Reviewed-by: Matthew R. Ochs Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 2 +- drivers/misc/cxl/context.c | 6 ++- drivers/misc/cxl/cxl.h | 3 ++ drivers/misc/cxl/fault.c | 129 +++++++++++++++++++++++++++++++++------------ drivers/misc/cxl/file.c | 6 ++- 5 files changed, 109 insertions(+), 37 deletions(-) commit 6a5ef90c58daada158ba16ba330558efc3471491 Merge: ebb3cf4 3ca8e40 Author: David S. Miller Date: Mon Jan 4 22:49:59 2016 -0500 Merge branch 'faster-soreuseport' Craig Gallek says: ==================== Faster SO_REUSEPORT This series contains two optimizations for the SO_REUSEPORT feature: Faster lookup when selecting a socket for an incoming packet and the ability to select the socket from the group using a BPF program. This series only includes the UDP path. I plan to submit a follow-up including the TCP path if the implementation in this series is acceptable. Changes in v4: - pskb_may_pull is unnecessary with pskb_pull (per Alexei Starovoitov) Changes in v3: - skb_pull_inline -> pskb_pull (per Alexei Starovoitov) - reuseport_attach* -> sk_reuseport_attach* and simple return statement syntax change (per Daniel Borkmann) Changes in v2: - Fix ARM build; remove unnecessary include. - Handle case where protocol header is not in linear section (per Alexei Starovoitov). ==================== Signed-off-by: David S. Miller commit 3ca8e4029969d40ab90e3f1ecd83ab1cadd60fbb Author: Craig Gallek Date: Mon Jan 4 17:41:48 2016 -0500 soreuseport: BPF selection functional test This program will build classic and extended BPF programs and validate the socket selection logic when used with SO_ATTACH_REUSEPORT_CBPF and SO_ATTACH_REUSEPORT_EBPF. It also validates the re-programing flow and several edge cases. Signed-off-by: Craig Gallek Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/reuseport_bpf.c | 467 ++++++++++++++++++++++++++++ 3 files changed, 469 insertions(+), 1 deletion(-) commit 538950a1b7527a0a52ccd9337e3fcd304f027f13 Author: Craig Gallek Date: Mon Jan 4 17:41:47 2016 -0500 soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF Expose socket options for setting a classic or extended BPF program for use when selecting sockets in an SO_REUSEPORT group. These options can be used on the first socket to belong to a group before bind or on any socket in the group after bind. This change includes refactoring of the existing sk_filter code to allow reuse of the existing BPF filter validation checks. Signed-off-by: Craig Gallek Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller arch/alpha/include/uapi/asm/socket.h | 3 + arch/avr32/include/uapi/asm/socket.h | 3 + arch/frv/include/uapi/asm/socket.h | 3 + arch/ia64/include/uapi/asm/socket.h | 3 + arch/m32r/include/uapi/asm/socket.h | 3 + arch/mips/include/uapi/asm/socket.h | 3 + arch/mn10300/include/uapi/asm/socket.h | 3 + arch/parisc/include/uapi/asm/socket.h | 3 + arch/powerpc/include/uapi/asm/socket.h | 3 + arch/s390/include/uapi/asm/socket.h | 3 + arch/sparc/include/uapi/asm/socket.h | 3 + arch/xtensa/include/uapi/asm/socket.h | 3 + include/linux/filter.h | 2 + include/net/sock_reuseport.h | 10 ++- include/net/udp.h | 5 +- include/uapi/asm-generic/socket.h | 3 + net/core/filter.c | 121 +++++++++++++++++++++++++++------ net/core/sock.c | 29 ++++++++ net/core/sock_reuseport.c | 88 ++++++++++++++++++++++-- net/ipv4/udp.c | 14 ++-- net/ipv4/udp_diag.c | 4 +- net/ipv6/udp.c | 14 ++-- 22 files changed, 282 insertions(+), 44 deletions(-) commit e32ea7e747271a0abcd37e265005e97cc81d9df5 Author: Craig Gallek Date: Mon Jan 4 17:41:46 2016 -0500 soreuseport: fast reuseport UDP socket selection Include a struct sock_reuseport instance when a UDP socket binds to a specific address for the first time with the reuseport flag set. When selecting a socket for an incoming UDP packet, use the information available in sock_reuseport if present. This required adding an additional field to the UDP source address equality function to differentiate between exact and wildcard matches. The original use case allowed wildcard matches when checking for existing port uses during bind. The new use case of adding a socket to a reuseport group requires exact address matching. Performance test (using a machine with 2 CPU sockets and a total of 48 cores): Create reuseport groups of varying size. Use one socket from this group per user thread (pinning each thread to a different core) calling recvmmsg in a tight loop. Record number of messages received per second while saturating a 10G link. 10 sockets: 18% increase (~2.8M -> 3.3M pkts/s) 20 sockets: 14% increase (~2.9M -> 3.3M pkts/s) 40 sockets: 13% increase (~3.0M -> 3.4M pkts/s) This work is based off a similar implementation written by Ying Cai for implementing policy-based reuseport selection. Signed-off-by: Craig Gallek Signed-off-by: David S. Miller include/net/addrconf.h | 3 +- include/net/udp.h | 2 +- net/ipv4/udp.c | 119 +++++++++++++++++++++++++++++++-------- net/ipv6/inet6_connection_sock.c | 4 +- net/ipv6/udp.c | 48 +++++++++++++--- 5 files changed, 141 insertions(+), 35 deletions(-) commit ef456144da8ef507c8cf504284b6042e9201a05c Author: Craig Gallek Date: Mon Jan 4 17:41:45 2016 -0500 soreuseport: define reuseport groups struct sock_reuseport is an optional shared structure referenced by each socket belonging to a reuseport group. When a socket is bound to an address/port not yet in use and the reuseport flag has been set, the structure will be allocated and attached to the newly bound socket. When subsequent calls to bind are made for the same address/port, the shared structure will be updated to include the new socket and the newly bound socket will reference the group structure. Usually, when an incoming packet was destined for a reuseport group, all sockets in the same group needed to be considered before a dispatching decision was made. With this structure, an appropriate socket can be found after looking up just one socket in the group. This shared structure will also allow for more complicated decisions to be made when selecting a socket (eg a BPF filter). This work is based off a similar implementation written by Ying Cai for implementing policy-based reuseport selection. Signed-off-by: Craig Gallek Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 2 + include/net/sock_reuseport.h | 20 +++++ net/core/Makefile | 2 +- net/core/sock_reuseport.c | 173 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 196 insertions(+), 1 deletion(-) commit ebb3cf41c1a49e334e3fe540ee24a1afb7ed30c4 Merge: 46f85a9 6c72a3d Author: David S. Miller Date: Mon Jan 4 22:07:58 2016 -0500 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: couple of fixes Couple of fixes from Ido. ==================== Signed-off-by: David S. Miller commit 6c72a3d0d3e2b3055a04aa6124c2faa3420a30b1 Author: Ido Schimmel Date: Mon Jan 4 10:42:26 2016 +0100 mlxsw: spectrum: Change bridge port attributes only when bridged Bridge port attributes are offloaded to hardware when invoked with SELF flag set, but it really makes no sense to reflect them when port is not bridged. Allow a user to change these attribute only when port is bridged and initialize them correctly when joining or leaving a bridge. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 17 +++++++++++------ .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) commit 5a8f45258eb2ff9da1ee68aad96b1189df8af50e Author: Ido Schimmel Date: Mon Jan 4 10:42:25 2016 +0100 mlxsw: spectrum: Set bridge status in appropriate functions Set the bridge status of physical ports in the appropriate functions, to be consistent with LAG join/leave and vPorts joining/leaving bridge. Also, remove the error messages in these two functions, as we already emit errors in both the single functions they call. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 78124078c404f3ab790d98d651f059f62d361659 Author: Ido Schimmel Date: Mon Jan 4 10:42:24 2016 +0100 mlxsw: spectrum: Return NOTIFY_BAD on bridge failure It is possible for us to fail when joining or leaving a bridge, so let the user know about that by returning NOTIFY_BAD, as already done for LAG join/leave and 802.1D bridges. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 7b31abe70b29edb3005a6466f51b7a10f8413a01 Author: Ido Schimmel Date: Mon Jan 4 10:42:23 2016 +0100 mlxsw: spectrum: Initialize PVID only once We set PVID to 1 in mlxsw_sp_port_vlan_init(), so we can remove this statement. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 - 1 file changed, 1 deletion(-) commit 46f85a9215d7352d886626e29c3fc3095bc5bec7 Author: Julia Lawall Date: Sun Jan 3 14:09:37 2016 +0100 chelsio: constify cphy_ops structures The cphy_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb/cphy.h | 2 +- drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c | 2 +- drivers/net/ethernet/chelsio/cxgb/mv88x201x.c | 2 +- drivers/net/ethernet/chelsio/cxgb/my3126.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/ael1002.c | 12 ++++++------ drivers/net/ethernet/chelsio/cxgb3/aq100x.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/common.h | 2 +- drivers/net/ethernet/chelsio/cxgb3/vsc8211.c | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) commit 46678612e13027b0ea901664504f3bf347756125 Author: Arnd Bergmann Date: Fri Jan 1 14:55:24 2016 +0100 fsl/fman: allow modular build ARM allmodconfig fails because of the addition of the FMAN driver: drivers/built-in.o: In function `dtsec_restart_autoneg': binder.c:(.text+0x173328): undefined reference to `mdiobus_read' binder.c:(.text+0x173348): undefined reference to `mdiobus_write' drivers/built-in.o: In function `dtsec_config': binder.c:(.text+0x173d24): undefined reference to `of_phy_find_device' drivers/built-in.o: In function `init_phy': binder.c:(.text+0x1763b0): undefined reference to `of_phy_connect' drivers/built-in.o: In function `stop': binder.c:(.text+0x176014): undefined reference to `phy_stop' drivers/built-in.o: In function `start': binder.c:(.text+0x176078): undefined reference to `phy_start' The reason is that the driver uses PHYLIB, but that is a loadable module here, and fman itself is built-in. This patch makes it possible to configure fman as a module as well so we don't change the status of PHYLIB in an allmodconfig kernel, and it adds a 'select PHYLIB' statement to ensure that phylib is always built-in when fman is. The driver uses "builtin_platform_driver(fman_driver);", which means it cannot be unloaded, but it's still possible to have it as a loadable module that gets loaded once and never removed. Signed-off-by: Arnd Bergmann Fixes: 5adae51a64b8 ("fsl/fman: Add FMan MURAM support") Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0efeff2905d0ea14f2ee83e6cefbda35ee8cf6fc Author: Arnd Bergmann Date: Fri Jan 1 13:18:48 2016 +0100 net: make ip6tunnel_xmit definition conditional Moving the caller of iptunnel_xmit_stats causes a build error in randconfig builds that disable CONFIG_INET: In file included from ../net/xfrm/xfrm_input.c:17:0: ../include/net/ip6_tunnel.h: In function 'ip6tunnel_xmit': ../include/net/ip6_tunnel.h:93:2: error: implicit declaration of function 'iptunnel_xmit_stats' [-Werror=implicit-function-declaration] iptunnel_xmit_stats(dev, pkt_len); The reason is that the iptunnel_xmit_stats definition is hidden inside #ifdef CONFIG_INET but the caller is not. We can change one or the other to fix it, and this patch adds a second #ifdef around ip6tunnel_xmit() to avoid seeing the invalid call. Signed-off-by: Arnd Bergmann Fixes: 039f50629b7f ("ip_tunnel: Move stats update to iptunnel_xmit()") Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/net/ip6_tunnel.h | 2 ++ 1 file changed, 2 insertions(+) commit 15ab90f400781a801017ea2bd8597e6eb3f39f79 Merge: 197c949 c6dc65d Author: David S. Miller Date: Mon Jan 4 21:48:15 2016 -0500 Merge tag 'nfc-next-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next Samuel Ortiz says: ==================== NFC 4.5 pull request This is the first NFC pull request for 4.5 and it brings: - A new driver for the STMicroelectronics ST95HF NFC chipset. The ST95HF is an NFC digital transceiver with an embedded analog front-end and as such relies on the Linux NFC digital implementation. This is the 3rd user of the NFC digital stack. - ACPI support for the ST st-nci and st21nfca drivers. - A small improvement for the nfcsim driver, as we can now tune the Rx delay through sysfs. - A bunch of minor cleanups and small fixes from Christophe Ricard, for a few drivers and the NFC core code. ==================== Signed-off-by: David S. Miller commit f199b2605c25a0076cdd5c6a9e7eece77f95ce61 Author: Stephen Rothwell Date: Wed Dec 16 15:48:13 2015 +1100 i2c: ibm_iic: rename i2c_timings struct due to clash with generic version Fixes: e1dba01ca620 ("i2c: add generic routine to parse DT for timing information") Signed-off-by: Stephen Rothwell Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-ibm_iic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 929ca89c305a6ed7a4149115be99af6d73c36918 Author: Andrzej Hajda Date: Wed Dec 30 12:18:42 2015 +0100 cpufreq-dt: fix handling regulator_get_voltage() result The function can return negative values so it should be assigned to signed type. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci. Link: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0df35026c6a527e65b53bc895ad672d648a248f3 Author: Chen Yu Date: Wed Dec 16 12:20:29 2015 +0800 cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC It is reported that, with CONFIG_HZ_PERIODIC=y cpu stays at the lowest frequency even if the usage goes to 100%, neither ondemand nor conservative governor works, however performance and userspace work as expected. If set with CONFIG_NO_HZ_FULL=y, everything goes well. This problem is caused by improper calculation of the idle_time when the load is extremely high(near 100%). Firstly, cpufreq_governor uses get_cpu_idle_time to get the total idle time for specific cpu, then: 1.If the system is configured with CONFIG_NO_HZ_FULL, the idle time is returned by ktime_get, which is always increasing, it's OK. 2.However, if the system is configured with CONFIG_HZ_PERIODIC, get_cpu_idle_time might not guarantee to be always increasing, because it will leverage get_cpu_idle_time_jiffy to calculate the idle_time, consider the following scenario: At T1: idle_tick_1 = total_tick_1 - user_tick_1 sample period(80ms)... At T2: ( T2 = T1 + 80ms): idle_tick_2 = total_tick_2 - user_tick_2 Currently the algorithm is using (idle_tick_2 - idle_tick_1) to get the delta idle_time during the past sample period, however it CAN NOT guarantee that idle_tick_2 >= idle_tick_1, especially when cpu load is high. (Yes, total_tick_2 >= total_tick_1, and user_tick_2 >= user_tick_1, but how about idle_tick_2 and idle_tick_1? No guarantee.) So governor might get a negative value of idle_time during the past sample period, which might mislead the system that the idle time is very big(converted to unsigned int), and the busy time is nearly zero, which causes the governor to always choose the lowest cpufreq, then cause this problem. In theory there are two solutions: 1.The logic should not rely on the idle tick during every sample period, but be based on the busy tick directly, as this is how 'top' is implemented. 2.Or the logic must make sure that the idle_time is strictly increasing during each sample period, then there would be no negative idle_time anymore. This solution requires minimum modification to current code and this patch uses method 2. Link: https://bugzilla.kernel.org/show_bug.cgi?id=69821 Reported-by: Jan Fikar Signed-off-by: Chen Yu Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_governor.c | 3 +++ 1 file changed, 3 insertions(+) commit a8036dfba94d2ddf70cc9d7e9c627b179f957299 Author: Colin Ian King Date: Sun Dec 6 22:19:40 2015 +0000 cciss: print max outstanding commands as a hex value The max outstanding commands is being printed with a 0x prefix to suggest it is a hex value, when in fact the integer decimal %d format specifier is being used and this is a bit confusing. Use %x instead to match the proceeding 0x prefix. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/block/cciss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b360ada3f1534a37b264274cad55932d2a214ec3 Merge: 7ed88aa 2d7f61f Author: Michael Turquette Date: Mon Jan 4 16:16:45 2016 -0800 Merge tag 'tegra-for-4.5-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-next clk: tegra: Changes for v4.5-rc1 This set of changes adds support for the Tegra210 SoC and contains a couple fixes and cleanups. commit c5d641f92c9633f568740332989c067a0ba7d4dc Author: Li Bin Date: Sun Dec 6 10:02:58 2015 +0800 x86: ftrace: Fix the comments for ftrace_modify_code_direct() There is no need to worry about module and __init text disappearing case, because that ftrace has a module notifier that is called when a module is being unloaded and before the text goes away and this code grabs the ftrace_lock mutex and removes the module functions from the ftrace list, such that it will no longer do any modifications to that module's text, the update to make functions be traced or not is done under the ftrace_lock mutex as well. And by now, __init section codes should not been modified by ftrace, because it is black listed in recordmcount.c and ignored by ftrace. Link: http://lkml.kernel.org/r/1449367378-29430-6-git-send-email-huawei.libin@huawei.com Reviewed-by: Thomas Gleixner Suggested-by: Steven Rostedt Signed-off-by: Li Bin Signed-off-by: Steven Rostedt arch/x86/kernel/ftrace.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit d9be398afb2c3333716324352d062c50112e4e86 Author: Dmitry Torokhov Date: Wed Dec 16 14:24:58 2015 -0800 Input: xpad - use LED API when identifying wireless controllers When lighting up the segment identifying wireless controller, Instead of sending command directly to the controller, let's do it via LED API (usinf led_set_brightness) so that LED object state is in sync with controller state and we'll light up the correct segment on resume as well. Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4220f7db1e424f2a086ad41217b5770cc9f003a9 Author: Pavel Rojtberg Date: Wed Dec 9 13:30:34 2015 -0800 Input: xpad - workaround dead irq_out after suspend/ resume The irq_out urb is dead after suspend/ resume on my x360 wr pad. (also reproduced by Zachary Lund [0]) Work around this by implementing suspend, resume, and reset_resume callbacks and properly shutting down URBs on suspend and restarting them on resume. [0]: https://github.com/paroj/xpad/issues/6 Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 175 +++++++++++++++++++++++++++++++++--------- 1 file changed, 137 insertions(+), 38 deletions(-) commit 197c949e7798fbf28cfadc69d9ca0c2abbf93191 Author: Eric Dumazet Date: Wed Dec 30 08:51:12 2015 -0500 udp: properly support MSG_PEEK with truncated buffers Backport of this upstream commit into stable kernels : 89c22d8c3b27 ("net: Fix skb csum races when peeking") exposed a bug in udp stack vs MSG_PEEK support, when user provides a buffer smaller than skb payload. In this case, skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov); returns -EFAULT. This bug does not happen in upstream kernels since Al Viro did a great job to replace this into : skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg); This variant is safe vs short buffers. For the time being, instead reverting Herbert Xu patch and add back skb->ip_summed invalid changes, simply store the result of udp_lib_checksum_complete() so that we avoid computing the checksum a second time, and avoid the problematic skb_copy_and_csum_datagram_iovec() call. This patch can be applied on recent kernels as it avoids a double checksumming, then backported to stable kernels as a bug fix. Signed-off-by: Eric Dumazet Acked-by: Herbert Xu Signed-off-by: David S. Miller net/ipv4/udp.c | 6 ++++-- net/ipv6/udp.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 15c3277ff60286860b3dc98651fc241875e678fa Author: Tom St Denis Date: Tue Dec 15 13:03:43 2015 -0500 amdgpu/dce11: Add test for crtc < 0 to various DCEv11 functions To be consistent with other DCE11 functions test for crtc < 0. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9e4e1ae82f2479a32bee61132206367a710e961e Author: Tom St Denis Date: Tue Dec 15 13:01:49 2015 -0500 amdgpu/dce11: Remove division from dce_v11_0_vblank_wait() Mimics odd behaviour where (i++ % 100 == 0) is true in the first iteration of each loop... Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 691ca86a3a15a9c5054edb3c517a1aeb40e9fadc Author: Tom St Denis Date: Tue Dec 15 10:55:34 2015 -0500 amdgpu/vce3: Simplify vce_v3_0_hw_init and ensure both rings default to not ready. Simplified the ring test and added logic to ensure rings are marked not ready by default. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 74af12762de65cbbc11e11501dacd652fae75de9 Author: Tom St Denis Date: Mon Jan 4 10:46:41 2016 -0500 amdgpu/vce3: Remove magic constants from harvest register masks. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 81da2edef935adc6091deb20963c29d8463f1440 Author: Tom St Denis Date: Tue Dec 15 10:42:39 2015 -0500 amdgpu/vce3: Simplify vce_v3_0_process_interrupt() Fold two cases into one for a LOC reduction. Signed-off-by: Tom St Denis Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit af18b0f7fb635e5b18d541bf05058723412d749f Author: Tom St Denis Date: Tue Dec 15 10:40:16 2015 -0500 amdgpu/vce3: Simplify vce_v3_0_soft_reset() LOC reduction and simplification. Signed-off-by: Tom St Denis Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 92988e604b8a7c7d541396905433021eedfc28bb Author: Tom St Denis Date: Tue Dec 15 10:35:56 2015 -0500 amdgpu/vce3: Simplify idle and wait for idle code More LOC reductions in VCE3 code. This patch simplifies the is_idle and wait_for_idle logic. Signed-off-by: Tom St Denis Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) commit 1dab5f067e1371e5ed88aa6c47a3cd800f061cfa Author: Tom St Denis Date: Tue Dec 15 10:21:46 2015 -0500 amdgpu/vce3: Cleanup harvest config function. Basic LOC reduction. Signed-off-by: Tom St Denis Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit e1de741529412f31cb53899307bd63286918c49c Author: Chunming Zhou Date: Tue Dec 29 11:57:38 2015 +0800 drm/amdgpu: fix NULL in vm_grab_id while S3 back vm_manager_fini shouldn't be in suspend phase. Signed-off-by: Chunming Zhou Reviewed-by: Ken Wang drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 - drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 - 2 files changed, 2 deletions(-) commit 815bc580fe4ebffc35cc837a775f5400f5a607c4 Merge: 98f40b3 1016a4a Author: David S. Miller Date: Mon Jan 4 16:50:50 2016 -0500 Merge branch 'r8169-hw-programming-typo-fixes' Chunhao Lin says: ==================== Fix some typos in setting hardware parameter The typos are in setting RTL8168DP, RTL8168EP and RTL8168H hardware parameters. This series of patch fix these typos. ==================== Signed-off-by: David S. Miller commit 1016a4a1f4018c9a1db411b38f46bd00b96f4e83 Author: Chun-Hao Lin Date: Tue Dec 29 22:13:39 2015 +0800 r8169:Correct the way of setting RTL8168DP ephy The original way is wrong, it always writes ephy reg 0x03. Signed-off-by: Chunhao Lin Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit c832c35f5f27f38b65d7d4d55906a3365ba6f33a Author: Chun-Hao Lin Date: Tue Dec 29 22:13:38 2015 +0800 r8169:Fix typo in setting RTL8168H PHY PFM mode. The PHY PFM register is in PHY page 0x0a44 register 0x11, not 0x14. Signed-off-by: Chunhao Lin Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69f3dc379bef56f9fe3b815cd41a7ae34e2c9047 Author: Chun-Hao Lin Date: Tue Dec 29 22:13:37 2015 +0800 r8169:Fix typo in setting RTL8168EP and RTL8168H D3cold PFM mode The register for setting D3code PFM mode is MISC_1, not DLLPR. Signed-off-by: Chunhao Lin Reviewed-by: Francois Romieu Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 98f40b3e22aed519bc545ba3cc7d884ede9428c9 Author: Guillaume Nault Date: Tue Dec 29 13:06:59 2015 +0100 l2tp: rely on ppp layer for skb scrubbing Since 79c441ae505c ("ppp: implement x-netns support"), the PPP layer calls skb_scrub_packet() whenever the skb is received on the PPP device. Manually resetting packet meta-data in the L2TP layer is thus redundant. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit a1e9ca6967d68209c70e616a224efa89a6b86ca6 Author: Rafael J. Wysocki Date: Sat Jan 2 03:09:16 2016 +0100 PM / sleep: Add support for read-only sysfs attributes Some sysfs attributes in /sys/power/ should really be read-only, so add support for that, convert those attributes to read-only and drop the stub .show() routines from them. Original-by: Sergey Senozhatsky Signed-off-by: Rafael J. Wysocki kernel/power/main.c | 17 ++--------------- kernel/power/power.h | 9 +++++++++ 2 files changed, 11 insertions(+), 15 deletions(-) commit edc345d88462c78cd43d44e38efc9cadae4266f1 Author: Lukas Wunner Date: Fri Jan 1 22:52:15 2016 +0100 ACPI: Fix white space in a structure definition Add a missing space in the definition of struct acpi_device_bus_id. Signed-off-by: Lukas Wunner [ rjw: Subject and changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c9574f262a25c7ca0779df31098ba4e0c382e86 Author: Dan Carpenter Date: Mon Jan 4 23:44:24 2016 +0300 drm/amd/powerplay: precedence bug in init_non_clock_fields() The cast to uint8_t happens before the right shift so this always sets .m3arb to zero. The cast is actually a no-op so we can remove it. Fixes: 3bace3591493 ('drm/amd/powerplay: add hardware manager sub-component') Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b92c26d1808ccd2acac17b660dce750ba9b0a0db Author: Dan Carpenter Date: Mon Jan 4 23:43:47 2016 +0300 drm/amdgpu/cgs: cleanup some indenting This code is indented too far. Also we normally use spaces to align if statement conditions. Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2500a3c9e06d349defdca00f2efd7fab189ae72f Author: Dan Carpenter Date: Mon Jan 4 23:42:55 2016 +0300 drm/amd/powerplay: fix a reversed condition This test was reversed so it would end up leading to a NULL dereference. Fixes: 4630f0faae80 ('drm/amd/powerplay: add Carrizo smu support') Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a84bc8cfb2f2e2bb59f2ebdf531464c547f5026f Author: Colin Ian King Date: Fri Jan 1 23:53:45 2016 +0000 ACPI / SBS: fix inconsistent indenting inside if statement The indenting in acpi_battery_set_alarm is inconsistent and has been so since 2007; commit 94f6c0860139da9219255b8ff45ad42117dda859 ("ACPI: SBS: Add support for power_supply class (and sysfs)"). Minor fix for this, no code functionality change. Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/sbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e0f03e87fc6f27a8af9896f430f2945b3b1664c0 Author: Heiner Kallweit Date: Wed Dec 16 07:33:22 2015 +0100 PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching I have a device (Nuvoton 6779D Super-IO IR RC with nuvoton-cir driver) which works after initial boot but not any longer if I unload and re-load the driver module. Digging into the issue I found that unloading the driver calls pnp_disable_dev although the driver has flag PNP_DRIVER_RES_DO_NOT_CHANGE set. IMHO this is not right. Let's have a look at the call chain when probing a device: pnp_device_probe 1. attaches the device 2. if it's not active and PNP_DRIVER_RES_DO_NOT_CHANGE is not set it gets activated 3. probes driver I think pnp_device_remove should do it in reverse order and also respect PNP_DRIVER_RES_DO_NOT_CHANGE. Therefore: 1. call drivers remove callback 2. if device is active and PNP_DRIVER_RES_DO_NOT_CHANGE is not set disable it 3. detach device The change works for me and sounds logical to me. However I don't know the pnp driver in detail so I might be wrong. Signed-off-by: Heiner Kallweit Signed-off-by: Rafael J. Wysocki drivers/pnp/driver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 04c67a90ab947560564f875033f0e06ddfa0c7af Merge: 6e898bf 7cf7247 Author: David S. Miller Date: Mon Jan 4 16:11:12 2016 -0500 Merge branch 'sh_eth-remove-BE-desc-support' Sergei Shtylyov says: ==================== sh_eth: remove unused BE descriptor support Here's a set of 2 patches against DaveM's 'net-next.git' repo plus the recently merged to 'net.git' repo fix for the 16-bit descriptor endianness. We get rid of ~30 LoCs and ~300 bytes of code. ==================== Signed-off-by: David S. Miller commit 7cf724770b78c1d4f24e23747ac03233a88af440 Author: Sergei Shtylyov Date: Mon Dec 28 02:10:47 2015 +0300 sh_eth: get rid of {cpu|edmac}_to_{edmac|cpu}() Now that {cpu|edmac}_to_{edmac|cpu}() functions boiled down to the mere {cpu|le32}_to_{le32|cpu}() calls, there's no need for these functions anymore, so just get rid of them. Signed-off-by: Sergei Shtylyov Acked-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 72 ++++++++++++++--------------------- 1 file changed, 29 insertions(+), 43 deletions(-) commit 888cc8c20cf265fcd1302f6c5d6be07628ba66c7 Author: Sergei Shtylyov Date: Mon Dec 28 02:07:08 2015 +0300 sh_eth: remove EDMAC_BIG_ENDIAN Commit 71557a37adb5 ("[netdrvr] sh_eth: Add SH7619 support") added support for the big-endian EDMAC descriptors. However, it was never used and never worked right until the recent driver fixes. I think we now can just remove this support, it was only burdening the driver from the start. It should be easy to do without disturbing the SH platform code, at least for now... Signed-off-by: Sergei Shtylyov Acked-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 18 ++---------------- drivers/net/ethernet/renesas/sh_eth.h | 1 - include/linux/sh_eth.h | 2 +- 3 files changed, 3 insertions(+), 18 deletions(-) commit 38a234b9f08883bbcb475b798e0a3d6b44bd37d7 Author: Mathias Krause Date: Sat Jan 2 11:30:09 2016 +0100 ACPI / PNP: constify device IDs Instead of re-creating the array on the stack each time is_cmos_rtc_device() gets called, make the array 'static const'. Signed-off-by: Mathias Krause Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_pnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4922be51ef1a95ca6a38694cf0cde5dd0308a24e Merge: 7eeabbd a6d7636 Author: Dave Chinner Date: Tue Jan 5 08:08:47 2016 +1100 Merge branch 'xfs-dax-fixes-for-4.5' into for-next commit 7eeabbd4b6b69f3f6cb75730f17804b714bd853b Merge: 609adfc a841b64 Author: Dave Chinner Date: Tue Jan 5 08:08:35 2016 +1100 Merge branch 'xfs-misc-fixes-for-4.5' into for-next commit 0971686954f9cdde502c7bce4794c5ad53ea2e66 Author: Rafael J. Wysocki Date: Mon Jan 4 22:07:39 2016 +0100 ACPI / PCI: Simplify acpi_penalize_isa_irq() acpi_penalize_isa_irq() can be written in fewer lines of code, so do that. No functional change. Signed-off-by: Rafael J. Wysocki Works-for: Andy Shevchenko drivers/acpi/pci_link.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 6e898bfd6e9e5cd0f7f8275ad4dc41a3acf7c75a Author: Geliang Tang Date: Fri Jan 1 23:48:57 2016 +0800 tilepro: use to_delayed_work Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/net/ethernet/tile/tilepro.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e3e9b577b477edbf50e6c1f93beee89f450f2b68 Author: Rafael J. Wysocki Date: Mon Jan 4 22:05:20 2016 +0100 ACPICA: Drop Linux-specific waking vector functions Commit f06147f9fbf1 (ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS) added three functions that aren't present in upstream ACPICA, acpi_hw_set_firmware_waking_vectors(), acpi_set_firmware_waking_vectors() and acpi_set_firmware_waking_vector64(), to allow Linux to use the previously existing API for setting the platform firmware waking vector. However, that wasn't necessary, since the ACPI sleep support code in Linux can be modified to use the upstream ACPICA's API easily and the additional functions may be dropped which reduces the code size and puts the kernel's ACPICA code more in line with the upstream. Make the changes as per the above. While at it, make the relevant function desctiption comments reflect the upstream ACPICA's ones. Signed-off-by: Rafael J. Wysocki Acked-by: Lv Zheng drivers/acpi/acpica/hwxfsleep.c | 96 ++++++++--------------------------------- drivers/acpi/sleep.c | 4 +- drivers/acpi/sleep.h | 6 +++ include/acpi/acpixf.h | 10 +---- 4 files changed, 28 insertions(+), 88 deletions(-) commit 48b874cce652a3aed8d57ead68ab9937fb488c52 Merge: c07f30a 068c9ec Author: David S. Miller Date: Mon Jan 4 15:54:41 2016 -0500 Merge branch 'bnxt_en-combined-rx-tx-channels' Michael Chan says: ==================== bnxt_en: Support combined and rx/tx channels. The bnxt hardware uses a completion ring for rx and tx events. The driver has to process the completion ring entries sequentially for the events. The current code only supports an rx/tx ring pair for each completion ring. This patch series add support for using a dedicated completion ring for rx only or tx only as an option configuarble using ethtool -L. The benefits for using dedicated completion rings are: 1. A burst of rx packets can cause delay in processing tx events if the completion ring is shared. If tx queue is stopped by BQL, this can cause delay in re-starting the tx queue. 2. A completion ring is sized according to the rx and tx ring size rounded up to the nearest power of 2. When the completion ring is shared, it is sized by adding the rx and tx ring sizes and then rounded to the next power of 2, often with a lot of wasted space. 3. Using dedicated completion ring, we can adjust the tx and rx coalescing parameters independently for rx and tx. ==================== Signed-off-by: David S. Miller commit 068c9ec62906b626a30526638fd36189b80b6464 Author: Michael Chan Date: Sat Jan 2 23:45:04 2016 -0500 bnxt_en: Modify ethtool -l|-L to support combined or rx/tx rings. The driver can support either all combined or all rx/tx rings. The default is combined, but the user can now select rx/tx rings. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 57 ++++++++++++++++++----- 1 file changed, 45 insertions(+), 12 deletions(-) commit 01657bcd078b924e4599a83acd402ea6f85a1e45 Author: Michael Chan Date: Sat Jan 2 23:45:03 2016 -0500 bnxt_en: Modify init sequence to support shared or non shared rings. Modify ring memory allocation and MSIX setup to support shared or non shared rings and do the proper mapping. Default is still to use shared rings. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 42 +++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 6e6c5a57fbe1c77c2c55e266f87a83429adc3de7 Author: Michael Chan Date: Sat Jan 2 23:45:02 2016 -0500 bnxt_en: Modify bnxt_get_max_rings() to support shared or non shared rings. Add logic to calculate how many shared or non shared rings can be supported. Default is to use shared rings. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 96 +++++++++++++++++------ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 +- 3 files changed, 79 insertions(+), 25 deletions(-) commit b81a90d3028af92da61a61e2efd231a585180044 Author: Michael Chan Date: Sat Jan 2 23:45:01 2016 -0500 bnxt_en: Re-structure ring indexing and mapping. In order to support dedicated or shared completion rings, the ring indexing and mapping are re-structured as below: 1. bp->grp_info[] array index is 1:1 with bp->bnapi[] array index and completion ring index. 2. rx rings 0 to n will be mapped to completion rings 0 to n. 3. If tx and rx rings share completion rings, then tx rings 0 to m will be mapped to completion rings 0 to m. 4. If tx and rx rings use dedicated completion rings, then tx rings 0 to m will be mapped to completion rings n + 1 to n + m. 5. Each tx or rx ring will use the corresponding completion ring index for doorbell mapping and MSIX mapping. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 91 ++++++++++++++++++------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 + 2 files changed, 55 insertions(+), 38 deletions(-) commit 3b2b7d9db74adb95aa0bd029298a741333eb847e Author: Michael Chan Date: Sat Jan 2 23:45:00 2016 -0500 bnxt_en: Check for NULL rx or tx ring. Each bnxt_napi structure may no longer be having both an rx ring and a tx ring. Check for a valid ring before using it. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit b6ab4b01f53b5f9e17dbd4f91c95fa5049fa2101 Author: Michael Chan Date: Sat Jan 2 23:44:59 2016 -0500 bnxt_en: Separate bnxt_{rx|tx}_ring_info structs from bnxt_napi struct. Currently, an rx and a tx ring are always paired with a completion ring. We want to restructure it so that it is possible to have a dedicated completion ring for tx or rx only. The bnxt hardware uses a completion ring for rx and tx events. The driver has to process the completion ring entries sequentially for the rx and tx events. Using a dedicated completion ring for rx only or tx only has these benefits: 1. A burst of rx packets can cause delay in processing tx events if the completion ring is shared. If tx queue is stopped by BQL, this can cause delay in re-starting the tx queue. 2. A completion ring is sized according to the rx and tx ring size rounded up to the nearest power of 2. When the completion ring is shared, it is sized by adding the rx and tx ring sizes and then rounded to the next power of 2, often with a lot of wasted space. 3. Using dedicated completion ring, we can adjust the tx and rx coalescing parameters independently for rx and tx. The first step is to separate the rx and tx ring structures from the bnxt_napi struct. In this patch, an rx ring and a tx ring will point to the same bnxt_napi struct to share the same completion ring. No change in ring assignment and mapping yet. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 147 +++++++++++++----------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 9 +- 2 files changed, 70 insertions(+), 86 deletions(-) commit 9f5545905fbcc069f6fa8030b866e967ec6a5c73 Author: Michael Chan Date: Sat Jan 2 23:44:58 2016 -0500 bnxt_en: Refactor bnxt_dbg_dump_states(). By adding 3 separate functions to dump the different ring states. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 50 ++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 17 deletions(-) commit 609adfc2ed5ba16700f125da0b656248bd9d4316 Author: Brian Foster Date: Tue Jan 5 07:41:16 2016 +1100 xfs: debug mode log record crc error injection XFS now uses CRC verification over a limited section of the log to detect torn writes prior to a crash. This is difficult to test directly due to the timing and hardware requirements to cause a short write. Add a mechanism to inject CRC errors into log records to facilitate testing torn write detection during log recovery. This mechanism is dangerous and can result in filesystem corruption. Thus, it is only available in DEBUG mode for testing/development purposes. Set a non-zero value to the following sysfs entry to enable error injection: /sys/fs/xfs//log/log_badcrc_factor Once enabled, XFS intentionally writes an invalid CRC to a log record at some random point in the future based on the provided frequency. The filesystem immediately shuts down once the record has been written to the physical log to prevent metadata writeback (e.g., AIL insertion) once the log write completes. This helps reasonably simulate a torn write to the log as the affected record must be safe to discard. The next mount after the intentional shutdown requires log recovery and should detect and recover from the torn write. Note again that this _will_ result in data loss or worse. For testing and development purposes only! Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log.c | 45 ++++++++++++++++++++++++++++++++++++++------- fs/xfs/xfs_log_priv.h | 3 +++ fs/xfs/xfs_sysfs.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 7 deletions(-) commit 7088c4136fa1cba26531fde40bdcfcf3d2ccd533 Author: Brian Foster Date: Tue Jan 5 07:40:16 2016 +1100 xfs: detect and trim torn writes during log recovery Certain types of storage, such as persistent memory, do not provide sector atomicity for writes. This means that if a crash occurs while XFS is writing log records, only part of those records might make it to the storage. This is problematic because log recovery uses the cycle value packed at the top of each log block to locate the head/tail of the log. This can lead to CRC verification failures during log recovery and an unmountable fs for a filesystem that is otherwise consistent. Update log recovery to incorporate log record CRC verification as part of the head/tail discovery process. Once the head is located via the traditional algorithm, run a CRC-only pass over the records up to the head of the log. If CRC verification fails, assume that the records are torn as a matter of policy and trim the head block back to the start of the first bad record. Signed-off-by: Brian Foster Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner fs/xfs/xfs_log_recover.c | 309 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 289 insertions(+), 20 deletions(-) commit 65a792e84f25d1436698f999224b2cf5d7594546 Author: Zhigang Lu Date: Wed Sep 30 10:11:45 2015 +0800 tile/jump_label: add jump label support for TILE-Gx Add the arch-specific code to support jump label for TILE-Gx. This code shares NOP instruction with ftrace, so we move it to a common header file. Reviewed-by: Chris Metcalf Signed-off-by: Zhigang Lu Signed-off-by: Chris Metcalf arch/tile/Kconfig | 1 + arch/tile/include/asm/insn.h | 59 +++++++++++++++++++++++++++++++++++ arch/tile/include/asm/jump_label.h | 58 ++++++++++++++++++++++++++++++++++ arch/tile/kernel/Makefile | 1 + arch/tile/kernel/ftrace.c | 11 +------ arch/tile/kernel/jump_label.c | 64 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 184 insertions(+), 10 deletions(-) commit f419e6f63c5afea00d7c17ebf54f2d265f5c4d7e Author: Zhigang Lu Date: Wed Sep 30 09:53:47 2015 +0800 tile: define a macro ktext_writable_addr to get writable kernel text address It is used by kgdb, ftrace, kprobe and jump label, so we factor this out into a helper routine. Reviewed-by: Chris Metcalf Signed-off-by: Zhigang Lu Signed-off-by: Chris Metcalf arch/tile/include/asm/page.h | 10 ++++++++++ arch/tile/kernel/ftrace.c | 2 +- arch/tile/kernel/kgdb.c | 2 +- arch/tile/kernel/kprobes.c | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) commit d4f50ee2f5b45fc4d9e4142a52edf8b7935a9275 Author: Pierre Morel Date: Wed Dec 23 13:08:05 2015 +0100 vfio/iommu_type1: make use of info.flags The flags entry is there to tell the user that some optional information is available. Since we report the iova_pgsizes signal it to the user by setting the flags to VFIO_IOMMU_INFO_PGSIZES. Signed-off-by: Pierre Morel Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29663b0cc1d5b9b6e2f6caf41e86c599a0310def Author: Julia Lawall Date: Wed Dec 23 22:36:32 2015 +0100 mac802154: constify ieee802154_llsec_ops structure The ieee802154_llsec_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Alexander Aring Signed-off-by: Marcel Holtmann include/net/ieee802154_netdev.h | 2 +- net/mac802154/mac_cmd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2a6d7527b35cf987260800807e328d167aef22ac Author: Pierre-Loup A. Griffais Date: Wed Dec 9 13:40:37 2015 -0800 Input: xpad - update Xbox One Force Feedback Support There's apparently a serial number woven into both input and output packets; neglecting to specify a valid serial number causes the controller to ignore the rumble packets. The scale of the rumble was also apparently halved in the packets. The initialization packet had to be changed to allow force feedback to work. see https://github.com/paroj/xpad/issues/7 for details. Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 7fc595f4c02636eadaeeecfe7bbc45b57c173004 Author: Pavel Rojtberg Date: Wed Dec 9 11:57:01 2015 -0800 Input: xpad - correctly handle concurrent LED and FF requests Track the status of the irq_out URB to prevent submission iof new requests while current one is active. Failure to do so results in the "URB submitted while active" warning/stack trace. Store pending brightness and FF effect in the driver structure and replace it with the latest requests until the device is ready to process next request. Alternate serving LED vs FF requests to make sure one does not starve another. See [1] for discussion. Inspired by patch of Sarah Bessmer [2]. [1]: http://www.spinics.net/lists/linux-input/msg40708.html [2]: http://www.spinics.net/lists/linux-input/msg31450.html Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 322 +++++++++++++++++++++++++++++------------- 1 file changed, 223 insertions(+), 99 deletions(-) commit 90708ce22b4849194d195bad128e94a110426434 Author: Suravee Suthikulpanit Date: Tue Dec 15 15:55:53 2015 -0600 i2c: designware: Add support for AMD Seattle I2C Add device HID AMDI0510 to match the I2C controlers on AMD Seattle platform Signed-off-by: Suravee Suthikulpanit Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 1 + 1 file changed, 1 insertion(+) commit 995e68a5ee6126a23dbfc1097b523c08a6b8bb65 Author: Fabio Estevam Date: Mon Jan 4 09:15:37 2016 -0200 i2c: imx: Remove unneeded comments These multi-lines comments do not follow the standard kernel coding style. In fact, they are not useful comments, so get rid of them. Signed-off-by: Fabio Estevam Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 12 ------------ 1 file changed, 12 deletions(-) commit 86f7ac77d4035e22ec7e58dcdb96327e2ecc3a9b Author: Chin-Ran Lo Date: Tue Dec 29 04:26:33 2015 -0800 Bluetooth: btmrvl: fix hung task warning dump It's been observed that when bluetooth driver fails to activate the firmware, below hung task warning dump is displayed after 120 seconds. [ 36.461022] Bluetooth: vendor=0x2df, device=0x912e, class=255, fn=2 [ 56.512128] Bluetooth: FW failed to be active in time! [ 56.517264] Bluetooth: Downloading firmware failed! [ 240.252176] INFO: task kworker/3:2:129 blocked for more than 120 seconds. [ 240.258931] Not tainted 3.18.0 #254 [ 240.262972] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 240.270751] kworker/3:2 D ffffffc000205760 0 129 2 0x00000000 [ 240.277825] Workqueue: events request_firmware_work_func [ 240.283134] Call trace: [ 240.285581] [] __switch_to+0x80/0x8c [ 240.290693] [] __schedule+0x540/0x7b8 [ 240.295921] [] schedule+0x78/0x84 [ 240.300764] [] __mmc_claim_host+0xe8/0x1c8 [ 240.306395] [] sdio_claim_host+0x74/0x84 [ 240.311840] [] 0xffffffbffc163d08 [ 240.316685] [] 0xffffffbffc165104 [ 240.321524] [] mwifiex_dnld_fw+0x98/0x110 [mwifiex] [ 240.327918] [] mwifiex_remove_card+0x2c4/0x5fc [mwifiex] [ 240.334741] [] request_firmware_work_func+0x44/0x80 [ 240.341127] [] process_one_work+0x2ec/0x50c [ 240.346831] [] worker_thread+0x350/0x470 [ 240.352272] [] kthread+0xf0/0xfc [ 240.357019] 2 locks held by kworker/3:2/129: [ 240.361248] #0: ("events"){.+.+.+}, at: [] process_one_work+0x1f8/0x50c [ 240.369562] #1: ((&fw_work->work)){+.+.+.}, at: [] process_one_work+0x1f8/0x50c [ 240.378589] task PC stack pid father [ 240.384501] kworker/1:1 D ffffffc000205760 0 40 2 0x00000000 [ 240.391524] Workqueue: events mtk_atomic_work [ 240.395884] Call trace: [ 240.398317] [] __switch_to+0x80/0x8c [ 240.403448] [] lock_acquire+0x128/0x164 [ 240.408821] kworker/3:2 D ffffffc000205760 0 129 2 0x00000000 [ 240.415867] Workqueue: events request_firmware_work_func [ 240.421138] Call trace: [ 240.423589] [] __switch_to+0x80/0x8c [ 240.428688] [] __schedule+0x540/0x7b8 [ 240.433886] [] schedule+0x78/0x84 [ 240.438732] [] __mmc_claim_host+0xe8/0x1c8 [ 240.444361] [] sdio_claim_host+0x74/0x84 [ 240.449801] [] 0xffffffbffc163d08 [ 240.454649] [] 0xffffffbffc165104 [ 240.459486] [] mwifiex_dnld_fw+0x98/0x110 [mwifiex] [ 240.465882] [] mwifiex_remove_card+0x2c4/0x5fc [mwifiex] [ 240.472705] [] request_firmware_work_func+0x44/0x80 [ 240.479090] [] process_one_work+0x2ec/0x50c [ 240.484794] [] worker_thread+0x350/0x470 [ 240.490231] [] kthread+0xf0/0xfc This patch adds missing sdio_release_host() call so that wlan driver thread can claim sdio host. Fixes: 4863e4cc31d647e1 ("Bluetooth: btmrvl: release sdio bus after firmware is up") Signed-off-by: Chin-Ran Lo Signed-off-by: Amitkumar Karwar Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e2973769372a3de1c20249206db5ee93287a2230 Author: Mathias Krause Date: Sat Jan 2 23:23:56 2016 +0100 ASoC: rt5645: Constify ACPI device ids Constify the ACPI device ID array, no need to have it writable at runtime. Also drop the unused RT5645_INIT_REG_LEN define. Signed-off-by: Mathias Krause Cc: Bard Liao Cc: Oder Chiou Cc: John Lin Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit adbdeae5cece1d888a1542edfe9e1c6f8884fef8 Author: Heikki Krogerus Date: Mon Jan 4 14:23:22 2016 +0200 Bluetooth: hci_bcm: new ACPI IDs These are used at least by Acer with BCM43241. Signed-off-by: Heikki Krogerus Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 3 +++ 1 file changed, 3 insertions(+) commit d3d20725407955d0bb107939f23535d2e7dadbee Author: Heikki Krogerus Date: Mon Jan 4 14:23:21 2016 +0200 Bluetooth: hci_bcm: move all Broadcom ACPI IDs to BCM HCI driver The IDs should all be for Broadcom BCM43241 module, and hci_bcm is now the proper driver for them. This removes one of two different ways of handling PM with the module. Cc: Johannes Berg Signed-off-by: Heikki Krogerus Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 4 ++++ net/rfkill/rfkill-gpio.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 942e3d72a62dcfe5bf1569b179174718bbbcfbc3 Merge: 58baac0 506c0d6 Author: Trond Myklebust Date: Mon Jan 4 13:19:55 2016 -0500 Merge branch 'pnfs_generic' * pnfs_generic: NFSv4.1/pNFS: Cleanup constify struct pnfs_layout_range arguments NFSv4.1/pnfs: Cleanup copying of pnfs_layout_range structures NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid() NFSv4.1/pNFS: Fix a race in initiate_file_draining() NFSv4.1/pNFS: pnfs_error_mark_layout_for_return() must always return layout NFSv4.1/pNFS: pnfs_mark_matching_lsegs_return() should set the iomode NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids NFSv4.1/pNFS: Don't pass stateids by value to pnfs_send_layoutreturn() NFS: Relax requirements in nfs_flush_incompatible NFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid NFS: Allow multiple commit requests in flight per file NFS/pNFS: Fix up pNFS write reschedule layering violations and bugs NFSv4: List stateid information in the callback tracepoints NFSv4.1/pNFS: Don't return NFS4ERR_DELAY unnecessarily in CB_LAYOUTRECALL NFSv4.1/pNFS: Ensure we enforce RFC5661 Section 12.5.5.2.1 pNFS: If we have to delay the layout callback, mark the layout for return NFSv4.1/pNFS: Add a helper to mark the layout as returned pNFS: Ensure nfs4_layoutget_prepare returns the correct error commit 506c0d68269e90d354b3cbfc7523611b026c88d0 Author: Trond Myklebust Date: Mon Jan 4 13:04:47 2016 -0500 NFSv4.1/pNFS: Cleanup constify struct pnfs_layout_range arguments Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 6 +++--- fs/nfs/pnfs.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit e144e5391cf0881c9d64750dca8c592f6b5f0378 Author: Trond Myklebust Date: Mon Jan 4 12:52:53 2016 -0500 NFSv4.1/pnfs: Cleanup copying of pnfs_layout_range structures Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 4 ++-- fs/nfs/pnfs.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 71b39854a500be0b80cb3bc05546a7962f387b5b Author: Trond Myklebust Date: Mon Jan 4 12:41:15 2016 -0500 NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid() Make it more obvious what we're returning... Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4b0934baf9317e05c7568da1366a1d65f151d81f Author: Trond Myklebust Date: Mon Jan 4 11:28:11 2016 -0500 NFSv4.1/pNFS: Fix a race in initiate_file_draining() Peng Tao points out that the call to pnfs_mark_matching_lsegs_return() could race with pnfs_put_lseg(), in which case the layout segment is cleared, but no layoutreturn will be sent. Fix is to replace the call to pnfs_mark_matching_lsegs_invalid(). Reported-by: Peng Tao Signed-off-by: Trond Myklebust fs/nfs/callback_proc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 10335556c9e6ed2e1949fb595b7775f475299832 Author: Trond Myklebust Date: Mon Jan 4 11:23:52 2016 -0500 NFSv4.1/pNFS: pnfs_error_mark_layout_for_return() must always return layout Fix a bug whereby if all the layout segments could be immediately freed, the call to pnfs_error_mark_layout_for_return() would never result in a layoutreturn. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 26 ++++++++++++++++++++------ fs/nfs/pnfs.h | 2 +- 2 files changed, 21 insertions(+), 7 deletions(-) commit 5c97f5de2c7cd9e2a5f71bc7c53125d9a2833ca9 Author: Trond Myklebust Date: Mon Jan 4 11:53:04 2016 -0500 NFSv4.1/pNFS: pnfs_mark_matching_lsegs_return() should set the iomode If pnfs_mark_matching_lsegs_return() needs to mark a layout segment for return, then it must also set the return iomode. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 50f563ef5d418127a75ca9b7116232672bbd8aaf Author: Trond Myklebust Date: Mon Jan 4 12:22:46 2016 -0500 NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ed429d6b934d44e25f23f8102375a103c6fc3996 Author: Trond Myklebust Date: Mon Jan 4 12:30:55 2016 -0500 NFSv4.1/pNFS: Don't pass stateids by value to pnfs_send_layoutreturn() A stateid is a structure, pass it as a pointer. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 85a21eafbc2218ffba59b1dda2ce9d7148bf43d2 Author: Thierry Reding Date: Mon Jan 4 18:19:12 2016 +0100 drm/radeon: Drop unnecessary unsigned int < 0 check Unsigned integers can never be negative, so drop this check. Cc: Christian König Cc: Alex Deucher Signed-off-by: Thierry Reding Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c31ecf6c126dbc7f30234eaf6c4a079649a38de7 Author: Konrad Rzeszutek Wilk Date: Fri Dec 18 16:28:53 2015 -0500 xen/blkfront: Fix crash if backend doesn't follow the right states. We have split the setting up of all the resources in two steps: 1) talk_to_blkback - which figures out the num_ring_pages (from the default value of zero), sets up shadow and so 2) blkfront_connect - does the real part of filling out the internal structures. The problem is if we bypass the 1) step and go straight to 2) and call blkfront_setup_indirect where we use the macro BLK_RING_SIZE - which returns an negative value (because sz is zero - since num_ring_pages is zero - since it has never been set). We can fix this by making sure that we always have called talk_to_blkback before going to blkfront_connect. Or we could set in blkfront_probe info->nr_ring_pages = 1 to have a default value. But that looks odd - as we haven't actually negotiated any ring size. This patch changes XenbusStateConnected state to detect if we haven't done the initial handshake - and if so continue on as if were in XenbusStateInitWait state. We also roll the error recovery (freeing the structure) into talk_to_blkback error path - which is safe since that function is only called from blkback_changed. Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 93bb277f97a6d319361766bde228717faf4abdeb Author: Bob Liu Date: Thu Dec 10 09:16:48 2015 +0800 xen/blkback: Fix two memory leaks. This patch fixs two memleaks: backtrace: [] kmemleak_alloc+0x28/0x50 [] kmem_cache_alloc+0xbb/0x1d0 [] xen_blkbk_probe+0x58/0x230 [] xenbus_dev_probe+0x76/0x130 [] driver_probe_device+0x166/0x2c0 [] __device_attach_driver+0xac/0xb0 [] bus_for_each_drv+0x67/0x90 [] __device_attach+0xc7/0x120 [] device_initial_probe+0x13/0x20 [] bus_probe_device+0x9a/0xb0 [] device_add+0x3b1/0x5c0 [] device_register+0x1e/0x30 [] xenbus_probe_node+0x158/0x170 [] xenbus_dev_changed+0x1af/0x1c0 [] backend_changed+0x1b/0x20 [] xenwatch_thread+0xb6/0x160 unreferenced object 0xffff880007ba8ef8 (size 224): backtrace: [] kmemleak_alloc+0x28/0x50 [] __kmalloc+0xd3/0x1e0 [] frontend_changed+0x2c7/0x580 [] xenbus_otherend_changed+0xa2/0xb0 [] frontend_changed+0x10/0x20 [] xenwatch_thread+0xb6/0x160 [] kthread+0xd7/0xf0 [] ret_from_fork+0x3f/0x70 [] 0xffffffffffffffff unreferenced object 0xffff8800048dcd38 (size 224): The first leak is caused by not put() the be->blkif reference which we had gotten in xen_blkif_alloc(), while the second is us not freeing blkif->rings in the right place. Signed-off-by: Bob Liu Reported-and-Tested-by: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/xenbus.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit db6fbc106786f26d95889c50c18b1f28aa543a17 Author: Bob Liu Date: Wed Dec 9 07:44:02 2015 +0800 xen/blkback: make st_ statistics per ring Make st_* statistics per ring and the VBD sysfs would iterate over all the rings. Note: xenvbd_sysfs_delif() is called in xen_blkbk_remove() before all rings are torn down, so it's safe. Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk --- v2: Aligned the variables on the same column. drivers/block/xen-blkback/blkback.c | 34 +++++++++++++--------------- drivers/block/xen-blkback/common.h | 20 ++++++++--------- drivers/block/xen-blkback/xenbus.c | 45 ++++++++++++++++++++++++++++--------- 3 files changed, 61 insertions(+), 38 deletions(-) commit 6cc5683390472c450fd69975d1283db79202667f Author: Julien Grall Date: Thu Aug 13 13:13:35 2015 +0100 xen/blkfront: Handle non-indirect grant with 64KB pages The minimal size of request in the block framework is always PAGE_SIZE. It means that when 64KB guest is support, the request will at least be 64KB. Although, if the backend doesn't support indirect descriptor (such as QDISK in QEMU), a ring request is only able to accommodate 11 segments of 4KB (i.e 44KB). The current frontend is assuming that an I/O request will always fit in a ring request. This is not true any more when using 64KB page granularity and will therefore crash during boot. On ARM64, the ABI is completely neutral to the page granularity used by the domU. The guest has the choice between different page granularity supported by the processors (for instance on ARM64: 4KB, 16KB, 64KB). This can't be enforced by the hypervisor and therefore it's possible to run guests using different page granularity. So we can't mandate the block backend to support indirect descriptor when the frontend is using 64KB page granularity and have to fix it properly in the frontend. The solution exposed below is based on modifying directly the frontend guest rather than asking the block framework to support smaller size (i.e < PAGE_SIZE). This is because the change is the block framework are not trivial as everything seems to relying on a struct *page (see [1]). Although, it may be possible that someone succeed to do it in the future and we would therefore be able to use it. Given that a block request may not fit in a single ring request, a second request is introduced for the data that cannot fit in the first one. This means that the second ring request should never be used on Linux if the page size is smaller than 44KB. To achieve the support of the extra ring request, the block queue size is divided by two. Therefore, the ring will always contain enough space to accommodate 2 ring requests. While this will reduce the overall performance, it will make the implementation more contained. The way forward to get better performance is to implement in the backend either indirect descriptor or multiple grants ring. Note that the parameters blk_queue_max_* helpers haven't been updated. The block code will set the mimimum size supported and we may be able to support directly any change in the block framework that lower down the minimal size of a request. [1] http://lists.xen.org/archives/html/xen-devel/2015-08/msg02200.html Signed-off-by: Julien Grall Acked-by: Roger Pau Monné Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 228 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 212 insertions(+), 16 deletions(-) commit 2e073969d57f60fc0b863985779657624cbd4886 Author: Julien Grall Date: Thu Aug 13 19:23:10 2015 +0100 xen-blkfront: Introduce blkif_ring_get_request The code to get a request is always the same. Therefore we can factorize it in a single function. Signed-off-by: Julien Grall Acked-by: Roger Pau Monné Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit a6e7af1288eeb7fca8361356998d31a92a291531 Author: Jiri Kosina Date: Mon Oct 26 14:47:21 2015 +0900 xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule() xen_blkif_schedule() kthread calls try_to_freeze() at the beginning of every attempt to purge the LRU. This operation can't ever succeed though, as the kthread hasn't marked itself as freezable. Before (hopefully eventually) kthread freezing gets converted to fileystem freezing, we'd rather mark xen_blkif_schedule() freezable (as it can generate I/O during suspend). Signed-off-by: Jiri Kosina Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/blkback.c | 1 + 1 file changed, 1 insertion(+) commit 2d0382fac17cef20d507a0211b82e0942b2ab271 Author: Konrad Rzeszutek Wilk Date: Wed Nov 25 13:20:14 2015 -0500 xen/blkback: Free resources if connect_ring failed. With the multi-queue support we could fail at setting up some of the rings and fail the connection. That meant that all resources tied to rings[0..n-1] (where n is the ring that failed to be setup). Eventually the frontend will switch to the states and we will call xen_blkif_disconnect. However we do not want to be at the mercy of the frontend deciding when to change states. This allows us to do the cleanup right away and freeing resources. Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/xenbus.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bde21f73b9be146fda0c689f2724cda9d7737565 Author: Konrad Rzeszutek Wilk Date: Wed Nov 25 13:07:39 2015 -0500 xen/blocks: Return -EXX instead of -1 Lets return sensible values instead of -1. Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/xenbus.c | 2 +- drivers/block/xen-blkfront.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit d4bf0065b7251afb723a29b2fd58f7c38f8ce297 Author: Bob Liu Date: Sat Nov 14 11:12:19 2015 +0800 xen/blkback: make pool of persistent grants and free pages per-queue Make pool of persistent grants and free pages per-queue/ring instead of per-device to get better scalability. Test was done based on null_blk driver: dom0: v4.2-rc8 16vcpus 10GB "modprobe null_blk" domu: v4.2-rc8 16vcpus 10GB [test] rw=read direct=1 ioengine=libaio bs=4k time_based runtime=30 filename=/dev/xvdb numjobs=16 iodepth=64 iodepth_batch=64 iodepth_batch_complete=64 group_reporting Results: iops1: After patch "xen/blkfront: make persistent grants per-queue". iops2: After this patch. Queues: 1 4 8 16 Iops orig(k): 810 1064 780 700 Iops1(k): 810 1230(~20%) 1024(~20%) 850(~20%) Iops2(k): 810 1410(~35%) 1354(~75%) 1440(~100%) With 4 queues after this commit we can get ~75% increase in IOPS, and performance won't drop if increasing queue numbers. Please find the respective chart in this link: https://www.dropbox.com/s/agrcy2pbzbsvmwv/iops.png?dl=0 Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/blkback.c | 202 ++++++++++++++++-------------------- drivers/block/xen-blkback/common.h | 32 +++--- drivers/block/xen-blkback/xenbus.c | 21 ++-- 3 files changed, 118 insertions(+), 137 deletions(-) commit d62d86000316d7ef38e1c2e9602c3ce6d1cb57bd Author: Bob Liu Date: Sat Nov 14 11:12:17 2015 +0800 xen/blkback: get the number of hardware queues/rings from blkfront Backend advertises "multi-queue-max-queues" to front, also get the negotiated number from "multi-queue-num-queues" written by blkfront. Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/blkback.c | 13 +++++++++++++ drivers/block/xen-blkback/common.h | 1 + drivers/block/xen-blkback/xenbus.c | 34 ++++++++++++++++++++++++++++------ 3 files changed, 42 insertions(+), 6 deletions(-) commit 2fb1ef4f1226ea6d6d3481036cabe01a4415b68c Author: Konrad Rzeszutek Wilk Date: Fri Dec 11 12:08:48 2015 -0500 xen/blkback: pseudo support for multi hardware queues/rings Preparatory patch for multiple hardware queues (rings). The number of rings is unconditionally set to 1, larger number will be enabled in "xen/blkback: get the number of hardware queues/rings from blkfront". Signed-off-by: Arianna Avanzini Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk --- v2: Align variables in the structures. drivers/block/xen-blkback/common.h | 3 +- drivers/block/xen-blkback/xenbus.c | 277 +++++++++++++++++++++++-------------- 2 files changed, 175 insertions(+), 105 deletions(-) commit 597957000ab5b1b38085c20868f3f7b9c305bae5 Author: Bob Liu Date: Sat Nov 14 11:12:15 2015 +0800 xen/blkback: separate ring information out of struct xen_blkif Split per ring information to an new structure "xen_blkif_ring", so that one vbd device can be associated with one or more rings/hardware queues. Introduce 'pers_gnts_lock' to protect the pool of persistent grants since we may have multi backend threads. This patch is a preparation for supporting multi hardware queues/rings. Signed-off-by: Arianna Avanzini Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk --- v2: Align the variables in the structure. drivers/block/xen-blkback/blkback.c | 235 ++++++++++++++++++++---------------- drivers/block/xen-blkback/common.h | 56 +++++---- drivers/block/xen-blkback/xenbus.c | 96 +++++++-------- 3 files changed, 215 insertions(+), 172 deletions(-) commit 45fc82642e54018740a25444d1165901501b601b Author: Peng Fan Date: Wed Nov 25 18:26:01 2015 +0800 xen/blkfront: correct setting for xen_blkif_max_ring_order According to this piece code: " pr_info("Invalid max_ring_order (%d), will use default max: %d.\n", xen_blkif_max_ring_order, XENBUS_MAX_RING_GRANT_ORDER); " if xen_blkif_max_ring_order is bigger that XENBUS_MAX_RING_GRANT_ORDER, need to set xen_blkif_max_ring_order using XENBUS_MAX_RING_GRANT_ORDER, but not 0. Signed-off-by: Peng Fan Cc: Boris Ostrovsky Cc: David Vrabel Cc: "Roger Pau Monné" Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73716df7da4f60dd2d59a9302227d0394f1b8fcc Author: Bob Liu Date: Mon Nov 16 16:51:39 2015 -0500 xen/blkfront: make persistent grants pool per-queue Make persistent grants per-queue/ring instead of per-device, so that we can drop the 'dev_lock' and get better scalability. Test was done based on null_blk driver: dom0: v4.2-rc8 16vcpus 10GB "modprobe null_blk" domu: v4.2-rc8 16vcpus 10GB [test] rw=read direct=1 ioengine=libaio bs=4k time_based runtime=30 filename=/dev/xvdb numjobs=16 iodepth=64 iodepth_batch=64 iodepth_batch_complete=64 group_reporting Queues: 1 4 8 16 Iops orig(k): 810 1064 780 700 Iops patched(k): 810 1230(~20%) 1024(~20%) 850(~20%) Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 110 +++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 67 deletions(-) commit 75f070b3967b0c3bf0e1bc43411b06bab6c2c2cd Author: Bob Liu Date: Mon Nov 16 16:25:33 2015 -0500 xen/blkfront: Remove duplicate setting of ->xbdev. We do the same exact operations a bit earlier in the function. Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 1 - 1 file changed, 1 deletion(-) commit 6f03a7ff89485f0a7a559bf5c7631d2986c4ecfa Author: Konrad Rzeszutek Wilk Date: Mon Nov 16 15:14:41 2015 -0500 xen/blkfront: Cleanup of comments, fix unaligned variables, and syntax errors. Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 28d949bcc28bbc2d206f9c3f69b892575e81c040 Author: Bob Liu Date: Sat Nov 14 11:12:14 2015 +0800 xen/blkfront: negotiate number of queues/rings to be used with backend The max number of hardware queues for xen/blkfront is set by parameter 'max_queues'(default 4), while it is also capped by the max value that the xen/blkback exposes through XenStore key 'multi-queue-max-queues'. The negotiated number is the smaller one and would be written back to xenstore as "multi-queue-num-queues", blkback needs to read this negotiated number. Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 160 ++++++++++++++++++++++++++++++++----------- 1 file changed, 119 insertions(+), 41 deletions(-) commit 11659569f7202d0cb6553e81f9b8aa04dfeb94ce Author: Bob Liu Date: Sat Nov 14 11:12:13 2015 +0800 xen/blkfront: split per device io_lock After patch "xen/blkfront: separate per ring information out of device info", per-ring data is protected by a per-device lock ('io_lock'). This is not a good way and will effect the scalability, so introduce a per-ring lock ('ring_lock'). The old 'io_lock' is renamed to 'dev_lock' which protects the ->grants list and ->persistent_gnts_c which are shared by all rings. Note that in 'blkfront_probe' the 'blkfront_info' is setup via kzalloc so setting ->persistent_gnts_c to zero is not needed. Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 73 ++++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 26 deletions(-) commit 3df0e5059908b8fdba351c4b5dd77caadd95a949 Author: Bob Liu Date: Sat Nov 14 11:12:12 2015 +0800 xen/blkfront: pseudo support for multi hardware queues/rings Preparatory patch for multiple hardware queues (rings). The number of rings is unconditionally set to 1, larger number will be enabled in patch "xen/blkfront: negotiate number of queues/rings to be used with backend" so as to make review easier. Note that blkfront_gather_backend_features does not call blkfront_setup_indirect anymore (as that needs to be done per ring). That means that in blkif_recover/blkif_connect we have to do it in a loop (bounded by nr_rings). Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 343 +++++++++++++++++++++++++------------------ 1 file changed, 198 insertions(+), 145 deletions(-) commit 7a11a334aa6af4c65c6a0d81b60c97fc18673532 Author: Mykola Lysenko Date: Fri Dec 25 16:14:48 2015 +0800 drm/dp/mst: fix in RAD element access This is needed to receive correct port number from RAD, so MSTB could be found Acked-by: Dave Airlie Signed-off-by: Mykola Lysenko Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75af4c8c4c0f60d7ad135419805798f144e9baf9 Author: Mykola Lysenko Date: Fri Dec 25 16:14:47 2015 +0800 drm/dp/mst: fix in MSTB RAD initialization This fix is needed to support more then two branch displays, so RAD address consist at least of 2 elements Acked-by: Dave Airlie Signed-off-by: Mykola Lysenko Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1f16ee7fa13649f4e55aa48ad31c3eb0722a62d3 Author: Mykola Lysenko Date: Fri Dec 18 17:14:43 2015 -0500 drm/dp/mst: always send reply for UP request We should always send reply for UP request in order to make downstream device clean-up resources appropriately. Issue was that reply for UP request was sent only once. Acked-by: Dave Airlie Signed-off-by: Mykola Lysenko Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/drm_dp_mst_topology.c | 30 +++++++++++------------------- include/drm/drm_dp_mst_helper.h | 2 -- 2 files changed, 11 insertions(+), 21 deletions(-) commit bd9343208704fcc70a5b919f228a7d26ae472727 Author: Mykola Lysenko Date: Fri Dec 18 17:14:42 2015 -0500 drm/dp/mst: process broadcast messages correctly In case broadcast message received in UP request, RAD cannot be used to identify message originator. Message should be parsed, originator should be found by GUID from parsed message. Also reply with broadcast in case broadcast message received (for now it is always broadcast) Acked-by: Dave Airlie Signed-off-by: Mykola Lysenko Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/drm_dp_mst_topology.c | 95 +++++++++++++++++++++++++++++++---- 1 file changed, 84 insertions(+), 11 deletions(-) commit 449278d9244277cbcaf04e0d2bb8b54797c3d5cd Author: Julia Lawall Date: Mon Jan 4 17:36:01 2016 +0100 hwmon: (ibmaem) constify aem_rw_sensor_template and aem_ro_sensor_template structures The aem_rw_sensor_template and aem_ro_sensor_template structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Guenter Roeck drivers/hwmon/ibmaem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ad6d950393138830edae2efcc500aa69b467b89c Author: Pablo Neira Ayuso Date: Sun Jan 3 22:41:24 2016 +0100 netfilter: nf_ct_helper: define pr_fmt() Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_ftp.c | 17 ++++++++--------- net/netfilter/nf_conntrack_irc.c | 7 ++++--- net/netfilter/nf_conntrack_sane.c | 19 +++++++++---------- net/netfilter/nf_conntrack_sip.c | 5 +++-- net/netfilter/nf_conntrack_tftp.c | 7 ++++--- 5 files changed, 28 insertions(+), 27 deletions(-) commit 39e6dea28adc874f7021e5580c13cab0b58407ea Author: Pablo Neira Ayuso Date: Wed Nov 25 13:39:38 2015 +0100 netfilter: nf_tables: add forward expression to the netdev family You can use this to forward packets from ingress to the egress path of the specified interface. This provides a fast path to bounce packets from one interface to another specific destination interface. Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 12 ++++ net/netfilter/Kconfig | 6 ++ net/netfilter/Makefile | 1 + net/netfilter/nft_fwd_netdev.c | 98 ++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+) commit e679660dbb8347f275fe5d83a5dd59c1fb6c8e63 Author: Jens Wiklander Date: Mon Jan 4 15:46:47 2016 +0100 ARM: 8481/2: drivers: psci: replace psci firmware calls Switch to use a generic interface for issuing SMC/HVC based on ARM SMC Calling Convention. Removes now the now unused psci-call.S. Acked-by: Will Deacon Reviewed-by: Mark Rutland Tested-by: Mark Rutland Acked-by: Lorenzo Pieralisi Tested-by: Lorenzo Pieralisi Signed-off-by: Jens Wiklander Signed-off-by: Russell King arch/arm/Kconfig | 2 +- arch/arm/kernel/Makefile | 1 - arch/arm/kernel/psci-call.S | 31 ------------------------------- arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/psci-call.S | 28 ---------------------------- drivers/firmware/psci.c | 23 +++++++++++++++++++++-- 6 files changed, 23 insertions(+), 64 deletions(-) commit 14457459f9ca2ff8521686168ea179edc3a56a44 Author: Jens Wiklander Date: Mon Jan 4 15:44:32 2016 +0100 ARM: 8480/2: arm64: add implementation for arm-smccc Adds implementation for arm-smccc and enables CONFIG_HAVE_SMCCC. Acked-by: Will Deacon Signed-off-by: Jens Wiklander Signed-off-by: Russell King arch/arm64/Kconfig | 1 + arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/arm64ksyms.c | 5 +++++ arch/arm64/kernel/asm-offsets.c | 3 +++ arch/arm64/kernel/smccc-call.S | 43 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-) commit b329f95d70f3f955093e9a2b18ac1ed3587a8f73 Author: Jens Wiklander Date: Mon Jan 4 15:42:55 2016 +0100 ARM: 8479/2: add implementation for arm-smccc Adds implementation for arm-smccc and enables CONFIG_HAVE_SMCCC for architectures that may support arm-smccc. It's the responsibility of the caller to know if the SMC instruction is supported by the platform. Reviewed-by: Lars Persson Signed-off-by: Jens Wiklander Signed-off-by: Russell King arch/arm/Kconfig | 1 + arch/arm/kernel/Makefile | 2 ++ arch/arm/kernel/armksyms.c | 6 +++++ arch/arm/kernel/smccc-call.S | 62 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) commit 98dd64f34f47ce19b388d9015f767f48393a81eb Author: Jens Wiklander Date: Mon Jan 4 15:37:32 2016 +0100 ARM: 8478/2: arm/arm64: add arm-smccc Adds helpers to do SMC and HVC based on ARM SMC Calling Convention. CONFIG_HAVE_ARM_SMCCC is enabled for architectures that may support the SMC or HVC instruction. It's the responsibility of the caller to know if the SMC instruction is supported by the platform. This patch doesn't provide an implementation of the declared functions. Later patches will bring in implementations and set CONFIG_HAVE_ARM_SMCCC for ARM and ARM64 respectively. Reviewed-by: Lorenzo Pieralisi Signed-off-by: Jens Wiklander Signed-off-by: Russell King drivers/firmware/Kconfig | 3 ++ include/linux/arm-smccc.h | 104 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) commit 6a53b31349e7fbe6f742b7f09d7c2118d4fe81e3 Author: Arnd Bergmann Date: Fri Jan 1 14:07:41 2016 +0100 drm: powerplay: use div64_s64 instead of do_div The newly added code for Fiji creates a correct compiler warning about invalid use of the do_div macro: In file included from powerplay/hwmgr/ppatomctrl.c:31:0: drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppevvmath.h: In function 'fDivide': drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppevvmath.h:382:89: warning: comparison of distinct pointer types lacks a cast do_div(longlongX, longlongY); /*Q(32,32) divided by Q(16,16) = Q(16,16) Back to original format */ do_div() divides an unsigned 64-bit number by an unsigned 32-bit number. The code instead wants to divide two signed 64-bit numbers, which is done using the div64_s64 function. Reviewed-by: Thierry Reding Reviewed-by: Christian König Signed-off-by: Arnd Bergmann Fixes: 770911a3cfbb ("drm/amd/powerplay: add/update headers for Fiji SMU and DPM") Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppevvmath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 793b796ebfcb3157fe80056a719096a550f0c7d0 Author: Al Viro Date: Sat Jan 2 14:53:28 2016 -0500 [um] mconsole: don't open-code memdup_user_nul() Signed-off-by: Al Viro arch/um/drivers/mconsole_kern.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 1ceb36285c256347ffa062b7b1b593f801b6697b Author: Al Viro Date: Sat Jan 2 14:50:51 2016 -0500 [um] hostaudio: don't open-code memdup_user() Signed-off-by: Al Viro arch/um/drivers/hostaudio_kern.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 80f8dccf95147f9668eee021425ecf3ff6432c51 Author: Al Viro Date: Sat Jan 2 14:29:23 2016 -0500 HFS wants 8Kb per-superblock allocation; just use kmalloc() ... rather than play with __get_free_pages() (and figuring out the allocation order, etc.) Signed-off-by: Al Viro fs/hfs/mdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76e8d7cb71d415581402dbc5c5bbbbcc28ca0e47 Author: Al Viro Date: Sat Jan 2 14:22:04 2016 -0500 jfs: microoptimize get_zeroed_page / virt_to_page get_zeroed_page does alloc_page and returns page_address of the result; subsequent virt_to_page will recover the page, but since the caller needs both page and its page_address() anyway, why bother going through that wrapper at all? Signed-off-by: Al Viro fs/jfs/jfs_logmgr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 222e4adec52418dc1c80a30eff80b33ec954745e Author: Al Viro Date: Sat Jan 2 13:31:21 2016 -0500 ... and a couple in net/9p Signed-off-by: Al Viro net/9p/trans_virtio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93bbf5831dd1742a98c57b6415ee84ce35425067 Author: Al Viro Date: Sat Jan 2 13:30:54 2016 -0500 md: more open-coded offset_in_page() Signed-off-by: Al Viro drivers/md/bcache/util.c | 2 +- drivers/md/dm-io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 756d097b959aefe69a081496f84cfc14b1397a15 Author: Al Viro Date: Sat Jan 2 12:45:27 2016 -0500 dm-bufio: virt_to_phys() doesn't change remainder modulo PAGE_SIZE ... so virt_to_phys(p) & (PAGE_SIZE - 1) is a very odd way to spell offset_in_page(p). Signed-off-by: Al Viro drivers/md/dm-bufio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e728cf8ffa2891913dd48e179c132fb9fa07e0e Author: Al Viro Date: Tue Dec 29 15:38:25 2015 -0500 hpfs: missing endianness annotation Signed-off-by: Al Viro fs/hpfs/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4802c5919a70661d5022710d88e311c3880cd0fd Author: Al Viro Date: Tue Dec 29 14:55:33 2015 -0500 drivers/mtd/maps/pcmciamtd.c: __iomem annotations Signed-off-by: Al Viro drivers/mtd/maps/pcmciamtd.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 62fb4a155f745285d9b1640c3ef53bf90c12f17c Author: Al Viro Date: Sat Dec 26 22:33:24 2015 -0500 don't carry MAY_OPEN in op->acc_mode Signed-off-by: Al Viro fs/exec.c | 4 ++-- fs/namei.c | 21 +++++++++------------ fs/open.c | 5 +---- 3 files changed, 12 insertions(+), 18 deletions(-) commit b40ef8696fbbb1107fbe5f4afc21c357f16e5ffc Author: Al Viro Date: Mon Dec 14 18:44:44 2015 -0500 saner calling conventions for copy_mount_options() let it just return NULL, pointer to kernel copy or ERR_PTR(). Signed-off-by: Al Viro fs/compat.c | 21 ++++++++++----------- fs/internal.h | 2 +- fs/namespace.c | 35 +++++++++++++++++------------------ 3 files changed, 28 insertions(+), 30 deletions(-) commit cc4e719e83cd4149bc96b7e1d1a73fe61797df6e Author: Al Viro Date: Fri Dec 25 17:59:12 2015 -0500 fix the leak in integrity_read_file() Signed-off-by: Al Viro security/integrity/iint.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 7812bf173a0a65a1227fe207ba8683c0afecb5e8 Author: Al Viro Date: Fri Dec 25 12:33:26 2015 -0500 ppc: get rid of the remnants of __get_user64() When __get_user64() had been removed, its helper (__get_user64_nocheck) got missed. Signed-off-by: Al Viro arch/powerpc/include/asm/uaccess.h | 15 --------------- 1 file changed, 15 deletions(-) commit f5e6634ec04b6ed55be4e124277acde240323f2d Author: Al Viro Date: Fri Dec 25 10:04:47 2015 -0500 put the remnants of ..._user_ret() to rest they hadn't been used in last 15 years... Signed-off-by: Al Viro arch/blackfin/include/asm/uaccess.h | 6 ---- arch/m68k/include/asm/uaccess_no.h | 4 --- arch/mn10300/include/asm/uaccess.h | 15 --------- arch/sparc/include/asm/uaccess_32.h | 65 ------------------------------------- arch/sparc/include/asm/uaccess_64.h | 40 ----------------------- 5 files changed, 130 deletions(-) commit bb646cdb12e75d82258c2f2e7746d5952d3e321a Author: Al Viro Date: Thu Dec 24 00:16:30 2015 -0500 proc_pid_attr_write(): switch to memdup_user() Signed-off-by: Al Viro fs/proc/base.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 70f6cbb6f9c95535acd327d1ac1ce5fd078cff1e Author: Al Viro Date: Thu Dec 24 00:13:10 2015 -0500 kernel/*: switch to memdup_user_nul() Signed-off-by: Al Viro kernel/sysctl.c | 79 +++++++++++++------------------------ kernel/trace/trace_events.c | 28 ++++--------- kernel/trace/trace_events_trigger.c | 15 +++---- kernel/user_namespace.c | 21 ++++------ 4 files changed, 48 insertions(+), 95 deletions(-) commit e4e85bb091d13afef7b1a10b4bd209b442be8863 Author: Al Viro Date: Thu Dec 24 00:12:09 2015 -0500 cciss: switch to memdup_user_nul() all we do to buffer is strncmp()... Signed-off-by: Al Viro drivers/block/cciss.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit f0fc86966253ad244f53841e3d8db2cf9f862019 Author: Al Viro Date: Thu Dec 24 00:10:20 2015 -0500 switch wireless debugfs ->write() instances to memdup_user_nul() again, it only parses the contents of the copied buffer, so get_zeroed_page() might as well had been kmalloc(), which makes it open-coded memdup_user_nul() Signed-off-by: Al Viro drivers/net/wireless/libertas/debugfs.c | 181 +++++++++++--------------------- drivers/net/wireless/mwifiex/debugfs.c | 82 +++++---------- 2 files changed, 89 insertions(+), 174 deletions(-) commit 8365a71946bb1075f5e0e6357fe0f0b92404d966 Author: Al Viro Date: Thu Dec 24 00:08:06 2015 -0500 selinuxfs: switch to memdup_user_nul() Nothing in there gives a damn about the buffer alignment - it just parses its contents. So the use of get_zeroed_page() doesn't buy us anything - might as well had been kmalloc(), which makes that code equivalent to open-coded memdup_user_nul() Signed-off-by: Al Viro security/selinux/selinuxfs.c | 114 ++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 73 deletions(-) commit 16e5c1fc36040e592128a164499bc25eb138a80f Author: Al Viro Date: Thu Dec 24 00:06:05 2015 -0500 convert a bunch of open-coded instances of memdup_user_nul() A _lot_ of ->write() instances were open-coding it; some are converted to memdup_user_nul(), a lot more remain... Signed-off-by: Al Viro arch/xtensa/platforms/iss/simdisk.c | 12 +-- drivers/net/wireless/ath/wil6210/debugfs.c | 12 +-- drivers/s390/char/vmcp.c | 11 +-- drivers/sbus/char/openprom.c | 13 +--- fs/afs/proc.c | 25 ++----- fs/cachefiles/daemon.c | 12 +-- fs/dlm/user.c | 11 +-- kernel/trace/blktrace.c | 12 +-- lib/dynamic_debug.c | 11 +-- net/rxrpc/ar-key.c | 24 ++---- security/smack/smackfs.c | 114 ++++++++--------------------- security/tomoyo/securityfs_if.c | 11 +-- 12 files changed, 71 insertions(+), 197 deletions(-) commit 7e935c7ca1e6c398f11edac5beabfc4348e3b3a4 Merge: c62432b e9d408e Author: Al Viro Date: Mon Jan 4 10:25:34 2016 -0500 Merge branch 'memdup_user_nul' into work.misc commit e9d408e107db9a554b36c3a79f67b37dd3e16da0 Author: Al Viro Date: Thu Dec 24 00:06:05 2015 -0500 new helper: memdup_user_nul() Similar to memdup_user(), except that allocated buffer is one byte longer and '\0' is stored after the copied data. Signed-off-by: Al Viro include/linux/string.h | 1 + mm/util.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit bb00c898ad1ce40c4bb422a8207ae562e9aea7ae Author: Andrew Gabbasov Date: Thu Dec 24 10:25:33 2015 -0600 udf: Check output buffer length when converting name to CS0 If a name contains at least some characters with Unicode values exceeding single byte, the CS0 output should have 2 bytes per character. And if other input characters have single byte Unicode values, then the single in